From nobody Mon Oct 13 00:27:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJ8M6R21z6BWfX for ; Mon, 13 Oct 2025 00:27:31 +0000 (UTC) (envelope-from jlduran@gmail.com) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clJ8L5Fylz48Bm for ; Mon, 13 Oct 2025 00:27:25 +0000 (UTC) (envelope-from jlduran@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of jlduran@gmail.com designates 209.85.222.176 as permitted sender) smtp.mailfrom=jlduran@gmail.com Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-8625f8624d8so72736385a.3 for ; Sun, 12 Oct 2025 17:27:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760315244; x=1760920044; h=content-transfer-encoding:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DJn68D3GdWvHerBqn6EiecNr2QgcFiMY/q47+QQyl3k=; b=sGFcBic9rYfVT8oj1q/mani7CO83/JHrErmFNHEDbUTNpfGIanhqk4tI4Ce47hzBGW oy9woCpB/QbVS+wB7ZxNXdCYj+v2r+Nbx5t5Hkd7F9WmtwIXtl5SBZ1jjF88ciUzLmKN 4NT+t645XD+PgJ2WsKpRLd670KUJolGCa8UsypoBoqXhtGeU/8wbupXIuvaolvW4lmuq YP5+GDQ/S2gVXkWeH2721gEW7BbE8/X3n/xNq8CM3fX7hY+8JeiqhOIkgW3NfBelCdsO RZdxx6KT80x44Su0TKpXUW9cvnBDDm7RelWFSDxjAnNi45YDAkOrc/bpZD5JWfrKwImu I7Ig== X-Forwarded-Encrypted: i=1; AJvYcCWixVEPZQbe5Gvfoh3jHILflDagRdwvDZIXtpp8nGa7oXof6d3h+aISMedswlWzQcKni9AkA5eRfswkmTX00qZJrs3glw==@freebsd.org X-Gm-Message-State: AOJu0YxM00WElQu23tTxJhMMpTk6FDVvA06ATqnh2/5ANIMJtC34h5P3 km9CkyTcMlsrw8ksvyWPnbXBfdQnR4tEE2odFctlsMb04giIWnjsIkGAUhG0NXrS X-Gm-Gg: ASbGncsfGQouL8giw8sAF43DR+tbi9j5YQ8JCz3x03/Q0jYknAwP9wHAYYSqnRvm6zl qqu1tGZm6eSEljSvWp4XbkC7aHwTW8xtDsQXcoOrZkmC7vTlqvSf5v+1T8mejsdH+AhtJhsWC5Z kc+/70ZqvrW0dMRO1oqGQWXkX9W5N4Yj2j7j2c691Rh/xoZ7/9fILyIJIQ/ooRqk4HJSg9R+qst IWyNFIgIbE8XwO5ZtEesSHqi4Ipl8dBoq/gBV4rds7fYPLkBqF4uBlQtAEt+NvKwkjqce6Qjf4/ nUNa1ZAtZTeDGrsG5mZopp9FpzeHobltrxrVy7AVBvVznF9ePMrygJldZrn3KxE9hiRTXu5UVt9 PhbLFdHITFoSGVnB4ENCBEXo+lMalbPLLvbMudWPqHE6ku3NJD+Ny7IBpV94FmQFY+a8U//Y2FI fOMUT6Kopkv24eQx5F X-Google-Smtp-Source: AGHT+IFzxGT564Lq2fWM3SN3VMyArct9A7SOG6heJc2wkoBoztJIiqLNVGfluvC/PxlIiHSZTgUONg== X-Received: by 2002:a05:6214:1d23:b0:876:2e1a:e77b with SMTP id 6a1803df08f44-87b2efac6f2mr188289476d6.7.1760315244077; Sun, 12 Oct 2025 17:27:24 -0700 (PDT) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com. [209.85.222.171]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-87bc345bf4bsm61126876d6.1.2025.10.12.17.27.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Oct 2025 17:27:23 -0700 (PDT) Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-85a9d0d9170so65988785a.1 for ; Sun, 12 Oct 2025 17:27:23 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUk6/25vxRDrqYpmc4ljw8cwT3zNVEPeW+nLwnc3O4vXDfeSqOtf6hsg3zdFb4TvBvoKrvCEHfi0RYVWhELx/bmVXfEtA==@freebsd.org X-Received: by 2002:ac8:5a03:0:b0:4b3:4590:ab6d with SMTP id d75a77b69052e-4e6eacdec00mr186376071cf.7.1760315243375; Sun, 12 Oct 2025 17:27:23 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202510121718.59CHIkWb030841@gitrepo.freebsd.org> In-Reply-To: <202510121718.59CHIkWb030841@gitrepo.freebsd.org> Reply-To: jlduran@freebsd.org From: Jose Luis Duran Date: Sun, 12 Oct 2025 21:27:12 -0300 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWCuj6-Y29abJPUOqE9xhvr367M6LNalvScx1mYyeTQcUzTx0Ew1hz5-tjs Message-ID: Subject: Re: git: 7238317403b9 - main - blocklist: Rename blacklist to blocklist To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: - X-Spamd-Result: default: False [-1.50 / 15.00]; NEURAL_HAM_SHORT(-0.98)[-0.985]; NEURAL_HAM_LONG(-0.97)[-0.969]; NEURAL_SPAM_MEDIUM(0.35)[0.352]; FORGED_SENDER(0.30)[jlduran@freebsd.org,jlduran@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_ENVFROM(0.00)[gmail.com]; REPLYTO_DOM_EQ_TO_DOM(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.176:from,209.85.222.171:received]; FREEFALL_USER(0.00)[jlduran]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jlduran@freebsd.org,jlduran@gmail.com]; HAS_REPLYTO(0.00)[jlduran@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.176:from]; FROM_HAS_DN(0.00)[] X-Rspamd-Queue-Id: 4clJ8L5Fylz48Bm I just broke the metalog_reader.lua -c check with the rename of blocklist. As blacklist man pages are just a symlink from blocklist, it ends up installing blocklist man pages twice and reporting a duplicate error. $ /usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/usr/src/arm64.aarch64/worldstage/METALOG error: ./usr/share/man/man3/libblocklist.3.gz file repeated with same meta: line 11229,11242 error: ./usr/share/man/man5/blocklistd.conf.5.gz file repeated with same meta: line 37809,37819 error: ./usr/share/man/man8/blocklistctl.8.gz file repeated with same meta: line 37803,37814 error: ./usr/share/man/man8/blocklistd.8.gz file repeated with same meta: line 37808,37818 The trivial fix is yet again: duplication. In this case, the man pages for blacklist (not symlinked to blocklist). To be submitted shortly. Sorry! On Sun, Oct 12, 2025 at 2:18=E2=80=AFPM Jose Luis Duran wrote: > > The branch main has been updated by jlduran: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D7238317403b95a8e35cf0bc7cd= 66fbd78ecbe521 > > commit 7238317403b95a8e35cf0bc7cd66fbd78ecbe521 > Author: Jose Luis Duran > AuthorDate: 2025-10-12 17:14:27 +0000 > Commit: Jose Luis Duran > CommitDate: 2025-10-12 17:14:27 +0000 > > blocklist: Rename blacklist to blocklist > > Follow up upstream rename from blacklist to blocklist. > > - Old names and rc scripts are still valid, but emitting an ugly warn= ing > - Old firewall rules and anchor names should work, but emitting an ug= ly > warning > - Old MK_BLACKLIST* knobs are wired to the new ones > > Although care has been taken not to break current configurations, thi= s > is a large patch containing mostly duplicated code. If issues arise,= it > will be swiftly reverted. > > Reviewed by: ivy (pkgbase) > Approved by: emaste (mentor) > MFC after: 2 days > Relnotes: yes > --- > contrib/blocklist/bin/blacklistctl.c | 170 ++++++ > contrib/blocklist/bin/blacklistd.c | 592 +++++++++++++++= ++++++ > contrib/blocklist/bin/old_internal.c | 50 ++ > contrib/blocklist/bin/old_internal.h | 58 ++ > contrib/blocklist/include/blacklist.h | 65 +++ > contrib/blocklist/include/old_bl.h | 80 +++ > contrib/blocklist/lib/blacklist.c | 117 ++++ > contrib/blocklist/lib/old_bl.c | 554 +++++++++++++++= ++++ > crypto/openssh/auth-pam.c | 4 +- > crypto/openssh/auth.c | 8 +- > crypto/openssh/{blacklist.c =3D> blocklist.c} | 16 +- > .../{blacklist_client.h =3D> blocklist_client.h} | 30 +- > crypto/openssh/monitor.c | 8 +- > crypto/openssh/servconf.c | 18 +- > crypto/openssh/servconf.h | 2 +- > crypto/openssh/sshd-session.c | 10 +- > crypto/openssh/sshd_config | 2 +- > crypto/openssh/sshd_config.5 | 14 +- > lib/Makefile | 1 + > lib/libblacklist/Makefile | 24 +- > lib/libblocklist/Makefile | 30 ++ > lib/libblocklist/Makefile.depend | 16 + > lib/libsysdecode/Makefile.depend | 2 +- > libexec/Makefile | 6 +- > libexec/blacklistd-helper/Makefile | 7 - > libexec/blocklistd-helper/Makefile | 10 + > .../Makefile.depend | 0 > libexec/blocklistd-helper/blacklistd-helper | 293 ++++++++++ > libexec/fingerd/Makefile | 8 +- > libexec/fingerd/Makefile.depend.options | 2 +- > libexec/fingerd/fingerd.c | 16 +- > libexec/rc/rc.conf | 6 +- > libexec/rc/rc.d/Makefile | 5 +- > libexec/rc/rc.d/blacklistd | 10 +- > libexec/rc/rc.d/blocklistd | 46 ++ > release/packages/ucl/blocklist-all.ucl | 8 +- > secure/libexec/sshd-auth/Makefile | 10 +- > secure/libexec/sshd-session/Makefile | 10 +- > secure/usr.sbin/sshd/Makefile.depend.options | 2 +- > share/man/man5/periodic.conf.5 | 2 +- > share/man/man5/src.conf.5 | 43 +- > share/mk/bsd.libnames.mk | 1 + > share/mk/local.dirdeps-options.mk | 1 + > share/mk/src.libnames.mk | 10 +- > share/mk/src.opts.mk | 10 + > targets/pseudo/userland/Makefile.depend | 6 + > targets/pseudo/userland/lib/Makefile.depend | 4 + > targets/pseudo/userland/libexec/Makefile.depend | 4 +- > tools/build/mk/OptionalObsoleteFiles.inc | 21 +- > tools/build/options/WITHOUT_BLACKLIST | 6 +- > tools/build/options/WITHOUT_BLACKLIST_SUPPORT | 8 +- > tools/build/options/WITHOUT_BLOCKLIST | 4 + > tools/build/options/WITHOUT_BLOCKLIST_SUPPORT | 6 + > usr.sbin/Makefile | 2 + > usr.sbin/blacklistctl/Makefile | 10 +- > usr.sbin/blacklistd/Makefile | 13 +- > usr.sbin/blacklistd/blacklistd.conf | 10 +- > usr.sbin/blocklistctl/Makefile | 22 + > usr.sbin/blocklistctl/Makefile.depend | 18 + > usr.sbin/blocklistd/Makefile | 23 + > usr.sbin/blocklistd/Makefile.depend | 18 + > usr.sbin/blocklistd/blocklistd.conf | 16 + > usr.sbin/periodic/etc/security/520.pfdenied | 2 +- > 63 files changed, 2426 insertions(+), 144 deletions(-) > > diff --git a/contrib/blocklist/bin/blacklistctl.c b/contrib/blocklist/bin= /blacklistctl.c > new file mode 100644 > index 000000000000..6298a08b10b4 > --- /dev/null > +++ b/contrib/blocklist/bin/blacklistctl.c > @@ -0,0 +1,170 @@ > +/* $NetBSD: blocklistctl.c,v 1.4 2025/02/11 17:48:30 christos Exp $ = */ > + > +/*- > + * Copyright (c) 2015 The NetBSD Foundation, Inc. > + * All rights reserved. > + * > + * This code is derived from software contributed to The NetBSD Foundati= on > + * by Christos Zoulas. > + * > + * 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 th= e > + * documentation and/or other materials provided with the distributio= n. > + * > + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBU= TORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT L= IMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTI= CULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBU= TORS > + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, O= R > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSIN= ESS > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER = IN > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS= E) > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED O= F THE > + * POSSIBILITY OF SUCH DAMAGE. > + */ > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > + > +#ifdef HAVE_SYS_CDEFS_H > +#include > +#endif > +__RCSID("$NetBSD: blocklistctl.c,v 1.4 2025/02/11 17:48:30 christos Exp = $"); > + > +#include > +#include > +#ifdef HAVE_LIBUTIL_H > +#include > +#endif > +#ifdef HAVE_UTIL_H > +#include > +#endif > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "conf.h" > +#include "state.h" > +#include "old_internal.h" > +#include "support.h" > + > +static __dead void > +usage(int c) > +{ > + if (c =3D=3D 0) > + warnx("Missing/unknown command"); > + else if (c !=3D '?') > + warnx("Unknown option `%c'", (char)c); > + fprintf(stderr, > + "Usage: %s dump [-abdnrw] [-D dbname]\n", getprogname()); > + exit(EXIT_FAILURE); > +} > + > +static const char * > +star(char *buf, size_t len, int val) > +{ > + if (val =3D=3D -1) > + return "*"; > + snprintf(buf, len, "%d", val); > + return buf; > +} > + > +int > +main(int argc, char *argv[]) > +{ > + const char *dbname =3D _PATH_BLSTATE; > + DB *db; > + struct conf c; > + struct dbinfo dbi; > + unsigned int i; > + struct timespec ts; > + int all, blocked, remain, wide, noheader; > + int o; > + > + noheader =3D wide =3D blocked =3D all =3D remain =3D 0; > + lfun =3D dlog; > + > + if (argc =3D=3D 1 || strcmp(argv[1], "dump") !=3D 0) > + usage(0); > + > + argc--; > + argv++; > + > + while ((o =3D getopt(argc, argv, "abD:dnrw")) !=3D -1) > + switch (o) { > + case 'a': > + all =3D 1; > + blocked =3D 0; > + break; > + case 'b': > + blocked =3D 1; > + break; > + case 'D': > + dbname =3D optarg; > + break; > + case 'd': > + debug++; > + break; > + case 'n': > + noheader =3D 1; > + break; > + case 'r': > + remain =3D 1; > + break; > + case 'w': > + wide =3D 1; > + break; > + default: > + usage(o); > + } > + > + db =3D state_open(dbname, O_RDONLY, 0); > + if (db =3D=3D NULL) > + err(EXIT_FAILURE, "Can't open `%s'", dbname); > + > + clock_gettime(CLOCK_REALTIME, &ts); > + wide =3D wide ? 8 * 4 + 7 : 4 * 3 + 3; > + if (!noheader) > + printf("%*.*s/ma:port\tid\tnfail\t%s\n", wide, wide, > + "address", remain ? "remaining time" : "last access")= ; > + for (i =3D 1; state_iterate(db, &c, &dbi, i) !=3D 0; i =3D 0) { > + char buf[BUFSIZ]; > + char mbuf[64], pbuf[64]; > + if (!all) { > + if (blocked) { > + if (c.c_nfail =3D=3D -1 || dbi.count < c.= c_nfail) > + continue; > + } else { > + if (dbi.count >=3D c.c_nfail) > + continue; > + } > + } > + sockaddr_snprintf(buf, sizeof(buf), "%a", (void *)&c.c_ss= ); > + printf("%*.*s/%s:%s\t", wide, wide, buf, > + star(mbuf, sizeof(mbuf), c.c_lmask), > + star(pbuf, sizeof(pbuf), c.c_port)); > + if (c.c_duration =3D=3D -1) { > + strlcpy(buf, "never", sizeof(buf)); > + } else { > + if (remain) > + fmtydhms(buf, sizeof(buf), > + c.c_duration - (ts.tv_sec - dbi.last)= ); > + else > + fmttime(buf, sizeof(buf), dbi.last); > + } > + printf("%s\t%d/%s\t%-s\n", dbi.id, dbi.count, > + star(mbuf, sizeof(mbuf), c.c_nfail), buf); > + } > + state_close(db); > + return EXIT_SUCCESS; > +} > diff --git a/contrib/blocklist/bin/blacklistd.c b/contrib/blocklist/bin/b= lacklistd.c > new file mode 100644 > index 000000000000..ded3075ed707 > --- /dev/null > +++ b/contrib/blocklist/bin/blacklistd.c > @@ -0,0 +1,592 @@ > +/* $NetBSD: blocklistd.c,v 1.10 2025/03/26 17:09:35 christos Exp $ *= / > + > +/*- > + * Copyright (c) 2015 The NetBSD Foundation, Inc. > + * All rights reserved. > + * > + * This code is derived from software contributed to The NetBSD Foundati= on > + * by Christos Zoulas. > + * > + * 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 th= e > + * documentation and/or other materials provided with the distributio= n. > + * > + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBU= TORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT L= IMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTI= CULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBU= TORS > + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, O= R > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSIN= ESS > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER = IN > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS= E) > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED O= F THE > + * POSSIBILITY OF SUCH DAMAGE. > + */ > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > + > +#ifdef HAVE_SYS_CDEFS_H > +#include > +#endif > +__RCSID("$NetBSD: blocklistd.c,v 1.10 2025/03/26 17:09:35 christos Exp $= "); > + > +#include > +#include > +#include > + > +#ifdef HAVE_LIBUTIL_H > +#include > +#endif > +#ifdef HAVE_UTIL_H > +#include > +#endif > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "old_bl.h" > +#include "old_internal.h" > +#include "conf.h" > +#include "run.h" > +#include "state.h" > +#include "support.h" > + > +static const char *configfile =3D _PATH_BLCONF; > +static DB *state; > +static const char *dbfile =3D _PATH_BLSTATE; > +static sig_atomic_t readconf; > +static sig_atomic_t done; > +static int vflag; > + > +static void > +sigusr1(int n __unused) > +{ > + debug++; > +} > + > +static void > +sigusr2(int n __unused) > +{ > + debug--; > +} > + > +static void > +sighup(int n __unused) > +{ > + readconf++; > +} > + > +static void > +sigdone(int n __unused) > +{ > + done++; > +} > + > +static __dead void > +usage(int c) > +{ > + if (c !=3D '?') > + warnx("Unknown option `%c'", (char)c); > + fprintf(stderr, "Usage: %s [-vdfr] [-c ] [-R ] = " > + "[-P ] [-C ] [-D ] " > + "[-s ] [-t ]\n", getprogname()); > + exit(EXIT_FAILURE); > +} > + > +static int > +getremoteaddress(bl_info_t *bi, struct sockaddr_storage *rss, socklen_t = *rsl) > +{ > + *rsl =3D sizeof(*rss); > + memset(rss, 0, *rsl); > + > + if (getpeername(bi->bi_fd, (void *)rss, rsl) !=3D -1) > + return 0; > + > + if (errno !=3D ENOTCONN) { > + (*lfun)(LOG_ERR, "getpeername failed (%m)"); > + return -1; > + } > + > + if (bi->bi_slen =3D=3D 0) { > + (*lfun)(LOG_ERR, "unconnected socket with no peer in mess= age"); > + return -1; > + } > + > + switch (bi->bi_ss.ss_family) { > + case AF_INET: > + *rsl =3D sizeof(struct sockaddr_in); > + break; > + case AF_INET6: > + *rsl =3D sizeof(struct sockaddr_in6); > + break; > + default: > + (*lfun)(LOG_ERR, "bad client passed socket family %u", > + (unsigned)bi->bi_ss.ss_family); > + return -1; > + } > + > + if (*rsl !=3D bi->bi_slen) { > + (*lfun)(LOG_ERR, "bad client passed socket length %u !=3D= %u", > + (unsigned)*rsl, (unsigned)bi->bi_slen); > + return -1; > + } > + > + memcpy(rss, &bi->bi_ss, *rsl); > + > +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN > + if (*rsl !=3D rss->ss_len) { > + (*lfun)(LOG_ERR, > + "bad client passed socket internal length %u !=3D %u"= , > + (unsigned)*rsl, (unsigned)rss->ss_len); > + return -1; > + } > +#endif > + return 0; > +} > + > +static void > +process(bl_t bl) > +{ > + struct sockaddr_storage rss; > + socklen_t rsl; > + char rbuf[BUFSIZ]; > + bl_info_t *bi; > + struct conf c; > + struct dbinfo dbi; > + struct timespec ts; > + > + memset(&dbi, 0, sizeof(dbi)); > + memset(&c, 0, sizeof(c)); > + if (clock_gettime(CLOCK_REALTIME, &ts) =3D=3D -1) { > + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); > + return; > + } > + > + if ((bi =3D bl_recv(bl)) =3D=3D NULL) { > + (*lfun)(LOG_ERR, "no message (%m)"); > + return; > + } > + > + if (getremoteaddress(bi, &rss, &rsl) =3D=3D -1) > + goto out; > + > + if (debug || bi->bi_msg[0]) { > + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&r= ss); > + (*lfun)(bi->bi_msg[0] ? LOG_INFO : LOG_DEBUG, > + "processing type=3D%d fd=3D%d remote=3D%s msg=3D%s ui= d=3D%lu gid=3D%lu", > + bi->bi_type, bi->bi_fd, rbuf, > + bi->bi_msg, (unsigned long)bi->bi_uid, > + (unsigned long)bi->bi_gid); > + } > + > + if (conf_find(bi->bi_fd, bi->bi_uid, &rss, &c) =3D=3D NULL) { > + (*lfun)(LOG_DEBUG, "no rule matched"); > + goto out; > + } > + > + > + if (state_get(state, &c, &dbi) =3D=3D -1) > + goto out; > + > + if (debug) { > + char b1[128], b2[128]; > + (*lfun)(LOG_DEBUG, "%s: initial db state for %s: count=3D= %d/%d " > + "last=3D%s now=3D%s", __func__, rbuf, dbi.count, c.c_= nfail, > + fmttime(b1, sizeof(b1), dbi.last), > + fmttime(b2, sizeof(b2), ts.tv_sec)); > + } > + > + switch (bi->bi_type) { > + case BL_ABUSE: > + /* > + * If the application has signaled abusive behavior, > + * set the number of fails to be one less than the > + * configured limit. Fallthrough to the normal BL_ADD > + * processing, which will increment the failure count > + * to the threshhold, and block the abusive address. > + */ > + if (c.c_nfail !=3D -1) > + dbi.count =3D c.c_nfail - 1; > + /*FALLTHROUGH*/ > + case BL_ADD: > + dbi.count++; > + dbi.last =3D ts.tv_sec; > + if (c.c_nfail !=3D -1 && dbi.count >=3D c.c_nfail) { > + /* > + * No point in re-adding the rule. > + * It might exist already due to latency in proce= ssing > + * and removing the rule is the wrong thing to do= as > + * it allows a window to attack again. > + */ > + if (dbi.id[0] =3D=3D '\0') { > + int res =3D run_change("add", &c, > + dbi.id, sizeof(dbi.id)); > + if (res =3D=3D -1) > + goto out; > + } > + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", > + (void *)&rss); > + (*lfun)(LOG_INFO, > + "blocked %s/%d:%d for %d seconds", > + rbuf, c.c_lmask, c.c_port, c.c_duration); > + } > + break; > + case BL_DELETE: > + if (dbi.last =3D=3D 0) > + goto out; > + dbi.count =3D 0; > + dbi.last =3D 0; > + break; > + case BL_BADUSER: > + /* ignore for now */ > + break; > + default: > + (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); > + } > + state_put(state, &c, &dbi); > + > +out: > + close(bi->bi_fd); > + > + if (debug) { > + char b1[128], b2[128]; > + (*lfun)(LOG_DEBUG, "%s: final db state for %s: count=3D%d= /%d " > + "last=3D%s now=3D%s", __func__, rbuf, dbi.count, c.c_= nfail, > + fmttime(b1, sizeof(b1), dbi.last), > + fmttime(b2, sizeof(b2), ts.tv_sec)); > + } > +} > + > +static void > +update_interfaces(void) > +{ > + struct ifaddrs *oifas, *nifas; > + > + if (getifaddrs(&nifas) =3D=3D -1) > + return; > + > + oifas =3D ifas; > + ifas =3D nifas; > + > + if (oifas) > + freeifaddrs(oifas); > +} > + > +static void > +update(void) > +{ > + struct timespec ts; > + struct conf c; > + struct dbinfo dbi; > + unsigned int f, n; > + char buf[128]; > + void *ss =3D &c.c_ss; > + > + if (clock_gettime(CLOCK_REALTIME, &ts) =3D=3D -1) { > + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); > + return; > + } > + > +again: > + for (n =3D 0, f =3D 1; state_iterate(state, &c, &dbi, f) =3D=3D 1= ; > + f =3D 0, n++) > + { > + time_t when =3D c.c_duration + dbi.last; > + if (debug > 1) { > + char b1[64], b2[64]; > + sockaddr_snprintf(buf, sizeof(buf), "%a:%p", ss); > + (*lfun)(LOG_DEBUG, "%s:[%u] %s count=3D%d duratio= n=3D%d " > + "last=3D%s " "now=3D%s", __func__, n, buf, db= i.count, > + c.c_duration, fmttime(b1, sizeof(b1), dbi.las= t), > + fmttime(b2, sizeof(b2), ts.tv_sec)); > + } > + if (c.c_duration =3D=3D -1 || when >=3D ts.tv_sec) > + continue; > + if (dbi.id[0]) { > + run_change("rem", &c, dbi.id, 0); > + sockaddr_snprintf(buf, sizeof(buf), "%a", ss); > + (*lfun)(LOG_INFO, "released %s/%d:%d after %d sec= onds", > + buf, c.c_lmask, c.c_port, c.c_duration); > + } > + state_del(state, &c); > + goto again; > + } > +} > + > +static void > +addfd(struct pollfd **pfdp, bl_t **blp, size_t *nfd, size_t *maxfd, > + const char *path) > +{ > + bl_t bl =3D bl_create(true, path, vflag ? vdlog : vsyslog_r); > + if (bl =3D=3D NULL || !bl_isconnected(bl)) > + exit(EXIT_FAILURE); > + if (*nfd >=3D *maxfd) { > + *maxfd +=3D 10; > + *blp =3D realloc(*blp, sizeof(**blp) * *maxfd); > + if (*blp =3D=3D NULL) > + err(EXIT_FAILURE, "malloc"); > + *pfdp =3D realloc(*pfdp, sizeof(**pfdp) * *maxfd); > + if (*pfdp =3D=3D NULL) > + err(EXIT_FAILURE, "malloc"); > + } > + > + (*pfdp)[*nfd].fd =3D bl_getfd(bl); > + (*pfdp)[*nfd].events =3D POLLIN; > + (*blp)[*nfd] =3D bl; > + *nfd +=3D 1; > +} > + > +static void > +uniqueadd(struct conf ***listp, size_t *nlist, size_t *mlist, struct con= f *c) > +{ > + struct conf **list =3D *listp; > + > + if (c->c_name[0] =3D=3D '\0') > + return; > + for (size_t i =3D 0; i < *nlist; i++) { > + if (strcmp(list[i]->c_name, c->c_name) =3D=3D 0) > + return; > + } > + if (*nlist =3D=3D *mlist) { > + *mlist +=3D 10; > + void *p =3D realloc(*listp, *mlist * sizeof(*list)); > + if (p =3D=3D NULL) > + err(EXIT_FAILURE, "Can't allocate for rule list")= ; > + list =3D *listp =3D p; > + } > + list[(*nlist)++] =3D c; > +} > + > +static void > +rules_flush(void) > +{ > + struct conf **list; > + size_t nlist, mlist; > + > + list =3D NULL; > + mlist =3D nlist =3D 0; > + for (size_t i =3D 0; i < rconf.cs_n; i++) > + uniqueadd(&list, &nlist, &mlist, &rconf.cs_c[i]); > + for (size_t i =3D 0; i < lconf.cs_n; i++) > + uniqueadd(&list, &nlist, &mlist, &lconf.cs_c[i]); > + > + for (size_t i =3D 0; i < nlist; i++) > + run_flush(list[i]); > + free(list); > +} > + > +static void > +rules_restore(void) > +{ > + DB *db; > + struct conf c; > + struct dbinfo dbi; > + unsigned int f; > + > + db =3D state_open(dbfile, O_RDONLY, 0); > + if (db =3D=3D NULL) { > + (*lfun)(LOG_ERR, "Can't open `%s' to restore state (%m)", > + dbfile); > + return; > + } > + for (f =3D 1; state_iterate(db, &c, &dbi, f) =3D=3D 1; f =3D 0) { > + if (dbi.id[0] =3D=3D '\0') > + continue; > + (void)run_change("add", &c, dbi.id, sizeof(dbi.id)); > + state_put(state, &c, &dbi); > + } > + state_close(db); > + state_sync(state); > +} > + > +int > +main(int argc, char *argv[]) > +{ > + int c, tout, flags, flush, restore, ret; > + const char *spath, **blsock; > + size_t nblsock, maxblsock; > + > + setprogname(argv[0]); > + > + spath =3D NULL; > + blsock =3D NULL; > + maxblsock =3D nblsock =3D 0; > + flush =3D 0; > + restore =3D 0; > + tout =3D 0; > + flags =3D O_RDWR|O_EXCL|O_CLOEXEC; > + while ((c =3D getopt(argc, argv, "C:c:D:dfP:rR:s:t:v")) !=3D -1) = { > + switch (c) { > + case 'C': > + controlprog =3D optarg; > + break; > + case 'c': > + configfile =3D optarg; > + break; > + case 'D': > + dbfile =3D optarg; > + break; > + case 'd': > + debug++; > + break; > + case 'f': > + flush++; > + break; > + case 'P': > + spath =3D optarg; > + break; > + case 'R': > + rulename =3D optarg; > + break; > + case 'r': > + restore++; > + break; > + case 's': > + if (nblsock >=3D maxblsock) { > + maxblsock +=3D 10; > + void *p =3D realloc(blsock, > + sizeof(*blsock) * maxblsock); > + if (p =3D=3D NULL) > + err(EXIT_FAILURE, > + "Can't allocate memory for %zu so= ckets", > + maxblsock); > + blsock =3D p; > + } > + blsock[nblsock++] =3D optarg; > + break; > + case 't': > + tout =3D atoi(optarg) * 1000; > + break; > + case 'v': > + vflag++; > + break; > + default: > + usage(c); > + } > + } > + > + argc -=3D optind; > + if (argc) > + usage('?'); > + > + signal(SIGHUP, sighup); > + signal(SIGINT, sigdone); > + signal(SIGQUIT, sigdone); > + signal(SIGTERM, sigdone); > + signal(SIGUSR1, sigusr1); > + signal(SIGUSR2, sigusr2); > + > + openlog(getprogname(), LOG_PID, LOG_DAEMON); > + > + if (debug) { > + lfun =3D dlog; > + if (tout =3D=3D 0) > + tout =3D 5000; > + } else { > + if (tout =3D=3D 0) > + tout =3D 15000; > + } > + > + update_interfaces(); > + conf_parse(configfile); > + if (flush) { > + rules_flush(); > + if (!restore) > + flags |=3D O_TRUNC; > + } > + > + struct pollfd *pfd =3D NULL; > + bl_t *bl =3D NULL; > + size_t nfd =3D 0; > + size_t maxfd =3D 0; > + > + for (size_t i =3D 0; i < nblsock; i++) > + addfd(&pfd, &bl, &nfd, &maxfd, blsock[i]); > + free(blsock); > + > + if (spath) { > + FILE *fp =3D fopen(spath, "r"); > + char *line; > + if (fp =3D=3D NULL) > + err(EXIT_FAILURE, "Can't open `%s'", spath); > + for (; (line =3D fparseln(fp, NULL, NULL, NULL, 0)) !=3D = NULL; > + free(line)) > + addfd(&pfd, &bl, &nfd, &maxfd, line); > + fclose(fp); > + } > + if (nfd =3D=3D 0) > + addfd(&pfd, &bl, &nfd, &maxfd, _PATH_BLSOCK); > + > + state =3D state_open(dbfile, flags, 0600); > + if (state =3D=3D NULL) > + state =3D state_open(dbfile, flags | O_CREAT, 0600); > + if (state =3D=3D NULL) > + return EXIT_FAILURE; > + > + if (restore) { > + if (!flush) > + rules_flush(); > + rules_restore(); > + } > + > + if (!debug) { > + if (daemon(0, 0) =3D=3D -1) > + err(EXIT_FAILURE, "daemon failed"); > + if (pidfile(NULL) =3D=3D -1) > + err(EXIT_FAILURE, "Can't create pidfile"); > + } > + > + for (size_t t =3D 0; !done; t++) { > + if (readconf) { > + readconf =3D 0; > + conf_parse(configfile); > + } > + ret =3D poll(pfd, (nfds_t)nfd, tout); > + if (debug) > + (*lfun)(LOG_DEBUG, "received %d from poll()", ret= ); > + switch (ret) { > + case -1: > + if (errno =3D=3D EINTR) > + continue; > + (*lfun)(LOG_ERR, "poll (%m)"); > + return EXIT_FAILURE; > + case 0: > + state_sync(state); > + break; > + default: > + for (size_t i =3D 0; i < nfd; i++) > + if (pfd[i].revents & POLLIN) > + process(bl[i]); > + } > + if (t % 100 =3D=3D 0) > + state_sync(state); > + if (t % 10000 =3D=3D 0) > + update_interfaces(); > + update(); > + } > + state_close(state); > + return 0; > +} > diff --git a/contrib/blocklist/bin/old_internal.c b/contrib/blocklist/bin= /old_internal.c > new file mode 100644 > index 000000000000..79093cc8b8ab > --- /dev/null > +++ b/contrib/blocklist/bin/old_internal.c > @@ -0,0 +1,50 @@ > +/* $NetBSD: internal.c,v 1.2 2025/02/11 17:48:30 christos Exp $ *= / > + > +/*- > + * Copyright (c) 2015 The NetBSD Foundation, Inc. > + * All rights reserved. > + * > + * This code is derived from software contributed to The NetBSD Foundati= on > + * by Christos Zoulas. > + * > + * 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 th= e > + * documentation and/or other materials provided with the distributio= n. > + * > + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBU= TORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT L= IMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTI= CULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBU= TORS > + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, O= R > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSIN= ESS > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER = IN > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS= E) > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED O= F THE > + * POSSIBILITY OF SUCH DAMAGE. > + */ > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > + > +#ifdef HAVE_SYS_CDEFS_H > +#include > +#endif > +__RCSID("$NetBSD: internal.c,v 1.2 2025/02/11 17:48:30 christos Exp $"); > + > +#include > +#include > +#include "conf.h" > +#include "old_internal.h" > + > +int debug; > +const char *rulename =3D "blacklistd"; > +const char *controlprog =3D _PATH_BLCONTROL; > +struct confset lconf, rconf; > +struct ifaddrs *ifas; > +void (*lfun)(int, const char *, ...) =3D syslog; > diff --git a/contrib/blocklist/bin/old_internal.h b/contrib/blocklist/bin= /old_internal.h > new file mode 100644 > index 000000000000..becee563e81d > --- /dev/null > +++ b/contrib/blocklist/bin/old_internal.h > @@ -0,0 +1,58 @@ > +/* $NetBSD: internal.h,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $ = */ > + > +/*- > + * Copyright (c) 2015 The NetBSD Foundation, Inc. > + * All rights reserved. > + * > + * This code is derived from software contributed to The NetBSD Foundati= on > + * by Christos Zoulas. > + * > + * 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 th= e > + * documentation and/or other materials provided with the distributio= n. > + * > + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBU= TORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT L= IMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTI= CULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBU= TORS > + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, O= R > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSIN= ESS > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER = IN > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS= E) > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED O= F THE > + * POSSIBILITY OF SUCH DAMAGE. > + */ > +#ifndef _OLD_INTERNAL_H > +#define _OLD_INTERNAL_H > + > +#ifndef _PATH_BLCONF > +#define _PATH_BLCONF "/etc/blacklistd.conf" > +#endif > +#ifndef _PATH_BLCONTROL > +#define _PATH_BLCONTROL "/usr/libexec/blacklistd-helper" > +#endif > +#ifndef _PATH_BLSTATE > +/* We want the new name, the old one would be incompatible after 24932b6= */ > +#define _PATH_BLSTATE "/var/db/blocklistd.db" > +#endif > + > +extern struct confset rconf, lconf; > +extern int debug; > +extern const char *rulename; > +extern const char *controlprog; > +extern struct ifaddrs *ifas; > + > +#if !defined(__syslog_attribute__) && !defined(__syslog__) > +#define __syslog__ __printf__ > +#endif > + > +extern void (*lfun)(int, const char *, ...) > + __attribute__((__format__(__syslog__, 2, 3))); > + > *** 2507 LINES SKIPPED *** --=20 Jose Luis Duran From nobody Mon Oct 13 01:19:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clKJX5xQ6z6BbQS; Mon, 13 Oct 2025 01:19: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 4clKJX5h1Cz3HyC; Mon, 13 Oct 2025 01:19:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760318380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ibwyry+WKLz4eJEGwzqwp4Z13tDrIVkbwkDelgQ/x6E=; b=w3wZjP0E/kotm3p7S2jGvoKS8qYj1oPJvgSfonFsEe/A9rpf9qb4zSwZ8lBIOkR60kWIw/ 4ZJQAYDvIyLSIRgYhH93kBWTIPkJ3UcloL6cb0eOH5tB5YF/JquG9Dz0rorIbP1TiQa1HT F+uc/SEOn+Y017bsZd6Ok/NVIjP9V15tbgaOvwYtKPQ7l7ExjzQ2z5Y5EOeyAlmicELi7s syi7uN3DGWNHhBq97r5Wzm4HXceWOZKS651vnXhTN6lTZPcpXmlj8j8+to7DENY7SMbW+9 QcQJ18cKaFozibCjrHa+8YnZbhV8Q+c4mA2rMKfCant4kwsukC1Porbbz9ZXnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760318380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ibwyry+WKLz4eJEGwzqwp4Z13tDrIVkbwkDelgQ/x6E=; b=kuxZUWbG/GdHZ1wMhFxGgPXIjEAED+Zb+3xw4s6yYGx9TdLW61IQSaSUtumh8oM2qH4Q+n 3HgueiyVcVmMxAmjXYu33sVJ0ILUObf2ZQvuXJItKvYxg4jhLlRJmFKmgUds8VBgCQEWsG er1RTerQZUwM+SNWpcZJo2HRlURk4Z1fl/suNHpUrf7yMUnDUZREX0SNW24P4pGeiACHdL zEiZjK1f4jGi05UG70cOctzvprEvz/cGcasIVuvM18vvus3Vqq+XYsQjd31HhZK3ArdUx6 GCzv0Heq9A6mjb+glwQi/J96dRU3t5jOCpqF0r3JRMCXujNdlhSCR/9tI1Tx9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760318380; a=rsa-sha256; cv=none; b=WVJLxmCooOXKrrNWfII93s0qWpxpz7FXz6Hn7CpLk30yF6263JXxFwaevk2nBVpth3QFo7 2TR0x5HK8FooYPwRVEIKMB+/ZSVfEx/Cg2rRH4xNDWzTllvDe9zR/UORnehirM9MObJmrG 6gCk1tN9qwXGbNLgehgKDrhurGNfkLvNmsDPjaCQ65BclDOU08NoaIXm1GFOoQ2b3oZlE8 K9JZ5Gg9U2VDpn9uT22bJM3az4ltMaLuwyDz27MakVb3JYd2SSsuCQWpKQAGn7TzZGrEYS aPb8yRZ5LW0XU4fQvV9ecirKm+e/3HfzHzYSIpP71Nd9E+0DX9Uepm1o5pqb3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clKJX4vPBzlRb; Mon, 13 Oct 2025 01:19:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D1JePi033785; Mon, 13 Oct 2025 01:19:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D1JeMP033782; Mon, 13 Oct 2025 01:19:40 GMT (envelope-from git) Date: Mon, 13 Oct 2025 01:19:40 GMT Message-Id: <202510130119.59D1JeMP033782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: c62400455365 - main - blacklist: Avoid duplicate manual pages in METALOG List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6240045536548c22ce40d9ef36c1dc52abcfc9c Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=c6240045536548c22ce40d9ef36c1dc52abcfc9c commit c6240045536548c22ce40d9ef36c1dc52abcfc9c Author: Jose Luis Duran AuthorDate: 2025-10-13 00:53:50 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-13 01:19:18 +0000 blacklist: Avoid duplicate manual pages in METALOG Previously, blacklist man pages were just a symlink to their blocklist counterpart, this in turn installed blocklist man pages twice, and resulted in a duplicate error when running metalog_reader.lua -c. Take advantage of the duplication to document nuances in blacklist, such as the fact that it uses the new database and socket name (blocklist). Also, note that it has been renamed to blocklist. In the future, it will help to document its deprecation. Approved by: emaste (mentor) Fixes: 7238317403b9 ("blocklist: Rename blacklist to blocklist") MFC after: 2 days --- contrib/blocklist/bin/blacklistctl.8 | 136 ++++++++++++++ contrib/blocklist/bin/blacklistd.8 | 308 ++++++++++++++++++++++++++++++++ contrib/blocklist/bin/blacklistd.conf.5 | 242 +++++++++++++++++++++++++ contrib/blocklist/lib/libblacklist.3 | 188 +++++++++++++++++++ lib/libblacklist/Makefile | 17 +- usr.sbin/blacklistctl/Makefile | 3 +- usr.sbin/blacklistd/Makefile | 4 +- 7 files changed, 884 insertions(+), 14 deletions(-) diff --git a/contrib/blocklist/bin/blacklistctl.8 b/contrib/blocklist/bin/blacklistctl.8 new file mode 100644 index 000000000000..4d557c0c979d --- /dev/null +++ b/contrib/blocklist/bin/blacklistctl.8 @@ -0,0 +1,136 @@ +.\" $NetBSD: blocklistctl.8,v 1.4 2025/02/07 01:35:38 kre Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd January 27, 2025 +.Dt BLACKLISTCTL 8 +.Os +.Sh NAME +.Nm blacklistctl +.Nd display and change the state of the blacklistd database +.Sh SYNOPSIS +.Nm +.Cm dump +.Op Fl abdnrw +.Op Fl D Ar dbname +.Sh DESCRIPTION +.Nm +is a program used to display and change the state of the +.Xr blacklistd 8 +database. +The following sub-commands are supported: +.Ss dump +.Pp +The following options are available for the +.Cm dump +sub-command: +.Bl -tag -width indent +.It Fl a +Show all database entries, by default it shows only the active ones. +Inactive entries will be shown with a last-access (or, with +.Fl r , +the remaining) time of +.Ql never . +.It Fl b +Show only the blocked entries. +.It Fl D Ar dbname +Specify the location of the +.Ic blacklistd +database file to use. +The default is +.Pa /var/db/blocklistd.db . +.It Fl d +Increase debugging level. +.It Fl n +Don't display a header. +.It Fl r +Show the remaining blocked time instead of the last activity time. +.It Fl w +Normally the width of addresses is good for IPv4, the +.Fl w +flag, makes the display wide enough for IPv6 addresses. +.El +.Pp +The output of the +.Cm dump +sub-command consists of a header (unless +.Fl n +was given) and one line for each record in the database, where each line +has the following columns: +.Bl -tag -width indent +.It Ql address/ma:port +The remote address, mask, and local port number of the client connection +associated with the database entry. +.It Ql id +column will show the identifier for the packet filter rule associated +with the database entry, though this may only be the word +.Ql OK +for packet filters which do not creat a unique identifier for each rule. +.It Ql nfail +The number of +.Em failures +reported for the client on the noted port, as well as the number of +failures allowed before blocking (or, with +.Fl a , +an asterisk +.Aq * ) +.It So last access Sc | So remaining time Sc +The last time a the client was reported as attempting access, or, with +.Fl r , +the time remaining before the rule blocking the client will be removed. +.El +.Sh SEE ALSO +.Xr blacklistd 8 +.Sh NOTES +The +.Nm +program has been renamed to +.Xr blocklistctl 8 . +.Pp +Sometimes the reported number of failed attempts can exceed the number +of attempts that +.Xr blacklistd 8 +is configured to block. +This can happen either because the rule has been removed manually, or +because there were more attempts in flight while the rule block was being +added. +This condition is normal; in that case +.Xr blacklistd 8 +will first attempt to remove the existing rule, and then it will re-add +it to make sure that there is only one rule active. +.Sh HISTORY +.Nm +first appeared in +.Nx 7 . +.Fx +support for +.Nm +was implemented in +.Fx 11 . +.Sh AUTHORS +.An Christos Zoulas diff --git a/contrib/blocklist/bin/blacklistd.8 b/contrib/blocklist/bin/blacklistd.8 new file mode 100644 index 000000000000..9ca886e9c4d3 --- /dev/null +++ b/contrib/blocklist/bin/blacklistd.8 @@ -0,0 +1,308 @@ +.\" $NetBSD: blocklistd.8,v 1.8 2025/02/25 22:13:34 christos Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd February 25, 2025 +.Dt BLACKLISTD 8 +.Os +.Sh NAME +.Nm blacklistd +.Nd block and release ports on demand to avoid DoS abuse +.Sh SYNOPSIS +.Nm +.Op Fl dfrv +.Op Fl C Ar controlprog +.Op Fl c Ar configfile +.Op Fl D Ar dbfile +.Op Fl P Ar sockpathsfile +.Op Fl R Ar rulename +.Op Fl s Ar sockpath +.Op Fl t Ar timeout +.Sh DESCRIPTION +.Nm +is a daemon similar to +.Xr syslogd 8 +that listens to sockets at paths specified in the +.Ar sockpathsfile +for notifications from other daemons about successful or failed connection +attempts. +If no such file is specified, then it only listens to the socket path +specified by +.Ar sockpath +or if that is not specified to +.Pa /var/run/blocklistd.sock . +Each notification contains an (action, port, protocol, address, owner) tuple +that identifies the remote connection and the action. +This tuple is consulted against entries from the +.Ar configfile , +with the syntax specified in +.Xr blacklistd.conf 5 . +If an entry is matched, a state entry is created for that tuple. +Each entry contains a number of tries limit and a duration. +.Pp +If +.Ar configfile +is a directory, or a directory exists with the same name as +.Ar configfile +with +.Qq .d +appended to it, each file in the directory will be read as configuration file. +If +.Ar configfile +exists as a file it will be processed before the contents of the +.Ar configfile Ns .d +directory if that also exists. +.Pp +The way +.Nm +does configuration entry matching is by having the client side pass the +file descriptor associated with the connection the client wants to blacklist +as well as passing socket credentials. +.Pp +The file descriptor is used to retrieve information (address and port) +about the remote side with +.Xr getpeername 2 +and the local side with +.Xr getsockname 2 . +.Pp +By examining the port of the local side, +.Nm +can determine if the client program +.Dq owns +the port. +By examining the optional address portion on the local side, it can match +interfaces. +By examining the remote address, it can match specific allow or deny rules. +.Pp +Finally +.Nm +can examine the socket credentials to match the user in the configuration file. +.Pp +While this works well for TCP sockets, it cannot be relied on for unbound +UDP sockets. +It is also less meaningful when it comes to connections using non-privileged +ports. +On the other hand, if we receive a request that has a local endpoint indicating +a UDP privileged port, we can presume that the client was privileged to be +able to acquire that port. +.Pp +Once an entry is matched +.Nm +can perform various actions. +If the action is +.Dq add +and the number of tries limit is reached, then a +control script +.Ar controlprog +is invoked with arguments: +.Bd -literal -offset indent +control add
+.Ed +.Pp +and should invoke a packet filter command to block the connection +specified by the arguments. +The +.Ar rulename +argument can be set from the command line (default +.Dv blacklistd ) . +The script could print a numerical id to stdout as a handle for +the rule that can be used later to remove that connection, but +that is not required as all information to remove the rule is +kept. +.Pp +If the action is +.Dq rem +Then the same control script is invoked as: +.Bd -literal -offset indent +control rem
+.Ed +.Pp +where +.Ar id +is the number returned from the +.Dq add +action. +.Pp +.Nm +maintains a database of known connections in +.Ar dbfile . +On startup it reads entries from that file, and updates its internal state. +.Pp +.Nm +checks the list of active entries every +.Ar timeout +seconds (default +.Dv 15 ) +and removes entries and block rules using the control program as necessary. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl C Ar controlprog +Use +.Ar controlprog +to communicate with the packet filter, instead of the default, which is +.Pa /usr/libexec/blacklistd-helper . +The following arguments are passed to the control program: +.Bl -tag -width protocol +.It action +The action to perform: +.Dv add , +.Dv rem , +or +.Dv flush ; +to add, remove or flush a firewall rule. +.It name +The rule name. +.It protocol +The optional protocol name (can be empty): +.Dv tcp , +.Dv tcp6 , +.Dv udp , +.Dv udp6 . +.It address +The IPv4 or IPv6 numeric address to be blocked or released. +.It mask +The numeric mask to be applied to the blocked or released address +.It port +The optional numeric port to be blocked (can be empty). +.It id +For packet filters that support removal of rules by rule identifier, the +identifier of the rule to be removed. +The add command is expected to return the rule identifier string to stdout. +.El +.It Fl c Ar configuration +The name of the configuration file to read. +The default when +.Fl c +is not given is +.Pa /etc/blacklistd.conf . +.It Fl D Ar dbfile +The Berkeley DB file where +.Nm +stores its state. +It defaults to +.Pa /var/db/blocklistd.db . +.It Fl d +Normally, +.Nm +disassociates itself from the terminal unless the +.Fl d +flag is specified, in which case it stays in the foreground. +.It Fl f +Truncate the state database and flush all the rules named +.Ar rulename +are deleted by invoking the control script as: +.Bd -literal -offset indent +control flush +.Ed +.It Fl P Ar sockpathsfile +A file containing a list of pathnames, one per line that +.Nm +will create sockets to listen to. +This is useful for chrooted environments. +.It Fl R Ar rulename +Specify the default rule name for the packet filter rules, usually +.Dv blacklistd . +.It Fl r +Re-read the firewall rules from the internal database, then +remove and re-add them. +This helps for packet filters that do not retain state across reboots. +.It Fl s Ar sockpath +Add +.Ar sockpath +to the list of Unix sockets +.Nm +listens to. +.It Fl t Ar timeout +The interval in seconds +.Nm +polls the state file to update the rules. +.It Fl v +Cause +.Nm +to print +diagnostic messages to +.Dv stdout +instead of +.Xr syslogd 8 . +.El +.Sh SIGNAL HANDLING +.Nm +deals with the following signals: +.Bl -tag -width "USR2" +.It Dv HUP +Receipt of this signal causes +.Nm +to re-read the configuration file. +.It Dv INT , Dv TERM & Dv QUIT +These signals tell +.Nm +to exit in an orderly fashion. +.It Dv USR1 +This signal tells +.Nm +to increase the internal debugging level by 1. +.It Dv USR2 +This signal tells +.Nm +to decrease the internal debugging level by 1. +.El +.Sh FILES +.Bl -tag -width /usr/libexec/blacklistd-helper -compact +.It Pa /usr/libexec/blacklistd-helper +Shell script invoked to interface with the packet filter. +.It Pa /etc/blacklistd.conf +Configuration file. +.It Pa /var/db/blocklistd.db +Database of current connection entries. +.It Pa /var/run/blocklistd.sock +Socket to receive connection notifications. +.El +.Sh SEE ALSO +.Xr blacklistd.conf 5 , +.Xr blacklistctl 8 , +.Xr ipf 8 , +.Xr ipfw 8 , +.Xr pfctl 8 , +.Xr syslogd 8 +.Sh NOTES +The +.Nm +daemon has been renamed to +.Xr blocklistd 8 . +.Sh HISTORY +.Nm +first appeared in +.Nx 7 . +.Fx +support for +.Nm +was implemented in +.Fx 11 . +.Sh AUTHORS +.An Christos Zoulas diff --git a/contrib/blocklist/bin/blacklistd.conf.5 b/contrib/blocklist/bin/blacklistd.conf.5 new file mode 100644 index 000000000000..e775d30e7e8e --- /dev/null +++ b/contrib/blocklist/bin/blacklistd.conf.5 @@ -0,0 +1,242 @@ +.\" $NetBSD: blocklistd.conf.5,v 1.7 2025/02/11 17:47:05 christos Exp $ +.\" +.\" Copyright (c) 2015, 2025 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd February 5, 2025 +.Dt BLACKLISTD.CONF 5 +.Os +.Sh NAME +.Nm blacklistd.conf +.Nd configuration file format for blacklistd +.Sh DESCRIPTION +The +.Nm +file contains configuration entries for +.Xr blacklistd 8 +in a fashion similar to +.Xr inetd.conf 5 . +Only one entry per line is permitted. +Every entry must have all fields populated. +Each field can be separated by a tab or a space. +Comments are denoted by a +.Dq # +at the beginning of a line. +.Pp +There are two kinds of configuration lines, +.Va [local] +and +.Va [remote] . +By default, configuration lines are +.Va [local] , +i.e. the address specified refers to the addresses on the local machine. +To switch to between +.Va [local] +and +.Va [remote] +configuration lines you can specify the stanzas: +.Dq [local] +and +.Dq [remote] . +.Pp +On +.Va [local] +and +.Va [remote] +lines +.Dq * +means use the default, or wildcard match. +In addition, for +.Va [remote] +lines +.Dq = +means use the values from the matched +.Va [local] +configuration line. +.Pp +The first four fields, +.Va location , +.Va type , +.Va proto , +and +.Va owner +are used to match the +.Va [local] +or +.Va [remote] +addresses, whereas the last 3 fields +.Va name , +.Va nfail , +and +.Va disable +are used to modify the filtering action. +.Pp +The first field denotes the +.Va location +as an address, mask, and port. +The syntax for the +.Va location +is: +.Bd -literal -offset indent + [
|][/][:] +.Ed +.Pp +The +.Dv address +can be an IPv4 address in numeric format, an IPv6 address +in numeric format and enclosed by square brackets, or an interface name. +Mask modifiers are not allowed on interfaces because interfaces +can have multiple addresses in different protocols where the mask has a +different size. +.Pp +The +.Dv mask +is always numeric, but the +.Dv port +can be either numeric or symbolic. +.Pp +The second field is the socket +.Va type : +.Dv stream , +.Dv dgram , +or numeric. +The third field is the +.Va protocol : +.Dv tcp , +.Dv udp , +.Dv tcp6 , +.Dv udp6 , +or numeric. +The fourth field is the effective user +.Va ( owner ) +of the daemon process reporting the event, +either as a username or a userid. +.Pp +The rest of the fields control the behavior of the filter. +.Pp +The +.Va name +field, is the name of the packet filter rule to be used. +If the +.Va name +starts with a hyphen +.Pq Dq - , +then the default rulename is prepended to the given name. +If the +.Dv name +contains a +.Dq / , +the remaining portion of the name is interpreted as the mask to be +applied to the address specified in the rule, causing a single rule violation to +block the entire subnet for the configured prefix. +.Pp +The +.Va nfail +field contains the number of failed attempts before access is blocked, +defaulting to +.Dq * +meaning never, and the last field +.Va duration +specifies the amount of time since the last access that the blocking +rule should be active, defaulting to +.Dq * +meaning forever. +The default unit for +.Va duration +is seconds, but one can specify suffixes for different units, such as +.Dq m +for minutes +.Dq h +for hours and +.Dq d +for days. +.Pp +Matching is done first by checking the +.Va [local] +rules individually, in the order of the most specific to the least specific. +If a match is found, then the matching +.Va [remote] +rules are applied. +The +.Va name , +.Va nfail , +and +.Va duration +fields can be altered by the +.Va [remote] +rule that matched. +.Pp +The +.Va [remote] +rules can be used for allowing specific addresses, changing the mask +size (via +.Va name ) , +the rule that the packet filter uses (also via +.Va name ) , +the number of failed attempts (via +.Va nfail ) , +or the duration to block (via +.Va duration ) . +.Sh FILES +.Bl -tag -width /etc/blacklistd.conf -compact +.It Pa /etc/blacklistd.conf +Configuration file. +.El +.Sh EXAMPLES +.Bd -literal -offset 8n +# Block ssh, after 3 attempts for 6 hours on the bnx0 interface +[local] +# location type proto owner name nfail duration +bnx0:ssh * * * * 3 6h +[remote] +# Never block 1.2.3.4 +1.2.3.4:ssh * * * * * * +# Never block the example IPv6 subnet either +[2001:db8::]/32:ssh * * * * * * +# For addresses coming from 8.8.0.0/16 block whole /24 networks instead +# individual hosts, but keep the rest of the blocking parameters the same. +8.8.0.0/16:ssh * * * /24 = = +.Ed +.Sh SEE ALSO +.Xr blacklistctl 8 , +.Xr blacklistd 8 +.Sh NOTES +The +.Nm +file has been renamed to +.Xr blocklistd.conf 8 . +.Sh HISTORY +.Nm +first appeared in +.Nx 7 . +.Fx +support for +.Nm +was implemented in +.Fx 11 . +.Sh AUTHORS +.An Christos Zoulas diff --git a/contrib/blocklist/lib/libblacklist.3 b/contrib/blocklist/lib/libblacklist.3 new file mode 100644 index 000000000000..5bc093c38f79 --- /dev/null +++ b/contrib/blocklist/lib/libblacklist.3 @@ -0,0 +1,188 @@ +.\" $NetBSD: libblocklist.3,v 1.7 2025/02/05 20:14:30 christos Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd February 5, 2025 +.Dt LIBBLACKLIST 3 +.Os +.Sh NAME +.Nm blacklist_open , +.Nm blacklist_open2 , +.Nm blacklist_close , +.Nm blacklist_r , +.Nm blacklist , +.Nm blacklist_sa , +.Nm blacklist_sa_r +.Nd Blacklistd notification library +.Sh LIBRARY +.Lb libblacklist +.Sh SYNOPSIS +.In blacklist.h +.Ft struct blacklist * +.Fn blacklist_open "void" +.Ft struct blacklist * +.Fn blacklist_open2 "void (*logger)(int, struct syslog_data *, va_list)" +.Ft void +.Fn blacklist_close "struct blacklist *cookie" +.Ft int +.Fn blacklist "int action" "int fd" "const char *msg" +.Ft int +.Fn blacklist_r "struct blacklist *cookie" "int action" "int fd" "const char *msg" +.Ft int +.Fn blacklist_sa "int action" "int fd" "const struct sockaddr *sa" "socklen_t salen" "const char *msg" +.Ft int +.Fn blacklist_sa_r "struct blacklist *cookie" "int action" "int fd" "const struct sockaddr *sa" "socklen_t salen" "const char *msg" +.Sh DESCRIPTION +These functions can be used by daemons to notify +.Xr blacklistd 8 +about successful and failed remote connections so that blacklistd can +block or release port access to prevent Denial of Service attacks. +.Pp +The function +.Fn blacklist_open +creates the necessary state to communicate with +.Xr blacklistd 8 +and returns a pointer to it, or +.Dv NULL +on failure. +.Pp +The function +.Fn blacklist_open2 +is similar to +.Fn blacklist_open +but allows a +.Fa logger +to be specified. +If the +.Fa logger +is +.Dv NULL , +then no logging is performed. +.Pp +The +.Fn blacklist_close +function frees all memory and resources used. +.Pp +The +.Fn blacklist +function sends a message to +.Xr blacklistd 8 , +with an integer +.Ar action +argument specifying the type of notification, +a file descriptor +.Ar fd +specifying the accepted file descriptor connected to the client, +and an optional message in the +.Ar msg +argument. +.Pp +The +.Ar action +parameter can take these values: +.Bl -tag -width ".Dv BLACKLIST_ABUSIVE_BEHAVIOR" +.It Dv BLACKLIST_AUTH_FAIL +There was an unsuccessful authentication attempt. +.It Dv BLACKLIST_AUTH_OK +A user successfully authenticated. +.It Dv BLACKLIST_ABUSIVE_BEHAVIOR +The sending daemon has detected abusive behavior +from the remote system. +The remote address should +be blocked as soon as possible. +.It Dv BLACKLIST_BAD_USER +The sending daemon has determined the username +presented for authentication is invalid. +The +.Xr blacklistd 8 +daemon compares the username to a configured list of forbidden +usernames and +blocks the address immediately if a forbidden username matches. +(The +.Dv BLACKLIST_BAD_USER +support is not currently available.) +.El +.Pp +The +.Fn blacklist_r +function is more efficient because it keeps the blacklist state around. +.Pp +The +.Fn blacklist_sa +and +.Fn blacklist_sa_r +functions can be used with unconnected sockets, where +.Xr getpeername 2 +will not work, the server will pass the peer name in the message. +.Pp +In all cases the file descriptor passed in the +.Fa fd +argument must be pointing to a valid socket so that +.Xr blacklistd 8 +can establish ownership of the local endpoint +using +.Xr getsockname 2 . +.Pp +By default, +.Xr syslogd 8 +is used for message logging. +The internal +.Fn bl_create +function can be used to create the required internal +state and specify a custom logging function. +.Sh RETURN VALUES +The function +.Fn blacklist_open +returns a cookie on success and +.Dv NULL +on failure setting +.Dv errno +to an appropriate value. +.Pp +The functions +.Fn blacklist , +.Fn blacklist_sa , +and +.Fn blacklist_sa_r +return +.Dv 0 +on success and +.Dv \-1 +on failure setting +.Dv errno +to an appropriate value. +.Sh NOTES +The +.Lb libblacklist +has been renamed to +.Xr libblocklist 3 . +.Sh SEE ALSO +.Xr blacklistd.conf 5 , +.Xr blacklistd 8 +.Sh AUTHORS +.An Christos Zoulas diff --git a/lib/libblacklist/Makefile b/lib/libblacklist/Makefile index 07c770883eab..cac023d69bb7 100644 --- a/lib/libblacklist/Makefile +++ b/lib/libblacklist/Makefile @@ -18,14 +18,13 @@ CFLAGS+=-I${BLOCKLIST_DIR}/include -I${BLOCKLIST_DIR}/port \ SRCS= old_bl.c blacklist.c vsyslog_r.c INCS= blacklist.h -MAN= libblocklist.3 - -MLINKS+=libblocklist.3 libblacklist.3 \ - libblocklist.3 blacklist_open.3 \ - libblocklist.3 blacklist_close.3 \ - libblocklist.3 blacklist.3 \ - libblocklist.3 blacklist_r.3 \ - libblocklist.3 blacklist_sa.3 \ - libblocklist.3 blacklist_sa_r.3 +MAN= libblacklist.3 + +MLINKS= libblacklist.3 blacklist_open.3 \ + libblacklist.3 blacklist_close.3 \ + libblacklist.3 blacklist.3 \ + libblacklist.3 blacklist_r.3 \ + libblacklist.3 blacklist_sa.3 \ + libblacklist.3 blacklist_sa_r.3 .include diff --git a/usr.sbin/blacklistctl/Makefile b/usr.sbin/blacklistctl/Makefile index 8a01f52926a7..41c5f44b072b 100644 --- a/usr.sbin/blacklistctl/Makefile +++ b/usr.sbin/blacklistctl/Makefile @@ -6,8 +6,7 @@ PACKAGE= blocklist PROG= blacklistctl SRCS= blacklistctl.c conf.c state.c support.c old_internal.c \ sockaddr_snprintf.c pidfile.c strtoi.c popenve.c -MAN= blocklistctl.8 -MLINKS= blocklistctl.8 blacklistctl.8 +MAN= blacklistctl.8 LDFLAGS+=-L${LIBBLACKLISTDIR} LIBADD+= blocklist util diff --git a/usr.sbin/blacklistd/Makefile b/usr.sbin/blacklistd/Makefile index b4ba4ca2f9ad..490b12d46968 100644 --- a/usr.sbin/blacklistd/Makefile +++ b/usr.sbin/blacklistd/Makefile @@ -7,9 +7,7 @@ CONFS= blacklistd.conf PROG= blacklistd SRCS= blacklistd.c conf.c run.c state.c support.c old_internal.c \ sockaddr_snprintf.c pidfile.c strtoi.c popenve.c vsyslog_r.c -MAN= blocklistd.8 blocklistd.conf.5 -MLINKS= blocklistd.8 blacklistd.8 \ - blocklistd.conf.5 blacklistd.conf.5 +MAN= blacklistd.8 blacklistd.conf.5 *** 2 LINES SKIPPED *** From nobody Mon Oct 13 05:18:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clQbh4jyRz6Bvdl; Mon, 13 Oct 2025 05: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 4clQbh487lz3dmj; Mon, 13 Oct 2025 05:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760332688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/DUarniyNHlg/awOk6PyQ+2l/YwzZElIIvHWscDhxAs=; b=Jng/pa/z3Nnv+A7sYgd/C0MwdFmey2cpVN9MPiH5MvBxeyKjIvLWHrcsRk/hbIqLEYv+q3 V8/o/wZYHugf8dlqA79Kj92Wmr8vM/HrfaMdUz2w8GS7hi0nN9e9NIP2ZI+gx8V9z2lddm tifH/2UiWTZ+4r/zmov5kI3KJsfE8dTzg7tBPlDD7lLEpHrp0vY7/3Z8wmYyuY5BX3i04m 5CvUZddHYH6uX3CT2Da1dkBHbc9n+8DK9Anc2yLxAGxVbFlJQoTUImtXFJc4Z0uKKkY7Gt 4UQE/p0WJPbLUBBRa9cTq0Cj3sDfEJS8lQULMRKJ415EC9nDFTOaBOYIeTI4ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760332688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/DUarniyNHlg/awOk6PyQ+2l/YwzZElIIvHWscDhxAs=; b=CmIRxk+K5GUU0KQX+h1+e8jd4FWs9ynoptMAeoEEv1dgDs14dmyH0Y8inCVbm2ra3J/xw3 v6/M647hHKGZSERdlxbl4x1rPSnNKRL6IXpSYx/VK5i1eGyWZTLcqZgs3FLBoDKNLUQcQB 8aRqYFTWN0URNPFhm4DvJoOb/6iZWDieSB6leEXvpsO0jY94UBFpT2Cqfge3zaE3Y5cNLK j2of4fC0b72M2cFoOcHfYqG82FvVeuuM16GHEJvooDz7LFtyZBw26zvKoBuC6p0d0sqNR4 GRGXs2cm9BrXi+KNmOA1FKRBmgWZ4cdUe3PfCIFOno2XaGuOBSRmVHPdDNSTdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760332688; a=rsa-sha256; cv=none; b=Q7qcfyxs6y60twufVeXeDUVCIQqw+dSFMiVx6rQvN8lcIYvSvzUYfnmpQJE6m/z0jJNGDi zchPidIk5wDbqu8CWcEFY2aHDfPYSRBXNi8/O8cpslEm12lYfa2rRWu9FfVgYhfbh2tZNm vn1qB2H58g+ZK9z5AFNcgs6GteBmoxCtjGIkeTSx+6N8XUQO/orOQJyTJM/A1f1QQMWEWi Gvy/t9ZBf22oXmlo7lWEYbSxs1KstJAhPxE+mz6suTX9SjAE5cEILSRVlvPYaEgs93GRSh JgSoum4AMWOIRp9Vtr+DmBe/dM2Huq6OwqeNbGn8XOs9HVqIZGGx3udxrzCkZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clQbh3k0xzt5L; Mon, 13 Oct 2025 05:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D5I8Pe085393; Mon, 13 Oct 2025 05:18:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D5I82T085390; Mon, 13 Oct 2025 05:18:08 GMT (envelope-from git) Date: Mon, 13 Oct 2025 05:18:08 GMT Message-Id: <202510130518.59D5I82T085390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d714732b598b - main - nvme: use nitems() rather than hard coded value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d714732b598bd6ac04ba8214b80a6b5f61881e3a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d714732b598bd6ac04ba8214b80a6b5f61881e3a commit d714732b598bd6ac04ba8214b80a6b5f61881e3a Author: Warner Losh AuthorDate: 2025-10-13 05:16:20 +0000 Commit: Warner Losh CommitDate: 2025-10-13 05:16:20 +0000 nvme: use nitems() rather than hard coded value Suggested by: jhb@ 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 57cb37907e65..557b4df4c328 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -2173,7 +2173,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 (i = 0; i < 64; i++) + for (i = 0; i < nitems(s->lbaf); i++) s->lbaf[i] = le32toh(s->lbaf[i]); #endif } From nobody Mon Oct 13 05:58:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clRVc1WVYz6By5w; Mon, 13 Oct 2025 05:58: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 4clRVc0sWhz3hy8; Mon, 13 Oct 2025 05:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760335128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t4OSCDhrWYx5ad9XtB8AWxJnl5xgiwZO8ak/+jCvGfA=; b=F7fkTcojGAmvz9P7xTBZmx10NVsRGhuKs2VRedPBfBwKnh3gqN4oZEzuWjgaF8kvsWlSNY knxIxN/dpnjsYZmJShOth1/1PBZrqmvtrSmDkJVdgX+7+Efkhcw3W1RGqZNQSgZNv9Za7R zX7P9zj5oxZVtqagmPc+A+ehIJu6PBNWmXS25YIJbTIkCXvowlYK7F1fqNV/6P6JkjC23l rYcvdyDsKqBlN+B9Yh21EZgxpROJdpCfEjPjpa7aTgZc4TN/PgskReSqk8831DMkQIcEu3 UhjTa2hELstKtho5N7DyQ1m6MopTyKvERnzD1LsNE3jp/eLp+O/0ZoW7PNPLcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760335128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t4OSCDhrWYx5ad9XtB8AWxJnl5xgiwZO8ak/+jCvGfA=; b=UiGIVdUWpCIWn7MsWwEjg4RG1PexrQ2ENc78SYYMVE6IaCNxZBw25ltW5DSFgf6IFIT+BV U9AkB7P4yGkXXG700I9NWeFREgX4oofQcRa8laSFaqruhK4TV0vzn2bVrwqhajxFyqro/e 8LKZkmtA1x6fMtcCgV8fRJfIVfd0y+C18+xYGBpaMS46r+7PczXfBGQbWcZmdqLzcSK9sl NP5mlnwYSP+HFKDhJ3lDhxRmuIENji2IQhGMm7HgC9zAk/35wqLuDQRB/V/sMnzDmJ0CWj OT9daZRpbl3YylKtjab/vgTHqSJ7wUn+7lqqH7AT+E/DwfxngnVuCT0LNAHVzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760335128; a=rsa-sha256; cv=none; b=uwsVEG249te5pEbk3+Tu56vMNsNAareJ3E8odnCDn0DEBKE4BC34wbTVPTUGyFDmJACky9 +CCeJSKRV2x9hZyEpIHjPRkkcRcOPWePU9QJf+VlzOnFK0QHGO1Ay5qJdLn/7gK0rsg5BX 1z7fQ/iBH0hcr7KV3dTXw6J119Qzbc0rey9zO9xk4cJWiQdn/RUB2ONU+re2Kba0LU+o3q 2cGRAeShyhnpWh96py9rv0d5YQjEf79D4d85NC5YiOeq+KWeaYe4lHAL1u/Ql6R4fYK3Jd avTpX/acN5lBvEuKjMKmrbYgwljrSzFiwsC7XA6K9kHLnjLCidWNiSvk6OBe4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clRVc09xmzv2d; Mon, 13 Oct 2025 05:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D5wlhc060472; Mon, 13 Oct 2025 05:58:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D5wlZ6060469; Mon, 13 Oct 2025 05:58:47 GMT (envelope-from git) Date: Mon, 13 Oct 2025 05:58:47 GMT Message-Id: <202510130558.59D5wlZ6060469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: f08c46c8c83b - main - pam_xdg.8: Remove bogus note List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f08c46c8c83b4de306db1c8fab36a51c6c0ca28e Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f08c46c8c83b4de306db1c8fab36a51c6c0ca28e commit f08c46c8c83b4de306db1c8fab36a51c6c0ca28e Author: Emmanuel Vadot AuthorDate: 2025-10-13 05:57:46 +0000 Commit: Emmanuel Vadot CommitDate: 2025-10-13 05:57:46 +0000 pam_xdg.8: Remove bogus note The pam_xdg module does set the XDG_RUNTIME_DIR in the environment, it's actually its main purpose. Reported by: arrowd --- lib/libpam/modules/pam_xdg/pam_xdg.8 | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.8 b/lib/libpam/modules/pam_xdg/pam_xdg.8 index 9b335751a9fb..031010953e98 100644 --- a/lib/libpam/modules/pam_xdg/pam_xdg.8 +++ b/lib/libpam/modules/pam_xdg/pam_xdg.8 @@ -50,7 +50,6 @@ Use an alternate base directory .Bl -tag -width indent .It Ev XDG_RUNTIME_DIR The location of the runtime files base directory created by this module. -Note that the module does not set this environment variable. .El .Sh STANDARDS The directory created by this module conforms to the From nobody Mon Oct 13 06:01:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clRYG2f39z6BySG; Mon, 13 Oct 2025 06:01: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 4clRYG27DRz3k5J; Mon, 13 Oct 2025 06:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760335266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GMeee49ixC+xgOZ/cJqum/EK7HVehDrr5BY3j9EmHoI=; b=JdgCteFE11Rva//NNPfCEHHzACo1sTp3jyOxPfX2c7K5b0qqJGCPcPr8c2cUUG+yE8MaYH QPYyIUKDTgkNcn58+/41txDnRX5PZK9jeON7HpYI5oHXBqJuSLdVqkn8hW2oJscyc+nmTS YAbXikohzYjysj55FsYz2FeLhCP9cZoqcLIZdA6Rcg7HzccD/YWp2HJZTADaUHQwWItImm XmLBnxWTAgBLSy1sOKtHJey5p7CXVPkoB6fyFZCR8EYK2m3vDpqicNttyOGc9n+YGFDCnD TAyPFkZQCCqu7rzwE+XoRodKWyB1DeN4diulIDE6YxH4oRneAad8p42jp5oR7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760335266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GMeee49ixC+xgOZ/cJqum/EK7HVehDrr5BY3j9EmHoI=; b=hnt2QIJFvC+r/nb+QHwGbkX+COMKVldmZyCvq1y37KjIE2AcZVKOqLxC1CKg39AJKOgbUX 0oVY7QiiL8jk5a/CEV1bEhXpuY7+wn1GMDtcPQZMQSlE/e0Xn2uPVOwOjNo/xZGZgu33KN WxLqwMv2rPooCncZDCYPqweDPuAgjg/0JnVs5etgaTNB20PYUTT89OjVy88XohiwAWoiGJ ibZrsCCU8PmbJzdoXPO+pNpvLJ3ELZxz9XLKQu8jtmNBuLGyD5zZDsK9mWmOSU28glXNRt 8NxnMMil+qL+W9PYvS5FxzUy8ZL6ctRXXxYgtCvJ+BfcGfFCID+p1Ya2Piw+jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760335266; a=rsa-sha256; cv=none; b=U78khISXW7zzjZB01o4fSEDGeaV3s8Argo6Sbf7xWzflybZq5UuRepcq5VtV6Sk6VxkD8z aFD9M+6W7ngubm0OzuK1ZPhIyF22f0CCtiW5rmoCHrORFAjshul5xDA4DSCOEXouED/+HN 5KX8swS89l8RSqRDuvvu/oYXOO3ww0oNXFSsJ9C0c9FpZ/2w/kV8nUiXibZdTLEpCD0luO k6A27KBhbuBai+K5yrOCGorCnyPwiEQ/uiBnmg1OZe7oNE9RQZ+u8+DjCyi9cmzD3hAHrj bRM/OB3T1Mo6PPC3QXIfvkOT1q9hNV3DmzZ9ChPaPGRk72fETkVZYn5yiQS7wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clRYG1cD5zvDX; Mon, 13 Oct 2025 06:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D616Xq073722; Mon, 13 Oct 2025 06:01:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D616ud073719; Mon, 13 Oct 2025 06:01:06 GMT (envelope-from git) Date: Mon, 13 Oct 2025 06:01:06 GMT Message-Id: <202510130601.59D616ud073719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: dc978c5cb55b - main - bridge.4: Fix the synopsis for -ifuntagged List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc978c5cb55b75d292c7ef32564f5c376685234b Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=dc978c5cb55b75d292c7ef32564f5c376685234b commit dc978c5cb55b75d292c7ef32564f5c376685234b Author: Lexi Winter AuthorDate: 2025-10-13 05:57:57 +0000 Commit: Lexi Winter CommitDate: 2025-10-13 06:01:01 +0000 bridge.4: Fix the synopsis for -ifuntagged This command doesn't accept a vlan-id. PR: 290141 MFC after: 3 days Reported by: Paul Procacci Reviewed by: ziaee (manpages) Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53049 --- sbin/ifconfig/ifconfig.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index fafb77e1ca6c..d4f8d2b5747a 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 12, 2025 +.Dd October 12, 2025 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2799,7 +2799,7 @@ Set the untagged VLAN identifier for an interface. Frames received on this interface without an 802.1Q tag will be assigned to this VLAN instead of the default VLAN 0, and outgoing frames on this VLAN will have their 802.1Q tag removed. -.It Cm -ifuntagged Ar interface Ar vlan-id +.It Cm -ifuntagged Ar interface Clear the untagged VLAN identifier for an interface. .It Cm defuntagged Ar vlan-id Enable the From nobody Mon Oct 13 06:17:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clRvz22qMz6C0hP; Mon, 13 Oct 2025 06:17:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clRvz1Q48z3mpH; Mon, 13 Oct 2025 06:17:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760336239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7+NPoYj9W2O3jc986VDlobH9dSbZNYHP1ykyPvjwWQ=; b=oSn+/HEAW03goc53v03rFIDzhRnD43rq8kvq6nWEqfwusHFlHnT2HHZdhAK0h5CNJTXh0A DkLTNj8/6XU7QcbpFcXo41l3rnpF7kVi/B1Q8RD8r/A2wr8erTyL6EvxFnPEyWHfzCjyJM 7IZZA2Lkgp8yFY/a22qaHR4d7TJXxtLhYw7Fk1E0660+sLj2S2uSu7e/XBnx/1k2jrK+V3 Ra8l9c1HKb2o59s6axEWOqCJpqJHdIJfrJRfjWwQ4khtjyuPmpkD1HF0V9TNd1b6eXB3BR uGLgvIymk4MvRyxoQAdvQxlDKsiwplgtkoMWi4mBfNHIycmQsrU4x0O0q5alxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760336239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7+NPoYj9W2O3jc986VDlobH9dSbZNYHP1ykyPvjwWQ=; b=hi1mqNK0b/uAEj/ZylUHROqzLON9e40yZDLi/dns5uHQZddfZCjlhX5EfPQgAwhmNw0xTv JXiNGGhUcN4HunlzgNONapEy9P3YoJFts7zl8bSbrNAiHSpmYX42b4V3k7lSDn9MwsxYnR rVc3O3LeMy77fHxi5dSgC2Zos4B5hVRK6Vy+dKG+BQ7SLEqnuNDgwXDouYnvjgx29+LsdH rHbGbcci7N1qtCo8OKkXRYsl8bSGSm+fKOaoczWlBb4UkjyDxDNYLuHDHmBqF6w/ccylp1 E7OkiPGkhn6R/BK6wnGoN5Lq8uP6ovexLmNRhpVKb+9OnwpadMq8qganLRikCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760336239; a=rsa-sha256; cv=none; b=TFO+8KFPCktYBlHLlCai9utEjBEM/IGZEVdqSTUOLXNC4OIPVZmLW/lMto8aXTbW7UY5T7 sKkMkglZsaWtD9Mf/WscKERw323fqfHTe27QGHmqF+zbClzjSD4aVg7vGDEI2pQ5haLv3Q 44+nSNnVBg53lcI+75uwDkWHhPENlPdR/LYFXRpIj7dwLXZpgaVIONVL6CHWruiho8EMai XKYJDdM3/pZ2pZx4hDVBFdAja54yb38q6DTeYko/RfPzxx78ayl3AKyjHljP/Hv1VZ1e9u pz+EkeL92UAkGZufAVwrFrMLE6Rf+iiLhjeVAAPrkUO9eDv9jpCyzJimlSL5aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clRvz0xQZzv3P; Mon, 13 Oct 2025 06:17:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D6HJqp098757; Mon, 13 Oct 2025 06:17:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D6HJ8Y098754; Mon, 13 Oct 2025 06:17:19 GMT (envelope-from git) Date: Mon, 13 Oct 2025 06:17:19 GMT Message-Id: <202510130617.59D6HJ8Y098754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 96e0a62abd93 - main - nvme: Use unsigned List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96e0a62abd93664ad52d18a899f83cd866793a90 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=96e0a62abd93664ad52d18a899f83cd866793a90 commit 96e0a62abd93664ad52d18a899f83cd866793a90 Author: Warner Losh AuthorDate: 2025-10-13 06:12:36 +0000 Commit: Warner Losh CommitDate: 2025-10-13 06:15:51 +0000 nvme: Use unsigned CI complains about signed/unsigned comparisons, but normal build does not. Fix this by transitioning to unsigned and using a loop-scoped variable. Fixes: d714732b598b Sponsored by: Netflix --- sys/dev/nvme/nvme.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 557b4df4c328..f4ea08f129c0 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -2153,8 +2153,6 @@ static inline void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN - int i; - s->nsze = le64toh(s->nsze); s->ncap = le64toh(s->ncap); s->nuse = le64toh(s->nuse); @@ -2173,7 +2171,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 (i = 0; i < nitems(s->lbaf); i++) + for (unsigned i = 0; i < nitems(s->lbaf); i++) s->lbaf[i] = le32toh(s->lbaf[i]); #endif } From nobody Mon Oct 13 10:13:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8k2G9jz6CJ7M; Mon, 13 Oct 2025 10: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 4clY8k1QFBz43pg; Mon, 13 Oct 2025 10: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=1760350422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BZt181M2pWZsnivQQt63CKW4Ynx26ibMN0U0+32DzrE=; b=cACoNnqgfky/zVjrf9ST5D/nfhTU7EgukbsUdehduIbis5XLrly//loWFnu1pM3Ts1Giz0 BcyTBCf2q1DitqWNTE3oe5zh0t659M9mdE4HjJ565zyGFaREubV9nnEp+M8H3mXsp9svlA GxYX2LeItfs+bDep1EXq0fViT5aPoHED9Hsat/ZGceRc9hmoXz18haWXVTX9xv16LwClZX 6mfL3oS24hYRkvkVQbkt20wZ+pImDWccenv9UMGHloHZKLbOCvY/fiixYzEWZ4Z+CNA2q2 IfrN/2IJgZTMgwCeEvaPD6D5Csv3kWrmBJbY0rWAj2UeCcDFZkfJdQFONcOLFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BZt181M2pWZsnivQQt63CKW4Ynx26ibMN0U0+32DzrE=; b=sk05+pOJd1DV7BfPBwrGwW6Snsbe3lzdWX3vQpKKr0hUgWYAaKfQWGUHQO8H2QjvBAfqqF xNFeWBHQxNySiJG3Xh5ueJQKZthqOf2+jOpILNGFJI1hc9asEYlLk51DPFpa0z8wNYLQZu HNNSCM503S5/AL0IW1qjTLUJWKHvEJYhHWcbtd8ywXYWnBebhQ+eELYJg8IVWVvpw7ooAa Efjrtsk0KioYI5wzpqaett+UknQMMn0Lxyg/0aydbRMpdlVh6DQJpVQuKcxk8FpG7siE/Z N6tJ0uIpMY3T/queX6IW28zQzu/NNS2KSTpSMESkLJ2GOzgY+LS89/m35KLCIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350422; a=rsa-sha256; cv=none; b=AvaGGePJ8AYPGp1rgi7ZfKCTh0GWBnyiJkdlQD0sx7xk6jiO08jldcm5X1kvZ8OKJJ5mgP 6AafL/YTuZyomLYN2pKuHGLyp2jqQzTAv2TYNjrsBoAaI6paPi5T6VA8EGDbr1Dvt8KZy9 kwxssSqMYdVZDgDV0wm5AaYQBMKKUG2d8mTC/zvoMuHad4OfSqKqPKdGeVud8zQdjSzwNq CKv+zarX8Obc29YBHgugZsMcEa/YpiOQ+AHfLkdZEDlNVknXn6EOPvL++QOl23py0B9nhr vggtciJDqde8lXJQTAjzphTaLHATOgGzvGaWOxKOmjRHC4mMu/T+tzFqH5Sr9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8k0l1wz12Gx; Mon, 13 Oct 2025 10:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADgAV063719; Mon, 13 Oct 2025 10:13:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADfDc063716; Mon, 13 Oct 2025 10:13:41 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:41 GMT Message-Id: <202510131013.59DADfDc063716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: f94b1a8ca6e0 - main - scsi: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f94b1a8ca6e016aeff09e2053dc293b83c3aa912 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f94b1a8ca6e016aeff09e2053dc293b83c3aa912 commit f94b1a8ca6e016aeff09e2053dc293b83c3aa912 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:28 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:28 +0000 scsi: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/cam/scsi/scsi_all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index b518f84454ad..9c097f52d136 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -112,7 +112,7 @@ static void fetchtableentries(int sense_key, int asc, int ascq, const struct asc_table_entry **); #ifdef _KERNEL -static void init_scsi_delay(void); +static void init_scsi_delay(void *); static int sysctl_scsi_delay(SYSCTL_HANDLER_ARGS); static int set_scsi_delay(int delay); #endif @@ -9379,7 +9379,7 @@ scsi_vpd_supported_page(struct cam_periph *periph, uint8_t page_id) } static void -init_scsi_delay(void) +init_scsi_delay(void *dummy __unused) { int delay; From nobody Mon Oct 13 10:13:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8l52QPz6CJS2; Mon, 13 Oct 2025 10:13: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 4clY8l1t2fz43Y6; Mon, 13 Oct 2025 10:13:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ccQZmm2S/wLv7b33672qohJzpSJ1b6j4BUcevD1vbM8=; b=p2n/5fRkfLYbeS1IuCEx0J2dQcKKxMmq2NJDbTfpZICewAKpHfjylbfIJX7Hu1fraMvBUw gAiTVN2oEo9lXTJViTpAsohr+Odn8XNnu8DnQKFfO5d21Ol/R4HBZ0J/zamszXFz/z6ap7 E/byHNtXEFU/b9mhkIPcy5s76arLqqogbK044KZxZG0+InZJUdswQb1qkWos/l01gyrGQO EmCJ78i7e9S3XrtxNYAx1tboG66FYQ4Nm0BmlH/dFTBfS4mn3y0I5QMWy/fAxPx9gTHOMr iUeV+GxHa2SXzErSS7mb3O0CWj6jh+PHJfwEcIgXmjmca3kLMTZ7q/0F0iBK6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ccQZmm2S/wLv7b33672qohJzpSJ1b6j4BUcevD1vbM8=; b=HvqyKT6P4NB9fcVXHN1HinMz6iBS/q6+58+5lmPlTzrsVr1XsMO8gGnpgVl84tqQfU9og+ wcnGnmQnMTBV1cDz7XYMr/X8vK1RTUL+jmwwe20cNS9+Y6esRluzJgpXq4z0Unos6a1sh1 +fyqqTXSXsrfvC06wxzDAtrxu3Er1+xcTE25QadC6YLw8yX2e9wMstoObqSG40mHa9B2uu e6jyXeRky1TNv5/mBU1ALo0+FfdqEAY8Z9rMA+CcO1B8y7YDixfZ2L/9lYaZTXQ2DRRODq bG/fpe5LKa7YRFxcdNM5rFngKmnNR4krSYZf5yyKaglo7kjIsunTN9OW9Un67w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350423; a=rsa-sha256; cv=none; b=nhuHAK6vK9wUO5XJwPiHBxEJWYZrvqVnF6HHMCsTJYLh17obqORYJSvm17d9DaXM0HFO3U xpb2O1QpA2s1gfbJTR1JM8QS5L9rEX3IXKFXksKaH7z+hrRr81NulM3khpGZh6WmUKOXr7 FoEEgvsTTZQ+sr+N9qf8ubNpOxR+KlUAm7XYYyJbkJTZDKqsQZT8/R69hUQ0ljeI5QhGTQ ioDgB4+F8Hdp+ow+72TSRHjaSXS785tviTmSvkrPkhrLNrqtqzggBwjcYWf3k7X7NXsb6A +YTQZ8KO4QpwrAVkR6ofJuQjadajuqMz0Vgl8fCaVxMxOu65aUWiroI8jnAHdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8l1P2Qz12Lv; Mon, 13 Oct 2025 10:13:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADhLO063752; Mon, 13 Oct 2025 10:13:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADhDf063749; Mon, 13 Oct 2025 10:13:43 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:43 GMT Message-Id: <202510131013.59DADhDf063749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 41c0b64f021e - main - opensolaris: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41c0b64f021ecda09c0d42bfc539dba69ec51e4c Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=41c0b64f021ecda09c0d42bfc539dba69ec51e4c commit 41c0b64f021ecda09c0d42bfc539dba69ec51e4c Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:28 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:28 +0000 opensolaris: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/cddl/compat/opensolaris/kern/opensolaris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris.c b/sys/cddl/compat/opensolaris/kern/opensolaris.c index 10924977c20d..898b2ea49f96 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris.c @@ -67,7 +67,7 @@ opensolaris_load(void *dummy) SYSINIT(opensolaris_register, SI_SUB_OPENSOLARIS, SI_ORDER_FIRST, opensolaris_load, NULL); static void -opensolaris_unload(void) +opensolaris_unload(void *dummy __unused) { mutex_destroy(&cpu_lock); } From nobody Mon Oct 13 10:13:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8n2gCRz6CJS5; Mon, 13 Oct 2025 10:13: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 4clY8m3tJTz43y1; Mon, 13 Oct 2025 10:13:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C8mXFbX7eXntE/x1s6F86k7ajxTMWfWIzdH+zq1z3jU=; b=oUZdHaC92nsDkVyuR3janFRnfQD/knn8zWoUF5EEd6p0oZz4fPz5nlp0l6ZNtih3JQHXw1 U+DgrLPS5NYYJEYdlmkpQPlONGhxTHD/MD8uz0CdncmAyVKpz+snodOsS/jDMGClBr7XoY qIZ69mIT9qeYSjHIl8AQ+BvRWBrbSlptYnVKgTFOmBE//iYIq6FO3p2LsArkQyfMh7LxHV udF7kbMN4lJkuETDoK0+50iVv7FMat/uGswkkdxxJQuKsRInW+CBSEvWnVfdF632h8dvcS 3wyXbdQtMg0F96UFbKc+x6pqvW37WFF+dVmk1UJlR6uWg0mOqt8do4RyJ15Byw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C8mXFbX7eXntE/x1s6F86k7ajxTMWfWIzdH+zq1z3jU=; b=v+FCh5A2yOn4PV0LggkCuQqpi4RXsM29/00/sYJMapwhh3UOrW6HkAcZSmU/ts3gyRZxnR aorEuU3ZShdQq4svhoEJClRV2eYvvp+kruTJSexzHrGAZ9+Z8rc3SUciL87Kv2llIGLPjf Ix20wxYZKgAFx/rvJyCu3JKvoFHwxMYobEb+S+8BmjhIAaO9/7LN98+W9lcSI/QGczI4qa Y3wg0+0HVWYJhwp6FCWx1ZDfInach81XZ7mAU+el6oLfGWC6DOLLQB/ihR80o+QJgG+BOZ hYhgUR+ACVIlu+AksQaiOA7S2f1uQ6xp8kqB8wp/1DkVkyVvC5D3I8iwzY93+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350424; a=rsa-sha256; cv=none; b=jS91V98lKX+9p8DcfoFlkMkf13prv29gaQEXGjk4AUtlIQMoJanA2jULy4czGS5DHxMHce SUhe/d4fogJ2tyRSy6dzHullGMQhGoUfCmoCDOwHEA83rWy1CgaxVnrXiPojSi9LZvTsYC 6YxVYAaLUwpwlO8Ol8jP9l48aoVMAOXEtR9UVLY77T7kVxpVk3d8rKGpPrJU2yIiAveGnr 4Wob9FD+Wp2meVF7VaIAsHj8Ybz0EMYx6WfEinIkhJkmxLWKQNh3HbS79r2RCSUSdKpQP0 M6ryKZFIhPkZkLGPdNqDs3FRaqurwt+eFHtEFe6Njj2bsQvXxHk8UzvyI/9wUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8m2YMpz12Gy; Mon, 13 Oct 2025 10:13:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADiPA063785; Mon, 13 Oct 2025 10:13:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADi1u063782; Mon, 13 Oct 2025 10:13:44 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:44 GMT Message-Id: <202510131013.59DADi1u063782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: d82653aee7e3 - main - dev/fdt: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d82653aee7e357916403147dc21d342e6b543106 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d82653aee7e357916403147dc21d342e6b543106 commit d82653aee7e357916403147dc21d342e6b543106 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:28 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:28 +0000 dev/fdt: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/dev/fdt/fdt_slicer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/fdt/fdt_slicer.c b/sys/dev/fdt/fdt_slicer.c index 3ba4eddf8b61..50112db5cfae 100644 --- a/sys/dev/fdt/fdt_slicer.c +++ b/sys/dev/fdt/fdt_slicer.c @@ -45,7 +45,7 @@ static int fill_slices(device_t dev, const char *provider, struct flash_slice *slices, int *slices_num); -static void fdt_slicer_init(void); +static void fdt_slicer_init(void *); static int fill_slices_from_node(phandle_t node, struct flash_slice *slices, int *count) @@ -138,7 +138,7 @@ fill_slices(device_t dev, const char *provider __unused, } static void -fdt_slicer_init(void) +fdt_slicer_init(void *dummy __unused) { flash_register_slicer(fill_slices, FLASH_SLICES_TYPE_NAND, false); @@ -147,7 +147,7 @@ fdt_slicer_init(void) } static void -fdt_slicer_cleanup(void) +fdt_slicer_cleanup(void *dummy __unused) { flash_register_slicer(NULL, FLASH_SLICES_TYPE_NAND, true); From nobody Mon Oct 13 10:13:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8q36s4z6CJ5D; Mon, 13 Oct 2025 10:13: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 4clY8n3dx1z4443; Mon, 13 Oct 2025 10:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/0amz7PYpv5fSlhna76svOy34ONZQCM4ZKdssIsEC/s=; b=Qyg8HbaftHi+5zDfmW947VF/mKElvw0JDUpnWucqva3kbUatkQ7FomKr8o4fecWFyZKwMh Hr2STzXJesdxqAqXa/ryU7X5LsQyjpJdtF/jLoU+INXmM6Y6tHLQsAosn0tBX6KV0XT4Y0 qW4oOfy6FxZCGb6thaS+ggCz7oT5xx5xitqdCVEHLfYQ8tMpORzxOoLVCAr3H5DrPLWVk5 iM9gU83tTiNpuYI0hCXMPaqVrSI0vn7/TenQZhgHh9IcI5e6AGJsiFigR3jg9mMe2Tiy9o HThCaZNow0FACeh5tFAY0Zg2jxOXipLQNzxYAX+vKXSpWiW357YDdJEscf8N2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/0amz7PYpv5fSlhna76svOy34ONZQCM4ZKdssIsEC/s=; b=KZXgeSlD3fg/cO5Napvx0cTbhLo4wf1j5T6XAoRm6NOilkb/CVPkNYipWE6quJaf447PXz koQcUP9Wu4HNro/4zw7gxsV+vbojU4nyA42oYoro+shj9cuMdW548YbOVvvDGbGf+6je4A ps0AxAMamJX9r/2Dk+ZlSvlZP9DM5ZSJ0AUmbMElH1y2fD4dFhkZbQVqhHF2eiM0QP2QeS YUSMshnXuVgm2+43jkqXuc4QeeysvolgC47P18yOO0hTao54tQ8lgNwG8xlO+/nEMD9jYY tM4vIOiHP7wzCED00oEJQ1H58FWqO8qHfJFQUaX2WVXn6bYOYQriAn8/ozSFCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350425; a=rsa-sha256; cv=none; b=jUOiyu3wK0P+h0iulitOyWILH4F9HQ9kG0Jo/fRz9tt4X8MByAiYCQm9oL3GEn1nNTqWn1 YezFoykno2f/87LC/dvWlvvZgm+NXx0GbXWDaaF+y8/dIVSq+H/IeZCGOQlyYxxGsqmfv8 ndataMJH4MVVX+HzoRxcMYHYDGF57wICbD/IylCxWnqWi7QbVgdapmKooaE25sbBfkI+m+ 1OlcdZExCmBrGuh9VnQcvc9x5tdsMAQqrv1QUpZMQuOTQfo8iYE/thJ1zouy4SO+9h65Mj J6F5x9ejT0zwG27ZEX75Xb36RH/qEcDYuyxbmmiNWvXXSjZK8DiUThsyhcBRUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8n2xwrz12H0; Mon, 13 Oct 2025 10:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADjdn063822; Mon, 13 Oct 2025 10:13:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADjJu063819; Mon, 13 Oct 2025 10:13:45 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:45 GMT Message-Id: <202510131013.59DADjJu063819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 05c313cd2cbc - main - iommu_gas: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05c313cd2cbcc6c0a6ffa97363b70232d02542f3 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=05c313cd2cbcc6c0a6ffa97363b70232d02542f3 commit 05c313cd2cbcc6c0a6ffa97363b70232d02542f3 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:29 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:29 +0000 iommu_gas: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/dev/iommu/iommu_gas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index ffa8dc096adc..80e37341b3dc 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -77,7 +77,7 @@ static int iommu_check_free; #endif static void -intel_gas_init(void) +intel_gas_init(void *dummy __unused) { iommu_map_entry_zone = uma_zcreate("IOMMU_MAP_ENTRY", From nobody Mon Oct 13 10:13:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8s1qKxz6CJS8; Mon, 13 Oct 2025 10:13: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 4clY8q2lFkz444H; Mon, 13 Oct 2025 10:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wBkPKtoChFpmFIwjBGHs6CrrpiXq8KqvJjMk2C0ws0=; b=SRTOamf0B+gP0d2+pRopuK6qnYOaHpPa3vZraIdRD70yGlen534boOawbet47bsM3xqYpX YY8IakW2C+P2Ujj3ax3/xFu5Pto2IB5Hiitd95ab7/S8RXJoPbXWK0nN5OYF2JzBmP0rge ISbeuIpCXw8Sfxf+JFmXPvXjcQaP51uaADkx2eocTj2hD1UeJQt4enWBVDCGt1vTAn0+bF yJpyS6O+hsnvZ9Ma5qKXFTBt43XuVCLPlTv1t7EuKYYFXddJPmdrz+kr/YsmPtUu5r58T2 U7ZF7qfGb0D2ZYiH/WiNbrW1c5T97v57B1wur1MYGTTXG4sf4WsIRt3k+OWvUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wBkPKtoChFpmFIwjBGHs6CrrpiXq8KqvJjMk2C0ws0=; b=suEjh64E+D+snHQqvkxqu05p/Mxf0XxBXtb5Qu0hMrFmNi6PkTC0qQJItiPpfTEigwdaCI ON1tsUrr6mY2yFM5JplOhdnJukpUSDeIZIYyDH+uSa73CB461uEE+8Jf7gHjOO+MErZGT1 6k+E483ABG/YRruNWjVbTfMmMFgI04DxqnOreHF8yun0d0PZ1DEATX+W8fju+wm4Do6FQS OfkoPV0y6HWAYbKSvMC+xoIV3+nYWTzuDvTrkLD+SHZGfNA/9KVswQVcpBwf8L74VXqhvQ w/l4Igd2TtPrYjJeJIgxA6vtrydBreVQ5q555mnpHVJf5030u9h67OcCypsJxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350427; a=rsa-sha256; cv=none; b=YZbz1l1DCKhC/JqowtxHb6ThDDvX28A+URjLTvbmXKpPcKs0If6hfP+h6qSnk8598Rv2Xw c+pabUTwrdZ0YGy6ncibv7qR9IkBw/GIqBMP0h76YiWm0TWXrtTC7SyckiIJgI5zFnPqmW kOjoLnrFfFSBSdJmAC0/os6q/JsnzFKedtmMMSWEtlZc0vdMDQmZsaaHWiM2von3to3S63 FIlvv1z+ZowkViN+vSvMfmI43eGKZgnbRWYsApFAv/T2TSGdud/lUWGjnq3nKx7kHBpl9q Ym+kTM8K0P1MlJZ3ygm3euoVe1zhVl0CQI0ANJ6CkcjaWCs/U/r9rmn9VCS5KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8p48ZVz12H1; Mon, 13 Oct 2025 10:13:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADkFw063859; Mon, 13 Oct 2025 10:13:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADkmY063856; Mon, 13 Oct 2025 10:13:46 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:46 GMT Message-Id: <202510131013.59DADkmY063856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: dd256c3fa738 - main - nvme: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd256c3fa738b6941f58355c077224c9a227b169 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=dd256c3fa738b6941f58355c077224c9a227b169 commit dd256c3fa738b6941f58355c077224c9a227b169 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:29 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:29 +0000 nvme: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/dev/nvme/nvme.c | 4 ++-- sys/dev/nvme/nvme_sim.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index ead91f0d01fe..d119f9877aaa 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -51,7 +51,7 @@ int32_t nvme_retry_count; MALLOC_DEFINE(M_NVME, "nvme", "nvme(4) memory allocations"); static void -nvme_init(void) +nvme_init(void *dummy __unused) { uint32_t i; @@ -62,7 +62,7 @@ nvme_init(void) SYSINIT(nvme_register, SI_SUB_DRIVERS, SI_ORDER_SECOND, nvme_init, NULL); static void -nvme_uninit(void) +nvme_uninit(void *dummy __unused) { } diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index a06774a64761..7693aa6d54d3 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -391,7 +391,7 @@ nvme_sim_controller_fail(void *ctrlr_arg) struct nvme_consumer *consumer_cookie; static void -nvme_sim_init(void) +nvme_sim_init(void *dummy __unused) { if (nvme_use_nvd) return; @@ -404,7 +404,7 @@ SYSINIT(nvme_sim_register, SI_SUB_DRIVERS, SI_ORDER_ANY, nvme_sim_init, NULL); static void -nvme_sim_uninit(void) +nvme_sim_uninit(void *dummy __unused) { if (nvme_use_nvd) return; From nobody Mon Oct 13 10:13:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8t1V9Rz6CJgx; Mon, 13 Oct 2025 10: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 4clY8r2DT3z43qP; Mon, 13 Oct 2025 10:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cjaaFiZXQl/HgzAiYKz3LtG0UyHwv/tOgKsrGPtW7hw=; b=HMUGP3C1YHTpltBW1EyJeAc5uJOf4B7fsa3hK28VtEiLxMJa0HtyMG/RyjxChn+IqWpqd+ EMce71TVgukHWci3KxYFtIwEG/0FLT1XB+zdvpfSC/5ConbITxdAG0RxNzoVetG44wojCs x9iuZjYTJy7h5L07huvXW3P3MjtOtgV+aXFnmPvObp5bOoyrasNCWx7rERM4VLeCzBN/wg ilTrOh2hPy2E6zl8PYdpMlYngcip9DRMUivoth9Yc9tYxJmvT6E6KN8Sa8E7wDsl57ZEw8 gKSzO5gp3aMFdDxGwE3/mX9jJ7crIumK8y22ecnq8By1DT9PBEKOykqIA0MZYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cjaaFiZXQl/HgzAiYKz3LtG0UyHwv/tOgKsrGPtW7hw=; b=AlS95/cDGiGNPANKdvoGfyjfuULR/2Jo9N8WbQuXbKgwnhPInBB/3hSJXF/BQvg6NBfTt6 aM2NJKcWdjL97Cd7S7vwJvUl0Y+vcLveEt0LmnOQ0EJ9PD7gieybpP1PO9/GRikx4ES++t E6Oq1uJz9tSoJV7Wvq1nO8Jg3SrJnsdpoVV3ImA9OxhL+YGoxfmw90S18iKtuL/Dp+r2qq TgnwB7gGvESrYNzDepUdOgnzO28tUdw3NsIhmoUbc8woICJMkRkTlBWW38gbrTZJTvjFot 4IHl1phU5xUCO5pC9L8tDUjPxhA/mLAHVv+ph0h/kyRaL7c/HgnhoxIGKFLqIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350428; a=rsa-sha256; cv=none; b=Pv8FEO5f+PIDT1IpVwNRyH4LLZrBeHRNsuJdsZQzmHVGnBAghG7rAE68Z6DeHGi2zkPdzC VEpP43OSuCcmtDAk2ZFsAdzi8S0yK7cLZjQFnN3hR3jtir9BO1QiUt6dpZjL8srvUjp1n2 zVQt32RSEBQsQQgNXpeq0ZB77HwjWgQ9roeblSQyKssEXdZ+8Ykyj1dAVtvT9BZXnPqwzF Ve0KZDRB9HT9kSjjkErfgnYP8fb9VgAWReymMCB86JObpSlopjlVGmTDsO/EdOWDPrJlNO RtjrfVVJ9RsdGE2MU38wAPGLVa8cpfdQ3U/tH+Bk3kBrVAVjKQQ4S+8GUaztvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8q4x8Nz12n5; Mon, 13 Oct 2025 10:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADlPU063894; Mon, 13 Oct 2025 10:13:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADlpB063889; Mon, 13 Oct 2025 10:13:47 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:47 GMT Message-Id: <202510131013.59DADlpB063889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: ef56b9188937 - main - xdma: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef56b9188937eec1ceef458d02c71c6b890b398a Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ef56b9188937eec1ceef458d02c71c6b890b398a commit ef56b9188937eec1ceef458d02c71c6b890b398a Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:29 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:29 +0000 xdma: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/dev/xdma/xdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/xdma/xdma.c b/sys/dev/xdma/xdma.c index 62b781159d03..cdd9ad0b8f39 100644 --- a/sys/dev/xdma/xdma.c +++ b/sys/dev/xdma/xdma.c @@ -555,7 +555,7 @@ xdma_put(xdma_controller_t *xdma) } static void -xdma_init(void) +xdma_init(void *dummy __unused) { mtx_init(&xdma_mtx, "xDMA", NULL, MTX_DEF); From nobody Mon Oct 13 10:13:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8t1ZPYz6CJ7Z; Mon, 13 Oct 2025 10: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 4clY8s1wZzz448w; Mon, 13 Oct 2025 10:13:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i9F7HCQGDTCYLRTgdEbfLyVyOsNTaN0Xhf0tLWwHYEI=; b=UcOU20eixNKdX3/D1ZHaachFo4SJm1vAOdB2bIEs1WMDT0hi9gfdxrnyl6+MDY1Xd92v4p /0Dm6dXb21X0IoOKYPmJtYxy67x8neuIBEU9e3WZDHlvAtp8U6mDQySpB/7Jgo2F/BmUcQ UeeKA3LZTlr0MVqo95d1+KWomkmfJpug+WRWQIZo60iysmqV0hVyZVjUQZ+eZy2bL74Cg9 f9ooxO1NSDxFxUwRiR2u36AkKEn8ITbcSFMlRc66NmYIWvnDRvZEoDqlFHXG4feu0kfHc0 KObI3brrVNL4eDw2Sf9l5PfmEWwVQ5FypwK/WliYL2cm+iT3dCAvHLO3H6sW8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i9F7HCQGDTCYLRTgdEbfLyVyOsNTaN0Xhf0tLWwHYEI=; b=KRidxHBIT2r03iKBY9nLBiea3BQS9Hq3wlzyZipg1Z84f20RAI4CY0TV/F9roqpoeGxUal Vsq/IHEsbCgQNKxmUBjw/j5yBvRts+QI1bpVPCet6z7X/hDsbOUE37DM3ClYnrczOCfEaw u6/ta1Pfu2NTiaGg0159RzbO0ixRH3GJxOwaQxA2RfFNrJNnXsTRBmOd82iC45l/xuQERs OLSfFIZ7zsK+YnqlV9ZAUvShJ/0Rm96F/pUGUhX1IEyue7N608PZMFQcHDl5TLd4kIheae kzzYu5/SPsrE5BVkDBaH0pfwFwMCXTcEO6rYwCjzxNjn5GztXcU6Woj5j7kjyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350429; a=rsa-sha256; cv=none; b=Qw5pdjuJtlkrMAfMXSHBTJwM4+5yniEFzoRToQljGtIwy63jibC3MCjMsOJBlR7uAFsY6Z oPGq3IIFxvZlCi0s1n+ApgKoQ/lakvWeHN/GyqpBl0cPgzCCRGDaTXfPdbL6jRftfl3MJ5 8QZc0wakqh445zGFWqk6rmZuOWojJMqFZ/RJ/CM9Ywi/ve0aWPEuBSBJ17clfa81ejK1D2 TjqfPQ5nlRm/Lnr3xI71t84ZEXSt1i2u4oRDI2LbKnDYM8LR/rdI1oaCTm9uzA8lGM2hai ZUg8amOyjzzaXLMR+mhvcY9Yntw5CBS7KXjZsgzB9maBw6V4T9IPQFXOlYOvCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8r6js2z12n6; Mon, 13 Oct 2025 10:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADm6x063928; Mon, 13 Oct 2025 10:13:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADm9r063925; Mon, 13 Oct 2025 10:13:48 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:48 GMT Message-Id: <202510131013.59DADm9r063925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 19061a898ac8 - main - xen: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19061a898ac809c8e9a30839b7200ff13a6eb9c0 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=19061a898ac809c8e9a30839b7200ff13a6eb9c0 commit 19061a898ac809c8e9a30839b7200ff13a6eb9c0 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:30 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:30 +0000 xen: Use proper prototype for SYSINIT functions The only possible return value of function xen_intr_init() is 0. Make it return void to match the prototype of SYSINIT. MFC after: 1 week --- sys/dev/xen/bus/xen_intr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/xen/bus/xen_intr.c b/sys/dev/xen/bus/xen_intr.c index cb30b6efa484..2b5fa8fb7cd1 100644 --- a/sys/dev/xen/bus/xen_intr.c +++ b/sys/dev/xen/bus/xen_intr.c @@ -460,7 +460,7 @@ xen_intr_handle_upcall(void *unused __unused) return (FILTER_HANDLED); } -static int +static void xen_intr_init(void *dummy __unused) { shared_info_t *s = HYPERVISOR_shared_info; @@ -468,7 +468,7 @@ xen_intr_init(void *dummy __unused) int i; if (!xen_domain()) - return (0); + return; _Static_assert(is_valid_evtchn(0), "is_valid_evtchn(0) fails (unused by Xen, but valid by interface"); @@ -502,8 +502,6 @@ xen_intr_init(void *dummy __unused) if (bootverbose) printf("Xen interrupt system initialized\n"); - - return (0); } SYSINIT(xen_intr_init, SI_SUB_INTR, SI_ORDER_SECOND, xen_intr_init, NULL); From nobody Mon Oct 13 10:13:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8t29pbz6CJ5J; Mon, 13 Oct 2025 10: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 4clY8s6sWsz441m; Mon, 13 Oct 2025 10:13:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gztFpwY5/JV3t2dcBI/j1ccxgYLZMM1uEaZcTO8nh8=; b=vE+53eulHuUHTdPzoCVnjKTfvbGRnL2PReFxU7Dd4c6sWDtWszm9ByOtZ55derTimt0McM +m8l7tlHIIWkpG+orOeV9M9NOoUK/EKlPSK4XUpFyXNsNfTvynXG+vsI+kO+H8rI+Ziqtf aSb8d1ldNrk92B/8uoIM8/9UOzqzkhPJistxtVkRft4vxmqa3Mc2pa6DkdtMWaLjXbUWZR umNCk5TZtH9e1qNLCftsjyyWCQEmyHqb4WFS/zxLEQTLNOihUWxFABpQ4cAoj/uyy2MsK9 WyzzvapPdhfc1QI416QI68t+ES8hegMMj4bsvNgGGVxG3PgYXsuZkowpfQoVHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gztFpwY5/JV3t2dcBI/j1ccxgYLZMM1uEaZcTO8nh8=; b=IfQ/+mywHKepPsbtQpD7aP0MIaQ2z5AZoC/8A1MjA+ODUAqGMSrLMnWXjV1A05iZymLLQP VF8t8fXYsn9b2QXHZKpBFVX7d5PkD3hvn8gK4aajOUZsNRXHTWUJ/0HQY7YRacTT+qS+sS qT5V1FMVuYCkRAr5deqMhSgRss4u9vk9b++0KCpnwQR+s4Els3AawwsDRtJB8cr8mYgS4l qLbr8B0iIUgEZZy7UOw3vuwxCxhR/g4UMKYj/lNYGi0loH9n0wTIhwHyicQgvwt8ogtXTC GMWpl7QJ3m3y6VcIvR5UDXEwjpfrDR62WaYqzZY4Wx2rVhMBbZuIV+S4j1EuGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350430; a=rsa-sha256; cv=none; b=j8GAoQ6jerp3RnO+No04sF2G822LZXplOG3IkFEeZKoNhJJRurExDzOdku/FBJA774WoR4 cbXrWCgsdsFAhKnvMEo26nUJVTfoXB6fYsqNwAQJHx4a1pqYAyI3b7ugv7B1unUUTEYQM2 BkpPx/yjaKDr0IEAbMzqke7n4CzDyaY0KWXG0eQyMk4+0cWX7iG559hfwpCM85nWl2UMu+ tKqmaF6/uy4iYCTur0nv8sTfB25XPf5Vk/1ye9O97Bw3UdcmRR21z/IhjqXODvruifYxRu 05IKniF2zsLypsVHW44kzi6WiUVBbq0Vkx6dYrhbTatARomgj4vYAbZQkqYbiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8s6CCXz12Ys; Mon, 13 Oct 2025 10:13:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADnEp063962; Mon, 13 Oct 2025 10:13:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADnFB063959; Mon, 13 Oct 2025 10:13:49 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:49 GMT Message-Id: <202510131013.59DADnFB063959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 11cfa861e3ff - main - p9fs: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11cfa861e3ff83649c54e5781b541166dc73e80b Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=11cfa861e3ff83649c54e5781b541166dc73e80b commit 11cfa861e3ff83649c54e5781b541166dc73e80b Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:30 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:30 +0000 p9fs: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/fs/p9fs/p9_transport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/fs/p9fs/p9_transport.c b/sys/fs/p9fs/p9_transport.c index c82d81fedcd7..25eee984265c 100644 --- a/sys/fs/p9fs/p9_transport.c +++ b/sys/fs/p9fs/p9_transport.c @@ -34,9 +34,8 @@ TAILQ_HEAD(, p9_trans_module) transports; static void -p9_transport_init(void) +p9_transport_init(void *dummy __unused) { - TAILQ_INIT(&transports); } From nobody Mon Oct 13 10:13:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8w730cz6CJDN; Mon, 13 Oct 2025 10:13: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 4clY8w244vz43tJ; Mon, 13 Oct 2025 10:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJ1kesMTO/e+YGU0ZZwvbqg6c+TUrALV4OJGBvtzbT4=; b=NvhZv+L63HOxGFt3EzvolQcFjl21IDlLS5QkV6wEz19ngWKgzHmWGSXBfP43+2/Nl7EQMY TRmh+sh8y+MPmLTAVgv8GUBQdnJkxCCnVP5Ob2Q1Zl7pg0GInijAraC1C1geI0w/wiCkT7 rphwETI5YHy4ljLRyQaw72Jyx/LQ1oVOGF1jFfZCOD9m0G+yuAKJ8E3bGrUow1LsWJUhH2 qJOcoty7/3gyiWBuYPTri7I6xPjQpzAspt4Q8APtGZoDX0uu7mMnaw5kkH5rc0JhujgFDZ jtAhkH970pkqAPMfXwn+9ZZUmVZBZMpvsbK4vkY0wmsX5pvhHh/XCFC/j/qMkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJ1kesMTO/e+YGU0ZZwvbqg6c+TUrALV4OJGBvtzbT4=; b=tqu2uBvUh4BZgaFiZ4Lty6sCdXg5GRqkFvWFtnlUNQRaRQV2KEcejMCcaql4R00CbpcR+x VNtCL0MX90Vz48KxFcUDFcPaBzLQby+ojMsUjP8MeuUU489HYgNtcAgIWXfMlUu/5haNld ncs1IuNXMaukt4xXQOSSvoINyxAqap7ZUH3fm22KD0ernOtdCD8phIpCwYZIrEQVseNrvV YjU15srLsUpdB8TLIYHIyiDXg5TzoMse1w0ZYEPoAZs/ivZAiuC4PDceJk6+9Wlf5UAv5N FDDQmLGmHJ5AoPv7HiLYtZCOD8dcezyW/5S9u1L6X17gjICKdKrXJa7NyfOEAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350432; a=rsa-sha256; cv=none; b=rQNKvRIFcGLmauL/vKBr6fJH860EfPzSxVEsB2wOPm28IvCoXuGrl0WAOV7UZ4BoIj+N3d G7z/HbLKJG1fyWo5i816Z44C+5tEbmTIiccQVNvZU80IhQMK6QQfH1CK3IdM1tl71VIR76 LrJzv6NP3SFbHk9bsjiI7QRWuF4xoQ9DPuA983hHg3Sb1SapTj2EA9s+hIkG9USFp4o7Ia wm99tUCTYCgSCcvexJItHUtvkXvbZbHVWF/IIEuspOD2s9mxlpNava2b8W4IEIhCMDMMcs S4SDRtLOkFQ/xbAI+QAFClo0c/OTiETlVq0vcNarxMleAEgK3BQ1r08CSVY4RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8w0mQSz12q8; Mon, 13 Oct 2025 10:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADpeG064035; Mon, 13 Oct 2025 10:13:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADpUH064032; Mon, 13 Oct 2025 10:13:51 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:51 GMT Message-Id: <202510131013.59DADpUH064032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 141b44e0afc2 - main - kern_sharedpage.c: Remove an unneeded type cast List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 141b44e0afc2912a0a1c7bbb4116921ead1d58d4 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=141b44e0afc2912a0a1c7bbb4116921ead1d58d4 commit 141b44e0afc2912a0a1c7bbb4116921ead1d58d4 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:31 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:31 +0000 kern_sharedpage.c: Remove an unneeded type cast The function shared_page_init() already has the right prototype. MFC after: 1 week --- sys/kern/kern_sharedpage.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/kern_sharedpage.c b/sys/kern/kern_sharedpage.c index 5b8398caaca9..f48d0e3d616b 100644 --- a/sys/kern/kern_sharedpage.c +++ b/sys/kern/kern_sharedpage.c @@ -130,8 +130,7 @@ shared_page_init(void *dummy __unused) shared_page_mapping = (char *)addr; } -SYSINIT(shp, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)shared_page_init, - NULL); +SYSINIT(shp, SI_SUB_EXEC, SI_ORDER_FIRST, shared_page_init, NULL); /* * Push the timehands update to the shared page. From nobody Mon Oct 13 10:13:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8w2z5Kz6CJMG; Mon, 13 Oct 2025 10:13: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 4clY8v3892z43x6; Mon, 13 Oct 2025 10:13:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ojjDL0fLCqPBnXoHhNUUIHxv3hY0dEzf/4eMnGOtgjI=; b=jJ6X+zONXpmNkEYXXt6Wg4MDKt6b0HEha9m26skLxpvRwP1dyOgxDyiEryKZFx1jVfpfA9 Oq3ex7PLGUDXXMD3p77B4XI+g8vWnaZXAlYFK0MkpbmBU0JWa1KaAmHjogMZfHC8mq/qre iG8Bqupk3CPQdb3nD3kYLod3LPDwY+z6zU+hzqPK7ItSn9eja2em3fNnPGDAEAkgYW1/QX DZK5DejWY7LRJ+odLHuD7sBvVnvo4NxcY9Hg8dlVEWTxHtNaMPqdMzHJBzvsxPC/CKPw22 ZlY3NJ/hhVB4X53+R/dHrDeLWMTkg9w/6NXyTvnsAOyUYwvCZNib9NaEqDxotQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ojjDL0fLCqPBnXoHhNUUIHxv3hY0dEzf/4eMnGOtgjI=; b=KRizMy19kDbqHj33YpJQKVoAIKVJyc/BZ+nbNVXWYX6CP6/4+9RStki7k5s843QncPhcfp jeMh2P4XI+hDmSgOJiSCyxh0gy1X4g6UIzKxUS4WkLHaLH4pGek38KKd+L1AtKchP7VteV QkbExrib/xqpyoHUUk78lbDsBbiayZhSy0i/47AtqUdCd522r4LeVXtMAWVgaYJeLZFO09 3Z3i16JpKggK/HiJXCpT7gjX2U1du5tlk1vNpLzZVpaJYGyp/3qUWgdovSNY7wrF0k14CS XCCZS/QyzzxAn7o4hLyETn+OMlA8YOqvPprmDgQw6WuWQrg5S3aIxCebtIDAug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350431; a=rsa-sha256; cv=none; b=leFdyDYjn7qjvcojrwUoPeEa4BJyWmSRlxrsSKXc9uSrWLcwCRteIXwT54p1clkYyPqDRB iAMq0c3MuZ9uBJanQVqER2Q8CpEOoS25aCX3XhBVttHkrF4fUoo0bLuiCYNkltoHzK9cKf 6j5/Fpb9IjJspzZU7DFUU9YEPsHPTSGLzOEixWii4yxgdlMm/ElVo2mOUcu5Zm5OpzXbGj E7Jo01m6jb4z8k4CYYKg4Th+4z3WrxJN3Drnxwy/bCFlv3VwQpzkIjfdKWFnomS2NRqQ+w G9RO3rSAyxJFri7PxlbCm6wO48gwgtljhh5LATWB4o1YoAIzWhjCaLRqRSKxLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8v0GqGz12Lw; Mon, 13 Oct 2025 10:13:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADox7063996; Mon, 13 Oct 2025 10:13:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADoic063992; Mon, 13 Oct 2025 10:13:50 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:50 GMT Message-Id: <202510131013.59DADoic063992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 9c35c4470ad1 - main - kern: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c35c4470ad131c748efba7f64ad2fff7d21060f Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9c35c4470ad131c748efba7f64ad2fff7d21060f commit 9c35c4470ad131c748efba7f64ad2fff7d21060f Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:31 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:31 +0000 kern: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/kern/kern_boottrace.c | 2 +- sys/kern/kern_devctl.c | 2 +- sys/kern/kern_event.c | 4 ++-- sys/kern/kern_linker.c | 2 +- sys/kern/kern_malloc.c | 2 +- sys/kern/kern_racct.c | 4 ++-- sys/kern/kern_rangelock.c | 2 +- sys/kern/kern_rctl.c | 4 ++-- sys/kern/kern_sig.c | 4 ++-- sys/kern/kern_time.c | 4 ++-- sys/kern/subr_pcpu.c | 2 +- sys/kern/sys_socket.c | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/kern/kern_boottrace.c b/sys/kern/kern_boottrace.c index 1fa87955a299..c83255bc74ee 100644 --- a/sys/kern/kern_boottrace.c +++ b/sys/kern/kern_boottrace.c @@ -579,7 +579,7 @@ sysctl_boottrace_reset(SYSCTL_HANDLER_ARGS) } static void -boottrace_init(void) +boottrace_init(void *dummy __unused) { if (!boottrace_enabled) diff --git a/sys/kern/kern_devctl.c b/sys/kern/kern_devctl.c index 7a2818c29b1a..a1696225df32 100644 --- a/sys/kern/kern_devctl.c +++ b/sys/kern/kern_devctl.c @@ -140,7 +140,7 @@ static struct devctlbridge { } devctl_notify_hook = { .send_f = NULL }; static void -devctl_init(void) +devctl_init(void *dummy __unused) { int reserve; uma_zone_t z; diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 23d8dc9cf54a..a6333d8011b1 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -156,7 +156,7 @@ static void knote_drop(struct knote *kn, struct thread *td); static void knote_drop_detached(struct knote *kn, struct thread *td); static void knote_enqueue(struct knote *kn); static void knote_dequeue(struct knote *kn); -static void knote_init(void); +static void knote_init(void *); static struct knote *knote_alloc(int mflag); static void knote_free(struct knote *kn); @@ -2887,7 +2887,7 @@ knote_dequeue(struct knote *kn) } static void -knote_init(void) +knote_init(void *dummy __unused) { knote_zone = uma_zcreate("KNOTE", sizeof(struct knote), NULL, NULL, diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index d566bc01bc5e..e2f63cbc0c5a 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -435,7 +435,7 @@ linker_file_register_modules(linker_file_t lf) } static void -linker_init_kernel_modules(void) +linker_init_kernel_modules(void *dummy __unused) { sx_xlock(&kld_sx); diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 653ce1ee556b..e919b15543b2 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -303,7 +303,7 @@ sysctl_vm_malloc_zone_sizes(SYSCTL_HANDLER_ARGS) */ #if MALLOC_DEBUG_MAXZONES > 1 static void -tunable_set_numzones(void) +tunable_set_numzones(void *dummy __unused) { TUNABLE_INT_FETCH("debug.malloc.numzones", diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 7351e9cb6313..2aab151aba08 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -1312,7 +1312,7 @@ static struct kproc_desc racctd_kp = { }; static void -racctd_init(void) +racctd_init(void *dummy __unused) { if (!racct_enable) return; @@ -1322,7 +1322,7 @@ racctd_init(void) SYSINIT(racctd, SI_SUB_RACCTD, SI_ORDER_FIRST, racctd_init, NULL); static void -racct_init(void) +racct_init(void *dummy __unused) { if (!racct_enable) return; diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 3854ffbeec29..cd66bff62608 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -300,7 +300,7 @@ static void rangelock_free_free(struct rl_q_entry *free); static void rangelock_noncheating_destroy(struct rangelock *lock); static void -rangelock_sys_init(void) +rangelock_sys_init(void *dummy __unused) { rl_entry_zone = uma_zcreate("rl_entry", sizeof(struct rl_q_entry), NULL, NULL, NULL, NULL, UMA_ALIGNOF(struct rl_q_entry), diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c index 4232c71f86fb..682ba86d23ff 100644 --- a/sys/kern/kern_rctl.c +++ b/sys/kern/kern_rctl.c @@ -209,7 +209,7 @@ static struct dict actionnames[] = { { "throttle", RCTL_ACTION_THROTTLE }, { NULL, -1 }}; -static void rctl_init(void); +static void rctl_init(void *); SYSINIT(rctl, SI_SUB_RACCT, SI_ORDER_FIRST, rctl_init, NULL); static uma_zone_t rctl_rule_zone; @@ -2175,7 +2175,7 @@ rctl_racct_release(struct racct *racct) } static void -rctl_init(void) +rctl_init(void *dummy __unused) { if (!racct_enable) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 8efc0886988b..21f765b17f62 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -113,7 +113,7 @@ static int filt_sigattach(struct knote *kn); static void filt_sigdetach(struct knote *kn); static int filt_signal(struct knote *kn, long hint); static struct thread *sigtd(struct proc *p, int sig, bool fast_sigblock); -static void sigqueue_start(void); +static void sigqueue_start(void *); static void sigfastblock_setpend(struct thread *td, bool resched); static void sig_handle_first_stop(struct thread *td, struct proc *p, int sig); @@ -344,7 +344,7 @@ ast_sigsuspend(struct thread *td, int tda __unused) } static void -sigqueue_start(void) +sigqueue_start(void *dummy __unused) { ksiginfo_zone = uma_zcreate("ksiginfo", sizeof(ksiginfo_t), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 2a6f0989f6aa..5b7485c25cd7 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -90,7 +90,7 @@ static int user_clock_nanosleep(struct thread *td, clockid_t clock_id, int flags, const struct timespec *ua_rqtp, struct timespec *ua_rmtp); -static void itimer_start(void); +static void itimer_start(void *); static int itimer_init(void *, int, int); static void itimer_fini(void *, int); static void itimer_enter(struct itimer *); @@ -1170,7 +1170,7 @@ eventratecheck(struct timeval *lasttime, int *cureps, int maxeps) } static void -itimer_start(void) +itimer_start(void *dummy __unused) { static const struct kclock rt_clock = { .timer_create = realtimer_create, diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c index 5c14e15830f4..c9a387a5e87b 100644 --- a/sys/kern/subr_pcpu.c +++ b/sys/kern/subr_pcpu.c @@ -140,7 +140,7 @@ uma_zone_t pcpu_zone_32; uma_zone_t pcpu_zone_64; static void -pcpu_zones_startup(void) +pcpu_zones_startup(void *dummy __unused) { pcpu_zone_4 = uma_zcreate("pcpu-4", 4, diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index c221106ae067..bc0725230cca 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -586,7 +586,7 @@ soaio_enqueue(struct task *task) } static void -soaio_init(void) +soaio_init(void *dummy __unused) { soaio_lifetime = AIOD_LIFETIME_DEFAULT; From nobody Mon Oct 13 10:13:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8y1RR0z6CJ7q; Mon, 13 Oct 2025 10:13: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 4clY8x2BJPz43r8; Mon, 13 Oct 2025 10:13:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H9EXLfWdy3MMXJaqoJBPAX/VOCS3CuhLu4hwjxzSH9k=; b=gcrQbk5t/YnLArnJrtkF3QeNd8orfOc+ReeroGkYUnjQ8Ap5VcMpSovx2Ed6BV4Bq1tfUe giga0Wuw37QvBhMdDnIuLhKgCNfXZeFs7KIzjtAvx2hi0U8I8Y08o/h59tBK9vc3dGgkg0 Stlzsa7DXPCj5teFOnbmcYrY6JmdZcvfWE3DccFYq8nfQgnFgy6scZJp0pEvDtoUsJacF1 SldSP0OHZ7hR3lnK0DCF5ROTUyx5x5LzJjHJVBj1cvICVVjuSe6Q0994YIVwG31hdBvQvd WN160LdXcXwPMJhdgdRwBuMZyqk5bF+0jOkzFPB5Aq3Jo6Dvto/zcs2zrhC5zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H9EXLfWdy3MMXJaqoJBPAX/VOCS3CuhLu4hwjxzSH9k=; b=uW9BK9LBzh1k+U1wc7JqqKbp66tUXAA+JuaTyGUtHjWdfFtezKR0BbjypE4tPp+rtNJjB8 kAB+gvYpsQSOXycaRWc8KNKOSjrAt5ZL/aozJ1QxLJELOCgMfSN29qyqYV0WSAE/04g72N L7vEbUbqgzY9T4siV14snLLgzL/qo1IvEx9IyEVL0crpLKuQefk3WbLbzHqEiA4nMZfJGM EWWTmtQzC4CiinmmBEEimuK5Wk9l0GMOBBBiP18k4bZCg54BreMt61BEWwTQLMa72ZZmx2 VM8sNjTKiD57Jl9Fz7bgf7ihOu57AE6faD+VREB0yemArfn/veS0b8Kh5WQfeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350433; a=rsa-sha256; cv=none; b=uKLA30CRuknN5lP8FxD1SER8Msp6764UYutouxwAert+Exr717EChOjFnf95MaFSZaFiYe GAD0+yDYhu3/QcIqUAwIH4Kg+iA05pGNrmyzwvxKIRAfuc/dpzXqMQR16L5DNa4SB7CMm+ fmPAPUcT+w5aLDCfDxYXOw2dKxPc9Vdocx86HiH/+CyFgHTCNWZoCrXVrtye06TQ/hasTs dCHt4ogLR+hW4c1uYiBOQVeKQaMy6hyRUWTeHaISxrjEZas9iwk5/fCQSSygYAYa2G7CKg bQuj/sCei9GuS67cy138kJGKty1y3KwZMpmrIsgxdZ3fzfbVWqC7/Bl2iWNo5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8x1Y7fz12Pt; Mon, 13 Oct 2025 10:13:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADrKl064072; Mon, 13 Oct 2025 10:13:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADrka064069; Mon, 13 Oct 2025 10:13:53 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:53 GMT Message-Id: <202510131013.59DADrka064069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: a988393b469b - main - jail: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a988393b469be58ff87f4d044af61fd2251b490c Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a988393b469be58ff87f4d044af61fd2251b490c commit a988393b469be58ff87f4d044af61fd2251b490c Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:31 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:31 +0000 jail: Use proper prototype for SYSINIT functions The only possible return value of function jm_sysinit() and jm_sysuninit() is 0. Make them return void to match the prototype of SYSINIT. MFC after: 1 week --- sys/kern/kern_jailmeta.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_jailmeta.c b/sys/kern/kern_jailmeta.c index 4e37eccad03a..91bb7155820d 100644 --- a/sys/kern/kern_jailmeta.c +++ b/sys/kern/kern_jailmeta.c @@ -599,22 +599,18 @@ SYSCTL_PROC(_security_jail, OID_AUTO, env, /* Setup and tear down. */ -static int +static void jm_sysinit(void *arg __unused) { meta.osd_slot = osd_jail_register(jm_osd_destructor, meta.methods); env.osd_slot = osd_jail_register(jm_osd_destructor, env.methods); - - return (0); } -static int +static void jm_sysuninit(void *arg __unused) { osd_jail_deregister(meta.osd_slot); osd_jail_deregister(env.osd_slot); - - return (0); } SYSINIT(jailmeta, SI_SUB_DRIVERS, SI_ORDER_ANY, jm_sysinit, NULL); From nobody Mon Oct 13 10:13:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY8y4clSz6CJkc; Mon, 13 Oct 2025 10:13: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 4clY8y2wyBz449f; Mon, 13 Oct 2025 10:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LCoh6kWA00+4rT10IHsjwTQdNByKGYugn8fjvVnLKEQ=; b=VgpUUMzJIhtJMcOmb5P1Vb28jssETC2fvmYrLoHgUg4PyNir25d5IEHsenFd9F1MOtIkpT 9cf8k9dI9NxJLOhwAGw7LmPeAKwiMFFi8Vid89+dVuyitjX7aHcoIzgJRtSQQ0dOVijon8 8RxnRkS6sl06ZxBHV5AY6Ere6w0/OKy6vQKkug0PJqlCF4JlnBFsddEoclC1rUVJJsCojB QfQfAefKKcOvHaIXkM9mVYmCjVPEsXk2f7SR5SgUPSC6/hK/iinsSdsN1KuCrWlxzOpuL1 YRRIygzKzAPYJnv7bim6ru6ynSYoDyONxvZ05syxxipE6rYSVcN/+B0S5SzXDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LCoh6kWA00+4rT10IHsjwTQdNByKGYugn8fjvVnLKEQ=; b=Tj7P7lqjCaqArsHAavTzFQz36lQ1gr/xk1f8vBZIMJAuEO7qbm3Q2jnl5Fi3pK9DaXBwXx TveMJr0EuQfbE7WJ5/yNpcDMO46ZMTWa6S8jNEIeHOcPVz/16b4goo5RofVPdbjmsDTcNf ZCBqq+hMFLsWZ5DSV/gsJL2GHOI6G2AjhlpkTmMajMa9PGG3ZEGCiwP+80EpHNQXq12aCl XvSU/XMBJ1GiTVFnH3Qjm1ze0mbzCPO//2T2T9/RLi9aJTXX34SnZx+yA4K051NUpPBV4x D5qpORT0BwYqVPaa8oYBbdpdmU2fIkI3pgnaRujh0zPrlUq5VBfhvI/Emfz8xQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350434; a=rsa-sha256; cv=none; b=pKOJqVwo36UekHxeJB6MQ3OzPKh3yVkv7VgnY42Je+jqBcH9jFrW4VnlpUQw5+6c7Xds/t RyjI8yRKPIwtmBS8ggVhN8OxdCTG9qqQtmxdS+G1ikq4iEG/jKoq1GiEj493aBiSsLfzK5 MB6O1J4xWXi3E/LrgxlD6JgfUn6wbVfady1g4CA6DjqK1i9hT54XzHamV4e939TVjFvVl7 SBHk+bUVzjqHrd1rtxyfDsHT+W7qhkQm83aobjn5dKBY9d1HShZoApnn4x6vvtSMGbNTfT qFL6cVSdZK/X2ST8kiloM9tBEfdDSuHlm2Uf79Sryk58kp+1Yc+MNUvKKa+4SA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8y2SrHz12Yt; Mon, 13 Oct 2025 10:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADsCu064107; Mon, 13 Oct 2025 10:13:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADs4v064104; Mon, 13 Oct 2025 10:13:54 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:54 GMT Message-Id: <202510131013.59DADs4v064104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 850a88e8db76 - main - libkern: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 850a88e8db761c55b9aa56c2cf4da258dc61dec5 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=850a88e8db761c55b9aa56c2cf4da258dc61dec5 commit 850a88e8db761c55b9aa56c2cf4da258dc61dec5 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:31 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:31 +0000 libkern: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/libkern/arc4random.c | 4 ++-- sys/libkern/x86/crc32_sse42.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/libkern/arc4random.c b/sys/libkern/arc4random.c index 016822e9f03c..6fca7c3c4e9d 100644 --- a/sys/libkern/arc4random.c +++ b/sys/libkern/arc4random.c @@ -156,7 +156,7 @@ chacha20_randomstir(struct chacha20_s *chacha20) * Initialize the contexts. */ static void -chacha20_init(void) +chacha20_init(void *dummy __unused) { struct chacha20_s *chacha20; @@ -176,7 +176,7 @@ SYSINIT(chacha20, SI_SUB_LOCK, SI_ORDER_ANY, chacha20_init, NULL); static void -chacha20_uninit(void) +chacha20_uninit(void *dummy __unused) { struct chacha20_s *chacha20; diff --git a/sys/libkern/x86/crc32_sse42.c b/sys/libkern/x86/crc32_sse42.c index b79c7afbeeb1..94ffdc178910 100644 --- a/sys/libkern/x86/crc32_sse42.c +++ b/sys/libkern/x86/crc32_sse42.c @@ -199,8 +199,10 @@ crc32c_shift(uint32_t zeros[][256], uint32_t crc) static void #ifndef _KERNEL __attribute__((__constructor__)) -#endif crc32c_init_hw(void) +#else +crc32c_init_hw(void *dummy __unused) +#endif { crc32c_zeros(crc32c_long, LONG); crc32c_zeros(crc32c_2long, 2 * LONG); From nobody Mon Oct 13 10:13:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY903sS9z6CJkh; Mon, 13 Oct 2025 10:13: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 4clY8z3sGZz442W; Mon, 13 Oct 2025 10:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObctkqcD/xrafjxsscNHkbYW7cNoI5vTCrTgYph3jLA=; b=N26WnSEmWbalx02Afzf1LtdpUy/muBb6HH+ry/+VLEJH2OrP8cjd1LX5nlDsDt8LJxKG5u INWimjJnOgHBCCjLnCt12ZRUlucAgHFI43wS0O6wcOC2sYlHJ8BTjTIeLyu3YSrvi/eV9k 9vVyPmBOvmI7X9PWUgvl6PQ+bXob6ZN4YilwqvV2VDrEY99xNhIJPi7fCfkUSDODftDE5r NAgxpNc19NnjWyQmQAgZYxIfV+PY2adzFpkPaGz+e2zwqogVI5U3BxVYyi9YsOifUE+0uT ysvZcevxCMXywyVyylyIHVQkXO+g+dn62ESW/GOs3EGrq/dO1QZnQj96wE7Q1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObctkqcD/xrafjxsscNHkbYW7cNoI5vTCrTgYph3jLA=; b=oqJC2k9hadLCHH12VMI4EwWsQ1L9x2WHLiu89WlvX8PIWoTWDBCI2sC/QUfiBG/exJFo6v zjwQDbOJmN4CnyHs+0tPs5inpRp9txhm/rmPhNmxUvbL85cWKDwYeS07XnTQcapfXzBMOC IoYXfS99Sl/iBKLg1GI+zetNspmEEyn/PQmKUm+zV8HRzVqe1WXYgNzU8Skl/wbfxvz+bX v1kCT/HK4SyyZBXzve04yBX6I92++oINdAqEan/sihqGPyZeTn3TgQVl/RA8Yihj96+t3P fkUoE/mk6qMqmHFIYvnpbhNJVVLGpDzRfFS8BFMjDctsX3R1iv3VNclUdJ5TrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350435; a=rsa-sha256; cv=none; b=J1CqqB8IU7yAQobgsFItJozW+6qzmQQvnUxkzWCsEGH2FvVEmTspRibNJmAJ9NExoP831y u10JkEq9RaKMIH0JJNaEx0YdXRmdS3agwYZ3rN1eiFjc4yG5evsgEssYjZAf4w2tbgpbG9 Fi0KV1mDOzlZfl6cmlI7Gs4eoSUihU2RopHH0eAJLd0eHCyoGqX951QMCkcTCxo8GNzaZa tvXLiPXHgT5ZDuUflGuGq9nLoAl1yrO1QItZbuo+OBkfFowb6f/Mo3InEGzL07g85Wt46R 3A4y8hVYgjjVw4Ww99PVW1gUrJsKyu6CbdVMpj760qvN3qpcCTCPmcvPn+5pZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY8z3F7fz12Zn; Mon, 13 Oct 2025 10:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADtGq064141; Mon, 13 Oct 2025 10:13:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADtsl064138; Mon, 13 Oct 2025 10:13:55 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:55 GMT Message-Id: <202510131013.59DADtsl064138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 6f8259eae619 - main - net: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f8259eae61981d7e5d049be7eed9235f0e8172e Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6f8259eae61981d7e5d049be7eed9235f0e8172e commit 6f8259eae61981d7e5d049be7eed9235f0e8172e Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:32 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:32 +0000 net: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/net/route.c | 2 +- sys/net/route/route_tables.c | 2 +- sys/net/rtsock.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/route.c b/sys/net/route.c index 7a50bcc43e06..d2c9f3e39c17 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -89,7 +89,7 @@ static int rt_ifdelroute(const struct rtentry *rt, const struct nhop_object *, * SI_ORDER_MIDDLE. */ static void -route_init(void) +route_init(void *dummy __unused) { nhops_init(); diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c index 176ca43fa1c5..3b7bb1385d0e 100644 --- a/sys/net/route/route_tables.c +++ b/sys/net/route/route_tables.c @@ -186,7 +186,7 @@ rtables_prison_destructor(void *data) } static void -rtables_init(void) +rtables_init(void *dummy __unused) { osd_method_t methods[PR_MAXMETHOD] = { [PR_METHOD_ATTACH] = rtables_check_proc_fib, diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index f0dcc973ca7c..be858428bb3e 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -309,7 +309,7 @@ rtsock_notify_event(uint32_t fibnum, const struct rib_cmd_info *rc) } static void -rtsock_init(void) +rtsock_init(void *dummy __unused) { rtsbridge_orig_p = rtsock_callback_p; rtsock_callback_p = &rtsbridge; From nobody Mon Oct 13 10:13:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY921PLyz6CJDc; Mon, 13 Oct 2025 10:13: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 4clY915s36z44PM; Mon, 13 Oct 2025 10:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yapoUKMZNyfIGfHgiNIbarmaFiwzYX9x4MfM8ZmZK5k=; b=CbXubrqX/Otgn97fo6LgPcPsAbxAvYaJzyDTPhIQF/BjofJlHUE2Nc5jQzAwQ8LeThNFO4 Xs/0RyfjD9X2Fy+WTexoPSBDXs5tcVf0XC0KzgQ48bhW+Hcwn0C88XGhOjC/xGQ6kmjFBI t5NlCpKCkD7jjJjm14oMkwZvTy52eFPBUdDtxYFovpCk68T14mJ+U5yDCunaXKiGsRc6uR Y09l+JgsM9e9Sh1OihZaiGlEnOsJUvqPOt1pY/fbIn9r8dl0n/sfDet9Djd10BfYIWVrq6 +2+qMp1KKuLZepslJ1XQSbyswOkK83aOYaj9Nj/qGLrblWHv7Q9wXFqcziaE0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yapoUKMZNyfIGfHgiNIbarmaFiwzYX9x4MfM8ZmZK5k=; b=fuODFRROBszjmKtLpTwQQJZJ7lAPeotYGAg1ErDyLc5pIs+TMTgQkY8G6l4Ny0aswJr/Ix oehXCNI6gY0BFmYfBOQ6LYz+5uWb5+xVyrGmq3Z1JqIElYClSneJB2LDZMUL5sLk15GZhr tdnt7YPBAU8S/G1UoaoUm+DZtUi4oUxSDO9cGS6jr+/lriWU5qVNTZZOP7GLbX25U+73+c 609u4NuMV0flQatTFGTf8fwJxQ6+EvYuzqkO4plYRYcxHWifk31mCl6taYq2xqV9yUbjNg vuWwiNDqRz5fuHF4gq85tNCw/VCTr9ryyfToFn0/DEYNR1p+ACGfzT4qDKFi/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350437; a=rsa-sha256; cv=none; b=eZwQlXyDOmisDlwOOiXjl5KFV89yO7D5wswqEBGwGyE7BabyR4zxTnnB6hvDMqAS49tTpR K9YR/o/ZlaoSxry1vrcImNODksCV2gaSwrxFvXLFu/4FdLtPvnqTazASySUK8b69Gp2Olv UK8tYm9MVMB8NFTIlN/iI6MdutWV7a5n3ykKnHAncVu1OB5WQDVAS2jugBmYnFigUnUTug Ll/D4pUFpSQqz4ZRQs97kp7RUXosZ/ZKZT6PFfVYup5DAmCjIS1E/iF3SjR63C3IbAvAGw vJX7ncoy8Y5rbp7Z4Irj1gctw4gQHZtOAt55ss25dpISeDdxIo0xaTh6Gd+wjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY914zHhz12Pv; Mon, 13 Oct 2025 10:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADvvr064211; Mon, 13 Oct 2025 10:13:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADvqs064208; Mon, 13 Oct 2025 10:13:57 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:57 GMT Message-Id: <202510131013.59DADvqs064208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 6613b6ad1ecc - main - netinet: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6613b6ad1ecc5384c119018b9b27c18bd7516e3f Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6613b6ad1ecc5384c119018b9b27c18bd7516e3f commit 6613b6ad1ecc5384c119018b9b27c18bd7516e3f Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:33 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:33 +0000 netinet: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/netinet/cc/cc.c | 2 +- sys/netinet/in_fib_algo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c index c20a20cd983d..bc06616dbf93 100644 --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -271,7 +271,7 @@ cc_check_default(struct cc_algo *remove_cc) * Initialise CC subsystem on system boot. */ static void -cc_init(void) +cc_init(void *dummy __unused) { CC_LIST_LOCK_INIT(); STAILQ_INIT(&cc_list); diff --git a/sys/netinet/in_fib_algo.c b/sys/netinet/in_fib_algo.c index 123dacb409e7..95621c300064 100644 --- a/sys/netinet/in_fib_algo.c +++ b/sys/netinet/in_fib_algo.c @@ -767,7 +767,7 @@ struct fib_lookup_module flm_radix4 = { }; static void -fib4_algo_init(void) +fib4_algo_init(void *dummy __unused) { fib_module_register(&flm_bsearch4); From nobody Mon Oct 13 10:13:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY910lB5z6CJDX; Mon, 13 Oct 2025 10:13: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 4clY904cnrz440p; Mon, 13 Oct 2025 10:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpEKPspeZEq2oTDoorxxkDhlz0SljNKMeBhSATcNUdU=; b=UNZsKSvwAtLttUe8t1qWoYMJUYwT+lHOjjFS5rAX9z3NXif72mcjE7xXKMDBas3lq8ME99 PLP3IRi9C56lxGuoyD3d7xxOKLsIALF6urzXS71H5BDuv3rnaEZeyYBHmBUweG1UlfPXhy s44mhyopDuV9fkYHYPrOM7+jUj9mvMVwvr8xGMBK4hNy96jWhqOa7BSQLL+jwOeTTlqPuO Qbru3s6iBL9oiWUgbh6o1beFxBu1CiW/irvQTpfl84DGWYDhHdyCSehpADNkMJRjlmvLkw HKcDsgG7Z5cHePH6Q/Rwj1nllox5YVHg1/P7Nu5sBMUo8QMNY02C1b/qhAdq9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpEKPspeZEq2oTDoorxxkDhlz0SljNKMeBhSATcNUdU=; b=LL6MpLG6LPfiuRZzjB4YLevR2eHnq3TtZkcBK56FpLyYD3mZ9KR7GwviJiwJE8YRO6NxH+ vdLUXHv9HOfzxmKsLRstnFvMfTI1hmrBwu6wF8eRnSOJBC43kB0G2nsFA5wq5FyiQbXYhB CsYk3o+1GK8q/sV5e7LxCA6EacCuyzUMx1ZbgqZ9nH5mGS/TYX1dklI3AZpikNeEv0n/27 WeF2t2dYv6hm6ec8QnYgnW/bO5JSdvJ7UMo8UADP99AUtCcEmVZEVqrYSUA+WGKzLqA58R 8UObeDth6IpmzqPJrd9UBt7A9fZBZrffFDbRA5qu7LaQOoGwt8BHIR10ekimmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350436; a=rsa-sha256; cv=none; b=W1LERKmEqkXznJQx8eu2HCD5ASWfM/DExtTvPg2IsySkYi+ywa1USFe9294Fbykmas+/YM A6lc1/y5fe5QraNOe9De098YpHpn0bNBMkN6fyrguXXp2Yz1+o+3SIvYevhykY/hWHAkyU gwxEnpOEZYagKn8dCTtL7bLLfNRYc04JlgAfaZcnikj5L1vk01yWfVWURPLcjiC2Fa6aSA R5Ket1tcdIBSeIl1Wbhi8GABuccwvfE7dYheJgCjyxJGVWKj9e+mUBMYAY+BcRCf2mjwo3 HaMFehtyfTBj+Py8pPKH0Ca/pcaTe8+Cfu/ZpbnwvNXsYCZggmllSVfFl238lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY903yP2z12q9; Mon, 13 Oct 2025 10:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADuEQ064176; Mon, 13 Oct 2025 10:13:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADuYI064173; Mon, 13 Oct 2025 10:13:56 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:56 GMT Message-Id: <202510131013.59DADuYI064173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 7449e59110b8 - main - net80211: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7449e59110b8abbb3d647c3565ca3de1d21b2c84 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7449e59110b8abbb3d647c3565ca3de1d21b2c84 commit 7449e59110b8abbb3d647c3565ca3de1d21b2c84 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:32 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:32 +0000 net80211: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/net80211/ieee80211_ht.c | 2 +- sys/net80211/ieee80211_hwmp.c | 2 +- sys/net80211/ieee80211_mesh.c | 2 +- sys/net80211/ieee80211_phy.c | 2 +- sys/net80211/ieee80211_proto.c | 2 +- sys/net80211/ieee80211_vht.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 3af56a228295..a8a767785fce 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -167,7 +167,7 @@ static ieee80211_send_action_func ht_send_action_ba_delba; static ieee80211_send_action_func ht_send_action_ht_txchwidth; static void -ieee80211_ht_init(void) +ieee80211_ht_init(void *dummy __unused) { /* * Setup HT parameters that depends on the clock frequency. diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c index b69210768c54..084e67da13db 100644 --- a/sys/net80211/ieee80211_hwmp.c +++ b/sys/net80211/ieee80211_hwmp.c @@ -212,7 +212,7 @@ SYSCTL_PROC(_net_wlan_hwmp, OID_AUTO, inact, "mesh route inactivity timeout (ms)"); static void -ieee80211_hwmp_init(void) +ieee80211_hwmp_init(void *dummy __unused) { /* Default values as per amendment */ ieee80211_hwmp_pathtimeout = msecs_to_ticks(5*1000); diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c index 3f0410a69e3c..7f2e8bdcb963 100644 --- a/sys/net80211/ieee80211_mesh.c +++ b/sys/net80211/ieee80211_mesh.c @@ -548,7 +548,7 @@ mesh_gatemode_cb(void *arg) } static void -ieee80211_mesh_init(void) +ieee80211_mesh_init(void *dummy __unused) { memset(mesh_proto_paths, 0, sizeof(mesh_proto_paths)); diff --git a/sys/net80211/ieee80211_phy.c b/sys/net80211/ieee80211_phy.c index 7f53c717152b..b4d9b16907d2 100644 --- a/sys/net80211/ieee80211_phy.c +++ b/sys/net80211/ieee80211_phy.c @@ -348,7 +348,7 @@ ieee80211_setup_ratetable(struct ieee80211_rate_table *rt) /* Setup all rate tables */ static void -ieee80211_phy_init(void) +ieee80211_phy_init(void *dummy __unused) { static struct ieee80211_rate_table * const ratetables[] = { &ieee80211_half_table, diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 0c161d98a55a..4918bf7d025f 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -459,7 +459,7 @@ static const struct ieee80211_authenticator auth_internal = { * Setup internal authenticators once; they are never unregistered. */ static void -ieee80211_auth_setup(void) +ieee80211_auth_setup(void *dummy __unused) { ieee80211_authenticator_register(IEEE80211_AUTH_OPEN, &auth_internal); ieee80211_authenticator_register(IEEE80211_AUTH_SHARED, &auth_internal); diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c index 10a5fc7f08ab..095c4108c768 100644 --- a/sys/net80211/ieee80211_vht.c +++ b/sys/net80211/ieee80211_vht.c @@ -102,7 +102,7 @@ vht_send_action_placeholder(struct ieee80211_node *ni, } static void -ieee80211_vht_init(void) +ieee80211_vht_init(void *dummy __unused) { ieee80211_recv_action_register(IEEE80211_ACTION_CAT_VHT, From nobody Mon Oct 13 10:13:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY936SDMz6CJPt; Mon, 13 Oct 2025 10:13: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 4clY925pM5z44Jc; Mon, 13 Oct 2025 10:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dv5lD+HUBqlDvQ+3oKIuz5A2oWN32mWIWh1D8QCLuzs=; b=Rrj2BDqQ9GQYFgDeqPWXLZP0e+BhXXJemDMTgu1JuMxgagwJSsS1SBLtGf2UwlVYmxTwNf r5xjQXdmlGblEgbyVH1ZFG01wlLZEx9neQ2aKqhhsIe55UjSB61QgUCxxB4TMte7Y7F3xW emghreBx+YrXMFWLWHjS4J6CZHUlafZoB9iDjZP3tXfGkiVVap4g7iQf2IoYurxd0UVc8+ GjRd6rHNMBCFh2ctOWMRy6zOslrUonw08xTVU2/9UnTObj7+8n60tbhcZRjKUsYKDQ93V2 fF4dYtnqIwJ3v6ludMQv4RIeetqKvVaAJu65EayFHA86mc/qNJwk0g8Q3EsxPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dv5lD+HUBqlDvQ+3oKIuz5A2oWN32mWIWh1D8QCLuzs=; b=k9QlPAvmo4vltaV/5t9ZvTru4KFkwlpzgiLpd2vwgOJmwA7rXNF6PCuROINniN/FxgYopI qCtCNJVrj1uPpsn3XuDNnzmgHcRgtnmlnyYzEDTqfMZcV2JqeMqnNKpny9C14WZDs+im7N mkLUNzWqAbxmm3qRDhRZuUFOFwE/C6nHLpjNDXEqWdEcGU4vWEp2hLdazc6tsCPHoOhyqF VAxJweIWSK3eDnDm3+DXAxt+A+s9YQ1J6Ui41GPV7Cn0euDNCopoG+sOeh0ATGdbXiIjuW Vk8VjeCLIeL2C0SkbMsUNjo7P+WyabtGbr7LnXIDJv2YgEIthi77RPlCvLaoRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350438; a=rsa-sha256; cv=none; b=tsSdvqJo2GI8MFJX64Y6qcVqyTUkENh9+N+i14Ke4an17Qoo5n92Ln2bBXsyGJYyWVjWvO q23XKmX2/ijgBlPe3yD5lvEIrVtGlxXbbI8PIJjUcgWGqsGu6RLBMuZXcnzfgiahKFqZVE XRm4mro/ls2tQGLsLUGMRJSSdjjR9vjkrN519Ix4daxAX02kxqTcQwzJ8KU0fd2SRKWvNZ cMKfeMBA84Rq32Hd44LcYwHXaaxenGN3MIDx/c4GgDRxy/ycZcJTSbvYcM0Snh6Oim1FqW XIhNa1XcxcTx4jKhrbSShEfwBCaZc0iVv24/oBQOgo2sUqKV9rzaOPl3SRLhXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY925Gt6z12qB; Mon, 13 Oct 2025 10:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADwRK064255; Mon, 13 Oct 2025 10:13:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADwtm064252; Mon, 13 Oct 2025 10:13:58 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:58 GMT Message-Id: <202510131013.59DADwtm064252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: d4a80fa271b1 - main - netinet6: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4a80fa271b148b269869e5ca34e1861d9fcdfb0 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a80fa271b148b269869e5ca34e1861d9fcdfb0 commit d4a80fa271b148b269869e5ca34e1861d9fcdfb0 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:33 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:33 +0000 netinet6: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/netinet6/in6_fib_algo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet6/in6_fib_algo.c b/sys/netinet6/in6_fib_algo.c index 10ffe7ab0265..ef5cfc6d5ef6 100644 --- a/sys/netinet6/in6_fib_algo.c +++ b/sys/netinet6/in6_fib_algo.c @@ -351,7 +351,7 @@ struct fib_lookup_module flm_radix6 = { }; static void -fib6_algo_init(void) +fib6_algo_init(void *dummy __unused) { fib_module_register(&flm_radix6_lockless); From nobody Mon Oct 13 10:13:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY943lbjz6CJhw; Mon, 13 Oct 2025 10:14: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 4clY936yvPz44Dn; Mon, 13 Oct 2025 10:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CZh0iCGP/8TTz1X4GgAnhcOW9ljGjYePYVGaQFqZQ4=; b=XXuEDu3Ne2kIz57I22/n3uIdUi8xOkLnW/XkIm4KNe2H2TEaxW8Sc7/z/uMDbT1SCuPjwQ uj9uzLakkftU+LHumiav1BOby65muvfin42EgXCQ3FeoUS51qNMjqX5EZaxkfJisPYNvtG DD/ch6tgLqaQNs/sI3L07GT/XS7+ORkkMpGLXKf9fAcHgcnnt1JdjhpMjTvtQWM3VvGOK3 MSiERjJlkrqbrG/xg7Z/7/lMOW389XXY8/M3Gwud1OOXZmwQhXE4JcQGVAYqZezQ+lhUaw TEOe9j6WPeCZW6YgLwxXMGrwSv0h/TZoR/4QrCsV5AAoDR4h29MTKNIEdvmIUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CZh0iCGP/8TTz1X4GgAnhcOW9ljGjYePYVGaQFqZQ4=; b=gHoKLfJkHpe4fAMbXovDB9dHkpv+yqvUWoA+N6zCBnbyL2+JZ6sK4kSlD0Rrjd7PT19iJ1 wc7FkYt0jzd1xRfbwwU251bjYtz2BDTGQptT9wEGe/yCsV6FZDf1Sp4syZEVa1uBXUg5GT EbxtpHL436sIUhPORDJK3PksO/pfl/0OETLlKY/S1gfaW3A1iJ3U1zXFOd2V7XNx7z6zce BYto+ViU0FNcu7aiyue5YW97AuFD7hcvL7eiTCSK0LKBTHIw9m1Ok8j7zAkrl3KVlBo1Mk TVEzJk3Satts0bsMggz3vKbDJ/lMF4K6ikNfSPfbGE3nEvJH0va7iSq5rt1J9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350440; a=rsa-sha256; cv=none; b=Tu2h6r5SgYch0qZDJdnAhLh2ksa2wJx/5lMtzDm3VXGCq/jcsQRLI8bYM0vX/smCS3XQql h6SC4ztj1XHG3D1SNyoVMbsEYPBc4S0vvlLCXVJr+x5XGF4XpBmLgaLqIqV4bvq8L+ADuC Fu7Iq/wZ8O2wqa3jz00e7uO6vVCM87MdWVPDDbzbgn4z6ooqLUG2Ls26JNAlAZ6Af7Umm6 yBNmOgYQesj/LQvo23L87VCTonuqcdMLHRHbxosj2wzBHoisDqNgB0VSrKWCemP80xr1aL 7fY3q7l5Cd68ZIfZDKFRPDJZtgy//Scja7EYS0d4k/3EQKV5yxd8DcK2sH/gOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY93697Jz12JX; Mon, 13 Oct 2025 10:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DADxeD064290; Mon, 13 Oct 2025 10:13:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DADxMF064287; Mon, 13 Oct 2025 10:13:59 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:13:59 GMT Message-Id: <202510131013.59DADxMF064287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 360bb45690d9 - main - netipsec: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 360bb45690d918fac5bae78ab44f45d11327067a Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=360bb45690d918fac5bae78ab44f45d11327067a commit 360bb45690d918fac5bae78ab44f45d11327067a Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:33 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:33 +0000 netipsec: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/netipsec/xform_ipcomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netipsec/xform_ipcomp.c b/sys/netipsec/xform_ipcomp.c index 737d4a50098a..05a01b75e0bb 100644 --- a/sys/netipsec/xform_ipcomp.c +++ b/sys/netipsec/xform_ipcomp.c @@ -750,7 +750,7 @@ static struct xformsw ipcomp_xformsw = { }; static void -ipcomp_attach(void) +ipcomp_attach(void *dummy __unused) { #ifdef INET @@ -763,7 +763,7 @@ ipcomp_attach(void) } static void -ipcomp_detach(void) +ipcomp_detach(void *dummy __unused) { #ifdef INET From nobody Mon Oct 13 10:14:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY952yLDz6CJj1; Mon, 13 Oct 2025 10:14: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 4clY950sfsz44Jw; Mon, 13 Oct 2025 10:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=txvNQoxLVh+ijFw45YYjQHjS4nRV75TxTP76foQJ6tU=; b=jBVyKxZM0ewkjSjW6MPnLAETaBFS0qO6iQW59OgtrRYRxxwJrJehnD4qZAldH31bHZ5L9M +Q4Pn0HRA6XMSZOGCNQKifW6bK4Fgf81CY9FRJoYzzqbFjH434Oivt0k0UOK27Z9a+zuNV bxOwseym4efB92/PJ6g0Fy7wTRsMQJnoNFZMDAG0vS7L+SA70pecrTzPwL9E2bqEj1K6cT 9n4AANTyzZXfJAkrWxdwFKo29Kn4eeTvW8koBR9MZL8VQXrOCDTkdVwO7pgV64Qh8yxVix vKu+JAoMM/9gP1jqVpjPAXTWe6qwJ8c9e1GLtvPxyE8p5ag2ugGeMqy3cHY5dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=txvNQoxLVh+ijFw45YYjQHjS4nRV75TxTP76foQJ6tU=; b=D2/40nOzw04KtJ+WE24IW36syqT19ny/zm+IddTG/wfHvCSBzWAy5TAgvYUwuzoWl6Fxr8 C4+bHf5EjxMIyPlsMBT8yDONCGDM5RlF5F/z+drTSrG4lqR3MUWTTnDXlXeZCse9Pb2Rba 7P3OveL61NWeirt6nVw23gLHLatX1XncBDQWD1YGCyUdmsUyQz8Eu8YTlJEsWoOhIMoOJH f1W3jemynKxKrXxZPOfFItVPQhUmGvKMNAikxyZ0qRkCjeLUi7mhi5jJusLcb0S+XaN/RE rBSofwrvBXLyjKj5qYkUe3EtAxKxWbQEHJjIjEwENKmik74n+/acyShUXuHKqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350441; a=rsa-sha256; cv=none; b=D8OezLOjlPRWu57J5Wc+jzGealHZs/cr9RjCND4JxBDI9nFTFTQUQIZwcHtmsEwHJVz87v KNB636jO3ht1y6FRLYj1PPrH7q0FJnUELZ3/TnHOIMBP1mN5IcznwOtGhb5eEqKlehLSTR PCBJBfiFhYk0wnbuSkgBZz+JoMiDrwhpkaW7JY6ZoeWGG37w6IDf+xQDQj8poA6fakgQdt 65PglxEFrDtqDTQ3z/1S5/FK0fPLFDbVrzadgiy9QPb8BgGYb4S6kIDjjM/zYwhuzb/Dnp RmOL5UfKl6OWVvJXhc5sG6MmCOy02al/TADB7zzRh8oasxX9ghoJqDMwop/qog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY950Q8kz12Lx; Mon, 13 Oct 2025 10:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAE0mx064330; Mon, 13 Oct 2025 10:14:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAE0SA064327; Mon, 13 Oct 2025 10:14:00 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:00 GMT Message-Id: <202510131014.59DAE0SA064327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 1bba2194c8a9 - main - ipfw: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bba2194c8a960235f8eae36e7d3e96f347ce779 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1bba2194c8a960235f8eae36e7d3e96f347ce779 commit 1bba2194c8a960235f8eae36e7d3e96f347ce779 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:33 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:33 +0000 ipfw: Use proper prototype for SYSINIT functions The only possible return value of function ipfw_init() is 0. Make it return void to match the prototype of SYSINIT. MFC after: 1 week --- sys/netpfil/ipfw/ip_fw2.c | 9 +++------ sys/netpfil/ipfw/ip_fw_nat.c | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index b59d8d08bf80..d15d7760d7f1 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -3578,11 +3578,9 @@ sysctl_ipfw_tables_sets(SYSCTL_HANDLER_ARGS) /* * Stuff that must be initialised only on boot or module load */ -static int -ipfw_init(void) +static void +ipfw_init(void *dummy __unused) { - int error = 0; - /* * Only print out this stuff the first time around, * when called from the sysinit code. @@ -3627,14 +3625,13 @@ ipfw_init(void) ipfw_init_sopt_handler(); ipfw_init_obj_rewriter(); ipfw_iface_init(); - return (error); } /* * Called for the removal of the last instance only on module unload. */ static void -ipfw_destroy(void) +ipfw_destroy(void *dummy __unused) { ipfw_iface_destroy(); diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 1e2ff1bca290..1cee7873de31 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -1166,7 +1166,7 @@ vnet_ipfw_nat_uninit(const void *arg __unused) } static void -ipfw_nat_init(void) +ipfw_nat_init(void *dummy __unused) { /* init ipfw hooks */ @@ -1183,7 +1183,7 @@ ipfw_nat_init(void) } static void -ipfw_nat_destroy(void) +ipfw_nat_destroy(void *dummy __unused) { EVENTHANDLER_DEREGISTER(ifaddr_event, ifaddr_event_tag); From nobody Mon Oct 13 10:14:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY982LvFz6CJn9; Mon, 13 Oct 2025 10:14: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 4clY962Htbz44Xx; Mon, 13 Oct 2025 10:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qYTUIe00b84rV1Qk2LQKuozZ4WixpeVrh6FOQbqO330=; b=h90mqzTISHJv+Cl/l4d+VF7+5VN0Z+81044X/q/3azAUa1QojtC5EmlYDzUOPRg2c562JZ rBnuFo4lz9EI2AoBqzIe+J+tekyNQqkKSREerQhlFdjf5b4uTjiSJef6cB21j+88Qdb9B8 lVG5WILC33amg0xnU9eFn/its2UrUPqBXLxFzVk464LPRicpmKSPQrseEXGtWDHKVWccGb iIALI/q1UXV5rouh+mnkfXSnLUfuR1OXUJJGbClB2IB2U5ob7IK5R1M2fty0rcgFbPml/P DStwN/OVbHqqDPf2SLZbNTM9XAIi8BLy7jUtYqx9gqo/23PYzQ8/pU3pjVJNOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qYTUIe00b84rV1Qk2LQKuozZ4WixpeVrh6FOQbqO330=; b=qjsu11e3bmpA1zKLxNSWwmML7hRq2p+29CXEMPa1fXqa359elzbBem8U+vqOqz6UlBsP4Q jVOPCX4+z8ZxbUH1JanPgaD0KlyIoFk7FQn70gdqCJlw97urGqMQQKo+zJNWVrFJHTiiyW Uwl5fibRnhz/BnlY7BW3Me9BrCNT/hCKBBtS+wV+/lKvqZO4e+EwToqbJrW47ZlIPtWk65 OnAqsunBaau6wjQThbmFuR52e7BoPD67NWY6w91Orr/glnmYhCKfzCyoqrz+jQSbBmF1FT dGqo96RWStPBVjZ2I6IpGWEWsFDZyww2ENycCj/VDJ0IbSr2Q5JuX8mwd/R8Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350442; a=rsa-sha256; cv=none; b=SZCTVTTDbXlqMSqBFIAIng5qskXV0QyIwyr4jOgXuAxnN8EZ8zuLLADR3NUsMfJxofScoO 9PsuATGmgG3zVarRnDf+ggOVjnhA2KpsWofBL6rf2jWLCotLtOciOXfAcxNrwkdbiL0EMe yZC9RaLFQ4x8J7ZrJy8+2Q5TEcJTItNVZ2MLwfT9faekoA1gyeyieFhAZ7DN3RdbIhLC9o OiCEfWEmGEo5OO0q8MIDSex9nbCf66UCEGJgkWsKuxaKoHoQgiec6g6fB2/f+hwuL8aFNe Vdjr8pYLzOV7HI7JqI/lxfqNbdXwUC7DqTE8PWLyiGSJO0XFhmHW0E0jKjsfGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY961X3Dz12Zp; Mon, 13 Oct 2025 10:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAE28Z064366; Mon, 13 Oct 2025 10:14:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAE2dj064363; Mon, 13 Oct 2025 10:14:02 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:02 GMT Message-Id: <202510131014.59DAE2dj064363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 0ce8c20fcd44 - main - pf: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ce8c20fcd44c1595b42fcb540913d3802edd438 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0ce8c20fcd44c1595b42fcb540913d3802edd438 commit 0ce8c20fcd44c1595b42fcb540913d3802edd438 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:34 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:34 +0000 pf: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/netpfil/pf/pf_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index d58af6e5ec4d..a4557f139ae5 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -259,7 +259,7 @@ static void dehook_pf_eth(void); static void dehook_pf(void); static int shutdown_pf(void); static int pf_load(void); -static void pf_unload(void); +static void pf_unload(void *); static struct cdevsw pf_cdevsw = { .d_ioctl = pfioctl, @@ -7082,7 +7082,7 @@ pf_unload_vnet(void) } static void -pf_unload(void) +pf_unload(void *dummy __unused) { sx_xlock(&pf_end_lock); From nobody Mon Oct 13 10:14:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY99317yz6CJT1; Mon, 13 Oct 2025 10:14: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 4clY983q70z44bS; Mon, 13 Oct 2025 10:14:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G//nkvYNy1ewk2I0ofn2uHxCzISakUxoy6YoMTkTNXs=; b=pR12SYu044lUT9B1rd4hWhUYV0/twRKUCmP8WQoKcKvMVg2ipR6OewF0d1r+tC1L/n6ZNZ 2KMnG/R58WjDnnfpdf7PFc0siym/N5v9EcEZtuLGAMqsYIzwab4VCzwmTjrI55zDoTtjAs K13WqDNMqQd8Imzc3jn9IAQrfHZaDqDjj7nXj671GkLOHf4ykHQvA1DHWhe7oVV+R31D7Z Te9oIdPyO+bRM20koYHcdce5IiOebgBWi2L8lUr1KQDWvY1v40BXIWhpXAmQ/RPzPDb7y+ E0I46Xp4GSLaFJu87vD9di+4+1wwqJ4IjdXHPe3zqhaXvqTSvc1Yk1HBUxQQ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G//nkvYNy1ewk2I0ofn2uHxCzISakUxoy6YoMTkTNXs=; b=fAJSdacn2Q6jVSy2CQUh8zJnnlfhVVFUlB9C7+Sq1FWmJ0qVfr5OB7syUBBwaI9O7pjiLw ZZyDjIhk0rAJXVDQP6i0HtNZ9DEnDq7iCf23UpYrOc7AwXKaBBm2tHwve4k5IOmq15tUoR IzN5ibTYFSUv5YZKapn4Ra5ywwh3Ui8HTvmmtxPNinQexXOusJkAUppy0nJR62ti7LjOUu PTG/Vx8X3bAp/yQ3nvPpX+bKwjvXxKmMn4Uq7kK6cvl74qwzQz/yrxzflbRIBjs8QqHBhR WySvmpu3R9uftn9UYlg9lqv1bPQ9VTJz12b85Q5RcUOBLRQ4+x4Piy20GHYj2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350444; a=rsa-sha256; cv=none; b=okEgYqoyBfEcmE3EYJLP4Z/V1zfO4zfVCmmgcNe64DQgiOaZaSGXqU15d/tiic0rjqm3oq RvY2N3id/ZTTaFq+s2UnFQdZpexAShkBTu8YTg7TKdpYr54BqbYfw4eim3wrRuasZPzdvf XeQsq5vrB1To8SQ+mckzMwJJM7mtuuHp2Of/aGBcGkfLgS7AsRnWHm58nPxZEDb/erKMJQ nk2vVZtEtabMvnMEafGyApEFWfnzrPwd4Gl7tvUb+sAUQlzKUsiF1mTA5X/dMV/TwfWYiw kvMBedPoyVGmsT+vNVs51+XlXyLlzlBZu4UNu1rQ3XDim+c0XU8A/g2/Gru7bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY983Hfwz12qD; Mon, 13 Oct 2025 10:14:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAE40J064435; Mon, 13 Oct 2025 10:14:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAE4tD064432; Mon, 13 Oct 2025 10:14:04 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:04 GMT Message-Id: <202510131014.59DAE4tD064432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 32c1e940e07c - main - audit: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32c1e940e07c48ab80427efd3d6ff2091407d577 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=32c1e940e07c48ab80427efd3d6ff2091407d577 commit 32c1e940e07c48ab80427efd3d6ff2091407d577 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:34 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:34 +0000 audit: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/security/audit/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/audit/audit.c b/sys/security/audit/audit.c index 7ec50d990d4e..876776e5f62e 100644 --- a/sys/security/audit/audit.c +++ b/sys/security/audit/audit.c @@ -329,7 +329,7 @@ audit_record_dtor(void *mem, int size, void *arg) * call into the BSM assembly code to initialize it. */ static void -audit_init(void) +audit_init(void *dummy __unused) { audit_trail_enabled = 0; From nobody Mon Oct 13 10:14:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY992zf0z6CJjJ; Mon, 13 Oct 2025 10:14: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 4clY973BkZz44bD; Mon, 13 Oct 2025 10:14:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i7x9CdDDg+KMa11EqaqUApJ3HovDsZrTb4XJ3N/9w6A=; b=VUO0KnCaPGJhlP92uJiCMWi3UEajs2cj+0IX+eLTizlnEPGwVlV8o7ei150AY9Hxe3YdHV 7AwNNPPkC88RliWzuwPwIe55RlouCvlsbxXXgUiG0Z0RPXWqV7TrIjQ2ItYvFvAs+SDSgA 0/BYgmX1y7+EU8xQXzUBNU3+hL0Li9kpwIFNqOkXoKxV8Z3u5CVd4uY69JaBZcKJRWuMjA h729UiWtGPffGhYncE1ic8NcveRsqfRkTK0HW6qdGdC1QkOqyrJWcssz6KoV/w96XPTXIj W5vXYfrfVM/4rgXbz5oss0QX2ZOGC7LTAtRfxrzSJ1SKG77kKKq48t8o/UrnCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i7x9CdDDg+KMa11EqaqUApJ3HovDsZrTb4XJ3N/9w6A=; b=usxp/BboPxvjPKWkOgmBLZdvi2SIxWl9PLSlP+KCmRmAdQT5YshRy4Jhzml8cFTpgqDYfB 8CAmpOLUrUmD5GBetIaPoe/O8NSIx4dQxJFrcpZIb7Lc8dEqVGQnpQ/h+xton3uj1qu7JO QIt0+hzn6/s36izdoEieZDU93ER3hEcm+vWrN4nWdPJPJmE+nHZQhXwjhB/opiO0b2J1HC wvLMSbn5ba3dm/PFTaJlM66UsGotjce5CYK25M2HEomKiCh3JY4XqotxXQqFfQgf+oNzMt vqCL05rMbjOcBykJAs8OQrv8aqamlIzya5m1hKSXsSCkbbKn4nhBSYCA/GKZ4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350443; a=rsa-sha256; cv=none; b=dK5nVe9g7tNip37M1WPmh0RNIhGO50lfOkc+oFtwPLnUe+av5jpL9B2XAES98Zlk85FaLB TT9Vc1gu0MigsRKush7pU8zdlooNgeANXVuLx156anszf9YlL5gdbFjry7LGOcLKd/dbUj lwHlgMRCu8abDQ9OMXV/ZIrJytixCPV9u+gbKf/xyctmOICTJe1U/V9W/jx06re+NDEliT dIkeYbx7tbNL7IDXFlIpWL9pvkT0pzkcDqHa0M7JVdI8yTR5o5+044cjaKGYaG2mvbxoSQ LpptF936xRsch6K88bvvwtzPBXBbKAUsYrHkBygF1LdGCT6qCz0SbQQ4aIvmqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY972NCKz12H2; Mon, 13 Oct 2025 10:14:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAE3Oj064400; Mon, 13 Oct 2025 10:14:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAE3ln064397; Mon, 13 Oct 2025 10:14:03 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:03 GMT Message-Id: <202510131014.59DAE3ln064397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: a06ecc4f70c2 - main - nfs: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a06ecc4f70c296f62f666421c3cf9643d40bdca2 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a06ecc4f70c296f62f666421c3cf9643d40bdca2 commit a06ecc4f70c296f62f666421c3cf9643d40bdca2 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:34 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:34 +0000 nfs: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/nfs/nfs_diskless.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/nfs/nfs_diskless.c b/sys/nfs/nfs_diskless.c index 42cfee63d184..0f0cf80feeec 100644 --- a/sys/nfs/nfs_diskless.c +++ b/sys/nfs/nfs_diskless.c @@ -428,7 +428,7 @@ decode_nfshandle(char *ev, u_char *fh, int maxfh) #if !defined(BOOTP_NFSROOT) static void -nfs_rootconf(void) +nfs_rootconf(void *dummy __unused) { nfs_setup_diskless(); From nobody Mon Oct 13 10:14:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY9C204pz6CJng; Mon, 13 Oct 2025 10:14: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 4clY9B6b0wz44TN; Mon, 13 Oct 2025 10:14:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gnkiRxzWrr85dGJ1hZbOmMVnPKyBnCHlEJITCHx6pC4=; b=K2vscHLfXNmWBSP8XRIEI+4e3OqE0ubLHrQT13uvZ/01njBEstElgBcSV1f96o6J5FfYE0 +MsVP89LA3XV9F5bHhOmAQIeEM3wWT1ewk4x2Obu9wq5bFeveyyWnocZgg1oed6phE0Wfl uMjdbusKorRWF7tVDdSBKIGekZlc7YzTIIvM3MCdXxOR3aOi4vY0Tt8WbeBb3Mj45N9Hjc Z39lH3W3VkmuRdFOXyJvqOGfXa0rUJFgqdUXYbQdwORhhGKZi6OhclJOS3yMdeNq62RVbI ZcFQVo9hYnzxWN8Y+biEJl6pu10FIOBVOnTklV57cP+1kYu8rtuLwiUqj9kxng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gnkiRxzWrr85dGJ1hZbOmMVnPKyBnCHlEJITCHx6pC4=; b=P2uJLZZH1JpeJpvlHbF0HgOZCxcp4M2Xsms/ulEf9Jp9xWA588t+xIhMP+DjOqj25ax7SR jhBXFRfr71WLMnhAvgTakf5YejZ6MJEEKeb+JNAklP5L4BI5FdkorKK9JXr8GwVedTPFjQ 27cdCEsWzKFB3XMh9oujavT1XLBb1I/5GTa2++EHaR9uQ6nKlJ0Sm+NUT1EH43G3qTy5kQ 0Dg5QeOd/UD1PkVuKlvPJ1K3FYWkPzxpc2CgxY2wmKtoV+BatKCdjnRya67OhcblDmY/mj L9XIMrq9s+tlOSBLG3hWhQ7yBj4pdHcwKS72sX3PoBuY/jTQ9PsNjE3zjI4WmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350446; a=rsa-sha256; cv=none; b=u59FEVs5sb6uzp3H/RFt01QifxxBuaF1rmiI/F1q4YtWtviCtWaglgp5D9tO/sy54ruuoh lJhoRsmzMMaQrFZo/xKvjhJyxXw/rQDgfS/Fe36KwgKzY7aAYIDAKs/SSWnm+G/8sN7ueo 0q5xP7xI99Nm1pT6QtI4jATHJHXO6hRIHSQJPrELpAdleVj79TDSArjWc40fq5pE6n1I6G wmdSYSut4GsM57pNbGdPB6HHVO7q+CyChGgjPMr3lSq53O/6fbWESXWpNsO9e6QeBbXodF Au4DlqObzQ50JO9tckRBGU5Rrc8nr/yClBXttAh35jo585b/lU71xjAVXd/H/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY9B5gBgz12Zq; Mon, 13 Oct 2025 10:14:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAE6c2064510; Mon, 13 Oct 2025 10:14:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAE6xc064507; Mon, 13 Oct 2025 10:14:06 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:06 GMT Message-Id: <202510131014.59DAE6xc064507@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 296db8c72dca - main - sys/sysent.h: Remove an unneeded type cast List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 296db8c72dca1c17d9a4ce94cc8881e48df8187b Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=296db8c72dca1c17d9a4ce94cc8881e48df8187b commit 296db8c72dca1c17d9a4ce94cc8881e48df8187b Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:35 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:35 +0000 sys/sysent.h: Remove an unneeded type cast The function exec_sysvec_init() already has the right prototype. While here, remove an extra semicolon from the macro INIT_SYSENTVEC. MFC after: 1 week --- sys/sys/sysent.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 1714fa5a7416..6de391dcc03e 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -343,8 +343,7 @@ void exec_free_abi_mappings(struct proc *p); void exec_onexec_old(struct thread *td); #define INIT_SYSENTVEC(name, sv) \ - SYSINIT(name, SI_SUB_EXEC, SI_ORDER_ANY, \ - (sysinit_cfunc_t)exec_sysvec_init, sv); + SYSINIT(name, SI_SUB_EXEC, SI_ORDER_ANY, exec_sysvec_init, sv) #endif /* _KERNEL */ From nobody Mon Oct 13 10:14:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY9C2dMTz6CJlm; Mon, 13 Oct 2025 10:14: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 4clY9958Hxz44Kq; Mon, 13 Oct 2025 10:14:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Cbt4WTt7yNAv2mcCIVp27i0zKVjISNOLwzrkWtgf8E=; b=mFYHokVhmMdMk4DUVxckf2PZEnVH0FuQ+xrqCpg3WlsFaMseh9FZx2j0J1B4sUFBbE0xmK aS68ThC77zdRZYr4S24AVYimJi4OhBNCMoQhC/h7zAI2dnLcB4d4mdjDwuDfo4wrHsl9AN ecRnbZ+V7Qe3cOMyYP925vEwdFXKkHdJWumaiIyuvuzxY/lf+X+gMEWpny1zAw093ZmKLU Kr7r1siE6quNJnImwyJfHjhUe/oaxkNKMVCrjcIpofEOF2nA0uI/i173kSYaZwi74kl/dm 6Kt2HRNTkGrCBl6MwGJp+0VRJrE++YBusPUysyUQXHgNuTYpPEbshlBCVjeU8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Cbt4WTt7yNAv2mcCIVp27i0zKVjISNOLwzrkWtgf8E=; b=OEHU7FhWdfm95lhwJIDLxR3dzftei7DkXl26deG6MpquuXJlPohF1swqGMHXzJRUAamXOX 8o0Q2FvwjoOW5XYCnOfS6CKS6Ge5EEz/UwtgXzbebwC5ZmWMb//rCiy0WfIW9arWa4zcLZ J2l+StpPA6YNBzs/Oz55/+3FDsXRh7mE6kmXvocmDUrXtQIYfmZ9wr/VC6fpbV0Qa0sxSn W1n53wpKLtzKfHEmbekotDFtY4pWoMvjvGH3nP4Xm+DrdAOyUDWZ+NxHclgNVyBmeEUO7u S1VttyVymvIuTVNmRIq2P/K20PPoCGKXHQyGPO9PoSkDnjr6QGNkbHTKPUC8rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350445; a=rsa-sha256; cv=none; b=bzyQrpDCzi34HSPOBh7Sl4Ucr6BPpgkPSj6LNTdzL0lW4z2pTtnO5DoOg4F2WiXNAlw090 3Sm8CPyr91vp/9qNrExkblSe4cjTGCrA6yT61YvVy/wWe3fvGzUmTtDB78x7Jg/Bq+ukZ2 QVkC2jNWhJbMy/cE6aPS0KrGfcXzmOiiNEJcCrFQew+Y55wL8xR4H3dpwP9H4qbMXnaVSk mjTm3XYQq0L10HoobW8XI+Ylo7F4amooMRTDPePclSTIql11HYScLzXl/f68LqUEruO4Gz ooxLmm9O65N1oBMgaoViLSXkQypVkShQ8jRinmrdjZQUD+C3+WBBbL6yAbAh8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY994bmxz12Yv; Mon, 13 Oct 2025 10:14:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAE52W064474; Mon, 13 Oct 2025 10:14:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAE5uD064471; Mon, 13 Oct 2025 10:14:05 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:05 GMT Message-Id: <202510131014.59DAE5uD064471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 12ac59a0d1f6 - main - MAC: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12ac59a0d1f6ae2065e8e2cb36c53c00771bfc74 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=12ac59a0d1f6ae2065e8e2cb36c53c00771bfc74 commit 12ac59a0d1f6ae2065e8e2cb36c53c00771bfc74 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:35 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:35 +0000 MAC: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/security/mac/mac_framework.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index d742b5dcbc3a..b0776160cc74 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -320,7 +320,7 @@ mac_policy_xlock_assert(void) * Initialize the MAC subsystem, including appropriate SMP locks. */ static void -mac_init(void) +mac_init(void *dummy __unused) { LIST_INIT(&mac_static_policy_list); @@ -340,7 +340,7 @@ mac_init(void) * kernel, or loaded before the kernel startup. */ static void -mac_late_init(void) +mac_late_init(void *dummy __unused) { mac_late = 1; From nobody Mon Oct 13 10:14:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY9F61klz6CJtv; Mon, 13 Oct 2025 10:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clY9D0sSVz44TT; Mon, 13 Oct 2025 10:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s8B1VEgiYbfE62JKB8CrAzCxuQRWCaqOkw7PClw+R9o=; b=fTvHFH42jdDkYQ6pSA1DIbCLlu72K4TY5rsyHlByd+yPn1hHL9gTav1X6lw458W2sBMtsB rLwsAk0F2aFLaT0w1mepT3uz7Wyx6Mdjg0tOAjB2gSHz9OQI+HWMzKYcTIfs25+J71+hVy t8p3zwrMsTJTqdUXtX1c1tkHur+EJ7t0kONuej7x9mUM76uCDX5/STNhRfvkceDJTtPKqT DyPcnITTm4kCXkzGlMpyGWVglsZlSfxMoYsi6CGnUSA6H5WQZLtg79Mus3hsnIia8lHP6W NX0SPRImiwvvFXsHRtH7rk7r9NMkzdibxD8FaK0iAfqr8IbNvHEbPTk8T53vrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s8B1VEgiYbfE62JKB8CrAzCxuQRWCaqOkw7PClw+R9o=; b=cATyPrEg6cbVQEnaKxS9gCL0xuBHnXH+Wkk9QdqFO6a+YqpOjGuT1osptWd7mdh6/yeYid 7aA4dX7OeUyB3QrCECUlJNjR6ZgxKq/q3ajN5lzPFqGkJWUcRqtTd1xFEKfayW8YfcWvCj WUn/pFeeNwEJ74VOnuxEL71XXQVXvXT6sV/kVGqwz7dN+oTdLZG7AuvukTOhJQzKR+NpJi xc1FgRYL/Okdrd/BsM1JlbaHGq245FWtVRI5pPZwPAw2I+08pJfD198Q7EW9V2OUhb/FB+ ccaFzwPVSRE3QBWaKXohCzLsg8h8IPZa/5LCdAgFt9zAEVOKY+8pbNEgU8E+ZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350448; a=rsa-sha256; cv=none; b=uIc1IUcsP4UMiYwPVOEuNq4fPcHpEYRIfmiscG//VHrmx120NiqbVNWyRLleix7k433tMG bQ6v0BF+yXDARGWyXvbKlSsDOASl9feAnzXr+wsgYlgY+8qCXhtWM7DJKFey8gbKWV+g2s h1WTY2kX5cAguPAf0tjNtMUIZ+B5HimUX+ffU2l8mIxClG/er5u807CmaQu08VIQTyepYr /R+IabILEVzEwEqfia3sZScWUrmllaQLEP0MfkBGLNUX20zeMggx2SvwknOUj2vmkd4chx vuhK8Qb64K5tXXygezc7wmGaevao8vKrkYeoOPiGO8KgmK2Fi6NZ9sFYg13dmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY9C75h4z12Yw; Mon, 13 Oct 2025 10:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAE7pg064544; Mon, 13 Oct 2025 10:14:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAE7X9064541; Mon, 13 Oct 2025 10:14:07 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:07 GMT Message-Id: <202510131014.59DAE7X9064541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: a5d5851c86eb - main - vm: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5d5851c86ebba87f580e4f9bada495ebeedc465 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a5d5851c86ebba87f580e4f9bada495ebeedc465 commit a5d5851c86ebba87f580e4f9bada495ebeedc465 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:35 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:35 +0000 vm: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/vm/vm_meter.c | 2 +- sys/vm/vm_pageout.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index fef28bb883e4..fee50f49c844 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -96,7 +96,7 @@ struct vmmeter __read_mostly vm_cnt = { u_long __exclusive_cache_line vm_user_wire_count; static void -vmcounter_startup(void) +vmcounter_startup(void *dummy __unused) { counter_u64_t *cnt = (counter_u64_t *)&vm_cnt; diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 3f1be78342c9..418a9cff8abf 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -120,7 +120,7 @@ /* the kernel process "vm_pageout"*/ static void vm_pageout(void); -static void vm_pageout_init(void); +static void vm_pageout_init(void *); static int vm_pageout_clean(vm_page_t m, int *numpagedout); static int vm_pageout_cluster(vm_page_t m); static void vm_pageout_mightbe_oom(struct vm_domain *vmd, int page_shortage, @@ -2333,7 +2333,7 @@ vm_pageout_init_domain(int domain) } static void -vm_pageout_init(void) +vm_pageout_init(void *dummy __unused) { u_long freecount; int i; From nobody Mon Oct 13 10:14:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY9F6yBgz6CJnm; Mon, 13 Oct 2025 10:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clY9F1T0wz44Wl; Mon, 13 Oct 2025 10:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8EEET/R4NNp8uDyV0v+LJj1TYzQN1UyDg8CXVlU6zh8=; b=xOGzGi9+B9tqku+gjacIUcL3oKP3gXbBLGZqflblrlIVskhSL66k1Xg39fKqNNNr66ep9A 21taPJtMa/ngMR7mhrJ32VaydHmyD7P3xGO9QGZiO4D4n8Vwbfy2EsNwQiAqt9mmoRSuvK ecMfSdmYGsQ1xUyNXr8UtToUOlssAFrEffrxC9sQDfbVM3kAJP3OClyjlSeIr1nSjqShPP wuslZZpgCYu5NR2v4AQNPzrUP0H0etRQnPMMBcPeLRb6LHvkTwt0TktXLwpBWdVt5uRMHr 9vbX2+oPOXMOdAOJTkL9/MnEDusHOrAdRB5fBu2YsH+GulhK4c8iszSBbDDSQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8EEET/R4NNp8uDyV0v+LJj1TYzQN1UyDg8CXVlU6zh8=; b=rjDPPci4sHBvlerfs1azEsaEmMPdN4B7GRjAvDLZkaWsPe+XU/psnLws6urBfd1amY3mU1 AsYC3IuFEcGvvZMTdgzZgvQExehaJ9Ska6eqKCuJ3VpbZJIfGMiHyIuu8JJ91ZTDAeSMZ4 iTYH4gSxq+bZWAa/c7vV5Uki/4NYG3xGp9DMery+gDdv2fsIk464TDFHFn/ckhF5Nfpji+ hNK0dDs2glHsYWQNe5GU7IOseWG9bvOmoF9x+CpNMA8pRz/1JxOsKsyfLrR2SyTdc7NvJn FJG+bTUNNuTDcBgutdmBsTp05xt5H0OjAoQrU5LHPtTA0NHyDzYCDr9iQ7I0Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350449; a=rsa-sha256; cv=none; b=PQHFwsPkyo7r85l02u1ZEz2GXaRTTNSh4zRM8deHbtJs5xSEF0YUhlXjTgWS2ZobNtARwj 6rlk4JJ3jGM237rfKUTtqapLp8XHC5nMSXcYE127nUm7H3K7AHP8WYSAx2DyauC5RGvLqq K6FEK7B6otUgdmJzA8rjOUdWPzTSV1ovjG/bigBa/uTSTm15ERn6J5D/cOjt0BRUEl4Wpq vHdMtzM7Hs50mS0rtkDC1ZwgWhKx8yBF8hzFftnkQdi5XOo7pFownz8Y9n6OmfPC60YqW/ SFlGpyZswTS6ezFO4ziM7/m0+TeWwsjRffvux9EGs3C7S3fM9RXQJidn2JVsdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY9F0V56z12H3; Mon, 13 Oct 2025 10:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAE8ga064577; Mon, 13 Oct 2025 10:14:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAE8HL064574; Mon, 13 Oct 2025 10:14:08 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:08 GMT Message-Id: <202510131014.59DAE8HL064574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 0b9c12fa9764 - main - arm: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b9c12fa976446705635a94984f45232f034eecf Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0b9c12fa976446705635a94984f45232f034eecf commit 0b9c12fa976446705635a94984f45232f034eecf Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:35 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:35 +0000 arm: Use proper prototype for SYSINIT functions The only possible return value of function module_info_init() is 0. Make it return void to match the prototype of SYSINIT. MFC after: 1 week --- sys/arm/arm/pmap-v6.c | 2 +- sys/arm/arm/unwind.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 78883296c5b7..6a0ece1e4d98 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -1246,7 +1246,7 @@ pmap_bootstrap(vm_offset_t firstaddr) } static void -pmap_init_reserved_pages(void) +pmap_init_reserved_pages(void *dummy __unused) { struct pcpu *pc; vm_offset_t pages; diff --git a/sys/arm/arm/unwind.c b/sys/arm/arm/unwind.c index 7ad91a3e01a5..0d77074fae34 100644 --- a/sys/arm/arm/unwind.c +++ b/sys/arm/arm/unwind.c @@ -278,7 +278,7 @@ unwind_module_unloaded(struct linker_file *lf) * the unwind tables might be stripped, so instead we have to use the * _exidx_start/end symbols created by ldscript.arm. */ -static int +static void module_info_init(void *arg __unused) { struct linker_file thekernel; @@ -291,8 +291,6 @@ module_info_init(void *arg __unused) thekernel.exidx_addr = CADDR(&_exidx_start); thekernel.exidx_size = UADDR(&_exidx_end) - UADDR(&_exidx_start); populate_module_info(create_module_info(), &thekernel); - - return (0); } SYSINIT(unwind_init, SI_SUB_KMEM, SI_ORDER_ANY, module_info_init, NULL); From nobody Mon Oct 13 10:14:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY9G6qQxz6CJrL; Mon, 13 Oct 2025 10:14: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 4clY9G3btnz44f3; Mon, 13 Oct 2025 10:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Et2CecB8khwabdzyyaw/SE+ORXVieY6KSOj6alO9aM=; b=yuuwK0ygSnzYSw2AElsJxYTtIgZDBEP3rAQcl2BOOzQOHYF8ozcJXtjFd9IaBt9hm7tPJE ypmtMNHHwJtOEN2rn++z0S5EkkjfreiyQKGmm3Jz69UIcKZDwf6UVGYr5wiPeleTg6jkOk EUAECGa4th0ciXLfu3Arac4w89haUTTWa/NEbXgRCZw3UO2/aMRBTdaf1wc6qgABnSPgAf /vWjUgcteHr+bX7mY6Q7ET66OxEVm/PnWT6lEHoq/2hWCyd61PJ7TrLaORn08PmDogD6sl fuUpgAWAyfs/V8EVcoGZP6TsDJiaGRWz85qlEfY2nVbd6N9Lges4A5EsbE96Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Et2CecB8khwabdzyyaw/SE+ORXVieY6KSOj6alO9aM=; b=Uc1G+1a3lBRJBFzzUPAHjvc+s8UJeVVKwwLFzMyUJw15TlA1BGPEByoN7u6LoOoQBvcO/Q OLL2Rje+TdZ19LhYp+Gk5aqdTfP9tu+7Wwb+bK36nU32786HUDueZkU1RuP5nF0FM7TkIe BSlufrN02+feayZ+ZkpA8o5hYXaXwkh7Iylj+l1+2JV4j6AHt06HDNeAQs5uggssl68qCT zTfqudocZxsISL3efHG0ArkAQflxYH1WNl/lxkX3UQIYyOJJ5MWhV5ZNqt3eGQN/J/L9dS bzE1mn4o+x2/uOzRT0NzrIsFjqtsmbLGuYjUBmHNAiVWThCIpbBxk8m3CvMI2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350450; a=rsa-sha256; cv=none; b=kguJg5Jn8Ru3MEuOD4UEigyFgUudy2MqxxUJfHu+f/4z3x1O/eDXRlz9iXq4QWADLupeb1 WNYvOSd7NSIGdSleOfRxLqQ/JFPeZPZp6cMEaZdk6hBKPewuQcB8wK+VfTxtumMZsrr4Je uFOVExCGQvcY0+96H/Yycc5YE8Ru7t6dpe/yxFNhdRUwbayQsZXx5mgQI4Rdo2mOXux26/ 4YFNXyuC714+nWnufJeJgfnyAEMI0nNZCd0Fh5Ovlflblk3K2KkuDI3+D95nh1RPhTXiWy PA47NEv8oA2bs/xhU14h73tsjCwCA5CWXaKhz7RNLWjmuj6G/3odjSqXWT8Z4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY9G1kYbz12Pw; Mon, 13 Oct 2025 10:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAEAbV064609; Mon, 13 Oct 2025 10:14:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAEAwt064606; Mon, 13 Oct 2025 10:14:10 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:10 GMT Message-Id: <202510131014.59DAEAwt064606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 5d5ba0c0fa9e - main - arm64 coresight: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d5ba0c0fa9e2eaeda9d41508bb0f83d5a55f367 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5d5ba0c0fa9e2eaeda9d41508bb0f83d5a55f367 commit 5d5ba0c0fa9e2eaeda9d41508bb0f83d5a55f367 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:36 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:36 +0000 arm64 coresight: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/arm64/coresight/coresight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/coresight/coresight.c b/sys/arm64/coresight/coresight.c index 5928c153f4ae..9b9d3c65ecc9 100644 --- a/sys/arm64/coresight/coresight.c +++ b/sys/arm64/coresight/coresight.c @@ -113,7 +113,7 @@ coresight_get_output_device(struct endpoint *endp, struct endpoint **out_endp) } static void -coresight_init(void) +coresight_init(void *dummy __unused) { mtx_init(&cs_mtx, "ARM Coresight", NULL, MTX_DEF); From nobody Mon Oct 13 10:14:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY9J5R9hz6CJTq; Mon, 13 Oct 2025 10:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clY9H6cqdz44fF; Mon, 13 Oct 2025 10:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=clqm8QnYjRCrvXkGr8u25qD05yhMMuEAdDBpYS9ozS4=; b=hXItvohppofLLMR1oshCmbojxQ5XaLWZ5lqWbxRARMl39bJa/+MalSH2/oq+GpL7DQKhFP GS+EjUVyE1ZqnuV4aBRtTbncZmSIaBxhHkbrKEaKpvIsuiHdYYg0q8KgmhKB9vTQPfpVjs 7SVeLCdKmWxvSaslLWRpLZF1IJqV3ndfszBNEtdfX/LqAnw4XQZoGLP62rAiWxLnQoEMpv VNZqAG+ok8kIqso2yAGqVBuBE3jx0PMClrvkbtqru1fNWEhKWugHsjh5ckyLClepzewjI2 7LTHNys3eUUh/rjoOcmVEuT6KZX7B/aCVRqfnRRXufVW0oy7Nr5UOC3Szo5ACw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=clqm8QnYjRCrvXkGr8u25qD05yhMMuEAdDBpYS9ozS4=; b=oPieK/Ell4tUUKrty5f2Zkjh+YXVKCvDlaogDHYEtKlM7BxgiaFquhEYdN8VOvUSLEmYY5 1LY4z5pfuGfHztSDP8nO9FJEoyVLfu2cg2n4enLCAtRVhLbv0t1+GtWSJ3EOQraJe2JVdF 9r4ScM46TuQC8gFoR4v6iCRtTvOnhry4zKniXl3YkMNOnLEeJnutJGAmZlbZ8s6fmUUKPJ LXZbDfoSyBrIPyezERkr3BpDpCLOzPac4XM39I6ulidVjsoOaYr4IR0HWS4CzWDdI5GVH/ c8MX2HhkpiMb0MgvqraPO7zV9VeivnTBDOMpYc48kVsJHQka/phv/aCj/6lUuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350452; a=rsa-sha256; cv=none; b=gz69dp1C1Oo/TIzp4OltOrLsFnUzoFdH4Zhoho1qI60Q73MAi91zVqIgc7/erLpYDAIBw3 7cnW0H/V2CTt/toVhSgwtoX+As0kJEqFmRHD3mIcyl1SGdmpxHWuX/p86qaoyCTuQgUG9b tRMo3BE4VdEp9Nop1uegu1loqwZt/yMI7HNnwLNFImXgQUKOQ8eM1fbx5ixWEWbQCizo8O TcavKfGEpiTfmeyHBdBOH4gGa8AsltAxS+LcaD9UTmo6B6iGGyEBp8vFxTCwU33Xy4S2RA RVngZLOLZF4QvU3U5L/gx83bjMnrZMu1brwpqzXJZrhhxSoqVc9PgDCO38P8Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY9H2TDfz12Yx; Mon, 13 Oct 2025 10:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAEBDa064643; Mon, 13 Oct 2025 10:14:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAEBcf064640; Mon, 13 Oct 2025 10:14:11 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:11 GMT Message-Id: <202510131014.59DAEBcf064640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 0039721e3bab - main - i386: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0039721e3bab22446413fb62532e622345770ffb Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0039721e3bab22446413fb62532e622345770ffb commit 0039721e3bab22446413fb62532e622345770ffb Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:36 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:36 +0000 i386: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/i386/i386/machdep.c | 2 +- sys/i386/i386/pmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 6aac0e968362..3f659432552c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1605,7 +1605,7 @@ init386(int first) } static void -machdep_init_trampoline(void) +machdep_init_trampoline(void *dummy __unused) { struct region_descriptor r_gdt, r_idt; struct i386tss *tss; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index b44f5e08bbcf..1cf0867d57c3 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -720,7 +720,7 @@ __CONCAT(PMTYPE, bootstrap)(vm_paddr_t firstaddr) } static void -pmap_init_reserved_pages(void) +pmap_init_reserved_pages(void *dummy __unused) { struct pcpu *pc; vm_offset_t pages; From nobody Mon Oct 13 10:14:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY9K4JQNz6CJx2; Mon, 13 Oct 2025 10:14: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 4clY9J4j6cz44fY; Mon, 13 Oct 2025 10:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RYXBS5jdiSjkIqq30hlHQLdKyboJ4uAf7WIqzYxO4u0=; b=lCxlPEl4p9A+5esjfHGGFfmy63/1V6DBBGM0mc5ISTqYC4CVCqZ75/cOX0RhVMc8YkLaaN JncZBXa9Z1/n2wq0lsd68n3Lj0qyJH0SgPXHI7eT6HDtzwNGhxopq0zezQ1xVkoEVFvja7 B9SLrymbpxVEk2Pn2tVVSwfGDoSm1HtMRHQA+1ajRM7O541htyCl1QPn42GUPPGa+/GFwY XvrZamvQN70i0WRIryo2g07q4z3W1Tbxh7bnAFNuY6dQGO8wjglTztwoPGZtKLiH6yuQY9 WC1cF7zcQcjCFcXwxgOm6NBQhm3wc3s4JGF73ivoDRmU9i/1kER7aGFUH0qsVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RYXBS5jdiSjkIqq30hlHQLdKyboJ4uAf7WIqzYxO4u0=; b=kZItLUh099j5AkppNhFBYHowB9wYAceSZoWGJQuSOu7gRbby048UD3VHka/6YEYIcllbPl KJnXbrXzA98u4iLNJuQ7clAjLAkFtEQD5yLc7TGhBEXvIkqHV5sXNyx8zUhPIx1mKYcZoB AWTACkSdVmT+YikcNDjLqMl14/u4IE7ujRTE97EH1Wc5oqagtEZfusg07wu1AHgZgy9/v6 13YRaR0GHYcP+2jXWndaM8RB1ukciVNxDIfnujt2cdWQnbZAhOlOVOrhs9IAdq6ZdfKxJU dO2NrTYrkGc4z638p4R41wdlRfnSOF5Cj2B0C0meJhLV0btwcTqSzDsJZZ1Vkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350453; a=rsa-sha256; cv=none; b=CrOzFuSPQkB4rAGDI94KSmFfYGfmf7tf4kBUO+CJL3TkQFiba0UNFzO9EPsV/mQtmvsv9m g8VLVD/9Xi0rTJuGnEg3JarOlKE4CZwWOO55F6Esq2YFGuZS9ka5dsmlVEUVRNG+sseJL+ 4JxzW0kfOwy4Lf/ZWifswfOAfXlHaiAzBDSH9q63K80S/1JLnTrgYJLMmjozWI8mnEPtH7 fsEH1u4tjtaD4iao9r/Knf458ijKUNWd4m1NEjp8wxCsC7W2jhYc45igzZDzUhwUohy4s7 sWLbJ+cZzpOfhDpEPFpmFBSTKQYB9YNdKU5jEpcYvVk1K5RHuRfLP6qCeK4Sfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY9J2kRRz12qF; Mon, 13 Oct 2025 10:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAEC7A064679; Mon, 13 Oct 2025 10:14:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAEC82064676; Mon, 13 Oct 2025 10:14:12 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:12 GMT Message-Id: <202510131014.59DAEC82064676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 9caa16bd0287 - main - powerpc: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9caa16bd028746af7bee01c6bcc6394de91265db Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9caa16bd028746af7bee01c6bcc6394de91265db commit 9caa16bd028746af7bee01c6bcc6394de91265db Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:37 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:37 +0000 powerpc: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/powerpc/aim/mmu_oea64.c | 4 ++-- sys/powerpc/cpufreq/pmcr.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 796b1719b8ba..01bf4c7e90a8 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -297,7 +297,7 @@ static u_int moea64_clear_bit(vm_page_t, uint64_t); static void moea64_kremove(vm_offset_t); static void moea64_syncicache(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, vm_size_t sz); -static void moea64_pmap_init_qpages(void); +static void moea64_pmap_init_qpages(void *); static void moea64_remove_locked(pmap_t, vm_offset_t, vm_offset_t, struct pvo_dlist *); @@ -1284,7 +1284,7 @@ moea64_late_bootstrap(vm_offset_t kernelstart, vm_offset_t kernelend) } static void -moea64_pmap_init_qpages(void) +moea64_pmap_init_qpages(void *dummy __unused) { struct pcpu *pc; int i; diff --git a/sys/powerpc/cpufreq/pmcr.c b/sys/powerpc/cpufreq/pmcr.c index dd489b607606..6ae0777a8ac7 100644 --- a/sys/powerpc/cpufreq/pmcr.c +++ b/sys/powerpc/cpufreq/pmcr.c @@ -40,7 +40,8 @@ static int pstate_ids[256]; static int pstate_freqs[256]; static int npstates; -static void parse_pstates(void) +static void +parse_pstates(void *dummy __unused) { phandle_t node; From nobody Mon Oct 13 10:14:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY9L4T0Zz6CJTx; Mon, 13 Oct 2025 10:14: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 4clY9L1XH6z44d3; Mon, 13 Oct 2025 10:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNc/YqSFJVPHbIIqQSklKLNI+cae4O8QHpVN4KOJzRA=; b=SJb0TIKZwK6nWMyyDUvLKFFW23ornJfocZgpXMeEnXX+cIy66CABO8BwLP0bCOLEriFRBP k1e6PwKsumIVpg5nrhzP26OD2tE18SNGWc7ATeMugf9FtGxwjK+sq0phq5RJEHc0qfM5RM 8EfHyv3yPplW9sYoT2z53gKbPu/cVWEr+xtr8aQvl7ClOWPYmd+R/mNPwGj6O9O8M7LTZg oASl6oqxiDHJ7MvtrV1l2ckgwfaNm/NvbVlOvr7t3WJSgB5MdCWEZE0WbphgSxvgIzFSO3 79ETDqAS2O1IwsUM7/3PXtobV5E+gUaHWIw/CMlAAwSQTWBzdktLTY6ER5ZHBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNc/YqSFJVPHbIIqQSklKLNI+cae4O8QHpVN4KOJzRA=; b=p4PSoE+WAVCFvlNT1XhSHXqstbNmxSu9U5Id9eRir5VUjKohsorAp4IXFnMlYytGns5X3H MUcQQ3zzLsmNSr+O7slkkLBUKkZfO2Ruh2hvB06r4uUYqeMu/fBZa2qAm5pQTgW23BVJpT NYjXFla7IzyxA/yWYr4HWLeECHHcfo3aDTuAn3vE8wAlwINdimB7FQWtt54cgCgp5fD9Mv XHw4SCHurw1292JkSnxdw1x1D75ZKa3G4iDWcMF96En7rJW7/B+JXsRxWAyUZ9OTci5inv dO2FJe5osOsivDafhyMzaD1tFoqGJMDpYtJSvr8hqQ0YcMdIEPjfS9HUaeIhrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350454; a=rsa-sha256; cv=none; b=KaV6HTHJX1M/s+LW8198citc07mlt1k6OgE5i2tYB2w/02meirvAs3i88C+xF6sAfVVNeM G7RYgrYzZb/cbPnrASQ/se96xGIQM1ubjq1IE26TE5D+2z+VvraF9mfeNxj7pZgKJmgJid EJ1LvctlxFLG5xmlkl3z9ZsNdFvESyGoiu1fAP3/0jwtWeuMIa1JFCOVq+Cw3tFCgFSx5w O3PN+DJ4IFy6q7xE0jPD/z9SBngBaumXE8rcpdb9XL0XoKVhIqmJlSl207YVU7PvrScE2q HC322MQ3y91RlV52L14b0G81vULRH6I/prCTT05W9Orc1pQwTWyc7jscV7+Ksg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY9K3XbGz12Zr; Mon, 13 Oct 2025 10:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAEDaI064711; Mon, 13 Oct 2025 10:14:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAEDJq064708; Mon, 13 Oct 2025 10:14:13 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:13 GMT Message-Id: <202510131014.59DAEDJq064708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: bf8f6545f6ca - main - tsc: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf8f6545f6ca41e080cc3bc42009bdf253f596b4 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=bf8f6545f6ca41e080cc3bc42009bdf253f596b4 commit bf8f6545f6ca41e080cc3bc42009bdf253f596b4 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:37 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:37 +0000 tsc: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/x86/x86/tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index a1a5d8140b14..3b873d9dae73 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -650,7 +650,7 @@ retry: #endif /* SMP */ static void -init_TSC_tc(void) +init_TSC_tc(void *dummy __unused) { uint64_t max_freq; int shift; From nobody Mon Oct 13 10:14:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clY9M0Wz5z6CJkC; Mon, 13 Oct 2025 10:14: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 4clY9L5t6Wz44lK; Mon, 13 Oct 2025 10:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0T/C+aLHtDEO/40UAEewuDcmjwqrwXu14pI2nwOiyGE=; b=pL2aWe27srDwauoupMPFRearugzE+QX9f/tSb3iVI0bgPrNrDJkeBhXUrKCR2CrYzsMueb DHv4pxQQdAaghJPJT/mO28V5vD2GaDRPWNlFNKSYXcWCUFEKXKSjJbyjS7eVi7yegXojoe SKlk5zxWsm3D4MqQpFSIAoijXYEARtgl6Wsfwj9rSqZZz44lHP7DZpzRhcLn4DJIpNox8R t4ZNVYI+zRtrPBP7iQgip/Kc5TJuS3m6Dw8xlSSvWQ5OifEqPxB/5hSycSqTai8ayQD9bb YnF0jSDuNTUgmVTAb1Pfm18PMfYNlceM3kuYYi74BX7TO0ecJ23MbEhVyJHfpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760350454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0T/C+aLHtDEO/40UAEewuDcmjwqrwXu14pI2nwOiyGE=; b=e4SZMtwkhNx2Doc3VzRvGBsnlQpAk8RN/IGowD7JxLXDs6SlXyE6qucW6qjDPxBZmxKWQq 0UDwfxKGiwjxWlKNDc2/sguVXPeckr00cEI2qwmSFQVyX1c5dcbmv+NOHX83q+zUUtPEmr /VJP+CMKvV/sZNCjTjDScjaYG02mR+0Gf9HIv8ooiigvlbLnWoHgsfr01S4eQYOY873/28 NuC60Ig4vPzZ3OR4Hw3VVhTqTzHsQYPFDw2OaRkeLRaQ5LrB+yzY+lfg7RICcBZy+v1Oaq tdH+CzPMTZ+/QGtu3OOpn0oYxiHH0PYVgGLBMeST2PiUzbfrgN6zFS5KNcc0sA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760350454; a=rsa-sha256; cv=none; b=wvmd5uAE6i3bt86cqDuxMHPqnrKJH5AkpdPCZgucmIFVKG1mzXNHkc3DbWaj0DvMhgpdIH 7m6FYhJ1457aPCe8h7/JvSp+rgazHlvX3f/yubJboXniL7+UVDHfhsf/Ff09E7zK/hBgjI B0ewCJIGqayI18jtg60Yr/MqgQJs/PVUXeQ0Lv+2aEF2I8HwjmZyTj+6OXAk4cmA2HC4b5 RRn/DGE9BByAPQGjedM21f1NYVj2POPQ4PUUMr98CcFtSfy2Bq62U+s8zhcHA7/Q6580RU iYGNOVi+T/dKsomn1VomsuARguAmGAWoDj0+2gYqgZdUYoQCOcjSlWx35PRKwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clY9L4vbXz12H4; Mon, 13 Oct 2025 10:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAEEix064744; Mon, 13 Oct 2025 10:14:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAEEDY064741; Mon, 13 Oct 2025 10:14:14 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:14:14 GMT Message-Id: <202510131014.59DAEEDY064741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: c8e077e57b25 - main - x86/xen: Use proper prototype for SYSINIT functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8e077e57b2535b840d391f3217d00465b0514c4 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c8e077e57b2535b840d391f3217d00465b0514c4 commit c8e077e57b2535b840d391f3217d00465b0514c4 Author: Zhenlei Huang AuthorDate: 2025-10-13 10:12:37 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-13 10:12:37 +0000 x86/xen: Use proper prototype for SYSINIT functions MFC after: 1 week --- sys/x86/xen/xen_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/xen/xen_apic.c b/sys/x86/xen/xen_apic.c index 994dc3e0804c..43a253cc2860 100644 --- a/sys/x86/xen/xen_apic.c +++ b/sys/x86/xen/xen_apic.c @@ -330,7 +330,7 @@ xen_cpu_ipi_init(int cpu) } static void -xen_setup_cpus(void) +xen_setup_cpus(void *dummy __unused) { uint32_t regs[4]; int i; From nobody Mon Oct 13 10:44:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clYqs4LdQz6CLmQ; Mon, 13 Oct 2025 10:44: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 4clYqs3pLQz4K5P; Mon, 13 Oct 2025 10:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760352249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xfNIcapPO4z/+tiorxYidWb8jqShje3vHHwhKWLN8vo=; b=jt586J3dS2LKro+lgCB3XWxQ/cv+p1VZfCyFWpVO+HjOJMjEIsF1mzS7mKst1CMTDD4Fd6 SuCxL5lJLrFVQqUWtEf8SpxbhybnRuZ755JDwz7JiYuVkC61mL98URTVfRbaBnyP0NlSvo tGqci+EMBzv2moNkNLeo7w31R8g2ulMuxEnKRPPqUp65lJbtbzRrS4hdgxd6tcL/AV+Tm/ NyBOGPVv39OyX/0EOTPJfC63a+74wLxHpiEk9XtL0mPx7mJWPWIHVvWfW6THhCoZwOYcFo FRZjRdzyIqscb0c3+nbdvXtlsdGqbvC5v8obGAyD0CcdMWpmxdfoHRSKR0NFYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760352249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xfNIcapPO4z/+tiorxYidWb8jqShje3vHHwhKWLN8vo=; b=PADsFvp5qPJzQo50w+39X1Mn4qbb0mMiMAhR9qnIfhrexJRGAnfsWOsH3qYnQEZlqIIkhR UoLC1r7mxzIWj/ygGZ03/whNBNaYppZ3Elb03yWUl4Lbgg8M01FZF+Ctx7TSEGTAa8npmv SKngWVif4Cpql8ZdwE70IVSDLvP62OSS2+9ECDJL0wpfmHPwBxioNLghveS1GqQEfkRQjV 2gln3gockvrjLx39VVvPYacJiq5dZll8IEE3JjaUUVcJ5zyW1MLMRtbxq3KhN9DWokNeLz 69o9pJYXIEeiGgPQSum3zEz0OC8d8zhKzOHqeUc7l7b9u0UwQeF6qVTfHmYFgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760352249; a=rsa-sha256; cv=none; b=IChZNjfRYYKGOEfb1A4weM2H28j4qsIBJGty9AQUOpnJtO8/+ZPAvBGJtWsh9Nl408JxW0 1gBQZcfwQFxeOj+0T1IoF9HcqtYfMrAtn9Pnu3hAh6Jfsc7NRp1OyNTiWuAjYDWs6UiIbn 5k8RyEnDWHYBzqwtrJPcs+wBhVH+GcDH01IVkau+N8BaAYclPPuxiYGmDKitVuci07SRsh Q7nCN7oEop783Y4Yi++YCuuSUicOZp28FkKJGD2HHigbDtELsNC+lDQD437E3uV3rznqwL hbsvVmV5C1ZArTmE298Oyj8BNANzdoOxnoYJ0RcBGZqmKslyDcvJpkCKWHkknQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clYqs39J6z13MY; Mon, 13 Oct 2025 10:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DAi9wN020461; Mon, 13 Oct 2025 10:44:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DAi9X0020458; Mon, 13 Oct 2025 10:44:09 GMT (envelope-from git) Date: Mon, 13 Oct 2025 10:44:09 GMT Message-Id: <202510131044.59DAi9X0020458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: dd69f1261ec5 - main - bridge.4: Improve VLAN documentation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd69f1261ec5eb91cd7786d4462a15cfdd810d25 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=dd69f1261ec5eb91cd7786d4462a15cfdd810d25 commit dd69f1261ec5eb91cd7786d4462a15cfdd810d25 Author: Lexi Winter AuthorDate: 2025-10-13 10:39:56 +0000 Commit: Lexi Winter CommitDate: 2025-10-13 10:44:05 +0000 bridge.4: Improve VLAN documentation Document how bridge implements VLANs, and provide an example of configuring a bridge with VLAN filtering. MFC after: 3 days Reviewed by: ziaee, pauamma_gundo.com (previous version) Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D51185 --- share/man/man4/bridge.4 | 210 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 168 insertions(+), 42 deletions(-) diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 index 7048df4593bf..3af952256d3a 100644 --- a/share/man/man4/bridge.4 +++ b/share/man/man4/bridge.4 @@ -36,7 +36,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 28, 2025 +.Dd October 13, 2025 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -272,53 +272,149 @@ by setting the node using .Xr sysctl 8 . .Sh VLAN SUPPORT -The +Virtual LANs (VLANs), defined in the IEEE 802.1Q standard, allow traffic +on a bridge to be segregated into separate logical networks which cannot +communicate with each other. +For example, two interfaces in VLAN 10 would be able to communicate +with each other, but not with another interface in VLAN 20. +.Pp +Each VLAN is identified by a number between 1 and 4094 inclusive. +By default, all traffic on the bridge is assigned to "VLAN 0", +a pseudo-VLAN used for historical compatibility. +When VLANs are in use on a bridge, it is recommended to explicitly +assign all traffic to a VLAN rather than using VLAN 0. +.Pp +The bridge implements Independent VLAN Learning (IVL), meaning that +host addresses are learned separately for each VLAN, and the same host +address may exist on several different ports in different VLANs. +.Pp +If a +.Xr vlan 4 +interface is configured on an interface which is also an .Nm -driver has full support for virtual LANs (VLANs). -The bridge implements independent VLAN learning, i.e. MAC addresses are -learned on a per-VLAN basis, and the same MAC address may be learned on -multiple interfaces on different VLANs. -Incoming frames with an 802.1Q tag will be assigned to the appropriate -VLAN. -.Pp -Traffic sent to or from the host is not assigned to a VLAN by default. -To allow the host to communicate on a VLAN, configure a +member interface, all tagged frames will be processed by the .Xr vlan 4 -interface on the bridge and (if necessary) assign IP addresses there. -.Pp -By default no access control is enabled, so any interface may -participate in any VLAN. -.Pp -VLAN filtering may be enabled on a bridge using the +interface and will not be visible to the bridge. +This configuration is not recommended and may be unsupported in a +future release. +.Ss Tagged and untagged traffic +Incoming frames on a member interface may be either tagged or untagged. +Tagged frames contain an 802.1Q header indicating which VLAN the +frame belongs to, while untagged frames do not. +When a tagged frame is received, the frame is automatically assigned to +the VLAN in the tag (subject to any configured VLAN access list), +while untagged frames are assigned to the interface's configured +Port VLAN ID (PVID), or to VLAN 0 if no PVID is configured. +.Ss Assigning interfaces to VLANs +An interface's PVID may be configured using the .Xr ifconfig 8 -.Cm vlanfilter -option. -When VLAN filtering is enabled, an interface may only send and receive -frames based on its configured VLAN access list. +.Cm ifuntagged +command: +.Bd -literal -offset indent +ifconfig bridge0 ifuntagged ix0 10 +.Ed .Pp -The interface's untagged VLAN ID may be configured using the -.Xr ifconfig 8 +Or by using the .Cm untagged -option. -If an untagged VLAN ID is configured, incoming frames will be assigned -to that VLAN, and the interface may receive outgoing untagged frames -in that VLAN. -.Pp -The tagged VLAN access list may be configured using the -.Cm tagged , -.Cm +tagged -and -.Cm -tagged -options to -.Xr ifconfig 8 . -An interface may send and receive tagged frames for any VLAN in its -access list. +option to +.Cm addm : +.Bd -literal -offset indent +ifconfig bridge0 addm ix0 untagged 10 +.Ed .Pp -The bridge will automatically insert or remove 802.1q tags as needed, -based on the interface configuration, when forwarding frames between -interfaces. -This tag processing is only done for interfaces with VLAN filtering -enabled. +This will assign all untagged traffic received on the interface to the +specified VLAN, and any traffic transmitted on the interface in this +VLAN will have its VLAN tag (if present) removed. +Conversely, any traffic transmitted on the interface in a different +VLAN will have a tag added, to allow the remote system to assign the +traffic to the appropriate VLAN. +.Ss Host communication in a VLAN +Sometimes it is useful to allow the host itself to communicate in a VLAN, +for example to provide routing to other hosts in the VLAN. +To do this, create a +.Xr vlan 4 +interface on top of the +.Nm +interface with the appropriate VLAN tag. +For example, to allow the host to communicate in VLAN 10: +.Bd -literal -offset indent +ifconfig bridge0.10 create inet6 2001:db8::1/64 +.Ed +.Ss Configuring the VLAN access list (VLAN filtering) +For historical reasons, the default +.Nm +configuration allows all interfaces to send tagged traffic for any VLAN, +meaning that VLANs do not provide security separation. +To restrict which interfaces may communicate in which VLANs, +enable VLAN filtering on the bridge: +.Bd -literal -offset indent +ifconfig bridge0 vlanfilter +.Ed +.Pp +This has the following effects on bridge members: +.Bl -bullet -offset indent +.It +No untagged frames will be accepted from a member interface unless +the interface has a PVID configured. +.It +No tagged frames will be accepted from a member interface unless +the VLAN identifier is present in the interface's VLAN access list. +.It +Frames with stacked tags (Q-in-Q) will not be accepted from a +member interface unless the +.Cm qinq +option (see below) has been configured for that member. +.El +.Pp +To configure the VLAN access list, use the +.Xr ifconfig 8 +.Cm iftagged , +.Cm +iftagged +or +.Cm -iftagged +commands. +For example, to allow an interface to communicate in VLANs 10, 20, +and any VLAN from 100 to 199: +.Bd -literal -offset indent +ifconfig bridge0 iftagged ix0 10,20,100-199 +.Ed +.Ss IEEE 802.1ad (Q-in-Q) configuration +IEEE 802.1ad, also called Q-in-Q or +.Dq tag stacking , +allows a single Ethernet frame to contain multiple tags. +This allows one Ethernet network to transport traffic between endpoints +using its own VLAN tags without interfering with any pre-existing tags, +and is often used in service provider networks to provide +.Dq virtual wire +Ethernet services. +.Pp +When VLAN filtering is enabled, +.Nm +does not permit member interfaces to send Q-in-Q frames, because in +certain configuration this allows +.Dq VLAN-hopping +attacks on the bridge. +For example, consider a bridge with port ix0 configured as a tagged +port in VLAN 10, and port ix1 configured as untagged in VLAN 10 and +tagged in VLAN 20. +If ix0 is allowed to send Q-in-Q frames, then it can send a frame with +two tags: one for VLAN 10, followed by one for VLAN 20. +When the bridge forwards the frame to ix1, it will strip the VLAN tag +for VLAN 10, then forward the frame to ix1 with the tag for VLAN 20 +intact, effectively allowing ix1 to send traffic on VLAN 20 even +though the bridge configuration should not permit that. +.Pp +To permit an interface to send Q-in-Q frames, set the +.Xr ifconfig 8 +.Cm qinq +flag on the interface. +This is only required on the interface which will send Q-in-Q frames, +not the interface receiving the frames. +.Pp +Alternatively, set the +.Cm defqinq +flag on the bridge itself to enable Q-in-Q for all newly-added +interfaces by default. .Sh PACKET FILTERING Packet filtering can be used with any firewall package that hooks in via the .Xr pfil 9 @@ -537,6 +633,36 @@ ifconfig_wlan0="up ssid my_ap mode 11g" ifconfig_fxp0="up" .Ed .Pp +The following will cause a bridge to be created with two VLANs, +10 and 20, where the +.Dq Li em +interfaces can only communicate in their assigned VLANs, +while +.Dq Li ix0 +is a trunk port which can communicate in either VLAN: +.Bd -literal -offset indent +cloned_interfaces="bridge0" +ifconfig_bridge0="vlanfilter \e + addm em0 untagged 10 \e + addm em1 untagged 10 \e + addm em2 untagged 20 \e + addm em3 untagged 20 \e + addm ix0 tagged 10,20" +ifconfig_em0="up" +ifconfig_em1="up" +ifconfig_em2="up" +ifconfig_em3="up" +ifconfig_ix0="up" +.Ed +.Pp +The previous example could be extended to allow the host to +communicate in VLANs 10 and 20: +.Bd -literal -offset indent +vlans_bridge0="10 20" +ifconfig_bridge0_10_ipv6="inet6 2001:db8:0:10::1/64" +ifconfig_bridge0_20_ipv6="inet6 2001:db8:0:20::1/64" +.Ed +.Pp Consider a system with two 4-port Ethernet boards. The following will cause a bridge consisting of all 8 ports with Rapid Spanning Tree enabled to be created: From nobody Mon Oct 13 11:41:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clb5f5Gypz6CPwy; Mon, 13 Oct 2025 11: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 4clb5f4dbwz4Pcw; Mon, 13 Oct 2025 11: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=1760355670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CijDBL7EsAKyWehx+VRhlk68hnZgxA4Z5wntka6ADYQ=; b=tI18cfXD8oAmAksx0AxbWtXYWBhDYy5nYTrGpBOjazBPOGA8pzuWxK6XJYf7fzYtmfReMy IvdYl8IBSvRroFEYyXtAq/n+tJHl79j72lfMKqh/Yn0QLuGU0ZSCJtQvYPN6AP2c2VGl0V 5ERjUh2ZWKLRSoLc/gqgAqwX1D+8L058E5//hsTAguMEyuzsdq4S75Y7lXlJDGqFh9eNOX jaz36tau8tR3cXP4RB06cKf/kxlmWNeB9mYudgXgo68JGJD0K8TG+unsznT0Zn0MxfLqiq T/d8nHzL9WxAaSwUAnkfCUkwJlIX+pqV3uSJqC/y4hJ/yh9ntqYsSaDUF05LIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760355670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CijDBL7EsAKyWehx+VRhlk68hnZgxA4Z5wntka6ADYQ=; b=Hjatb5h87Qx5uAr1smUBggVgFDP1VA0H3tQhYA/07T9YY0XlCl7bUzJcY6UPB5GYMCSpFZ 7mhlgPdtk5WA5roqswb5i4tkQKyNZAH4F+gdxXFsllMnADz9g1GYF06/Xn8eRMJkqNYyZY QaNMpEaLi5p5lpKiSIod8URj3d6V2TRKUxbIRBUd3tFtLvUtucTDxP9IakFCYIRlVapqjf GHRMb4UiJJ8oExeqf6uf+1/hrJAHr9CTSoSCTDGsPrz0s0Uy3yvfaxmIGndl+Nsk7lNXC7 y04Ocbwk/eTBAdm9vvj87hg+mlJogSX7KSJlhrTQYHnX3WdmRQcY0pe0skE+xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760355670; a=rsa-sha256; cv=none; b=jAENUpoeqNQLtwxwo2FWZmQChpg3LxrYdnP4adA3KnZkYKGUtQ3C4EBDXpAaFtQacrh5DR v1+sEC+9iFsAjivXhhjkaFWS/sRAt/3YK110g4wr4es8zWt+g7MqwGh4M82A5FgCSmyhp2 BD5McHCU/uULFHzIx5VblL3a/6iyH4AFSP5P5pQE7L+Wu0XbAz2fV6jSnzblT0Gn5L7kff zgw/IXKcOMGijMublTGF9l/eJvRXH+oRMqpTzd7zbYwwQW2ihH8D2heBZx8jfIBq2p2DcI IZv61jzZ+w8NtCMFaE7E9BvR6emnitj2+BmQuQdSC7mn1imXAkMs3KtMXn190g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clb5f4F1jz140Z; Mon, 13 Oct 2025 11:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DBfAmN030975; Mon, 13 Oct 2025 11:41:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DBfAMB030972; Mon, 13 Oct 2025 11:41:10 GMT (envelope-from git) Date: Mon, 13 Oct 2025 11:41:10 GMT Message-Id: <202510131141.59DBfAMB030972@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: 4835fc45efe8 - main - login.conf: Remove never used ignoretime/ignoretime@ List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4835fc45efe8b593fa49786ec4bfb6ce5050756c Auto-Submitted: auto-generated The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=4835fc45efe8b593fa49786ec4bfb6ce5050756c commit 4835fc45efe8b593fa49786ec4bfb6ce5050756c Author: Paul Armstrong AuthorDate: 2019-09-06 21:40:01 +0000 Commit: Michael Osipov CommitDate: 2025-10-13 11:40:43 +0000 login.conf: Remove never used ignoretime/ignoretime@ PR: 240378 Reviewed by: otis (mentor), glebius (src committer) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52991 --- usr.bin/login/login.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/usr.bin/login/login.conf b/usr.bin/login/login.conf index 1069da17b4db..c65a83caa565 100644 --- a/usr.bin/login/login.conf +++ b/usr.bin/login/login.conf @@ -46,7 +46,6 @@ default:\ :umtxp=unlimited:\ :pipebuf=unlimited:\ :priority=0:\ - :ignoretime@:\ :umask=022:\ :charset=UTF-8:\ :lang=C.UTF-8: @@ -149,7 +148,6 @@ russian|Russian Users Accounts:\ # :requirehome:\ # :passwordtime=90d:\ # :umask=002:\ -# :ignoretime@:\ # :tc=default: # # @@ -174,7 +172,6 @@ russian|Russian Users Accounts:\ ## #staff:\ # :ignorenologin:\ -# :ignoretime:\ # :requirehome@:\ # :accounted@:\ # :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ @@ -265,7 +262,6 @@ russian|Russian Users Accounts:\ ## - no time accounting, restricted to access via dialin lines ## #site:\ -# :ignoretime:\ # :passwordtime@:\ # :refreshtime@:\ # :refreshperiod@:\ From nobody Mon Oct 13 11:54:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clbNd0jHBz6CQxb; Mon, 13 Oct 2025 11:54: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 4clbNc60khz3Bqr; Mon, 13 Oct 2025 11:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760356448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0u8eXoXlOF9xTh8ZtFuJiBfFjIDzqiXSnV68v5BdaA=; b=BB27AANTfz0X63E6PhuXAdljxVyPdT8hyvqcUtvrxbYQXESh4RDHRDxfy+D1H93bY+/QFd 8Zp6G2t9/Q2jCajZMn90od16+zpndsS3N/Q7G4T3EnZtNNyR6zPaREvrN7/n7bUxyqWNQQ K8bvhYUrcdfpN9aAyulIgrPtlEcYE93G2w1OvdFFQCQdOYZ146TV7xN8ovHJYUBertxNNs T2Oggy0HdWvRMHflBZSTp8GSXUXVziNADRm3wyIdwHNWa6NRUZUnYHN1TIsfN/+6ar6YoK ExscXk6eJiRr9D7ExKmM4fFYfQxl4ZsRC3u336/emZxYJTdRQmc2pzfplNPQ1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760356448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0u8eXoXlOF9xTh8ZtFuJiBfFjIDzqiXSnV68v5BdaA=; b=RRa6sQKa2u9tYRtYP7ETytcz3NSgE4W9OggyDTARfdG6LbLQYNkyRfDRPhGArq+py1utwA GCxJ4Xxim1vWkZPGjQkXJEPuJzlCAjpil6sMFQPRhD2qRh6a8C20se7YfgfjKmgbJN5p8y HM6fhtCSPZ+ZauooWV5O+MrCTXNOzqRQitFFVYGZMwmNzcDJzRK6oFjTvlknfQ/G8wPzcP sT1734OmWlEgz2BXg40W7Lo4XW1w+8v9rGESiOkSFc8/TrKzdYOv+9+DaSP8PeuxF6OeYa VHui2nzLjgpxjoWDtvmVtdaAmdJlQQcSsMR8pvf63lWSlhCfvVY3dFZViS97wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760356448; a=rsa-sha256; cv=none; b=GotF8qbhyX+o7f1oBWmoCy3pfkKeIyrN8pss0nAxE2sNAQz//P82/kbSP9meI6MqQlYKQW HcOVfN6X7gK8si9bHjolXCt/BFxLS/COzV2eA+hKZIZqmA2ZD5LlGg36YLyMFrAjNP8Zpx vRLUMNVVQh01M4/IlNhL5C5mm6dGsq6syqVEwzxANwAXDFTQ70k/3fBgz4wXbXLHUlaXHo Ojrr+SszHvtlrzGUE+DGXW8BCsVVeukq9mSOn0ln8uJ6MEZq1GNHegldp7YJuUmx0upJG1 mWSg0zQGvlrlUMEb1093wdj/Bg8Zv3/NR92IMboD8LV/dfGlOIQvnRgTNQozIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clbNc5ZzSz15Mh; Mon, 13 Oct 2025 11:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DBs81Z052122; Mon, 13 Oct 2025 11:54:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DBs82w052119; Mon, 13 Oct 2025 11:54:08 GMT (envelope-from git) Date: Mon, 13 Oct 2025 11:54:08 GMT Message-Id: <202510131154.59DBs82w052119@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: f3386dfeb429 - main - realpath: Additional test cases List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3386dfeb429faaa30a915a4a422a25e07c8bf39 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f3386dfeb429faaa30a915a4a422a25e07c8bf39 commit f3386dfeb429faaa30a915a4a422a25e07c8bf39 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-13 11:53:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-13 11:53:51 +0000 realpath: Additional test cases * Passing NULL should result in EINVAL * Passing an empty path should result in ENOENT * Failure with a non-null buffer should leave a partial result. As pointed out in a comment in the test case, this reveals a discrepancy between the documentation and reality. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53024 --- lib/libc/tests/gen/realpath2_test.c | 113 ++++++++++++++++++++++++++++++++---- 1 file changed, 101 insertions(+), 12 deletions(-) diff --git a/lib/libc/tests/gen/realpath2_test.c b/lib/libc/tests/gen/realpath2_test.c index f89dd99cbb72..b8f951d9b10f 100644 --- a/lib/libc/tests/gen/realpath2_test.c +++ b/lib/libc/tests/gen/realpath2_test.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2017 Jan Kokemüller * All rights reserved. + * Copyright (c) 2025 Klara, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,6 +26,8 @@ */ #include +#include + #include #include #include @@ -34,6 +37,31 @@ #include +ATF_TC(realpath_null); +ATF_TC_HEAD(realpath_null, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test null input"); +} +ATF_TC_BODY(realpath_null, tc) +{ + ATF_REQUIRE_ERRNO(EINVAL, realpath(NULL, NULL) == NULL); +} + +ATF_TC(realpath_empty); +ATF_TC_HEAD(realpath_empty, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test empty input"); +} +ATF_TC_BODY(realpath_empty, tc) +{ + char resb[PATH_MAX] = ""; + + ATF_REQUIRE_EQ(0, mkdir("foo", 0755)); + ATF_REQUIRE_EQ(0, chdir("foo")); + ATF_REQUIRE_ERRNO(ENOENT, realpath("", resb) == NULL); + ATF_REQUIRE_STREQ("", resb); +} + ATF_TC(realpath_buffer_overflow); ATF_TC_HEAD(realpath_buffer_overflow, tc) { @@ -44,16 +72,11 @@ ATF_TC_HEAD(realpath_buffer_overflow, tc) ATF_TC_BODY(realpath_buffer_overflow, tc) { - char path[MAXPATHLEN] = { 0 }; - char resb[MAXPATHLEN] = { 0 }; - size_t i; + char path[PATH_MAX] = ""; + char resb[PATH_MAX] = ""; - path[0] = 'a'; + memset(path, 'a', sizeof(path) - 1); path[1] = '/'; - for (i = 2; i < sizeof(path) - 1; ++i) { - path[i] = 'a'; - } - ATF_REQUIRE(realpath(path, resb) == NULL); } @@ -66,9 +89,9 @@ ATF_TC_HEAD(realpath_empty_symlink, tc) ATF_TC_BODY(realpath_empty_symlink, tc) { - char path[MAXPATHLEN] = { 0 }; - char slnk[MAXPATHLEN] = { 0 }; - char resb[MAXPATHLEN] = { 0 }; + char path[PATH_MAX] = ""; + char slnk[PATH_MAX] = ""; + char resb[PATH_MAX] = ""; int fd; (void)strlcat(slnk, "empty_symlink", sizeof(slnk)); @@ -89,11 +112,77 @@ ATF_TC_BODY(realpath_empty_symlink, tc) ATF_REQUIRE(unlink(slnk) == 0); } -ATF_TP_ADD_TCS(tp) +ATF_TC(realpath_partial); +ATF_TC_HEAD(realpath_partial, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that failure leaves a partial result"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} + +ATF_TC_BODY(realpath_partial, tc) { + char resb[PATH_MAX] = ""; + size_t len; + + /* scenario 1: missing directory */ + ATF_REQUIRE_EQ(0, mkdir("foo", 0755)); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 8 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/bar", resb + len - 8); + + /* scenario 2: dead link 1 */ + ATF_REQUIRE_EQ(0, symlink("nix", "foo/bar")); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 8 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/nix", resb + len - 8); + + /* scenario 3: missing file */ + ATF_REQUIRE_EQ(0, unlink("foo/bar")); + ATF_REQUIRE_EQ(0, mkdir("foo/bar", 0755)); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 12 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/bar/baz", resb + len - 12); + + /* scenario 4: dead link 2 */ + ATF_REQUIRE_EQ(0, symlink("nix", "foo/bar/baz")); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 12 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/bar/nix", resb + len - 12); + + /* scenario 5: unreadable directory */ + ATF_REQUIRE_EQ(0, chmod("foo", 000)); + ATF_REQUIRE_ERRNO(EACCES, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 8 && len < sizeof(resb)); + /* + * This is arguably wrong. The problem is not with bar, but with + * foo. However, since foo exists and is a directory and the only + * reliable way to detect whether a directory is readable is to + * attempt to read it, we do not detect the problem until we try + * to access bar. + */ + ATF_REQUIRE_STREQ("/foo/bar", resb + len - 8); + + /* scenario 6: not a directory */ + ATF_REQUIRE_EQ(0, close(creat("bar", 0644))); + ATF_REQUIRE_ERRNO(ENOTDIR, realpath("bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 4 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/bar", resb + len - 4); +} +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, realpath_null); + ATF_TP_ADD_TC(tp, realpath_empty); ATF_TP_ADD_TC(tp, realpath_buffer_overflow); ATF_TP_ADD_TC(tp, realpath_empty_symlink); + ATF_TP_ADD_TC(tp, realpath_partial); return atf_no_error(); } From nobody Mon Oct 13 11:54:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clbNf1FJqz6CQtw; Mon, 13 Oct 2025 11:54: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 4clbNd6cfFz3Bqs; Mon, 13 Oct 2025 11:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760356450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MkNrFyLOzqGuSa5jSkuLnIE+ipVC+YMFM9nWr/mPi30=; b=rkeNxhY9XVGNXjWsVs3v5ILUwFDN8AZd9hqmFkGPzIwpIBg8ccKDbE3Oa4UYwSf6mP7mXm w7yO1MeXIVha7FmGpsMlror9vMFPhiHCvX1hdFHXADhpeTT5KabYSmsaSCu5Ps6XDk/Da8 jo6NUdRqKysQkGzXs4AN5la65kc4ucn/YK6q3xEqSYp7Uqie4Gl3tKoiAJ4FnYUwfbdjFz BiydssgRd4vxNDL+FDZLucmg+RGCo1r7SjBotuu5CvF5rQzCpby9ubgjUzdLeThDdyBzHT 9tBTQHVkdwtQ5ukt7ur12b9aZIsWAZbEotmQLfYIFJg6KFnMhQGXv5lS0As2pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760356450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MkNrFyLOzqGuSa5jSkuLnIE+ipVC+YMFM9nWr/mPi30=; b=FjKKPBpFaIuNMLBW/3R88i1F2oJ7y2eXY16vZ8r3AnhAZXKmmER4Ny7XHUL9srvtpiZgXA RRpI2N95ZEY5WzuReCiSZiPR3Y69QYXa46nL6i2go4XZx4JVMEUiGbdRWzCCaYzsYSs51V O/shscv8xopVsmg/UGy1JWNqNEw7ncDZaJe0rw2GMYzG96HmkhUg1pbpzOXnufeKKLYfnS M/0YBk+p+Vhf2VXzkubkXXs+xxe5s2rSMyIfaI1o1VFbrGTUQLUmcbKkE+KmaZ5/d3BWCL Wl2qkXngNBMez5ypoxnBf9RJfA5BQzq5bu0YlWUFP2Lje5b+tNhWMdoUcrrLfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760356450; a=rsa-sha256; cv=none; b=kwoGrNDpOnVDIgitDz4lIDlVrw1WGWqBP1X6FZRVVqUwXKuPHvaq7UWuQaLkXj0jV8TJIB oTONYmprKSmBb6DP5hjoe8XntSgvVbxihCsCZlbe0sUjpmg8fG1IhV3RpbPShM32Jc4xG2 XcHq6/q83Ms1ctE5gUnKD3rhzjaTfWCqo05H8DTYiPR/k2E6TpUgq4Bbu4nQ4ne2Doy910 MVRxzibRPU36xY2DqRI7oHYaoMspK1+uZhM40V4me8wAUSB97OYQFSsXOOMN9zKdaNIB5j C/p/VPsmpcf5Kt5840ENjLgLYoobpKa17Dp9AAhDX7qp/WT7r776bZjNmlu8WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clbNd6DTWz15C0; Mon, 13 Oct 2025 11:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DBs9u7052163; Mon, 13 Oct 2025 11:54:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DBs9gN052160; Mon, 13 Oct 2025 11:54:09 GMT (envelope-from git) Date: Mon, 13 Oct 2025 11:54:09 GMT Message-Id: <202510131154.59DBs9gN052160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 1406de21e176 - main - realpath: Report correct path on failure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1406de21e176d8700240ac9e473df007cd41eec1 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1406de21e176d8700240ac9e473df007cd41eec1 commit 1406de21e176d8700240ac9e473df007cd41eec1 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-13 11:53:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-13 11:53:52 +0000 realpath: Report correct path on failure If lstat() fails with EACCES or ENOTDIR, the path we need to return in the caller-provided buffer is that of the parent directory (which is either unreadable or not a directory; the latter can only happen in the case of a race) rather than that of the child we attempted to stat. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53025 --- lib/libc/stdlib/realpath.c | 14 ++++++++++++-- lib/libc/tests/gen/realpath2_test.c | 11 ++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c index 4c52b73319ab..18f29e95ee6b 100644 --- a/lib/libc/stdlib/realpath.c +++ b/lib/libc/stdlib/realpath.c @@ -49,7 +49,7 @@ realpath1(const char *path, char *resolved) { struct stat sb; char *p, *q; - size_t left_len, resolved_len, next_token_len; + size_t left_len, prev_len, resolved_len, next_token_len; unsigned symlinks; ssize_t slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; @@ -98,6 +98,7 @@ realpath1(const char *path, char *resolved) left_len = 0; } + prev_len = resolved_len; if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { errno = ENAMETOOLONG; @@ -133,8 +134,17 @@ realpath1(const char *path, char *resolved) errno = ENAMETOOLONG; return (NULL); } - if (lstat(resolved, &sb) != 0) + if (lstat(resolved, &sb) != 0) { + /* + * EACCES means the parent directory is not + * readable, while ENOTDIR means the parent + * directory is not a directory. Rewind the path + * to correctly indicate where the error lies. + */ + if (errno == EACCES || errno == ENOTDIR) + resolved[prev_len] = '\0'; return (NULL); + } if (S_ISLNK(sb.st_mode)) { if (symlinks++ > MAXSYMLINKS) { errno = ELOOP; diff --git a/lib/libc/tests/gen/realpath2_test.c b/lib/libc/tests/gen/realpath2_test.c index b8f951d9b10f..431df8721ae0 100644 --- a/lib/libc/tests/gen/realpath2_test.c +++ b/lib/libc/tests/gen/realpath2_test.c @@ -158,15 +158,8 @@ ATF_TC_BODY(realpath_partial, tc) ATF_REQUIRE_EQ(0, chmod("foo", 000)); ATF_REQUIRE_ERRNO(EACCES, realpath("foo/bar/baz", resb) == NULL); len = strnlen(resb, sizeof(resb)); - ATF_REQUIRE(len > 8 && len < sizeof(resb)); - /* - * This is arguably wrong. The problem is not with bar, but with - * foo. However, since foo exists and is a directory and the only - * reliable way to detect whether a directory is readable is to - * attempt to read it, we do not detect the problem until we try - * to access bar. - */ - ATF_REQUIRE_STREQ("/foo/bar", resb + len - 8); + ATF_REQUIRE(len > 4 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo", resb + len - 4); /* scenario 6: not a directory */ ATF_REQUIRE_EQ(0, close(creat("bar", 0644))); From nobody Mon Oct 13 11:54:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clbNg31V6z6CR7G; Mon, 13 Oct 2025 11:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clbNg0lQCz4QV4; Mon, 13 Oct 2025 11:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760356451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WtNY66RJiWsg8a/Bf4MEqgmhm7tNEYq/O4GY1ki+T4M=; b=Q1ZtwADGLKlrcs80LL6ZrKe8CoDf4AuyEtEDu/osqma5nxIufMQvJq3c2jDHCfH6AFzzJl csiWuV2KnZU41SaeX8MBLY5YZmavUq0TjwnG4CQwy0ZyW50BmIqQu0AAErY1HWqFkHhvHh 9QDyGLqgo+IjIm87g6ClXISDZPPy0Po1aBBJV/Jy5NWZ9w61ev2RLGwYUhmV/gPYJNDi8G o8N0SFzmX+SN9UKTDpAf+MZz8+aPe1wLORXtpaf+Pb2R4WiSSYGeMfWkdJR9RndHttq1ZK aZJevDwyb2wt2/Tosb0NY5Mf8v7gXejnJfXAr3Hglhgb+e9Ri6fl+Ew9pfdirw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760356451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WtNY66RJiWsg8a/Bf4MEqgmhm7tNEYq/O4GY1ki+T4M=; b=Hh7W10Rx2jI6fjETUcdmAEyQl3yko953R+KsV1djnJmfKd2qRoGfMZM2GCdX01Y8g+Y8br /3ssB8OR6lnvhsNZPWNHtpXSdnVeWKgrVpNY6/9g3NWP7KZeZXjEbI8nYomVgckJ7BtIhW 3QNYH4QZLpkBEmXEdd0iabkfEDM4CzAU1DzNZoNIsliaYvcioaIFg+E0Qdz92MXrnUM555 iLLWf/hSC7kOYnZ9xB8R3vE6kZwp2KQdpfQK0f+RH+PT0YgsEzIUdTrVSLHakcTYvndMJG lOxsfRksck8FzbUf2Y7Xeh3/2/zejTQbnxZxMgGycAtygjbVcxN1s2XaxWUgjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760356451; a=rsa-sha256; cv=none; b=owneRvdZQho22cqt42a3Jeb9kRg6Hdq1L/TLL1hDB6yrIptHP3VLV9e+ycRC/uMrJDAX1d EKEer44MCl52L0TO0JW7wzHKaHTUSuzXfqn5diDaRiKuTHGCRKxU8/lTfZaLfzxB2BHcdb iYIEXY9ppWqISp2ZUgKb6IiMbEjQ7Xcjdn7siMfOtQSDEIRKzDns0vuldSHvTuFoREjA+H j1csn1xsU+K8ls6TdcAeBtuBdhbIRMmJRXpcTlbziuS/CtmEewPgZXBFA7+oTT38QigK9O XHErHTXvtDZ9BCxBA99saHvIHz6ZJgVfKPK3lR9FqNs3tBKzYIj1RkjKUL8CQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clbNf6lpDz14pX; Mon, 13 Oct 2025 11:54:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DBsAVB052201; Mon, 13 Oct 2025 11:54:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DBsA2E052198; Mon, 13 Oct 2025 11:54:10 GMT (envelope-from git) Date: Mon, 13 Oct 2025 11:54:10 GMT Message-Id: <202510131154.59DBsA2E052198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 7c66667d45e9 - main - realpath: Belatedly document POSIX conformance List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c66667d45e95af59f59e41ef169119a974a6be1 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7c66667d45e95af59f59e41ef169119a974a6be1 commit 7c66667d45e95af59f59e41ef169119a974a6be1 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-13 11:53:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-13 11:53:52 +0000 realpath: Belatedly document POSIX conformance We've been mostly POSIX-conforming since r236400 and fully since r240410, which fixed a corner case where a missing non-leaf directory would be reported as ENOTDIR instead of ENOENT. Sponsored by: Klara, Inc. Fixes: 7877ed7ce33e ("Avoid mapping ENOENT to ENOTDIR for non-existent path components.") Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D53027 --- lib/libc/stdlib/realpath.3 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/stdlib/realpath.3 b/lib/libc/stdlib/realpath.3 index 065ba312c2ef..76f40249963b 100644 --- a/lib/libc/stdlib/realpath.3 +++ b/lib/libc/stdlib/realpath.3 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 11, 2012 +.Dd October 10, 2025 .Dt REALPATH 3 .Os .Sh NAME @@ -108,11 +108,11 @@ and .Xr getcwd 3 . .Sh SEE ALSO .Xr getcwd 3 -.\" .Sh STANDARDS -.\" The -.\" .Fn realpath -.\" function conforms to -.\" .St -p1003.1-2001 . +.Sh STANDARDS +The +.Fn realpath +function conforms to +.St -p1003.1-2001 . .Sh HISTORY The .Fn realpath From nobody Mon Oct 13 14:44:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clg9K4vXvz6CcSx; Mon, 13 Oct 2025 14:44: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 4clg9K4D6tz3gCt; Mon, 13 Oct 2025 14:44:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760366677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KT3kY3KrAMVMUIFUFdl1sER8Caeed4EoCxxWZG9iGbM=; b=MIkzD/BVG82SyNN+R7xTAlSiqpUMvfStviOoIQSpm/o+8dX0I8xCwbgWhlcLfJQ/at1HrX uJ3cqeHEcgW2vPxWtNybyERpCCj9qq+W2zNM3PNtzB82EI7F+FT3o1WT/MeVDN1wTct8oR cr2MPK1wnvC9AUh3cP7Jygqhk5rl4AyrRu+ADC+2A0jFRTqXF0ITfX/xgVqfi5OPCl4Hdy SfZdBF4BOnu8D6vHpjqlyRCmGgdBk/syqNrc3fqGZG0ttKduAh7AbGC81NOvJTpui9kJiA XJdKB49jgvKcdqVtcXxl/xkQtgedoC9MI/QiPojqZo2AyNVw4QXeDKasS7P1iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760366677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KT3kY3KrAMVMUIFUFdl1sER8Caeed4EoCxxWZG9iGbM=; b=J1pTHuFp28OxDD5O+qMKS4rsqzSJ/OR+FqRd2GtY5VGQuyHBTrY8xmiA17VOFjw0PpNRSn xKDZ8rbhs6nnXYPF2z9mp6TidGhrXlKCFHZjYJbxsUaRWscuuJsUU77nWOoNZN4Jnf67nK jaMigXtWdYpGhAAF215zP8OyeQdsktWhHl6VeBJiBEoB2Cj4irJtxeMLGR2O0uA7hAmVHR xR3WjkfR0Z5Z9ybIFkSlSxiauPKcVZs99IqifCMK0A8EOQGcZ/TR7mT2Owvl1Na2SoKRrG JCFEenHYqcrmejS2FkRURtOvuNSmHfMyZ4DlVbwbzj9yPHjeQ7ppBaQMQRafQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760366677; a=rsa-sha256; cv=none; b=A/Nzb5yZLz3GXbUWQPww9C+fj1lG/GgdUmmlkOk6/kRAiFLHa04ScNaAJFzaVqDFn4d71F DvSketJJwtCbOzmXcy2PpXOuZZJQprLWohRJ4ja06WFWOhFeZdVDXVPMlWttDdWGWHscah 0w9yLgR1VGYDhUTE5V6SyzJ18UACb5HduJ1WbZLmlPFnPKxdgX80nPycF5h6AnyoG+l+mk 0hVCI5Xys++eh3k8VtkMKa5CfA2ho6xH1PZY4uFZ19kl/BfQ0Jxp2NTTlDbivxwRqR3Avs wgCwEnKN8FGngKU3wFW+IxkcZZ9vtbMv9HzHNkK63jCUdRAUGCbSk+XeUd6f5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clg9K3XVmz19Qf; Mon, 13 Oct 2025 14:44:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DEib7Y072278; Mon, 13 Oct 2025 14:44:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DEibK1072275; Mon, 13 Oct 2025 14:44:37 GMT (envelope-from git) Date: Mon, 13 Oct 2025 14:44:37 GMT Message-Id: <202510131444.59DEibK1072275@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: ffa816500936 - main - blocklist: Add an UPDATING entry List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffa8165009365ff93050626d880f2d1d6aacc31a Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=ffa8165009365ff93050626d880f2d1d6aacc31a commit ffa8165009365ff93050626d880f2d1d6aacc31a Author: Jose Luis Duran AuthorDate: 2025-10-13 14:35:12 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-13 14:42:45 +0000 blocklist: Add an UPDATING entry Add an UPDATING entry about the renaming of blocklist. Approved by: emaste (mentor) Fixes: 7238317403b9 ("blocklist: Rename blacklist to blocklist") MFC after: 1 day --- UPDATING | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPDATING b/UPDATING index 4460898fca2d..74ddc238ddca 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ 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".) +20251012: + Blacklist has been renamed upstream to Blocklist. If you have it + configured, rename all configuration files, firewall anchors or + sentinel files to reflect the new nomenclature. Old setups will + continue to work emitting a warning. + 20251002: Audio-related utilities including mixer(8) and virtual_oss(8) have moved to the new FreeBSD-sound package. If you have set-optional or From nobody Mon Oct 13 14:52:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clgLD6Vnzz6CdC4; Mon, 13 Oct 2025 14:52: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 4clgLD44r7z3hnm; Mon, 13 Oct 2025 14:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760367140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MyVdl1UrZJWHWkTUftlhx0VOaxqOsfFpscX0nh/Qszw=; b=gUCKa0R5bnh8Xuw0H3SR/ky0RQ1MC9z15PUMpSQNaTilj1Djh+7T/Z8aGL1jDwYpUWwIlc OIYTQKlcS/o2Rswyj0RvK1Djsuvd8K6HgfH11oTSgIwSGH/v+NCamHuUr8950xlxBSNY6M 80lu5dATzzV8C3Ez8GhLXi586FjTey0mI9lqO/ks4REgKiXpbSXqriTDsgafDF5utP3OWj czQisOqBBa1s3N7fUqoFlyRQ9P7QaMK8RX54ZF8VC0tW1sWdB6Hu44S3MFCDeZowBTSoDS OhHmVokcoz+b1evqAqeWbrnyVQ8wTTUlpjhCkxtcg6RTghusOAR5PrzQa4nh/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760367140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MyVdl1UrZJWHWkTUftlhx0VOaxqOsfFpscX0nh/Qszw=; b=gdrrQuT0YpsUIOW38g11ugv3rwXdglWYJRnabCFpj7P7ssc2qIxln+fPTkxJe3gXYepUh+ nWXLkovffy6idenbtitWyjoBCAYEczC5r5aMKzX7fgIyE2oRRLrPGUW7oPA7a6PhZZHxBK PzJSiVm1zlCFXpj5h8ZPz2HpJirt2SRTYdzEXDKp8Y6bgGWsl+fvubSupTzkQKUJbUGhQJ CIp0V5m24At/eKOzc9GMS2Pzdzl5vs+VNk0gjJUsabgb5pdRzHhxoVTxU/VmRCnFbEiYpR MTT/hDOaBpCaujm+yntk0gxoWRG73eo/2gVhZMO3KqQnfbxlcXCmBkBDP5t7uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760367140; a=rsa-sha256; cv=none; b=OSpOJ0X8KXiTMFS6cfHpE6K6WyynL9LQBddCcdxpV8k/6ehQYnftztDPd6W3xzP8X5wSXx N3YVTn1JgJLhxnhVfh3U9LzIVzFu5V+zXXdz+VZL+rLebAb9Aa+1BmdGbheHiNYke+XNQj T4ax7mNf5Yjtt1jQ2Pesp6nFfoGn3jr60MuLATfwkkB/Ye/7vtsvoophRRJPr12ApV/4Z5 OvY4XxO5Z+zFod+ZHoXgwJ1zknr2LJ98iUSBQgIiCF7ukhN5Qsb4qDj41oo1RX/YPvHsTp tyZfz9L4J1S0Q6ZQDxxJuWzRyaJaAvI+uMU987c1deldO3UwGqHOU5ts3MrnIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clgLD3T49z19xr; Mon, 13 Oct 2025 14:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DEqKYJ090419; Mon, 13 Oct 2025 14:52:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DEqKXf090416; Mon, 13 Oct 2025 14:52:20 GMT (envelope-from git) Date: Mon, 13 Oct 2025 14:52:20 GMT Message-Id: <202510131452.59DEqKXf090416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 10d88a7aa670 - main - fwget: pci: mediatek: correct package name List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10d88a7aa670a3cc2bf763e64bd292b4caa3a811 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=10d88a7aa670a3cc2bf763e64bd292b4caa3a811 commit 10d88a7aa670a3cc2bf763e64bd292b4caa3a811 Author: Bjoern A. Zeeb AuthorDate: 2025-10-13 13:15:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-13 14:51:10 +0000 fwget: pci: mediatek: correct package name The port is called wifi-firmware-mt76-kmod not "mediatek" in the moddle. Reported by: Lars Tunkrans (drsnx60 gmail.com) MFC after: 3 days Reviewed by: emaste, jrm, imp Differential Revision: https://reviews.freebsd.org/D53067 --- usr.sbin/fwget/pci/pci_network_mediatek | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 653c87c410eb..e1e15dcfa2e5 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -38,24 +38,24 @@ pci_network_mediatek_mt76() # { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh } ### >>> - 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7611) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; - 0x7615) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; - 0x7663) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; - 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x7920) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x0608) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x0616) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x0717) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7611) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;; + 0x7615) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;; + 0x7663) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;; + 0x7906) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x790a) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x7915) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x7916) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x7920) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7922) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7925) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7961) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7990) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; + 0x7991) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; + 0x7992) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; + 0x799a) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; ### <<< esac From nobody Mon Oct 13 14:55:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clgPS5db0z6CdGB; Mon, 13 Oct 2025 14:55: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 4clgPS2xywz3kXB; Mon, 13 Oct 2025 14:55:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760367308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=33lWVN+kSgkfnT7hRlTHa5x3QhjgxhtMKo7ge808FTY=; b=qc9LkEbAQb2QfVPEBh4c8cGy7uWSvnAadC2vVVCw8tFJQ+OFHPcIA/bxrsA3U68M9Ez8qC jJJhvqilU1vWIiTa1SDhg/geh9MlrUKsp45lczf3m80GODtJsSybNrRA3cqI45hqRLjryI zkZF6jdXMIh8oi+zdSElHcBSDIzfW4qbvoVEHxpazlOrSsn1ZQJfDRm8D3XbfaWycj3ccZ WJquvuVM+bI8DZqoCRSyywz15Dc2itDhvEzVamu7RZsTEi8/LOuDV+GqVdAQYIxrFK+ZWu UozpYkGT1KkaXgFjotdClm98rQY//GHmIbDOZMb6soCcd/JdaRF77Cgz7ERUIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760367308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=33lWVN+kSgkfnT7hRlTHa5x3QhjgxhtMKo7ge808FTY=; b=W+Y0XwOTrc3SVrW4P6h398tnQVGDpbKr2wcaRXVs5cEpb+kM7qKlNxsHnIkrV2UG9MAzWa 3qj5nT24BDwS7ymeg0MZKZGvwnEs6UQ7ewwu467BscLsjst8ahgz3kJl1eP2OwKDUar1IM QFk54UMP1mtBlqqKkqcy+hAE7ppq+7xgBl0j/yeQ0d1xdBZ6P/6jnYrcgmBy343L9sr0D6 L/QPW2D7cVwf2PGHebfR3EiHqNUHyB33E+1YgRWI9PoJTUCNaS+NDLAzzie4qcf6xpYo6H Vceyk6wEXD4Vo4ouVvVTsZpdZ/X4EbP0v00Awsqi3LxLA9sDBoRWF7l4vo1Wpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760367308; a=rsa-sha256; cv=none; b=hgKDMG0Kwr8sROF+TMdWA9X2sNHWP1x+w1c5g2CzUDDZAhVFgbhnB4dT+EyXxBIS8Lsvgc Q1XTW+6UQMRx+qr1CMFV2Y0myZbi8BKbZ/ulOb5nbzDjzkFifTUN063z0LcY74K3DtGMOc xiXcirO6BPtK9oCSqmXslRQSEYJiu5+ZVf2e+n/VL4TDLlrTKYnrYEE1BhxqUnfilk7O0l iF6ZfI0AyqYm0Z0EEqVjAXx8u7h2AHV6Z7gQbosgHnrAvVSvhmU0lLs3iptCfckzkE+ARB oi37NRxplfkeDYKk8S7RmH9mCKuy85a401yxWAc0K/gE1XtpNSFCmkE0V7GteA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clgPS0fRYz19kV; Mon, 13 Oct 2025 14:55:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DEt7fl091370; Mon, 13 Oct 2025 14:55:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DEt7xG091367; Mon, 13 Oct 2025 14:55:07 GMT (envelope-from git) Date: Mon, 13 Oct 2025 14:55:07 GMT Message-Id: <202510131455.59DEt7xG091367@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 376508ef2f79 - main - UPDATING: Fix typo objump should be objdump List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 376508ef2f794a57606a791166f1ce7f20d3ccaf Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=376508ef2f794a57606a791166f1ce7f20d3ccaf commit 376508ef2f794a57606a791166f1ce7f20d3ccaf Author: Jose Luis Duran AuthorDate: 2025-10-13 14:50:30 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-13 14:54:46 +0000 UPDATING: Fix typo objump should be objdump Approved by: emaste (mentor) Fixes: 86edb11e7491 ("Always install llvm-objdump as objdump") MFC after: 1 day --- UPDATING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 74ddc238ddca..9c8bd3a9fd6b 100644 --- a/UPDATING +++ b/UPDATING @@ -706,7 +706,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: Bump _FreeBSD_version to 1400078 to be able to detect this change. 20221212: - llvm-objump is now always installed as objdump. Previously there was + llvm-objdump is now always installed as objdump. Previously there was no /usr/bin/objdump unless the WITH_LLVM_BINUTILS knob was used. Some LLVM objdump options have a different output format compared to From nobody Mon Oct 13 16:08:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clj1c10w3z6C0Kg; Mon, 13 Oct 2025 16:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clj1c0Lffz3t7l; Mon, 13 Oct 2025 16:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760371684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8V446QKLvg5Nu9GfJcu/kkFQ1BgbckW9iYChgw1a8As=; b=P4upysI250LHUIN7YpAjAOaVXUKXbo3sRYhOL41shHmuXwlASS/gN4hHZHcLdPkgfHQNhp ADghLQOVmyQSBDFRWOvPcE/oyBkAFHdD8tnOiO6cWpi4MoPhdb5F7ygmdELP78ZwZ60bwr q7hWMurOB7hkd3ctUuP0zxpaCcuBjMBq2heUX2vt8hehjkvpEg4zorLOH1PO0lwFfm2jPb MjQ7PfJ8gdpP9CYlr/+ez7/+5R0cZNDZDMNpU/zJpsiYJ0DgZ7hNGuHoG9WVEzdrDxwK3G 9Ttf6DsNik7M13IeCPv73ZrfGVppaS3XTMmgPMqdBrsUrz+KUUBjpHa1IBjqrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760371684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8V446QKLvg5Nu9GfJcu/kkFQ1BgbckW9iYChgw1a8As=; b=YiOB3XmYKU8CCGyQtmW7UMkMTrRM6Zu2KMDs/l6VO++bJi/XBRxOrEBPfio9VDCYM4N6Uo 3VgEDpiqlXSeRXzSVyWty8jurFeYJhNveuGPJoyBt75rHgiUWBUe4GjSaDc1Txe2Ce1sU/ IlfV/XWvf8l0OBnL4B/iVlWOaV7umf4VVHlxQSvbOSLi52b33OCZhKccbiyAC4VtbdAlkl ZGor2zGBw5XY9Ax8eBFxYfviVNvbBuLeoSokSfwSFIDMoQUoxG9StEiI765r79VIxNdq9b WAHzM5CaqBAefRDELghOheERcm3juAUTmuerXU8H2A1A/f0rdkJfMv8E0xQjHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760371684; a=rsa-sha256; cv=none; b=i66lGxWp/oQojeUDdvztPSrjsOCdVSzIQ7OzVgMZKpIuaLNZGPMiFZICSo9Jd0WyPF0Ims bM9j7V4HxEyomq+bxQz6ublE5wCx2qIYnespblUyDd+yPVLFxiA6liuFzdn1XTPuVsJPk5 TANvt6wG12bXVqESTTfwhKg1xkITqOMMrvwuhgCjvE8Zt7E/5jun0uAYDGNJjJAcaqXeaP hC4iStSZ24UhqN93P9F1HqrIeyr4JcdVbxWcscvq1PJbux0OaXtBf+6RL+Byq9Hp0naCD7 J3Ybh3IEALnYAiqPDQFrLg5d8hiA5IeZblW7LPdZgyKKM9nc2pHLgJZRbz51Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clj1b73RHz1CDj; Mon, 13 Oct 2025 16:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DG83v1026448; Mon, 13 Oct 2025 16:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DG83i6026445; Mon, 13 Oct 2025 16:08:03 GMT (envelope-from git) Date: Mon, 13 Oct 2025 16:08:03 GMT Message-Id: <202510131608.59DG83i6026445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Silvers Subject: git: 24458c243162 - main - mdconfig_test: determine page size at run time rather than assuming 4k List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24458c243162db4170ba9404d7cb5411af09ab31 Auto-Submitted: auto-generated The branch main has been updated by chs: URL: https://cgit.FreeBSD.org/src/commit/?id=24458c243162db4170ba9404d7cb5411af09ab31 commit 24458c243162db4170ba9404d7cb5411af09ab31 Author: Chuck Silvers AuthorDate: 2025-10-13 16:07:43 +0000 Commit: Chuck Silvers CommitDate: 2025-10-13 16:07:43 +0000 mdconfig_test: determine page size at run time rather than assuming 4k Sponsored by: Netflix Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D52736 --- sbin/mdconfig/tests/mdconfig_test.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sbin/mdconfig/tests/mdconfig_test.sh b/sbin/mdconfig/tests/mdconfig_test.sh index ea87ff5d542d..cc29c188cbd8 100755 --- a/sbin/mdconfig/tests/mdconfig_test.sh +++ b/sbin/mdconfig/tests/mdconfig_test.sh @@ -274,22 +274,23 @@ attach_size_rounddown() attach_size_rounddown_body() { local md - local ss=8192 - local ms=$(($ss + 4096)) - local ms2=$((2 * $ss + 4096)) + local pgsz=$(pagesize) + local ss=$(($pgsz * 2)) + local ms=$(($ss + $pgsz)) + local ms2=$((2 * $ss + $pgsz)) - # Use a sector size that's a likely multiple of PAGE_SIZE, as md(4) + # Use a sector size that's a multiple of the kernel page size, as md(4) # expects that for swap MDs. atf_check -s exit:0 -o save:mdconfig.out -e empty \ -x "mdconfig -a -t swap -S $ss -s ${ms}b" md=$(cat mdconfig.out) - # 12288 bytes should be rounded down to one sector. - check_diskinfo "$md" 8192 1 $ss + # one sector plus one page should be rounded down to one sector. + check_diskinfo "$md" $ss 1 $ss # Resize and verify that the new size was also rounded down. atf_check -s exit:0 -o empty -e empty \ -x "mdconfig -r -u ${md#md} -s ${ms2}b" - check_diskinfo "$md" 16384 2 $ss + check_diskinfo "$md" $((2 * $ss)) 2 $ss } attach_size_rounddown_cleanup() { From nobody Mon Oct 13 16:13:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clj8C51gzz6C0rF; Mon, 13 Oct 2025 16:13: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 4clj8C4X1Hz3w6h; Mon, 13 Oct 2025 16:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760372027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbHgvFOVpTDif15T5z3rDT6Gczqq9rrya/RgasX+zX0=; b=MZCxqMF4lnuAX1ZsJ/q6bopeSoRVSN6vBMkZyTFlENpNktFGGW9MJZlnG9Q6lunjovSNuR h++WBNsH14Fl9bSq5rIbMcnNF3Q+OhBRBrRbO3/BRS/w8WGcsJ1iCGSuVkyzEeaSsPSJ+C cT9LWYeuFYDpLvycAc8/D5EYaKJCFP44BW7gGew95HFcL4uJLiqVahFp5Etd892GbigZJb j9yfyi8Kx+SdOh3EsW4AJKBzLH2QM9T5N97O2I6Al569AiBbx9ElIL/YTyDWp21qAfLPSZ m8rTCZ17G43kW5C7mqOAY4IQ39J37ATIe4As4JYhN+VmtUDlVk+jJULMGQZfKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760372027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbHgvFOVpTDif15T5z3rDT6Gczqq9rrya/RgasX+zX0=; b=pK51ZCFG4oTPAqOqKLYdJSdABbBPIAPuh60pIJMi6m0/6xwOiZR6hn4VbGapN4zzwgb7EI AO8VwhFJMWBif0LnzWJGQ+G1drtDOI4orcZoHV9smpVFn0RNtsIUf03eqYTOGrEKXchffL vWW4gHLpHCx3vxN4pEdHXttcp0wpFBfgLAh5pz2N28EpK06s9qTdflQ4eIHZGfJmq6qiH/ siGOrnhXbe7oDgyHoixQPZ22Ry4HEvjBGnU76FX4jjNjZBOSanuKXWD1baOUIWCrcFzoEP Qu5lyMZMFez0jTvD2MxBNdkpuhzHslE3vaH7o/zwdpNbj7dKyBIaKQu6cEDXIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760372027; a=rsa-sha256; cv=none; b=u25dJwh5dz0Xd5zq+7dA4VUA6i46UiXhDxTtsin+LNzVFlOWawc9ZlwdpVb7Srduw5Bn1i +JfADasOKKa3Ibr1+6DfV3dRTo9aLwaY3DmlCWB3LMmBYPVt7G0kJl7NAE2YVJ+LFX11zA 7Wr+InmIJZ1+Bh9uaUmTHFovA8iZEF97l/7GgF+JJy6QKySEIso6hRatXrzdNHvIBTLwwS iM8Sna6z+pUInuRzBXDeMjeUW5yMhrXPhURdbgsZOkB1R/KXQKM/5Ihy3mR1w6bQYWA1bf /3ufo/yAx1FdxBAu6OoKh3aUyzyBEhy5fAz5X8Vi/x6jOSZTj88pWSSOCSCG7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clj8C3y98z9g; Mon, 13 Oct 2025 16:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DGDlP4043395; Mon, 13 Oct 2025 16:13:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DGDloi043392; Mon, 13 Oct 2025 16:13:47 GMT (envelope-from git) Date: Mon, 13 Oct 2025 16:13:47 GMT Message-Id: <202510131613.59DGDloi043392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Silvers Subject: git: d5cfca008d63 - main - mmap_test: determine page size at run time rather than compile time List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5cfca008d63b3b9220ecbb152a36efa80423c31 Auto-Submitted: auto-generated The branch main has been updated by chs: URL: https://cgit.FreeBSD.org/src/commit/?id=d5cfca008d63b3b9220ecbb152a36efa80423c31 commit d5cfca008d63b3b9220ecbb152a36efa80423c31 Author: Chuck Silvers AuthorDate: 2025-10-13 16:13:22 +0000 Commit: Chuck Silvers CommitDate: 2025-10-13 16:13:22 +0000 mmap_test: determine page size at run time rather than compile time Sponsored by: Netflix Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D52735 --- tests/sys/vm/mmap_test.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tests/sys/vm/mmap_test.c b/tests/sys/vm/mmap_test.c index 6bc30f73ca95..27d02ae667fb 100644 --- a/tests/sys/vm/mmap_test.c +++ b/tests/sys/vm/mmap_test.c @@ -36,21 +36,6 @@ #include #include -static const struct { - void *addr; - int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */ -} map_at_zero_tests[] = { - { (void *)0, { 0, 1 } }, /* Test sysctl. */ - { (void *)1, { 0, 0 } }, - { (void *)(PAGE_SIZE - 1), { 0, 0 } }, - { (void *)PAGE_SIZE, { 1, 1 } }, - { (void *)-1, { 0, 0 } }, - { (void *)(-PAGE_SIZE), { 0, 0 } }, - { (void *)(-1 - PAGE_SIZE), { 0, 0 } }, - { (void *)(-1 - PAGE_SIZE - 1), { 0, 0 } }, - { (void *)(0x1000 * PAGE_SIZE), { 1, 1 } }, -}; - #define MAP_AT_ZERO "security.bsd.map_at_zero" #ifdef __LP64__ @@ -68,6 +53,22 @@ ATF_TC_BODY(mmap__map_at_zero, tc) int map_at_zero; bool allow_wx; int prot_flags; + size_t pgsz = getpagesize(); + + const struct { + void *addr; + int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */ + } map_at_zero_tests[] = { + { (void *)0, { 0, 1 } }, /* Test sysctl. */ + { (void *)1, { 0, 0 } }, + { (void *)(pgsz - 1), { 0, 0 } }, + { (void *)pgsz, { 1, 1 } }, + { (void *)-1, { 0, 0 } }, + { (void *)(-pgsz), { 0, 0 } }, + { (void *)(-1 - pgsz), { 0, 0 } }, + { (void *)(-1 - pgsz - 1), { 0, 0 } }, + { (void *)(0x1000 * pgsz), { 1, 1 } }, + }; len = sizeof(map_at_zero); if (sysctlbyname(MAP_AT_ZERO, &map_at_zero, &len, NULL, 0) == -1) { From nobody Mon Oct 13 18:31:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clmCS26j9z6C9VV; Mon, 13 Oct 2025 18:31: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 4clmCS1bvbz3D6N; Mon, 13 Oct 2025 18:31:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760380308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3TaILd9kdM7CFWAUKPhtb7/U9db7LeTc+HI3oliMLw=; b=KsV+DAKNIdaIFFc9B463jBcYcOiEaKc4nH2WYofutm/rTKTBDmKTcMIcIwNOvlv2YQXueN xAmvwMHljmGjZMWLbtE0say5LMfYQMDmm6wqDl0uMDmARTZbdBifBplGa2zpJO7IZoaQ4z KoBpPHQsPn12aZ23wE2f7PfJbB+/3vOic8eUogAJeE+3leoHJZ60nvnjzJeQ0w01JOtRB2 H3Tz1JPkRx/fdnMVHmA2CPwHZ6/6TJV+wIx35HINW7+vnjS3/u5MjgctKqd2gm2IrKKaXZ 9X9GvU5HANHGGy0FKL3Ir6AqGabCAMT0PR5/n+rbRrnJR4ToFtFYbBTRakAcaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760380308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3TaILd9kdM7CFWAUKPhtb7/U9db7LeTc+HI3oliMLw=; b=VrEvpXVn/8U8tB7JUeXUeKl+kMIabexasdpIv4If3NlpOUkbRj4PZoJaZBII8ivInzWfwz bfrRGoHzRqwUX644/NiWCEORDzeUfTQU2EhfcTbEGcbL+4ue4vI/m3iXF0BIqzX1eiPhym R6Q+YvvPf7dlhUeRZC6nGrsplzmyysZ8YLYMc48nDErFGT6YZGrg97QRU4+lqTSI4UuAzb 3R3PhMUp45GqyjZaTDwHH+Ns3ua6dIoaT+xtAW475ZkiYsnooB38Q8AmzqZDJZVLTNI6F8 TCABSS/hna8ZfmkqRWOnLNgtJkCIi871j0qUXFz1zOZt9FgkfYUkx4puxfhVyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760380308; a=rsa-sha256; cv=none; b=uFHHSz3JBK8jC3UAD7P196VTZ5jFX/n3Aqml+U+qCSY/w09QWLGxNxfTUeWxyo7i5Sz8cQ Pcobb3faPIQN1pLVbI/zdSnhqeIfT237uyxGzTc9iU6EFelrsEnibBCNv0CUsY7a63VUBl RRk1NFX5xCtmC0mI+qI2MwYkpjT3ZSZbo5+/dCtQ/owfjz9+NkuUtPlT9fbG5mMapnO8WX ahVgPeANbjzwThPpt6U1hFIiZyux/+xjCPswX75dWGbodoeqi1eSl5TY75o817TWlW2y2H vyBuOpCPaiyOmpjxXWzIJrdSZgoIiFkemxWIF4qJErnwhHrGWYDm8qA1p9QaWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clmCS121Zz3d5; Mon, 13 Oct 2025 18:31:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DIVmIN003138; Mon, 13 Oct 2025 18:31:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DIVmuU003135; Mon, 13 Oct 2025 18:31:48 GMT (envelope-from git) Date: Mon, 13 Oct 2025 18:31:48 GMT Message-Id: <202510131831.59DIVmuU003135@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: ea5685ba79fc - main - Makefile.inc1: Build source packages before sets List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea5685ba79fc9309698ef72cf48bc1f0c91ad3dd Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=ea5685ba79fc9309698ef72cf48bc1f0c91ad3dd commit ea5685ba79fc9309698ef72cf48bc1f0c91ad3dd Author: Lexi Winter AuthorDate: 2025-10-13 18:30:31 +0000 Commit: Lexi Winter CommitDate: 2025-10-13 18:31:36 +0000 Makefile.inc1: Build source packages before sets To build set-src, we first need to build the source packages. Add a .ORDER to ensure this happens. Otherwise, in a parallel build, sets might be built before the src-* packages have finished building, and set-src will be mysteriously missing. MFC after: 3 seconds Reported by: cperciva Actually diagnosed by: jrtc27 One-line fix by: ivy Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53076 --- Makefile.inc1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 74c4598dd092..e079a23552f1 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2094,6 +2094,7 @@ create-packages-world: _pkgbootstrap _repodir .PHONY .ORDER: create-packages-world create-packages-sets .ORDER: create-packages-kernel create-packages-sets +.ORDER: create-packages-source create-packages-sets create-packages-sets: _pkgbootstrap _repodir .PHONY ${_+_}@cd ${.CURDIR}; \ ${MAKE} -f Makefile.inc1 \ From nobody Mon Oct 13 19:49:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clnwr27Qyz6CGNg; Mon, 13 Oct 2025 19:49: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 4clnwr1VPWz3L0f; Mon, 13 Oct 2025 19:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760384956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MG2ZuDUzjW/vs6Kjy3GsFh/QTtxJNcwtADtCiDgatKw=; b=aHsO3ioo6U6UtIJ0QWg/Ur7K4cfigC/7YbN3I72/BAe5FIdwFAbsZKaxzdWamYWIkp475m zr7AHWmUHXhVqYX37+xLsLWSgs2OjbG7NyiUy48Udv8M0C/5HS2WvQyykegK0YBPTf+YSC I6S1xhLzLcSwe8/9laEboPUi8D+S9zoCRmaz9K0j7NfVGNNfD4s/aD3NLdSWkuhTx/vXSs GL4AV5trtFr5k9Zo4u76uSjJJ4RfNCZQ/908DGJquNbLyI/R2eBrZ8AEXrmg3ITmLQJ0T9 PQjuGwpu5otvlv/SGGypxMoiZlMTh3HBK+JOUn5lr+yiz2soppvdklmf/Ldc2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760384956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MG2ZuDUzjW/vs6Kjy3GsFh/QTtxJNcwtADtCiDgatKw=; b=ee4BV2iGjVoDOExvviBqlwbNKf7anoOmoKb605K5FHdasQok+QirY6XMU1mp3Xcgu77Uiy 8P6laD8N2sQG5ILKsstqj60w+GrQFAgUdTZ7HVIj12WBeHWWTxT/ImOjVglKbzZKNjIVPN dMqcs7v0pTjkDpzQiDsPpJ1fBIdmBiRQMhw/C/tPer4/exKdWItUF77jVIg6fI74OAUhHi HOHmkRYmWEbbqsZEDCHMr4f+5FGytn/sGq8yw5zWZR912gXxxWg3LKpEEhjsutitq5MyA+ 811NQWEoeq5ybLwPx50dFWlZvFdYKtadA6ZxhWn0Qe24N4P5FvRauojiGc3kiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760384956; a=rsa-sha256; cv=none; b=ifrC3SNZu65mE3+1XvqJap80gbTKh7pv/WbCL819NcNnI+HvRVJ4pDvt/BgXxLFEzLTuPX 20pq7TQiMHJAnpnS3j+BzCPsT9E3UFU8iIppGQv63SJXkRHVbF0aNQsA5oVOzI1bwydHkm 4+2jd/HQwMKfMwMZSH3+VcVSI5n8AfSPVYuiM8XAL1yjuZ28Lm3/EktmEOaxetAsPKronP wEFPD+lcr5hU9LklhwuAJ2TEaTawcHgmuzo8Uqu2Ms5QKYv0qcGOyYFBFuJrlZVyjpyFhJ imtEszA77GphUFlCq0xNKMfoG7yH2mUKuTjA35bCMfPrGvIcdTqBhUH37WQ3EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clnwr12D3z5lK; Mon, 13 Oct 2025 19:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DJnGnd039288; Mon, 13 Oct 2025 19:49:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DJnG0T039285; Mon, 13 Oct 2025 19:49:16 GMT (envelope-from git) Date: Mon, 13 Oct 2025 19:49:16 GMT Message-Id: <202510131949.59DJnG0T039285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: be1ad90e6bb6 - main - tcp: Initial ktest for HPTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be1ad90e6bb6ea915d122f7abe407dc18d38a673 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=be1ad90e6bb6ea915d122f7abe407dc18d38a673 commit be1ad90e6bb6ea915d122f7abe407dc18d38a673 Author: Nick Banks AuthorDate: 2025-10-13 19:47:31 +0000 Commit: Michael Tuexen CommitDate: 2025-10-13 19:47:31 +0000 tcp: Initial ktest for HPTS Reviewed by: rrs, tuexen Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52979 --- sys/modules/ktest/Makefile | 3 +- sys/modules/ktest/ktest_tcphpts/Makefile | 13 ++++++ sys/netinet/tcp_hpts_test.c | 76 ++++++++++++++++++++++++++++++++ sys/tests/ktest.h | 3 ++ tests/atf_python/ktest.py | 12 ++++- tests/sys/netinet/Makefile | 1 + tests/sys/netinet/tcp_hpts_test.py | 4 ++ 7 files changed, 109 insertions(+), 3 deletions(-) diff --git a/sys/modules/ktest/Makefile b/sys/modules/ktest/Makefile index a3052efa9ed9..d5f15576f38b 100644 --- a/sys/modules/ktest/Makefile +++ b/sys/modules/ktest/Makefile @@ -1,5 +1,6 @@ SUBDIR= ktest \ ktest_example \ - ktest_netlink_message_writer + ktest_netlink_message_writer \ + ktest_tcphpts .include diff --git a/sys/modules/ktest/ktest_tcphpts/Makefile b/sys/modules/ktest/ktest_tcphpts/Makefile new file mode 100644 index 000000000000..b642c0cb4209 --- /dev/null +++ b/sys/modules/ktest/ktest_tcphpts/Makefile @@ -0,0 +1,13 @@ +PACKAGE= tests +WARNS?= 6 + +SYSDIR?=${SRCTOP}/sys +.include "${SYSDIR}/conf/kern.opts.mk" + +.PATH: ${SYSDIR}/netinet + +KMOD= ktest_tcphpts +SRCS= tcp_hpts_test.c + +.include + diff --git a/sys/netinet/tcp_hpts_test.c b/sys/netinet/tcp_hpts_test.c new file mode 100644 index 000000000000..085da37e44c8 --- /dev/null +++ b/sys/netinet/tcp_hpts_test.c @@ -0,0 +1,76 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Netflix, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#define _WANT_INPCB +#include +#include +#define _WANT_TCPCB +#include +#include +#include +#include + +#define KTEST_ERR(_ctx, _fmt, ...) \ + KTEST_LOG_LEVEL(_ctx, LOG_ERR, _fmt, ## __VA_ARGS__) + +#define KTEST_VERIFY(x) do { \ + if (!(x)) { \ + KTEST_ERR(ctx, "FAIL: %s", #x); \ + return (EINVAL); \ + } else { \ + KTEST_LOG(ctx, "PASS: %s", #x); \ + } \ +} while (0) + +static int +test_hpts_init(struct ktest_test_context *ctx) +{ + /* TODO: Refactor HPTS code so that it may be tested. */ + KTEST_VERIFY(tcp_min_hptsi_time != 0); + return (0); +} + +static const struct ktest_test_info tests[] = { + { + .name = "test_hpts_init", + .desc = "Tests HPTS initialization and cleanup", + .func = &test_hpts_init, + }, +}; + +KTEST_MODULE_DECLARE(ktest_tcphpts, tests); +KTEST_MODULE_DEPEND(ktest_tcphpts, tcphpts); diff --git a/sys/tests/ktest.h b/sys/tests/ktest.h index c767aa31e8e5..8af92f1e0c18 100644 --- a/sys/tests/ktest.h +++ b/sys/tests/ktest.h @@ -104,6 +104,9 @@ MODULE_VERSION(ktest_##_n, 1); \ MODULE_DEPEND(ktest_##_n, ktestmod, 1, 1, 1); \ MODULE_DEPEND(ktest_##_n, netlink, 1, 1, 1); \ +#define KTEST_MODULE_DEPEND(_n, _d) \ +MODULE_DEPEND(ktest_##_n, _d, 1, 1, 1); \ + #endif /* _KERNEL */ /* genetlink definitions */ diff --git a/tests/atf_python/ktest.py b/tests/atf_python/ktest.py index a18f47d1dd06..a671aaa1fd4c 100644 --- a/tests/atf_python/ktest.py +++ b/tests/atf_python/ktest.py @@ -67,6 +67,10 @@ class KtestLoader(object): def __init__(self, module_name: str, autoload: bool): self.module_name = module_name self.autoload = autoload + # Ensure the base ktest.ko module is loaded + result = libc.kldload("ktest") + if result != 0 and result != 17: # 17 is EEXIST (already loaded) + logger.debug(f"Failed to load base ktest module (error {result})") self.helper = NlHelper() self.nlsock = Nlsock(NlConst.NETLINK_GENERIC, self.helper) self.family_id = self._get_family_id() @@ -76,7 +80,9 @@ class KtestLoader(object): family_id = self.nlsock.get_genl_family_id(NETLINK_FAMILY) except ValueError: if self.autoload: - libc.kldload(self.module_name) + result = libc.kldload(self.module_name) + if result != 0 and result != 17: # 17 is EEXIST (already loaded) + raise RuntimeError(f"Failed to load kernel module '{self.module_name}' (error {result})") family_id = self.nlsock.get_genl_family_id(NETLINK_FAMILY) else: raise @@ -103,7 +109,9 @@ class KtestLoader(object): def load_ktests(self): ret = self._load_ktests() if not ret and self.autoload: - libc.kldload(self.module_name) + result = libc.kldload(self.module_name) + if result != 0 and result != 17: # 17 is EEXIST (already loaded) + raise RuntimeError(f"Failed to load kernel module '{self.module_name}' (error {result})") ret = self._load_ktests() return ret diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index b742342beecb..9739221676ce 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -30,6 +30,7 @@ ATF_TESTS_SH= arp \ ATF_TESTS_PYTEST+= carp.py ATF_TESTS_PYTEST+= igmp.py +ATF_TESTS_PYTEST+= tcp_hpts_test.py LIBADD.so_reuseport_lb_test= pthread LIBADD.udp_bindings= pthread diff --git a/tests/sys/netinet/tcp_hpts_test.py b/tests/sys/netinet/tcp_hpts_test.py new file mode 100644 index 000000000000..c56383fb310f --- /dev/null +++ b/tests/sys/netinet/tcp_hpts_test.py @@ -0,0 +1,4 @@ +from atf_python.ktest import BaseKernelTest + +class TestTcpHpts(BaseKernelTest): + KTEST_MODULE_NAME = "ktest_tcphpts" From nobody Mon Oct 13 19:54:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clp3R2bCSz6CGdR; Mon, 13 Oct 2025 19:54: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 4clp3R1jJwz3LZJ; Mon, 13 Oct 2025 19:54:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760385299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mRIbzxt3dQ1nsx/adfYrIjpRIPbilvltjax77dd8x7Y=; b=BLLtY143SNejEO6FbCmfvWuco4Jy5A8eIpt5RVFOGb7wW68VOX/APIenY4h0b/HEXCP5Oo hde/wHhtECgDuyVlRinVdlN9428ghG/4zPsLByMX8tWCtOvFkwJxzSViLnNPrEa5/PT7C1 28RF9yVAWsa/azSLt8Au81WkhtvJFh7KiYvRtTqgXZFUTRGCfFGSUcCkyHaOJv0PzxkS09 q64P9Wgv8or1/YagsHno2aqVutR3GyfeyLwIim+993VOtfBcplKBUOq65mU+ljCE2TIAW0 KiIc2RF0nnDmZkNP80o7l9Ia+LCV5Jaj/8tSbyw8RGbqCUNf2Yg8WBt3GC4pCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760385299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mRIbzxt3dQ1nsx/adfYrIjpRIPbilvltjax77dd8x7Y=; b=gvHsjHO1VZNArWi3deVbcyEyvJewKryQ7HkbKF7gEeUNlcJawKCn4ZLuCsbj8cF7qRWChX ac4EpwnBhm2l/A2sER8HGqDmktZhHfMRM2BwGxRmrNX7ltubLgcidGbaKjRNw9Nge9hhFy nPwqvPXqAncQPKRUyB83cqKU/KX2V9fQESolVIJ+KGjL50Sciv+lPk38Q0aL/yGa2vt8zv YgIlRJsuikaANLVNtbETcd5VyvR9n3l2996QY0GJNnf693ZPrCipfR9oRd5SqJ/a7495mL zo+rj9IFtMO7p/jm6APAtaZH8yMQdO7sDriFWK4a/a4J+Z2aAyGt4ou5io14gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760385299; a=rsa-sha256; cv=none; b=nnim0TDU/qFQL72ljjrEyQdUlR+EEDeGifqlFVfr8NYhO0U7FegMnejiN4XXWksleYtLZO D4zFQ80oxXy0MYG7AMdlxhk2xk1zEw6cUBuhNzh0kgZypyT5GMcG3py9K6bfO77J83UVt/ jJK95G3FeUKOHNHp/IUKO0AkuGnxM4r4BY/Tx0lPrFxeiYkhRCxn+nZSb1wTOedonE4FXa 3wQTraaS3AVMcPh8+oprUb3FfabiO+hbz0Fa2yms/FBoVh5YUN6p5ymrFT/R6XyqMTSBbB 5w9vJ+KzBVE+do8dkYaI8LjoL38JIsYI7rBtkyIDKPWoci8AbbAokNaf1lyU6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clp3R10KNz5mL; Mon, 13 Oct 2025 19:54:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DJswUW056707; Mon, 13 Oct 2025 19:54:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DJswYw056704; Mon, 13 Oct 2025 19:54:58 GMT (envelope-from git) Date: Mon, 13 Oct 2025 19:54:58 GMT Message-Id: <202510131954.59DJswYw056704@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 790d94188081 - main - tcp: simplify tcp_hpts_insert signature List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 790d941880812146ec566cae0cc22ae831e25981 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=790d941880812146ec566cae0cc22ae831e25981 commit 790d941880812146ec566cae0cc22ae831e25981 Author: Nick Banks AuthorDate: 2025-10-13 19:53:20 +0000 Commit: Michael Tuexen CommitDate: 2025-10-13 19:53:20 +0000 tcp: simplify tcp_hpts_insert signature Reviewed by: tuexen Sponsored by: Netflix, Inc. --- sys/netinet/tcp_hpts.c | 19 ++++++++++--------- sys/netinet/tcp_hpts.h | 12 ++++++++---- sys/netinet/tcp_stacks/bbr.c | 11 ++++------- sys/netinet/tcp_stacks/rack.c | 17 ++++++----------- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 63bbe4bba11b..e9b61b67b02c 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -45,7 +45,7 @@ * one of the macros HPTS_MS_TO_SLOTS or HPTS_USEC_TO_SLOTS. So a typical * call from the tcp_output() routine might look like: * - * tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(550)); + * tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(550), NULL); * * The above would schedule tcp_output() to be called in 550 useconds. * Note that if using this mechanism the stack will want to add near @@ -855,12 +855,17 @@ check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct tcpcb *tp, } #endif -uint32_t -tcp_hpts_insert_diag(struct tcpcb *tp, uint32_t slot, int32_t line, struct hpts_diag *diag) +void +#ifdef INVARIANTS +__tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, int32_t line, + struct hpts_diag *diag) +#else +tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) +#endif { struct tcp_hpts_entry *hpts; struct timeval tv; - uint32_t slot_on, wheel_cts, last_slot, need_new_to = 0; + uint32_t wheel_cts, last_slot, need_new_to = 0; int32_t wheel_slot, maxslots; bool need_wakeup = false; @@ -912,10 +917,9 @@ tcp_hpts_insert_diag(struct tcpcb *tp, uint32_t slot, int32_t line, struct hpts_ hpts->p_direct_wake = 1; tcp_wakehpts(hpts); } - slot_on = hpts->p_nxt_slot; HPTS_UNLOCK(hpts); - return (slot_on); + return; } /* Get the current time relative to the wheel */ wheel_cts = tcp_tv_to_hpts_slot(&tv); @@ -1026,10 +1030,7 @@ tcp_hpts_insert_diag(struct tcpcb *tp, uint32_t slot, int32_t line, struct hpts_ diag->co_ret = co_ret; } } - slot_on = hpts->p_nxt_slot; HPTS_UNLOCK(hpts); - - return (slot_on); } static uint16_t diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index 6172baf2a062..b9252f1ba3bf 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -132,10 +132,14 @@ tcp_in_hpts(struct tcpcb *tp) * that INP_WLOCK() or from destroying your TCB where again * you should already have the INP_WLOCK(). */ -uint32_t tcp_hpts_insert_diag(struct tcpcb *tp, uint32_t slot, int32_t line, - struct hpts_diag *diag); -#define tcp_hpts_insert(inp, slot) \ - tcp_hpts_insert_diag((inp), (slot), __LINE__, NULL) +#ifdef INVARIANTS +void __tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, int32_t line, + struct hpts_diag *diag); +#define tcp_hpts_insert(tp, slot, diag) \ + __tcp_hpts_insert((tp), (slot), __LINE__, (diag)) +#else +void tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag); +#endif void tcp_set_hpts(struct tcpcb *tp); diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index f2d7867df9b4..0173e2fd4881 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -900,15 +900,13 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ tp->t_flags2 &= ~TF2_DONT_SACK_QUEUE; bbr->rc_pacer_started = cts; - (void)tcp_hpts_insert_diag(tp, HPTS_USEC_TO_SLOTS(slot), - __LINE__, &diag); + tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(slot), &diag); bbr->rc_timer_first = 0; bbr->bbr_timer_src = frm; bbr_log_to_start(bbr, cts, hpts_timeout, slot, 1); bbr_log_hpts_diag(bbr, cts, &diag); } else if (hpts_timeout) { - (void)tcp_hpts_insert_diag(tp, HPTS_USEC_TO_SLOTS(hpts_timeout), - __LINE__, &diag); + tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(hpts_timeout), &diag); /* * We add the flag here as well if the slot is set, * since hpts will call in to clear the queue first before @@ -5205,7 +5203,7 @@ bbr_process_timers(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts, uint8_t left = bbr->r_ctl.rc_timer_exp - cts; ret = -3; bbr_log_to_processing(bbr, cts, ret, left, hpts_calling); - tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(left)); + tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(left), NULL); return (1); } bbr->rc_tmr_stopped = 0; @@ -14132,8 +14130,7 @@ bbr_switch_failed(struct tcpcb *tp) } } else toval = HPTS_USECS_PER_SLOT; - (void)tcp_hpts_insert_diag(tp, HPTS_USEC_TO_SLOTS(toval), - __LINE__, &diag); + tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(toval), &diag); bbr_log_hpts_diag(bbr, cts, &diag); } diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 11ef5ba706c5..a31b2d87739c 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -6804,13 +6804,11 @@ rack_start_hpts_timer (struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts, * Arrange for the hpts to kick back in after the * t-o if the t-o does not cause a send. */ - (void)tcp_hpts_insert_diag(tp, HPTS_USEC_TO_SLOTS(hpts_timeout), - __LINE__, &diag); + tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(hpts_timeout), &diag); rack_log_hpts_diag(rack, us_cts, &diag, &tv); rack_log_to_start(rack, cts, hpts_timeout, slot, 0); } else { - (void)tcp_hpts_insert_diag(tp, HPTS_USEC_TO_SLOTS(slot), - __LINE__, &diag); + tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(slot), &diag); rack_log_hpts_diag(rack, us_cts, &diag, &tv); rack_log_to_start(rack, cts, hpts_timeout, slot, 1); } @@ -6824,8 +6822,7 @@ rack_start_hpts_timer (struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts, * at the start of this block) are good enough. */ rack->r_ctl.rc_hpts_flags &= ~PACE_PKT_OUTPUT; - (void)tcp_hpts_insert_diag(tp, HPTS_USEC_TO_SLOTS(hpts_timeout), - __LINE__, &diag); + tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(hpts_timeout), &diag); rack_log_hpts_diag(rack, us_cts, &diag, &tv); rack_log_to_start(rack, cts, hpts_timeout, slot, 0); } else { @@ -8016,7 +8013,7 @@ rack_process_timers(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts, uint8 rack->rc_tp->t_flags2 &= ~TF2_DONT_SACK_QUEUE; ret = -3; left = rack->r_ctl.rc_timer_exp - cts; - tcp_hpts_insert(tp, HPTS_MS_TO_SLOTS(left)); + tcp_hpts_insert(tp, HPTS_MS_TO_SLOTS(left), NULL); rack_log_to_processing(rack, cts, ret, left); return (1); } @@ -14377,8 +14374,7 @@ rack_switch_failed(struct tcpcb *tp) } } else toval = HPTS_USECS_PER_SLOT; - (void)tcp_hpts_insert_diag(tp, HPTS_USEC_TO_SLOTS(toval), - __LINE__, &diag); + tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(toval), &diag); rack_log_hpts_diag(rack, cts, &diag, &tv); } @@ -14973,8 +14969,7 @@ rack_init(struct tcpcb *tp, void **ptr) if (tov) { struct hpts_diag diag; - (void)tcp_hpts_insert_diag(tp, HPTS_USEC_TO_SLOTS(tov), - __LINE__, &diag); + tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(tov), &diag); rack_log_hpts_diag(rack, us_cts, &diag, &rack->r_ctl.act_rcv_time); } } From nobody Mon Oct 13 20:23:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clphD5ykyz6CJrq; Mon, 13 Oct 2025 20: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 4clphD2tztz3RrR; Mon, 13 Oct 2025 20:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387004; h=from:from:reply-to:subject:subject: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/9HtyyN5CMJx4J2ucLa9mHj67jSNLR0tJ3hXETJ0Hw=; b=ImOxk/5ZWtnRVh4/WvlkQ2al60DcOUWb4xeDzY6d2Bpdd6KgxZXGVSkXt9VyLnWb0PWNmX g46xoaBDC/lQeLk7/6ED2VIlUrWo77ceqqrevUMqDeWR38hIhqaefF38JOVimVcNzKbZmI iRfdwfQHlvM+0VGVgBTEhM/bEIvWwKaJmH6zCvROSa6oLqVd6XSrlqmwtJU5c+Reshk7Au Mk2n714fzcLE+WNGcjZM8BWbyvXq57ML+5Vj/l3NKFs8JwOf9R5sdfp/oGLjQtkNNXyckl IVQXPdpsCW33ShUahk/CBmZ9qo/sVvbAoixPsIupf/oi7z0sOGGS0NdD0996Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387004; h=from:from:reply-to:subject:subject: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/9HtyyN5CMJx4J2ucLa9mHj67jSNLR0tJ3hXETJ0Hw=; b=qBrx8hX1MPCqEOVHZcPOTo3sMGZvoY5EIOetGd2nKWLbh4lhCs5b1tgrulT+fxJ3XdVrAR uYFPmMJiMfce9tn9U0hefZu8xmrjEE/fuh8ln2p5ZqL/du4duqeHdRuCH4eC5Y5i7ttfJx aQ8fr+8II4YtAJzWKx3gdAaQHudLcT1WVNr+5xgDqSqyCGpBRDC7GS7NSxE67E1AM+C3Tw yZwYcT8gyJoAzOlxpfxx2mjc6NpRmsPTwJUZBy05vTMU4+rpZGPXpLy99hXzrwkCzoB8p1 j+g+TiX241j4OjGqsMSkEzwgIgVLetAvU9KB7SLAokzAPBblVUmf8GEPOu7J2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760387004; a=rsa-sha256; cv=none; b=OjBJbu3i/RgCVJSS6NbIDOA72+RBiUY31PbyQhhByutjYs4yWm49deQCDp81QzwhOhiTVH Valuj/pby+aLTKnG9gpDaEXRk37SwGKuzVcSgrQvXAo+9cl7ZJ4WglIZSbem9T+uEcJfXX sxg2NrBf2h0SEYJp0V6/wIAGM/StD021/tZ149ZgwDR3koY7bRjYIJI1sY7RMNgQ0yVja4 ULnuQsFYzgjawDIANhLzkEdXliQJtVN3QeDucBUYyBWTm9WNqpvZOIBAsiJRLfpIP0WUFJ SXrymOvdzEskAmkC65CjT/8g3T4YQWV5on1W37kZ8jiOktbZtmgbWtNI3Nue1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clphD2GFqz6H7; Mon, 13 Oct 2025 20:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DKNOMI013344; Mon, 13 Oct 2025 20:23:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DKNOOS013341; Mon, 13 Oct 2025 20:23:24 GMT (envelope-from git) Date: Mon, 13 Oct 2025 20:23:24 GMT Message-Id: <202510132023.59DKNOOS013341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 23461f4997c2 - main - tcp: remove notion of ticks from HPTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23461f4997c24896058152d9de56bb4f4527984a Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=23461f4997c24896058152d9de56bb4f4527984a commit 23461f4997c24896058152d9de56bb4f4527984a Author: Nick Banks AuthorDate: 2025-10-13 20:00:27 +0000 Commit: Michael Tuexen CommitDate: 2025-10-13 20:00:27 +0000 tcp: remove notion of ticks from HPTS To improve consistency of the code, don't use slots and ticks, just use slots. Reviewed by: tuexen Sponsored by: Netflix, Inc. --- sys/netinet/tcp_hpts.c | 143 +++++++++++++++++++----------------------- sys/netinet/tcp_hpts.h | 19 ------ sys/netinet/tcp_stacks/bbr.c | 3 - sys/netinet/tcp_stacks/rack.c | 3 - 4 files changed, 66 insertions(+), 102 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index e9b61b67b02c..b022cfba451d 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -204,11 +204,11 @@ * * When we are in the "new" mode i.e. conn_cnt > conn_cnt_thresh * then we do a dynamic adjustment on the time we sleep. - * Our threshold is if the lateness of the first client served (in ticks) is + * Our threshold is if the lateness of the first client served (in slots) is * greater than or equal too slots_indicate_more_sleep (10ms - * or 10000 ticks). If we were that late, the actual sleep time - * is adjusted down by 50%. If the ticks_ran is less than - * slots_indicate_more_sleep (100 ticks or 1000usecs). + * or 10000 slots). If we were that late, the actual sleep time + * is adjusted down by 50%. If the slots_ran is less than + * slots_indicate_more_sleep (100 slots or 1000usecs). * */ @@ -225,14 +225,12 @@ struct tcp_hpts_entry { uint64_t sleeping; /* What the actual sleep was (if sleeping) */ uint16_t p_hpts_active; /* Flag that says hpts is awake */ uint8_t p_wheel_complete; /* have we completed the wheel arc walk? */ - uint32_t p_curtick; /* Tick in 10 us the hpts is going to */ - uint32_t p_runningslot; /* Current tick we are at if we are running */ + uint32_t p_runningslot; /* Current slot we are at if we are running */ uint32_t p_prev_slot; /* Previous slot we were on */ uint32_t p_cur_slot; /* Current slot in wheel hpts is draining */ uint32_t p_nxt_slot; /* The next slot outside the current range of * slots that the hpts is running on. */ int32_t p_on_queue_cnt; /* Count on queue in this hpts */ - uint32_t p_lasttick; /* Last tick before the current one */ uint8_t p_direct_wake :1, /* boolean */ p_on_min_sleep:1, /* boolean */ p_hpts_wake_scheduled:1, /* boolean */ @@ -248,8 +246,6 @@ struct tcp_hpts_entry { uint32_t p_hpts_sleep_time; /* Current sleep interval having a max * of 255ms */ uint32_t overidden_sleep; /* what was overrided by min-sleep for logging */ - uint32_t saved_lasttick; /* for logging */ - uint32_t saved_curtick; /* for logging */ uint32_t saved_curslot; /* for logging */ uint32_t saved_prev_slot; /* for logging */ uint32_t p_delayed_by; /* How much were we delayed by */ @@ -487,13 +483,11 @@ tcp_hpts_log(struct tcp_hpts_entry *hpts, struct tcpcb *tp, struct timeval *tv, log.u_bbr.flex2 = hpts->p_cur_slot; log.u_bbr.flex3 = hpts->p_prev_slot; log.u_bbr.flex4 = idx; - log.u_bbr.flex5 = hpts->p_curtick; log.u_bbr.flex6 = hpts->p_on_queue_cnt; log.u_bbr.flex7 = hpts->p_cpu; log.u_bbr.flex8 = (uint8_t)from_callout; log.u_bbr.inflight = slots_to_run; log.u_bbr.applimited = hpts->overidden_sleep; - log.u_bbr.delivered = hpts->saved_curtick; log.u_bbr.timeStamp = tcp_tv_to_usec(tv); log.u_bbr.epoch = hpts->saved_curslot; log.u_bbr.lt_epoch = hpts->saved_prev_slot; @@ -662,23 +656,19 @@ hpts_slot(uint32_t wheel_slot, uint32_t plus) { /* * Given a slot on the wheel, what slot - * is that plus ticks out? + * is that plus slots out? */ - KASSERT(wheel_slot < NUM_OF_HPTSI_SLOTS, ("Invalid tick %u not on wheel", wheel_slot)); + KASSERT(wheel_slot < NUM_OF_HPTSI_SLOTS, ("Invalid slot %u not on wheel", wheel_slot)); return ((wheel_slot + plus) % NUM_OF_HPTSI_SLOTS); } static inline int -tick_to_wheel(uint32_t cts_in_wticks) +cts_to_wheel(uint32_t cts) { /* - * Given a timestamp in ticks (so by - * default to get it to a real time one - * would multiply by 10.. i.e the number - * of ticks in a slot) map it to our limited - * space wheel. + * Given a timestamp in useconds map it to our limited space wheel. */ - return (cts_in_wticks % NUM_OF_HPTSI_SLOTS); + return ((cts / HPTS_USECS_PER_SLOT) % NUM_OF_HPTSI_SLOTS); } static inline int @@ -721,7 +711,7 @@ max_slots_available(struct tcp_hpts_entry *hpts, uint32_t wheel_slot, uint32_t * if ((hpts->p_hpts_active == 1) && (hpts->p_wheel_complete == 0)) { end_slot = hpts->p_runningslot; - /* Back up one tick */ + /* Back up one slot */ if (end_slot == 0) end_slot = NUM_OF_HPTSI_SLOTS - 1; else @@ -734,7 +724,7 @@ max_slots_available(struct tcp_hpts_entry *hpts, uint32_t wheel_slot, uint32_t * * not active, or we have * completed the pass over * the wheel, we can use the - * prev tick and subtract one from it. This puts us + * prev slot and subtract one from it. This puts us * as far out as possible on the wheel. */ end_slot = hpts->p_prev_slot; @@ -747,7 +737,7 @@ max_slots_available(struct tcp_hpts_entry *hpts, uint32_t wheel_slot, uint32_t * /* * Now we have close to the full wheel left minus the * time it has been since the pacer went to sleep. Note - * that wheel_tick, passed in, should be the current time + * that wheel_slot, passed in, should be the current time * from the perspective of the caller, mapped to the wheel. */ if (hpts->p_prev_slot != wheel_slot) @@ -887,8 +877,6 @@ tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) diag->p_runningslot = hpts->p_runningslot; diag->p_nxt_slot = hpts->p_nxt_slot; diag->p_cur_slot = hpts->p_cur_slot; - diag->p_curtick = hpts->p_curtick; - diag->p_lasttick = hpts->p_lasttick; diag->slot_req = slot; diag->p_on_min_sleep = hpts->p_on_min_sleep; diag->hpts_sleep_time = hpts->p_hpts_sleep_time; @@ -921,10 +909,9 @@ tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) return; } - /* Get the current time relative to the wheel */ - wheel_cts = tcp_tv_to_hpts_slot(&tv); - /* Map it onto the wheel */ - wheel_slot = tick_to_wheel(wheel_cts); + /* Get the current time stamp and map it onto the wheel */ + wheel_cts = tcp_tv_to_usec(&tv); + wheel_slot = cts_to_wheel(wheel_cts); /* Now what's the max we can place it at? */ maxslots = max_slots_available(hpts, wheel_slot, &last_slot); if (diag) { @@ -999,7 +986,7 @@ tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) } /* * Now how far is the hpts sleeping to? if active is 1, its - * up and ticking we do nothing, otherwise we may need to + * up and running we do nothing, otherwise we may need to * reschedule its callout if need_new_to is set from above. */ if (need_wakeup) { @@ -1119,6 +1106,12 @@ tcp_hpts_set_max_sleep(struct tcp_hpts_entry *hpts, int wrap_loop_cnt) } } +static bool +tcp_hpts_different_slots(uint32_t cts, uint32_t cts_last_run) +{ + return ((cts / HPTS_USECS_PER_SLOT) != (cts_last_run / HPTS_USECS_PER_SLOT)); +} + static int32_t tcp_hptsi(struct tcp_hpts_entry *hpts, bool from_callout) { @@ -1131,6 +1124,7 @@ tcp_hptsi(struct tcp_hpts_entry *hpts, bool from_callout) int32_t wrap_loop_cnt = 0; int32_t slot_pos_of_endpoint = 0; int32_t orig_exit_slot; + uint32_t cts, cts_last_run; bool completed_measure, seen_endpoint; completed_measure = false; @@ -1139,31 +1133,28 @@ tcp_hptsi(struct tcp_hpts_entry *hpts, bool from_callout) HPTS_MTX_ASSERT(hpts); NET_EPOCH_ASSERT(); /* record previous info for any logging */ - hpts->saved_lasttick = hpts->p_lasttick; - hpts->saved_curtick = hpts->p_curtick; hpts->saved_curslot = hpts->p_cur_slot; hpts->saved_prev_slot = hpts->p_prev_slot; - hpts->p_lasttick = hpts->p_curtick; - hpts->p_curtick = tcp_gethptstick(&tv); - tcp_pace.cts_last_ran[hpts->p_num] = tcp_tv_to_usec(&tv); - orig_exit_slot = hpts->p_cur_slot = tick_to_wheel(hpts->p_curtick); + cts_last_run = tcp_pace.cts_last_ran[hpts->p_num]; + tcp_pace.cts_last_ran[hpts->p_num] = cts = tcp_get_usecs(&tv); + + orig_exit_slot = hpts->p_cur_slot = cts_to_wheel(cts); if ((hpts->p_on_queue_cnt == 0) || - (hpts->p_lasttick == hpts->p_curtick)) { + !tcp_hpts_different_slots(cts, cts_last_run)) { /* - * No time has yet passed, - * or nothing to do. + * Not enough time has yet passed or nothing to do. */ hpts->p_prev_slot = hpts->p_cur_slot; - hpts->p_lasttick = hpts->p_curtick; goto no_run; } again: hpts->p_wheel_complete = 0; HPTS_MTX_ASSERT(hpts); slots_to_run = hpts_slots_diff(hpts->p_prev_slot, hpts->p_cur_slot); - if (((hpts->p_curtick - hpts->p_lasttick) > (NUM_OF_HPTSI_SLOTS - 1)) && - (hpts->p_on_queue_cnt != 0)) { + if ((hpts->p_on_queue_cnt != 0) && + ((cts - cts_last_run) > + ((NUM_OF_HPTSI_SLOTS-1) * HPTS_USECS_PER_SLOT))) { /* * Wheel wrap is occuring, basically we * are behind and the distance between @@ -1239,7 +1230,7 @@ again: uint32_t runningslot; /* - * Calculate our delay, if there are no extra ticks there + * Calculate our delay, if there are no extra slots there * was not any (i.e. if slots_to_run == 1, no delay). */ hpts->p_delayed_by = (slots_to_run - (i + 1)) * @@ -1451,10 +1442,9 @@ no_one: hpts->p_delayed_by = 0; /* * Check to see if we took an excess amount of time and need to run - * more ticks (if we did not hit eno-bufs). + * more slots (if we did not hit eno-bufs). */ hpts->p_prev_slot = hpts->p_cur_slot; - hpts->p_lasttick = hpts->p_curtick; if (!from_callout || (loop_cnt > max_pacer_loops)) { /* * Something is serious slow we have @@ -1466,7 +1456,7 @@ no_one: * can never catch up :( * * We will just lie to this thread - * and let it thing p_curtick is + * and let it think p_curslot is * correct. When it next awakens * it will find itself further behind. */ @@ -1474,20 +1464,21 @@ no_one: counter_u64_add(hpts_hopelessly_behind, 1); goto no_run; } - hpts->p_curtick = tcp_gethptstick(&tv); - hpts->p_cur_slot = tick_to_wheel(hpts->p_curtick); + + cts_last_run = tcp_pace.cts_last_ran[hpts->p_num]; + tcp_pace.cts_last_ran[hpts->p_num] = cts = tcp_get_usecs(&tv); + + hpts->p_cur_slot = cts_to_wheel(cts); if (!seen_endpoint) { /* We saw no endpoint but we may be looping */ orig_exit_slot = hpts->p_cur_slot; } - if ((wrap_loop_cnt < 2) && - (hpts->p_lasttick != hpts->p_curtick)) { + if ((wrap_loop_cnt < 2) && tcp_hpts_different_slots(cts, cts_last_run)) { counter_u64_add(hpts_loops, 1); loop_cnt++; goto again; } no_run: - tcp_pace.cts_last_ran[hpts->p_num] = tcp_tv_to_usec(&tv); /* * Set flag to tell that we are done for * any slot input that happens during @@ -1495,7 +1486,7 @@ no_run: */ hpts->p_wheel_complete = 1; /* - * Now did we spend too long running input and need to run more ticks? + * Now did we spend too long running input and need to run more? * Note that if wrap_loop_cnt < 2 then we should have the conditions * in the KASSERT's true. But if the wheel is behind i.e. wrap_loop_cnt * is greater than 2, then the condtion most likely are *not* true. @@ -1503,17 +1494,20 @@ no_run: * multiple times so the slots may not align either. */ KASSERT(((hpts->p_prev_slot == hpts->p_cur_slot) || + (hpts->p_on_queue_cnt == 0) || (wrap_loop_cnt >= 2) || !from_callout), ("H:%p p_prev_slot:%u not equal to p_cur_slot:%u", hpts, hpts->p_prev_slot, hpts->p_cur_slot)); - KASSERT(((hpts->p_lasttick == hpts->p_curtick) - || (wrap_loop_cnt >= 2) || !from_callout), - ("H:%p p_lasttick:%u not equal to p_curtick:%u", hpts, - hpts->p_lasttick, hpts->p_curtick)); - if (from_callout && (hpts->p_lasttick != hpts->p_curtick)) { - hpts->p_curtick = tcp_gethptstick(&tv); + KASSERT((!tcp_hpts_different_slots(cts, cts_last_run) || + (hpts->p_on_queue_cnt == 0) || + (wrap_loop_cnt >= 2) || !from_callout), + ("H:%p cts_last_run:%u not close enough to cts:%u", hpts, + cts_last_run, cts)); + if (from_callout && ((cts - cts_last_run) >= HPTS_USECS_PER_SLOT)) { + cts_last_run = tcp_pace.cts_last_ran[hpts->p_num]; + tcp_pace.cts_last_ran[hpts->p_num] = cts = tcp_get_usecs(&tv); + hpts->p_cur_slot = cts_to_wheel(cts); counter_u64_add(hpts_loops, 1); - hpts->p_cur_slot = tick_to_wheel(hpts->p_curtick); goto again; } @@ -1589,7 +1583,7 @@ __tcp_run_hpts(void) { struct epoch_tracker et; struct tcp_hpts_entry *hpts; - int ticks_ran; + int slots_ran; hpts = tcp_choose_hpts_to_run(); @@ -1607,10 +1601,10 @@ __tcp_run_hpts(void) hpts->syscall_cnt++; counter_u64_add(hpts_direct_call, 1); hpts->p_hpts_active = 1; - ticks_ran = tcp_hptsi(hpts, false); + slots_ran = tcp_hptsi(hpts, false); /* We may want to adjust the sleep values here */ if (hpts->p_on_queue_cnt >= conn_cnt_thresh) { - if (ticks_ran > slots_indicate_less_sleep) { + if (slots_ran > slots_indicate_less_sleep) { struct timeval tv; sbintime_t sb; @@ -1642,7 +1636,7 @@ __tcp_run_hpts(void) callout_reset_sbt_on(&hpts->co, sb, 0, hpts_timeout_swi, hpts, hpts->p_cpu, (C_DIRECT_EXEC | C_PREL(tcp_hpts_precision))); - } else if (ticks_ran < slots_indicate_more_sleep) { + } else if (slots_ran < slots_indicate_more_sleep) { /* For the further sleep, don't reschedule hpts */ hpts->p_mysleep.tv_usec *= 2; if (hpts->p_mysleep.tv_usec > dynamic_max_sleep) @@ -1663,7 +1657,7 @@ tcp_hpts_thread(void *ctx) struct epoch_tracker et; struct timeval tv; sbintime_t sb; - int ticks_ran; + int slots_ran; hpts = (struct tcp_hpts_entry *)ctx; HPTS_LOCK(hpts); @@ -1722,7 +1716,7 @@ tcp_hpts_thread(void *ctx) } hpts->sleeping = 0; hpts->p_hpts_active = 1; - ticks_ran = tcp_hptsi(hpts, true); + slots_ran = tcp_hptsi(hpts, true); tv.tv_sec = 0; tv.tv_usec = hpts->p_hpts_sleep_time * HPTS_USECS_PER_SLOT; if ((hpts->p_on_queue_cnt > conn_cnt_thresh) && (hpts->hit_callout_thresh == 0)) { @@ -1738,11 +1732,11 @@ tcp_hpts_thread(void *ctx) * Only adjust sleep time if we were * called from the callout i.e. direct_wake == 0. */ - if (ticks_ran < slots_indicate_more_sleep) { + if (slots_ran < slots_indicate_more_sleep) { hpts->p_mysleep.tv_usec *= 2; if (hpts->p_mysleep.tv_usec > dynamic_max_sleep) hpts->p_mysleep.tv_usec = dynamic_max_sleep; - } else if (ticks_ran > slots_indicate_less_sleep) { + } else if (slots_ran > slots_indicate_less_sleep) { hpts->p_mysleep.tv_usec /= 2; if (hpts->p_mysleep.tv_usec < dynamic_min_sleep) hpts->p_mysleep.tv_usec = dynamic_min_sleep; @@ -1957,19 +1951,14 @@ tcp_hpts_mod_load(void) "What the current running pacers goal"); SYSCTL_ADD_UINT(&hpts->hpts_ctx, SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "runtick", CTLFLAG_RD, + OID_AUTO, "runslot", CTLFLAG_RD, &hpts->p_runningslot, 0, "What the running pacers current slot is"); - SYSCTL_ADD_UINT(&hpts->hpts_ctx, - SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "curtick", CTLFLAG_RD, - &hpts->p_curtick, 0, - "What the running pacers last tick mapped to the wheel was"); SYSCTL_ADD_UINT(&hpts->hpts_ctx, SYSCTL_CHILDREN(hpts->hpts_root), OID_AUTO, "lastran", CTLFLAG_RD, &tcp_pace.cts_last_ran[i], 0, - "The last usec tick that this hpts ran"); + "The last usec timestamp that this hpts ran"); SYSCTL_ADD_LONG(&hpts->hpts_ctx, SYSCTL_CHILDREN(hpts->hpts_root), OID_AUTO, "cur_min_sleep", CTLFLAG_RD, @@ -1988,9 +1977,9 @@ tcp_hpts_mod_load(void) hpts->p_hpts_sleep_time = hpts_sleep_max; hpts->p_num = i; - hpts->p_curtick = tcp_gethptstick(&tv); - tcp_pace.cts_last_ran[i] = tcp_tv_to_usec(&tv); - hpts->p_prev_slot = hpts->p_cur_slot = tick_to_wheel(hpts->p_curtick); + tcp_pace.cts_last_ran[i] = tcp_get_u64_usecs(&tv); + hpts->p_cur_slot = cts_to_wheel(tcp_pace.cts_last_ran[i]); + hpts->p_prev_slot = hpts->p_cur_slot; hpts->p_cpu = 0xffff; hpts->p_nxt_slot = hpts_slot(hpts->p_cur_slot, 1); callout_init(&hpts->co, 1); diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index b9252f1ba3bf..0bbf677c25aa 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -34,12 +34,6 @@ #define HPTS_MSEC_IN_SEC 1000 #define HPTS_USEC_IN_MSEC 1000 -static inline uint32_t -tcp_tv_to_hpts_slot(const struct timeval *sv) -{ - return ((sv->tv_sec * 100000) + (sv->tv_usec / HPTS_USECS_PER_SLOT)); -} - static inline uint32_t tcp_tv_to_usec(const struct timeval *sv) { @@ -75,8 +69,6 @@ struct hpts_diag { uint32_t maxslots; /* bbr->delRate x */ uint32_t wheel_cts; /* bbr->rttProp x */ int32_t co_ret; /* bbr->pkts_out x */ - uint32_t p_curtick; /* upper bbr->cur_del_rate */ - uint32_t p_lasttick; /* lower bbr->cur_del_rate */ uint8_t p_on_min_sleep; /* bbr->flex8 x */ }; @@ -151,17 +143,6 @@ get_hpts_min_sleep_time(void) return (tcp_min_hptsi_time + HPTS_USECS_PER_SLOT); } -static inline uint32_t -tcp_gethptstick(struct timeval *sv) -{ - struct timeval tv; - - if (sv == NULL) - sv = &tv; - microuptime(sv); - return (tcp_tv_to_hpts_slot(sv)); -} - static inline uint64_t tcp_get_u64_usecs(struct timeval *tv) { diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 0173e2fd4881..d035766d895d 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -2409,9 +2409,6 @@ bbr_log_hpts_diag(struct tcp_bbr *bbr, uint32_t cts, struct hpts_diag *diag) log.u_bbr.bw_inuse = diag->wheel_slot; log.u_bbr.rttProp = diag->wheel_cts; log.u_bbr.delRate = diag->maxslots; - log.u_bbr.cur_del_rate = diag->p_curtick; - log.u_bbr.cur_del_rate <<= 32; - log.u_bbr.cur_del_rate |= diag->p_lasttick; TCP_LOG_EVENTP(bbr->rc_tp, NULL, &bbr->rc_inp->inp_socket->so_rcv, &bbr->rc_inp->inp_socket->so_snd, diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index a31b2d87739c..cff07b4932d9 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -6497,9 +6497,6 @@ rack_log_hpts_diag(struct tcp_rack *rack, uint32_t cts, log.u_bbr.rttProp = diag->wheel_cts; log.u_bbr.timeStamp = cts; log.u_bbr.delRate = diag->maxslots; - log.u_bbr.cur_del_rate = diag->p_curtick; - log.u_bbr.cur_del_rate <<= 32; - log.u_bbr.cur_del_rate |= diag->p_lasttick; TCP_LOG_EVENTP(rack->rc_tp, NULL, &rack->rc_inp->inp_socket->so_rcv, &rack->rc_inp->inp_socket->so_snd, From nobody Mon Oct 13 20:26:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clplG6pgNz6CK5X; Mon, 13 Oct 2025 20:26: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 4clplG69fLz3SMR; Mon, 13 Oct 2025 20:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5X6a8Xvk5wU38bHYqpXPXEo8K6XNg/3cmvJ5KdpYXY=; b=V8FEe0VHgUL6F2ocvJDY8+o5lK5uujVYKGMfRaTXYczQTHIKulftx+v6S3aiJhFWGKs2ie arlJHEr99Q1EK6BB+XPRM3giTcLabigohGau0yuhRLE4EehWmeKGj6hgos6ZjOWTMj2buV obLWBERzFIH+F0AUcAkd5xrW7k3BC0vj4RILmCOCVHcRw4QGLpT9vOPeztoYfgNTHiKrZB g3XEyCzqQGEFaFydS5KpCioiHcI04PfDy25AIcgNbdOIFIGg3SWRKASmj9yPh8jOZMv6h/ G4R2JdbPdIcAnqcajqbl/Ra51XYvmDF6MVtjwdZyXC5hcwQ5qBhwlupOSoAngQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5X6a8Xvk5wU38bHYqpXPXEo8K6XNg/3cmvJ5KdpYXY=; b=T79jHPryfzJe7BEbJb/UXrG+1KAIxQt1nzP7Dv4hXxxWGa960ojdk0fRsGbZ6q3/YNdQGP UZGhCRyfMzXPOnOHZblUqJsCcbT9jO17cqa7QdThu1RrREC46d8t307RW9mG8M97qWq/lg AQt20EZf28fIire0Wj+/lg9z6TXoHpOeZ/80VQ1XZtBAeA0KbdHRL7vZ8pT261GcQ/uZ/+ ELtl5EpfpD66y9uOoES/V5axojjluAGzKRLdybRmzOUGXLHMOeEy9ZLxeA2u5w2ZIeDRE/ n/14e5jYH1yWgFwc97QGJv6LH8sM8P6+HF0IHztMdQwTC+qd8rXyWnfKzOPT1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760387162; a=rsa-sha256; cv=none; b=mFmoHSKG5G7o6nX+MLpVlHDCZQxlCfb2BAqXGrqKgfj0W0rEU1om0aZSLr26Psgc6++JOF G61/24Wvm20xqY0giHn0gGRvw5WX+Wa4iwDE0/SppJBCYNFpj98ChjHvS/DPUb0HzhuXOY +RP3HF3YbUF7+Bu7Y2sneI3YJwxF0boT1VuoSV+Ga8P62j8L6078dX1daQg3kff5lYsg4I Zhd6xvuUbZTIwfvcvF+cpVJKRdrLtl9d/Q7b/Ctca5gZY/RkJEusxKprZ+LJzSsLOHJ8HK EL2YQKz/gune5HkBk6fXNimRZZ1Pq7qzKCum4g21EkRCqNGmNH9nyjVsIxs6GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clplG5VMnz5n2; Mon, 13 Oct 2025 20:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DKQ2FZ014239; Mon, 13 Oct 2025 20:26:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DKQ2Iu014236; Mon, 13 Oct 2025 20:26:02 GMT (envelope-from git) Date: Mon, 13 Oct 2025 20:26:02 GMT Message-Id: <202510132026.59DKQ2Iu014236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e79941bcb9d8 - main - tcp: fix KASSERT in HPTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e79941bcb9d8758070a97d780582e097bb82396e Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e79941bcb9d8758070a97d780582e097bb82396e commit e79941bcb9d8758070a97d780582e097bb82396e Author: Nick Banks AuthorDate: 2025-10-13 20:24:52 +0000 Commit: Michael Tuexen CommitDate: 2025-10-13 20:24:52 +0000 tcp: fix KASSERT in HPTS Reviewed by: tuexen Sponsored by: Netflix, Inc. --- sys/netinet/tcp_hpts.c | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index b022cfba451d..fbab912b9a1f 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1486,24 +1486,32 @@ no_run: */ hpts->p_wheel_complete = 1; /* - * Now did we spend too long running input and need to run more? - * Note that if wrap_loop_cnt < 2 then we should have the conditions - * in the KASSERT's true. But if the wheel is behind i.e. wrap_loop_cnt - * is greater than 2, then the condtion most likely are *not* true. - * Also if we are called not from the callout, we don't run the wheel - * multiple times so the slots may not align either. - */ - KASSERT(((hpts->p_prev_slot == hpts->p_cur_slot) || - (hpts->p_on_queue_cnt == 0) || - (wrap_loop_cnt >= 2) || !from_callout), - ("H:%p p_prev_slot:%u not equal to p_cur_slot:%u", hpts, - hpts->p_prev_slot, hpts->p_cur_slot)); - KASSERT((!tcp_hpts_different_slots(cts, cts_last_run) || - (hpts->p_on_queue_cnt == 0) || - (wrap_loop_cnt >= 2) || !from_callout), - ("H:%p cts_last_run:%u not close enough to cts:%u", hpts, - cts_last_run, cts)); - if (from_callout && ((cts - cts_last_run) >= HPTS_USECS_PER_SLOT)) { + * If enough time has elapsed that we should be processing the next + * slot(s), then we should have kept running and not marked the wheel as + * complete. + * + * But there are several other conditions where we would have stopped + * processing, so the prev/cur slots and cts variables won't match. + * These conditions are: + * + * - Calls not from callouts don't run multiple times + * - The wheel is empty + * - We've processed more than max_pacer_loops times + * - We've wrapped more than 2 times + * + * This assert catches when the logic above has violated this design. + * + */ + KASSERT((!from_callout || (hpts->p_on_queue_cnt == 0) || + (loop_cnt > max_pacer_loops) || (wrap_loop_cnt >= 2) || + ((hpts->p_prev_slot == hpts->p_cur_slot) && + !tcp_hpts_different_slots(cts, cts_last_run))), + ("H:%p Shouldn't be done! prev_slot:%u, cur_slot:%u, " + "cts_last_run:%u, cts:%u, loop_cnt:%d, wrap_loop_cnt:%d", + hpts, hpts->p_prev_slot, hpts->p_cur_slot, + cts_last_run, cts, loop_cnt, wrap_loop_cnt)); + + if (from_callout && tcp_hpts_different_slots(cts, cts_last_run)){ cts_last_run = tcp_pace.cts_last_ran[hpts->p_num]; tcp_pace.cts_last_ran[hpts->p_num] = cts = tcp_get_usecs(&tv); hpts->p_cur_slot = cts_to_wheel(cts); From nobody Mon Oct 13 20:28:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clppB0w2lz6CJy5; Mon, 13 Oct 2025 20:28: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 4clppB0FjVz3Sj4; Mon, 13 Oct 2025 20:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yl2wkamah1uZEN5aXtm3X/bOoIHbw9D0O5BUbVA17Ho=; b=J+P7necs98Zh7xzRUUlbAUksiGnrqKLPd+EmEQKnryO7BeeGkHJ/DI/zJDvSx+cnTfFi63 4Lq+nTk1ztnQycjzvzIiqS4qOKzTK8FBCZIInt5V6KmP9AxETzzvk3WvXU2R/5Oo/mMjPY tPuiq0f+3poU098Ll5NO4XlqXmtdmz2iyam7li42dT/J7PKEwNaDMjXsWsQ4X4bEkbGT/e kvwdcsFZ2tyO0Y/OuuXkm/92Ag4Yn7JqmKr/uGG9mTL87oATM0x8ipZO9r7oFGfSB8hQhm gsE07LcMwdCClxW6ggPI+qkoh9QXVPTGMU1VnzhF/9lC1L2VAuNJIR3RQSsaRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yl2wkamah1uZEN5aXtm3X/bOoIHbw9D0O5BUbVA17Ho=; b=BdmlzxIb+a86SM+Yy8vms/qGi/N8YgCa9lNqwYFlRbloapXuHlF21tJS+uQIC2IlzEZ+uf a8oLHGStJlYULjUIT3h7NBbKKbnHjZ0o9VsUWnIr9Vgf4fdlLeOz/4fkcIGiwWZXG5h9Ag yxUg4J4yq5FFjRkyrNp3AUozfCn3r0sUdiVEMURWtxUUGFYIV4ujaKxF83ny2TXolwISrd ciXrdJuwQKi/+pVxDFDqZmqtQ2mdf1OVuGqDH+txMrV7u+G2ulHulpcmEIK2/zPRdnoIcg Oem83gd21Rwr3q45EkEzpErnGjE8TRaeNGUyQIDiFksbCWlM+n2EzKBBvnQZJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760387314; a=rsa-sha256; cv=none; b=Ni0nWd6kvn0VkFmkT26WB+E7sZLgytydaRsS8ibm8yLdE91bj9gRFoXzG4JMSXhPInSSO+ vqnT0N4T+V001l1eSNS5g91gjN9Py663t5mPBeeNSSWY+t0ahPjYTKqcVOwbSoLtpQY2+u fxVQ2GoF1oAi5AGmC5oRcoTM/4gQ4Sej5oIBf/bTzVTCOuG4BNQyTbT+e7H6JDCCXzrC70 jfOuCcY+VxZJLaRhMZkLYt8gkaC8+fdbgFKDooOzr6gKxRJAEUvOK6bXUu8M6/iWUgenMG GPPEBCvadM2CvEZO/YDPXmkbgZEt04/e7ysxiJNUItutJBTDobAN8XBFNs47HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clpp96yfmz63v; Mon, 13 Oct 2025 20:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DKSXCX015039; Mon, 13 Oct 2025 20:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DKSXC1015036; Mon, 13 Oct 2025 20:28:33 GMT (envelope-from git) Date: Mon, 13 Oct 2025 20:28:33 GMT Message-Id: <202510132028.59DKSXC1015036@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 0eef2b4a002a - main - tcp: fix a bug in HPTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0eef2b4a002aace2ac9cc092bee6e10f6332f5ce Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=0eef2b4a002aace2ac9cc092bee6e10f6332f5ce commit 0eef2b4a002aace2ac9cc092bee6e10f6332f5ce Author: Nick Banks AuthorDate: 2025-10-13 20:27:43 +0000 Commit: Michael Tuexen CommitDate: 2025-10-13 20:27:43 +0000 tcp: fix a bug in HPTS Reviewed by: tuexen Sponsored by: Netflix, Inc. --- sys/netinet/tcp_hpts.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index fbab912b9a1f..133703a5ede1 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1445,6 +1445,8 @@ no_one: * more slots (if we did not hit eno-bufs). */ hpts->p_prev_slot = hpts->p_cur_slot; + cts_last_run = cts; + cts = tcp_get_usecs(&tv); if (!from_callout || (loop_cnt > max_pacer_loops)) { /* * Something is serious slow we have @@ -1465,9 +1467,6 @@ no_one: goto no_run; } - cts_last_run = tcp_pace.cts_last_ran[hpts->p_num]; - tcp_pace.cts_last_ran[hpts->p_num] = cts = tcp_get_usecs(&tv); - hpts->p_cur_slot = cts_to_wheel(cts); if (!seen_endpoint) { /* We saw no endpoint but we may be looping */ @@ -1479,6 +1478,7 @@ no_one: goto again; } no_run: + tcp_pace.cts_last_ran[hpts->p_num] = cts; /* * Set flag to tell that we are done for * any slot input that happens during @@ -1511,9 +1511,8 @@ no_run: hpts, hpts->p_prev_slot, hpts->p_cur_slot, cts_last_run, cts, loop_cnt, wrap_loop_cnt)); - if (from_callout && tcp_hpts_different_slots(cts, cts_last_run)){ - cts_last_run = tcp_pace.cts_last_ran[hpts->p_num]; - tcp_pace.cts_last_ran[hpts->p_num] = cts = tcp_get_usecs(&tv); + if (from_callout && tcp_hpts_different_slots(cts, cts_last_run)) { + cts = tcp_get_usecs(&tv); hpts->p_cur_slot = cts_to_wheel(cts); counter_u64_add(hpts_loops, 1); goto again; From nobody Mon Oct 13 20:32:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clpv62FRFz6CK1f; Mon, 13 Oct 2025 20:32: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 4clpv6203gz3T2N; Mon, 13 Oct 2025 20:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ef2c1HADtaDVyG8DO3XD7kuohm0RaqnZQMRVRMpeIkA=; b=okynHs4SxQb7Xur2o01rxYrTIUUibZ66O8LM7g4c8uI9JAdT1qNs2SZcJQV0b231JGAFah hxxr5KPLtpcuG3+xhoydwNtbLh3KeuEEAxt5JHyB4pV2Brb2L8s7l6ssLUwMEtFuhaqChv s+QLjG4nWvDprAOAs4rOyT4rJP+Dd6m71slRwdR/6EhKO04GzjWEewFAKsPFwsTRHWQEge xIHcSGUYU6xrDaFTYcJM9A7FOI6zMmvZnR2f2gx8tE39X5WNH0AceC/LOqwAL3HT2Bjsv1 QvyMov4RfCKgiAG3OEqVgJBS0IkEY4nCaW6UlYVWftQJemgXR54a0GOoTeISEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ef2c1HADtaDVyG8DO3XD7kuohm0RaqnZQMRVRMpeIkA=; b=jZZoKqDw9BUGbiaMGiincfQR3KuwtzpZezdCLwnvi9wsh7dXhE31z02HP6TAQiyatf9w2c atS8bQVVcMEU63VUNmtdtk5Lhi1gDhpuCHelpTd0inN3sydljEL1X5rlbLOOa4vxLu10WB IxTHk8Eew8rdwaXkoe5RwJp/M3dzRnWTu2QoK+4wvuKrqPeLFhosPyrJQD49SaB2vaA1mC Vm3rDdlJt7Baj52/nAzXewlgUPk1Qbm8yrXiaadic6e9d5MjlFIDIbyhn2Nsp1wnFXXB/c DTQbWDevOXtoTEnynGaO3CrRkMBovq0jzfuFZ+PDovQMHT6mDz9A53KQxwYBWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760387570; a=rsa-sha256; cv=none; b=o0+5wSKhhAFiaZ8he+X17s0UibhkWed1hYplpP7Hd70yEx7KSChSgSr3VcgSmmGHnnpdBf ikCzch4muufV1RjqEIB/rT3/uvxqBkQjpvhWVf5TmcvyyG2zzI+hRZSAeIm9xnCVmEo4fw U5ZZ8fcMYiVjPLe7juDTCTY6/QbVY87QrDzpdZf3CDpeBm0dWQc7hTCSy/bPZjphKVgi5h u+atHh0l95ivmD170ei/oJQrbMarZ33nCdj2+ZUsJ6JbRT49l5AHDe0Zm29MqYkrZg+FYb A9vU2ThO/14F7CVUHmXUBcEce8Ul0owIXk/O8/1RzEMGx24a6k8Qwr8xtyuTcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clpv61QZJz701; Mon, 13 Oct 2025 20:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DKWoJp032409; Mon, 13 Oct 2025 20:32:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DKWoqH032406; Mon, 13 Oct 2025 20:32:50 GMT (envelope-from git) Date: Mon, 13 Oct 2025 20:32:50 GMT Message-Id: <202510132032.59DKWoqH032406@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: bfdd5b643d23 - main - tcp: improve testing of HPTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bfdd5b643d23171c53920accc2f15f78e984dfae Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=bfdd5b643d23171c53920accc2f15f78e984dfae commit bfdd5b643d23171c53920accc2f15f78e984dfae Author: Nick Banks AuthorDate: 2025-10-13 20:31:30 +0000 Commit: Michael Tuexen CommitDate: 2025-10-13 20:31:30 +0000 tcp: improve testing of HPTS Improve the HPTS API to allow testing and add several tests. Reviewed by: tuexen Sponsored by: Netflix, Inc. --- sys/conf/NOTES | 1 + sys/conf/options | 1 + sys/netinet/tcp_hpts.c | 758 +++++++++++--------- sys/netinet/tcp_hpts.h | 30 +- sys/netinet/tcp_hpts_test.c | 1616 ++++++++++++++++++++++++++++++++++++++++++- sys/netinet/tcp_lro_hpts.c | 3 + sys/tests/ktest.h | 7 + 7 files changed, 2055 insertions(+), 361 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index ea9b2667607e..a25ee8f6e1af 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -679,6 +679,7 @@ options TCP_OFFLOAD # TCP offload support. options TCP_RFC7413 # TCP Fast Open options TCPHPTS +#options TCP_HPTS_KTEST # Add KTEST support for HPTS # In order to enable IPSEC you MUST also add device crypto to # your kernel configuration diff --git a/sys/conf/options b/sys/conf/options index b48ad1cf42cf..0b795a8d28fb 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -231,6 +231,7 @@ SYSVSEM opt_sysvipc.h SYSVSHM opt_sysvipc.h SW_WATCHDOG opt_watchdog.h TCPHPTS +TCP_HPTS_KTEST opt_inet.h TCP_REQUEST_TRK opt_global.h TCP_ACCOUNTING opt_global.h TCP_BBR opt_inet.h diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 133703a5ede1..2631e79ab034 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -149,27 +149,44 @@ #include #include #include +#include #include #ifdef tcp_offload #include #endif -/* - * The hpts uses a 102400 wheel. The wheel - * defines the time in 10 usec increments (102400 x 10). - * This gives a range of 10usec - 1024ms to place - * an entry within. If the user requests more than - * 1.024 second, a remaineder is attached and the hpts - * when seeing the remainder will re-insert the - * inpcb forward in time from where it is until - * the remainder is zero. - */ +/* Global instance for TCP HPTS */ +struct tcp_hptsi *tcp_hptsi_pace; + +/* Default function table for production use. */ +const struct tcp_hptsi_funcs tcp_hptsi_default_funcs = { + .microuptime = microuptime, + .swi_add = swi_add, + .swi_remove = swi_remove, + .swi_sched = swi_sched, + .intr_event_bind = intr_event_bind, + .intr_event_bind_ithread_cpuset = intr_event_bind_ithread_cpuset, + .callout_init = callout_init, + .callout_reset_sbt_on = callout_reset_sbt_on, + ._callout_stop_safe = _callout_stop_safe, +}; -#define NUM_OF_HPTSI_SLOTS 102400 +#ifdef TCP_HPTS_KTEST +#define microuptime pace->funcs->microuptime +#define swi_add pace->funcs->swi_add +#define swi_remove pace->funcs->swi_remove +#define swi_sched pace->funcs->swi_sched +#define intr_event_bind pace->funcs->intr_event_bind +#define intr_event_bind_ithread_cpuset pace->funcs->intr_event_bind_ithread_cpuset +#define callout_init pace->funcs->callout_init +#define callout_reset_sbt_on pace->funcs->callout_reset_sbt_on +#define _callout_stop_safe pace->funcs->_callout_stop_safe +#endif -/* The number of connections after which the dynamic sleep logic kicks in. */ -#define DEFAULT_CONNECTION_THRESHOLD 100 +static MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts"); + +static void tcp_hpts_thread(void *ctx); /* * When using the hpts, a TCP stack must make sure @@ -212,75 +229,14 @@ * */ -/* Each hpts has its own p_mtx which is used for locking */ -#define HPTS_MTX_ASSERT(hpts) mtx_assert(&(hpts)->p_mtx, MA_OWNED) -#define HPTS_LOCK(hpts) mtx_lock(&(hpts)->p_mtx) -#define HPTS_TRYLOCK(hpts) mtx_trylock(&(hpts)->p_mtx) -#define HPTS_UNLOCK(hpts) mtx_unlock(&(hpts)->p_mtx) -struct tcp_hpts_entry { - /* Cache line 0x00 */ - struct mtx p_mtx; /* Mutex for hpts */ - struct timeval p_mysleep; /* Our min sleep time */ - uint64_t syscall_cnt; - uint64_t sleeping; /* What the actual sleep was (if sleeping) */ - uint16_t p_hpts_active; /* Flag that says hpts is awake */ - uint8_t p_wheel_complete; /* have we completed the wheel arc walk? */ - uint32_t p_runningslot; /* Current slot we are at if we are running */ - uint32_t p_prev_slot; /* Previous slot we were on */ - uint32_t p_cur_slot; /* Current slot in wheel hpts is draining */ - uint32_t p_nxt_slot; /* The next slot outside the current range of - * slots that the hpts is running on. */ - int32_t p_on_queue_cnt; /* Count on queue in this hpts */ - uint8_t p_direct_wake :1, /* boolean */ - p_on_min_sleep:1, /* boolean */ - p_hpts_wake_scheduled:1, /* boolean */ - hit_callout_thresh:1, - p_avail:4; - uint8_t p_fill[3]; /* Fill to 32 bits */ - /* Cache line 0x40 */ - struct hptsh { - TAILQ_HEAD(, tcpcb) head; - uint32_t count; - uint32_t gencnt; - } *p_hptss; /* Hptsi wheel */ - uint32_t p_hpts_sleep_time; /* Current sleep interval having a max - * of 255ms */ - uint32_t overidden_sleep; /* what was overrided by min-sleep for logging */ - uint32_t saved_curslot; /* for logging */ - uint32_t saved_prev_slot; /* for logging */ - uint32_t p_delayed_by; /* How much were we delayed by */ - /* Cache line 0x80 */ - struct sysctl_ctx_list hpts_ctx; - struct sysctl_oid *hpts_root; - struct intr_event *ie; - void *ie_cookie; - uint16_t p_num; /* The hpts number one per cpu */ - uint16_t p_cpu; /* The hpts CPU */ - /* There is extra space in here */ - /* Cache line 0x100 */ - struct callout co __aligned(CACHE_LINE_SIZE); -} __aligned(CACHE_LINE_SIZE); - -static struct tcp_hptsi { - struct cpu_group **grps; - struct tcp_hpts_entry **rp_ent; /* Array of hptss */ - uint32_t *cts_last_ran; - uint32_t grp_cnt; - uint32_t rp_num_hptss; /* Number of hpts threads */ -} tcp_pace; - -static MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts"); #ifdef RSS -static int tcp_bind_threads = 1; +int tcp_bind_threads = 1; #else -static int tcp_bind_threads = 2; +int tcp_bind_threads = 2; #endif static int tcp_use_irq_cpu = 0; static int hpts_does_tp_logging = 0; - -static int32_t tcp_hptsi(struct tcp_hpts_entry *hpts, bool from_callout); -static void tcp_hpts_thread(void *ctx); - +static int32_t tcp_hpts_precision = 120; int32_t tcp_min_hptsi_time = DEFAULT_MIN_SLEEP; static int conn_cnt_thresh = DEFAULT_CONNECTION_THRESHOLD; static int32_t dynamic_min_sleep = DYNAMIC_MIN_SLEEP; @@ -291,23 +247,6 @@ SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hpts, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, SYSCTL_NODE(_net_inet_tcp_hpts, OID_AUTO, stats, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "TCP Hpts statistics"); -#define timersub(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ - if ((vvp)->tv_usec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_usec += 1000000; \ - } \ - } while (0) - -static int32_t tcp_hpts_precision = 120; - -static struct hpts_domain_info { - int count; - int cpu[MAXCPU]; -} hpts_domains[MAXMEMDOM]; - counter_u64_t hpts_hopelessly_behind; SYSCTL_COUNTER_U64(_net_inet_tcp_hpts_stats, OID_AUTO, hopeless, CTLFLAG_RD, @@ -455,14 +394,14 @@ SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, nowake_over_thresh, CTLFLAG_RW, &tcp_hpts_no_wake_over_thresh, 0, "When we are over the threshold on the pacer do we prohibit wakeups?"); -static uint16_t -hpts_random_cpu(void) +uint16_t +tcp_hptsi_random_cpu(struct tcp_hptsi *pace) { uint16_t cpuid; uint32_t ran; ran = arc4random(); - cpuid = (((ran & 0xffff) % mp_ncpus) % tcp_pace.rp_num_hptss); + cpuid = (((ran & 0xffff) % mp_ncpus) % pace->rp_num_hptss); return (cpuid); } @@ -504,11 +443,67 @@ tcp_hpts_log(struct tcp_hpts_entry *hpts, struct tcpcb *tp, struct timeval *tv, } } +/* + * Timeout handler for the HPTS sleep callout. It immediately schedules the SWI + * for the HPTS entry to run. + */ static void -tcp_wakehpts(struct tcp_hpts_entry *hpts) +tcp_hpts_sleep_timeout(void *arg) { +#ifdef TCP_HPTS_KTEST + struct tcp_hptsi *pace; +#endif + struct tcp_hpts_entry *hpts; + + hpts = (struct tcp_hpts_entry *)arg; +#ifdef TCP_HPTS_KTEST + pace = hpts->p_hptsi; +#endif + swi_sched(hpts->ie_cookie, 0); +} + +/* + * Reset the HPTS callout timer with the provided timeval. Returns the results + * of the callout_reset_sbt_on() function. + */ +static int +tcp_hpts_sleep(struct tcp_hpts_entry *hpts, struct timeval *tv) +{ +#ifdef TCP_HPTS_KTEST + struct tcp_hptsi *pace; +#endif + sbintime_t sb; + +#ifdef TCP_HPTS_KTEST + pace = hpts->p_hptsi; +#endif + + /* Store off to make visible the actual sleep time */ + hpts->sleeping = tv->tv_usec; + + sb = tvtosbt(*tv); + return (callout_reset_sbt_on( + &hpts->co, sb, 0, tcp_hpts_sleep_timeout, hpts, hpts->p_cpu, + (C_DIRECT_EXEC | C_PREL(tcp_hpts_precision)))); +} + +/* + * Schedules the SWI for the HTPS entry to run, if not already scheduled or + * running. + */ +void +tcp_hpts_wake(struct tcp_hpts_entry *hpts) +{ +#ifdef TCP_HPTS_KTEST + struct tcp_hptsi *pace; +#endif + HPTS_MTX_ASSERT(hpts); +#ifdef TCP_HPTS_KTEST + pace = hpts->p_hptsi; +#endif + if (tcp_hpts_no_wake_over_thresh && (hpts->p_on_queue_cnt >= conn_cnt_thresh)) { hpts->p_direct_wake = 0; return; @@ -519,15 +514,6 @@ tcp_wakehpts(struct tcp_hpts_entry *hpts) } } -static void -hpts_timeout_swi(void *arg) -{ - struct tcp_hpts_entry *hpts; - - hpts = (struct tcp_hpts_entry *)arg; - swi_sched(hpts->ie_cookie, 0); -} - static void tcp_hpts_insert_internal(struct tcpcb *tp, struct tcp_hpts_entry *hpts) { @@ -556,13 +542,13 @@ tcp_hpts_insert_internal(struct tcpcb *tp, struct tcp_hpts_entry *hpts) } static struct tcp_hpts_entry * -tcp_hpts_lock(struct tcpcb *tp) +tcp_hpts_lock(struct tcp_hptsi *pace, struct tcpcb *tp) { struct tcp_hpts_entry *hpts; INP_LOCK_ASSERT(tptoinpcb(tp)); - hpts = tcp_pace.rp_ent[tp->t_hpts_cpu]; + hpts = pace->rp_ent[tp->t_hpts_cpu]; HPTS_LOCK(hpts); return (hpts); @@ -589,11 +575,10 @@ tcp_hpts_release(struct tcpcb *tp) * and has never received a first packet. */ void -tcp_hpts_init(struct tcpcb *tp) +__tcp_hpts_init(struct tcp_hptsi *pace, struct tcpcb *tp) { - if (__predict_true(tp->t_hpts_cpu == HPTS_CPU_NONE)) { - tp->t_hpts_cpu = hpts_random_cpu(); + tp->t_hpts_cpu = tcp_hptsi_random_cpu(pace); MPASS(!(tp->t_flags2 & TF2_HPTS_CPU_SET)); } } @@ -605,14 +590,14 @@ tcp_hpts_init(struct tcpcb *tp) * INP lock and then get the hpts lock. */ void -tcp_hpts_remove(struct tcpcb *tp) +__tcp_hpts_remove(struct tcp_hptsi *pace, struct tcpcb *tp) { struct tcp_hpts_entry *hpts; struct hptsh *hptsh; INP_WLOCK_ASSERT(tptoinpcb(tp)); - hpts = tcp_hpts_lock(tp); + hpts = tcp_hpts_lock(pace, tp); if (tp->t_in_hpts == IHPTS_ONQUEUE) { hptsh = &hpts->p_hptss[tp->t_hpts_slot]; tp->t_hpts_request = 0; @@ -847,10 +832,11 @@ check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct tcpcb *tp, void #ifdef INVARIANTS -__tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, int32_t line, - struct hpts_diag *diag) +__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t slot, + int32_t line, struct hpts_diag *diag) #else -tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) +__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t slot, + struct hpts_diag *diag) #endif { struct tcp_hpts_entry *hpts; @@ -868,7 +854,7 @@ tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) * current run (if up) or where it was when it stopped if it is * sleeping. */ - hpts = tcp_hpts_lock(tp); + hpts = tcp_hpts_lock(pace, tp); microuptime(&tv); if (diag) { memset(diag, 0, sizeof(struct hpts_diag)); @@ -903,7 +889,7 @@ tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) * timeout is not 1. */ hpts->p_direct_wake = 1; - tcp_wakehpts(hpts); + tcp_hpts_wake(hpts); } HPTS_UNLOCK(hpts); @@ -991,7 +977,7 @@ tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) */ if (need_wakeup) { hpts->p_direct_wake = 1; - tcp_wakehpts(hpts); + tcp_hpts_wake(hpts); if (diag) { diag->need_new_to = 0; diag->co_ret = 0xffff0000; @@ -999,7 +985,6 @@ tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) } else if (need_new_to) { int32_t co_ret; struct timeval tv; - sbintime_t sb; tv.tv_sec = 0; tv.tv_usec = 0; @@ -1007,11 +992,8 @@ tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) tv.tv_sec++; need_new_to -= HPTS_USEC_IN_SEC; } - tv.tv_usec = need_new_to; - sb = tvtosbt(tv); - co_ret = callout_reset_sbt_on(&hpts->co, sb, 0, - hpts_timeout_swi, hpts, hpts->p_cpu, - (C_DIRECT_EXEC | C_PREL(tcp_hpts_precision))); + tv.tv_usec = need_new_to; /* XXX: Why is this sleeping over the max? */ + co_ret = tcp_hpts_sleep(hpts, &tv); if (diag) { diag->need_new_to = need_new_to; diag->co_ret = co_ret; @@ -1021,7 +1003,7 @@ tcp_hpts_insert(struct tcpcb *tp, uint32_t slot, struct hpts_diag *diag) } static uint16_t -hpts_cpuid(struct tcpcb *tp, int *failed) +hpts_cpuid(struct tcp_hptsi *pace, struct tcpcb *tp, int *failed) { struct inpcb *inp = tptoinpcb(tp); u_int cpuid; @@ -1048,7 +1030,7 @@ hpts_cpuid(struct tcpcb *tp, int *failed) #ifdef RSS cpuid = rss_hash2cpuid(inp->inp_flowid, inp->inp_flowtype); if (cpuid == NETISR_CPUID_NONE) - return (hpts_random_cpu()); + return (tcp_hptsi_random_cpu(pace)); else return (cpuid); #endif @@ -1059,7 +1041,7 @@ hpts_cpuid(struct tcpcb *tp, int *failed) */ if (inp->inp_flowtype == M_HASHTYPE_NONE) { counter_u64_add(cpu_uses_random, 1); - return (hpts_random_cpu()); + return (tcp_hptsi_random_cpu(pace)); } /* * Hash to a thread based on the flowid. If we are using numa, @@ -1074,7 +1056,7 @@ hpts_cpuid(struct tcpcb *tp, int *failed) #ifdef NUMA } else { /* Hash into the cpu's that use that domain */ - di = &hpts_domains[inp->inp_numa_domain]; + di = &pace->domains[inp->inp_numa_domain]; cpuid = di->cpu[inp->inp_flowid % di->count]; } #endif @@ -1112,9 +1094,10 @@ tcp_hpts_different_slots(uint32_t cts, uint32_t cts_last_run) return ((cts / HPTS_USECS_PER_SLOT) != (cts_last_run / HPTS_USECS_PER_SLOT)); } -static int32_t +int32_t tcp_hptsi(struct tcp_hpts_entry *hpts, bool from_callout) { + struct tcp_hptsi *pace; struct tcpcb *tp; struct timeval tv; int32_t slots_to_run, i, error; @@ -1132,12 +1115,17 @@ tcp_hptsi(struct tcp_hpts_entry *hpts, bool from_callout) HPTS_MTX_ASSERT(hpts); NET_EPOCH_ASSERT(); + + pace = hpts->p_hptsi; + MPASS(pace != NULL); + /* record previous info for any logging */ hpts->saved_curslot = hpts->p_cur_slot; hpts->saved_prev_slot = hpts->p_prev_slot; - cts_last_run = tcp_pace.cts_last_ran[hpts->p_num]; - tcp_pace.cts_last_ran[hpts->p_num] = cts = tcp_get_usecs(&tv); + microuptime(&tv); + cts_last_run = pace->cts_last_ran[hpts->p_cpu]; + pace->cts_last_ran[hpts->p_cpu] = cts = tcp_tv_to_usec(&tv); orig_exit_slot = hpts->p_cur_slot = cts_to_wheel(cts); if ((hpts->p_on_queue_cnt == 0) || @@ -1383,7 +1371,7 @@ again: * gets added to the hpts (not this one) * :-) */ - tcp_set_hpts(tp); + __tcp_set_hpts(pace, tp); } CURVNET_SET(inp->inp_vnet); /* Lets do any logging that we might want to */ @@ -1445,8 +1433,9 @@ no_one: * more slots (if we did not hit eno-bufs). */ hpts->p_prev_slot = hpts->p_cur_slot; + microuptime(&tv); cts_last_run = cts; - cts = tcp_get_usecs(&tv); + cts = tcp_tv_to_usec(&tv); if (!from_callout || (loop_cnt > max_pacer_loops)) { /* * Something is serious slow we have @@ -1478,7 +1467,7 @@ no_one: goto again; } no_run: - tcp_pace.cts_last_ran[hpts->p_num] = cts; + pace->cts_last_ran[hpts->p_cpu] = cts; /* * Set flag to tell that we are done for * any slot input that happens during @@ -1512,7 +1501,8 @@ no_run: cts_last_run, cts, loop_cnt, wrap_loop_cnt)); if (from_callout && tcp_hpts_different_slots(cts, cts_last_run)) { - cts = tcp_get_usecs(&tv); + microuptime(&tv); + cts = tcp_tv_to_usec(&tv); hpts->p_cur_slot = cts_to_wheel(cts); counter_u64_add(hpts_loops, 1); goto again; @@ -1528,16 +1518,16 @@ no_run: } void -tcp_set_hpts(struct tcpcb *tp) +__tcp_set_hpts(struct tcp_hptsi *pace, struct tcpcb *tp) { struct tcp_hpts_entry *hpts; int failed; INP_WLOCK_ASSERT(tptoinpcb(tp)); - hpts = tcp_hpts_lock(tp); + hpts = tcp_hpts_lock(pace, tp); if (tp->t_in_hpts == IHPTS_NONE && !(tp->t_flags2 & TF2_HPTS_CPU_SET)) { - tp->t_hpts_cpu = hpts_cpuid(tp, &failed); + tp->t_hpts_cpu = hpts_cpuid(pace, tp, &failed); if (failed == 0) tp->t_flags2 |= TF2_HPTS_CPU_SET; } @@ -1545,33 +1535,35 @@ tcp_set_hpts(struct tcpcb *tp) } static struct tcp_hpts_entry * -tcp_choose_hpts_to_run(void) +tcp_choose_hpts_to_run(struct tcp_hptsi *pace) { + struct timeval tv; int i, oldest_idx, start, end; uint32_t cts, time_since_ran, calc; - cts = tcp_get_usecs(NULL); + microuptime(&tv); + cts = tcp_tv_to_usec(&tv); time_since_ran = 0; /* Default is all one group */ start = 0; - end = tcp_pace.rp_num_hptss; + end = pace->rp_num_hptss; /* * If we have more than one L3 group figure out which one * this CPU is in. */ - if (tcp_pace.grp_cnt > 1) { - for (i = 0; i < tcp_pace.grp_cnt; i++) { - if (CPU_ISSET(curcpu, &tcp_pace.grps[i]->cg_mask)) { - start = tcp_pace.grps[i]->cg_first; - end = (tcp_pace.grps[i]->cg_last + 1); + if (pace->grp_cnt > 1) { + for (i = 0; i < pace->grp_cnt; i++) { + if (CPU_ISSET(curcpu, &pace->grps[i]->cg_mask)) { + start = pace->grps[i]->cg_first; + end = (pace->grps[i]->cg_last + 1); break; } } } oldest_idx = -1; for (i = start; i < end; i++) { - if (TSTMP_GT(cts, tcp_pace.cts_last_ran[i])) - calc = cts - tcp_pace.cts_last_ran[i]; + if (TSTMP_GT(cts, pace->cts_last_ran[i])) + calc = cts - pace->cts_last_ran[i]; else calc = 0; if (calc > time_since_ran) { @@ -1580,9 +1572,9 @@ tcp_choose_hpts_to_run(void) } } if (oldest_idx >= 0) - return(tcp_pace.rp_ent[oldest_idx]); + return(pace->rp_ent[oldest_idx]); else - return(tcp_pace.rp_ent[(curcpu % tcp_pace.rp_num_hptss)]); + return(pace->rp_ent[(curcpu % pace->rp_num_hptss)]); } static void @@ -1592,7 +1584,7 @@ __tcp_run_hpts(void) struct tcp_hpts_entry *hpts; int slots_ran; - hpts = tcp_choose_hpts_to_run(); + hpts = tcp_choose_hpts_to_run(tcp_hptsi_pace); if (hpts->p_hpts_active) { /* Already active */ @@ -1613,7 +1605,6 @@ __tcp_run_hpts(void) if (hpts->p_on_queue_cnt >= conn_cnt_thresh) { if (slots_ran > slots_indicate_less_sleep) { struct timeval tv; - sbintime_t sb; hpts->p_mysleep.tv_usec /= 2; if (hpts->p_mysleep.tv_usec < dynamic_min_sleep) @@ -1637,12 +1628,7 @@ __tcp_run_hpts(void) * the dynamic value and set the on_min_sleep * flag so we will not be awoken. */ - sb = tvtosbt(tv); - /* Store off to make visible the actual sleep time */ - hpts->sleeping = tv.tv_usec; - callout_reset_sbt_on(&hpts->co, sb, 0, - hpts_timeout_swi, hpts, hpts->p_cpu, - (C_DIRECT_EXEC | C_PREL(tcp_hpts_precision))); + (void)tcp_hpts_sleep(hpts, &tv); } else if (slots_ran < slots_indicate_more_sleep) { /* For the further sleep, don't reschedule hpts */ hpts->p_mysleep.tv_usec *= 2; @@ -1660,17 +1646,22 @@ out_with_mtx: static void tcp_hpts_thread(void *ctx) { +#ifdef TCP_HPTS_KTEST + struct tcp_hptsi *pace; +#endif struct tcp_hpts_entry *hpts; struct epoch_tracker et; struct timeval tv; - sbintime_t sb; int slots_ran; hpts = (struct tcp_hpts_entry *)ctx; +#ifdef TCP_HPTS_KTEST + pace = hpts->p_hptsi; +#endif HPTS_LOCK(hpts); if (hpts->p_direct_wake) { /* Signaled by input or output with low occupancy count. */ - callout_stop(&hpts->co); + _callout_stop_safe(&hpts->co, 0); counter_u64_add(hpts_direct_awakening, 1); } else { /* Timed out, the normal case. */ @@ -1799,18 +1790,11 @@ tcp_hpts_thread(void *ctx) hpts->p_hpts_active = 0; back_to_sleep: hpts->p_direct_wake = 0; - sb = tvtosbt(tv); - /* Store off to make visible the actual sleep time */ - hpts->sleeping = tv.tv_usec; - callout_reset_sbt_on(&hpts->co, sb, 0, - hpts_timeout_swi, hpts, hpts->p_cpu, - (C_DIRECT_EXEC | C_PREL(tcp_hpts_precision))); + (void)tcp_hpts_sleep(hpts, &tv); NET_EPOCH_EXIT(et); HPTS_UNLOCK(hpts); } -#undef timersub - static int32_t hpts_count_level(struct cpu_group *cg) { @@ -1847,57 +1831,63 @@ hpts_gather_grps(struct cpu_group **grps, int32_t *at, int32_t max, struct cpu_g } } -static void -tcp_hpts_mod_load(void) +/* + * Initialize a tcp_hptsi structure. This performs the core initialization + * without starting threads. + */ +struct tcp_hptsi* +tcp_hptsi_create(const struct tcp_hptsi_funcs *funcs, bool enable_sysctl) { + struct tcp_hptsi *pace; struct cpu_group *cpu_top; - int32_t error __diagused; - int32_t i, j, bound = 0, created = 0; + uint32_t i, j, cts; + int32_t count; size_t sz, asz; struct timeval tv; - sbintime_t sb; struct tcp_hpts_entry *hpts; - struct pcpu *pc; char unit[16]; uint32_t ncpus = mp_ncpus ? mp_ncpus : MAXCPU; - int count, domain; + KASSERT(funcs != NULL, ("funcs is NULL")); + + /* Allocate the main structure */ + pace = malloc(sizeof(struct tcp_hptsi), M_TCPHPTS, M_WAITOK | M_ZERO); + if (pace == NULL) + return (NULL); + + memset(pace, 0, sizeof(*pace)); + pace->funcs = funcs; + + /* Setup CPU topology information */ #ifdef SMP cpu_top = smp_topo(); #else cpu_top = NULL; #endif - tcp_pace.rp_num_hptss = ncpus; - hpts_hopelessly_behind = counter_u64_alloc(M_WAITOK); - hpts_loops = counter_u64_alloc(M_WAITOK); - back_tosleep = counter_u64_alloc(M_WAITOK); - combined_wheel_wrap = counter_u64_alloc(M_WAITOK); - wheel_wrap = counter_u64_alloc(M_WAITOK); - hpts_wake_timeout = counter_u64_alloc(M_WAITOK); - hpts_direct_awakening = counter_u64_alloc(M_WAITOK); - hpts_back_tosleep = counter_u64_alloc(M_WAITOK); - hpts_direct_call = counter_u64_alloc(M_WAITOK); - cpu_uses_flowid = counter_u64_alloc(M_WAITOK); - cpu_uses_random = counter_u64_alloc(M_WAITOK); + pace->rp_num_hptss = ncpus; - sz = (tcp_pace.rp_num_hptss * sizeof(struct tcp_hpts_entry *)); - tcp_pace.rp_ent = malloc(sz, M_TCPHPTS, M_WAITOK | M_ZERO); - sz = (sizeof(uint32_t) * tcp_pace.rp_num_hptss); - tcp_pace.cts_last_ran = malloc(sz, M_TCPHPTS, M_WAITOK); - tcp_pace.grp_cnt = 0; + /* Allocate hpts entry array */ + sz = (pace->rp_num_hptss * sizeof(struct tcp_hpts_entry *)); + pace->rp_ent = malloc(sz, M_TCPHPTS, M_WAITOK | M_ZERO); + + /* Allocate timestamp tracking array */ + sz = (sizeof(uint32_t) * pace->rp_num_hptss); + pace->cts_last_ran = malloc(sz, M_TCPHPTS, M_WAITOK); + + /* Setup CPU groups */ if (cpu_top == NULL) { - tcp_pace.grp_cnt = 1; + pace->grp_cnt = 1; } else { /* Find out how many cache level 3 domains we have */ count = 0; - tcp_pace.grp_cnt = hpts_count_level(cpu_top); - if (tcp_pace.grp_cnt == 0) { - tcp_pace.grp_cnt = 1; + pace->grp_cnt = hpts_count_level(cpu_top); + if (pace->grp_cnt == 0) { + pace->grp_cnt = 1; } - sz = (tcp_pace.grp_cnt * sizeof(struct cpu_group *)); - tcp_pace.grps = malloc(sz, M_TCPHPTS, M_WAITOK); + sz = (pace->grp_cnt * sizeof(struct cpu_group *)); + pace->grps = malloc(sz, M_TCPHPTS, M_WAITOK); /* Now populate the groups */ - if (tcp_pace.grp_cnt == 1) { + if (pace->grp_cnt == 1) { /* * All we need is the top level all cpu's are in * the same cache so when we use grp[0]->cg_mask @@ -1905,188 +1895,290 @@ tcp_hpts_mod_load(void) * all cpu's in it. The level here is probably * zero which is ok. */ - tcp_pace.grps[0] = cpu_top; + pace->grps[0] = cpu_top; } else { /* * Here we must find all the level three cache domains * and setup our pointers to them. */ count = 0; - hpts_gather_grps(tcp_pace.grps, &count, tcp_pace.grp_cnt, cpu_top); + hpts_gather_grps(pace->grps, &count, pace->grp_cnt, cpu_top); } } + + /* Cache the current time for initializing the hpts entries */ + microuptime(&tv); + cts = tcp_tv_to_usec(&tv); + + /* Initialize each hpts entry */ asz = sizeof(struct hptsh) * NUM_OF_HPTSI_SLOTS; - for (i = 0; i < tcp_pace.rp_num_hptss; i++) { - tcp_pace.rp_ent[i] = malloc(sizeof(struct tcp_hpts_entry), + for (i = 0; i < pace->rp_num_hptss; i++) { + pace->rp_ent[i] = malloc(sizeof(struct tcp_hpts_entry), M_TCPHPTS, M_WAITOK | M_ZERO); - tcp_pace.rp_ent[i]->p_hptss = malloc(asz, M_TCPHPTS, M_WAITOK); - hpts = tcp_pace.rp_ent[i]; - /* - * Init all the hpts structures that are not specifically - * zero'd by the allocations. Also lets attach them to the - * appropriate sysctl block as well. - */ - mtx_init(&hpts->p_mtx, "tcp_hpts_lck", - "hpts", MTX_DEF | MTX_DUPOK); - for (j = 0; j < NUM_OF_HPTSI_SLOTS; j++) { - TAILQ_INIT(&hpts->p_hptss[j].head); - hpts->p_hptss[j].count = 0; - hpts->p_hptss[j].gencnt = 0; - } - sysctl_ctx_init(&hpts->hpts_ctx); - sprintf(unit, "%d", i); - hpts->hpts_root = SYSCTL_ADD_NODE(&hpts->hpts_ctx, - SYSCTL_STATIC_CHILDREN(_net_inet_tcp_hpts), - OID_AUTO, - unit, - CTLFLAG_RW | CTLFLAG_MPSAFE, 0, - ""); - SYSCTL_ADD_INT(&hpts->hpts_ctx, - SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "out_qcnt", CTLFLAG_RD, - &hpts->p_on_queue_cnt, 0, - "Count TCB's awaiting output processing"); - SYSCTL_ADD_U16(&hpts->hpts_ctx, - SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "active", CTLFLAG_RD, - &hpts->p_hpts_active, 0, - "Is the hpts active"); - SYSCTL_ADD_UINT(&hpts->hpts_ctx, - SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "curslot", CTLFLAG_RD, - &hpts->p_cur_slot, 0, - "What the current running pacers goal"); - SYSCTL_ADD_UINT(&hpts->hpts_ctx, - SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "runslot", CTLFLAG_RD, - &hpts->p_runningslot, 0, - "What the running pacers current slot is"); - SYSCTL_ADD_UINT(&hpts->hpts_ctx, - SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "lastran", CTLFLAG_RD, - &tcp_pace.cts_last_ran[i], 0, - "The last usec timestamp that this hpts ran"); - SYSCTL_ADD_LONG(&hpts->hpts_ctx, - SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "cur_min_sleep", CTLFLAG_RD, - &hpts->p_mysleep.tv_usec, - "What the running pacers is using for p_mysleep.tv_usec"); - SYSCTL_ADD_U64(&hpts->hpts_ctx, - SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "now_sleeping", CTLFLAG_RD, - &hpts->sleeping, 0, - "What the running pacers is actually sleeping for"); - SYSCTL_ADD_U64(&hpts->hpts_ctx, - SYSCTL_CHILDREN(hpts->hpts_root), - OID_AUTO, "syscall_cnt", CTLFLAG_RD, - &hpts->syscall_cnt, 0, - "How many times we had syscalls on this hpts"); + pace->rp_ent[i]->p_hptss = malloc(asz, M_TCPHPTS, + M_WAITOK | M_ZERO); + hpts = pace->rp_ent[i]; + /* Basic initialization */ hpts->p_hpts_sleep_time = hpts_sleep_max; - hpts->p_num = i; - tcp_pace.cts_last_ran[i] = tcp_get_u64_usecs(&tv); - hpts->p_cur_slot = cts_to_wheel(tcp_pace.cts_last_ran[i]); + hpts->p_cpu = i; + pace->cts_last_ran[i] = cts; + hpts->p_cur_slot = cts_to_wheel(cts); hpts->p_prev_slot = hpts->p_cur_slot; - hpts->p_cpu = 0xffff; hpts->p_nxt_slot = hpts_slot(hpts->p_cur_slot, 1); callout_init(&hpts->co, 1); + hpts->p_hptsi = pace; + mtx_init(&hpts->p_mtx, "tcp_hpts_lck", "hpts", + MTX_DEF | MTX_DUPOK); + for (j = 0; j < NUM_OF_HPTSI_SLOTS; j++) { + TAILQ_INIT(&hpts->p_hptss[j].head); + } + + /* Setup SYSCTL if requested */ + if (enable_sysctl) { + sysctl_ctx_init(&hpts->hpts_ctx); + sprintf(unit, "%d", i); + hpts->hpts_root = SYSCTL_ADD_NODE(&hpts->hpts_ctx, + SYSCTL_STATIC_CHILDREN(_net_inet_tcp_hpts), + OID_AUTO, + unit, + CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + ""); + SYSCTL_ADD_INT(&hpts->hpts_ctx, + SYSCTL_CHILDREN(hpts->hpts_root), + OID_AUTO, "out_qcnt", CTLFLAG_RD, + &hpts->p_on_queue_cnt, 0, + "Count TCB's awaiting output processing"); + SYSCTL_ADD_U16(&hpts->hpts_ctx, + SYSCTL_CHILDREN(hpts->hpts_root), + OID_AUTO, "active", CTLFLAG_RD, + &hpts->p_hpts_active, 0, + "Is the hpts active"); + SYSCTL_ADD_UINT(&hpts->hpts_ctx, + SYSCTL_CHILDREN(hpts->hpts_root), + OID_AUTO, "curslot", CTLFLAG_RD, + &hpts->p_cur_slot, 0, + "What the current running pacers goal"); + SYSCTL_ADD_UINT(&hpts->hpts_ctx, + SYSCTL_CHILDREN(hpts->hpts_root), + OID_AUTO, "runslot", CTLFLAG_RD, + &hpts->p_runningslot, 0, + "What the running pacers current slot is"); + SYSCTL_ADD_UINT(&hpts->hpts_ctx, + SYSCTL_CHILDREN(hpts->hpts_root), + OID_AUTO, "lastran", CTLFLAG_RD, + &pace->cts_last_ran[i], 0, + "The last usec timestamp that this hpts ran"); + SYSCTL_ADD_LONG(&hpts->hpts_ctx, + SYSCTL_CHILDREN(hpts->hpts_root), + OID_AUTO, "cur_min_sleep", CTLFLAG_RD, + &hpts->p_mysleep.tv_usec, + "What the running pacers is using for p_mysleep.tv_usec"); + SYSCTL_ADD_U64(&hpts->hpts_ctx, + SYSCTL_CHILDREN(hpts->hpts_root), + OID_AUTO, "now_sleeping", CTLFLAG_RD, + &hpts->sleeping, 0, + "What the running pacers is actually sleeping for"); + SYSCTL_ADD_U64(&hpts->hpts_ctx, + SYSCTL_CHILDREN(hpts->hpts_root), + OID_AUTO, "syscall_cnt", CTLFLAG_RD, + &hpts->syscall_cnt, 0, + "How many times we had syscalls on this hpts"); + } } - /* Don't try to bind to NUMA domains if we don't have any */ - if (vm_ndomains == 1 && tcp_bind_threads == 2) - tcp_bind_threads = 0; - /* - * Now lets start ithreads to handle the hptss. - */ - for (i = 0; i < tcp_pace.rp_num_hptss; i++) { - hpts = tcp_pace.rp_ent[i]; - hpts->p_cpu = i; + return (pace); +} + +/* + * Create threads for a tcp_hptsi structure and starts timers for the current + * (minimum) sleep interval. + */ +void +tcp_hptsi_start(struct tcp_hptsi *pace) +{ + struct tcp_hpts_entry *hpts; + struct pcpu *pc; + struct timeval tv; + uint32_t i, j; + int count, domain; + int error __diagused; + + KASSERT(pace != NULL, ("tcp_hptsi_start: pace is NULL")); + + /* Start threads for each hpts entry */ + for (i = 0; i < pace->rp_num_hptss; i++) { + hpts = pace->rp_ent[i]; + + KASSERT(hpts->ie_cookie == NULL, + ("tcp_hptsi_start: hpts[%d]->ie_cookie is not NULL", i)); error = swi_add(&hpts->ie, "hpts", *** 2014 LINES SKIPPED *** From nobody Mon Oct 13 20:37:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clq0m5x8xz6CKdh; Mon, 13 Oct 2025 20:37: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 4clq0m5NVxz3Tpd; Mon, 13 Oct 2025 20:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ly7VXwyNhSOrD7ImpzZMN/Bb+1osRfNbRA1Q1pn5aq4=; b=ih27zhsRFjle6CZkPAH2F63B5ASYRjty0CXDXbaPZEPUKD3G1f1mmBC+h39JeA2gT5f/66 9p6C8UV+enj4pIemtDodDkbgzGNmjogZTQkOp8imFCSGvr68XB+MguXi3/fDcDZPhYuSGX mti8PQHuIaG142DBKTZv12C1h92NaHIAQYw0u6yBTF5zFJVf+6pHnCOQZgzNBNS7HffAqR uDBCOcKh43qzNW67kVenryNwF+eIYqEOlIthxE3b2yPdtYKvf/7rpwUE/CIaLNmEHyQgKN +ipAnD4Rr+NKeo7P12s0itdzoTlJ+pcaB4EQIK89NxqM7dyVvbfuyWfDQyzgsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ly7VXwyNhSOrD7ImpzZMN/Bb+1osRfNbRA1Q1pn5aq4=; b=QLXrE7BITK9ysW20wGAapgVe+2+Eomn4UssmZie++jnX98F70OgQ3XNHGKV94v9CLyvRWW AUOWzGq0xbjm/vQT+JPsDsmGPzW2C5s5T9jbWWfG+SnKhSBCyJYPtaRceD/3nOY35ibBZo UDWY+2lxU+/grpGAadakKetMfSXTKVYzZdiQnOp6nUjj5Fvkoh75G8cLo1JuFIp0Bmjhzm AsVu+QO1WDGPmpimQEOaRsy+5J8PFZstxz+ct7IDYZWeBTIdlwWw8e2LbKNlth6CRxdFUk zAGwLKMDVasXHGxtUOoM/LGgJ9NcrVQPws8nFmqcc1F2+5qm0D/ZQU7jsnmWtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760387864; a=rsa-sha256; cv=none; b=w3gvw2CtxMc61glUPgWgi5LjpWEfx9VQt3JZcyKftQhKOWGDsPLZkOLEFe3YkoPfryD5By uThUUrDclIULFxN8lcT21EVifaYqt6RCYF2aTdTXtvciep7vhvQM9+oNKWncA8sc9X/P3i lFVh0/m56R8n7ZcsuYT9CNoAC8KHwDNeYZQTTlVfIYFxKO28O3cd2EGhj4qri66JNlyRqL HbdSxc3cJCLK24XEP2hsTaaT+2EQT6dGxKgcNl4L33b1dRtjKU+UsizWlIVzACZZDx8/uC IeP1egpM0wE8Qzu13vL+XFj8RG/m55PmeddeYEp1y5qujZoofStEudXl6v/pGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clq0m4d4bz72H; Mon, 13 Oct 2025 20:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DKbibU033954; Mon, 13 Oct 2025 20:37:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DKbiYO033951; Mon, 13 Oct 2025 20:37:44 GMT (envelope-from git) Date: Mon, 13 Oct 2025 20:37:44 GMT Message-Id: <202510132037.59DKbiYO033951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 156dfc3e6e53 - main - tcp: use time instead of slots in the HPTS API List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 156dfc3e6e53a07bfa2d1e9d6e1ec37871cb887a Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=156dfc3e6e53a07bfa2d1e9d6e1ec37871cb887a commit 156dfc3e6e53a07bfa2d1e9d6e1ec37871cb887a Author: Nick Banks AuthorDate: 2025-10-13 20:35:29 +0000 Commit: Michael Tuexen CommitDate: 2025-10-13 20:35:29 +0000 tcp: use time instead of slots in the HPTS API This makes slots an internal concept of HPTS. Reviewed by: tuexen Sponsored by: Netflix, Inc. --- sys/netinet/tcp_hpts.c | 21 ++-- sys/netinet/tcp_hpts.h | 16 ++- sys/netinet/tcp_hpts_test.c | 59 +++++----- sys/netinet/tcp_stacks/bbr.c | 125 +++++++++++----------- sys/netinet/tcp_stacks/rack.c | 244 +++++++++++++++++++++--------------------- 5 files changed, 232 insertions(+), 233 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 2631e79ab034..a50ad3fa6b33 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -39,15 +39,14 @@ * First, and probably the main thing its used by Rack and BBR, it can * be used to call tcp_output() of a transport stack at some time in the future. * The normal way this is done is that tcp_output() of the stack schedules - * itself to be called again by calling tcp_hpts_insert(tcpcb, slot). The - * slot is the time from now that the stack wants to be called but it - * must be converted to tcp_hpts's notion of slot. This is done with - * one of the macros HPTS_MS_TO_SLOTS or HPTS_USEC_TO_SLOTS. So a typical + * itself to be called again by calling tcp_hpts_insert(tcpcb, usecs). The + * usecs is the time from now that the stack wants to be called and is + * passing time directly in microseconds. So a typical * call from the tcp_output() routine might look like: * - * tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(550), NULL); + * tcp_hpts_insert(tp, 550, NULL); * - * The above would schedule tcp_output() to be called in 550 useconds. + * The above would schedule tcp_output() to be called in 550 microseconds. * Note that if using this mechanism the stack will want to add near * its top a check to prevent unwanted calls (from user land or the * arrival of incoming ack's). So it would add something like: @@ -832,16 +831,16 @@ check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct tcpcb *tp, void #ifdef INVARIANTS -__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t slot, +__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, int32_t line, struct hpts_diag *diag) #else -__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t slot, +__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, struct hpts_diag *diag) #endif { struct tcp_hpts_entry *hpts; struct timeval tv; - uint32_t wheel_cts, last_slot, need_new_to = 0; + uint32_t slot, wheel_cts, last_slot, need_new_to = 0; int32_t wheel_slot, maxslots; bool need_wakeup = false; @@ -850,10 +849,12 @@ __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t slot, MPASS(!(tp->t_in_hpts == IHPTS_ONQUEUE)); /* + * Convert microseconds to slots for internal use. * We now return the next-slot the hpts will be on, beyond its * current run (if up) or where it was when it stopped if it is * sleeping. */ + slot = HPTS_USEC_TO_SLOTS(usecs); hpts = tcp_hpts_lock(pace, tp); microuptime(&tv); if (diag) { @@ -929,7 +930,7 @@ __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t slot, tp->t_hpts_slot = last_slot; } if (diag) { - diag->slot_remaining = tp->t_hpts_request; + diag->time_remaining = tp->t_hpts_request; diag->inp_hptsslot = tp->t_hpts_slot; } #ifdef INVARIANTS diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index 6183e6646133..8b69e6af35ed 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -28,8 +28,6 @@ /* Number of useconds represented by an hpts slot */ #define HPTS_USECS_PER_SLOT 10 -#define HPTS_MS_TO_SLOTS(x) ((x * 100) + 1) -#define HPTS_USEC_TO_SLOTS(x) ((x+9) /10) #define HPTS_USEC_IN_SEC 1000000 #define HPTS_MSEC_IN_SEC 1000 #define HPTS_USEC_IN_MSEC 1000 @@ -60,7 +58,7 @@ struct hpts_diag { uint32_t p_runningslot; /* bbr->inflight */ uint32_t slot_req; /* bbr->flex3 x */ uint32_t inp_hptsslot; /* bbr->flex4 x */ - uint32_t slot_remaining; /* bbr->flex5 x */ + uint32_t time_remaining; /* bbr->flex5 x */ uint32_t have_slept; /* bbr->epoch x */ uint32_t hpts_sleep_time; /* bbr->applimited x */ uint32_t yet_to_sleep; /* bbr->lt_epoch x */ @@ -130,15 +128,15 @@ tcp_in_hpts(struct tcpcb *tp) * you should already have the INP_WLOCK(). */ #ifdef INVARIANTS -void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t slot, +void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, int32_t line, struct hpts_diag *diag); -#define tcp_hpts_insert(tp, slot, diag) \ - __tcp_hpts_insert(tcp_hptsi_pace, (tp), (slot), __LINE__, (diag)) +#define tcp_hpts_insert(tp, usecs, diag) \ + __tcp_hpts_insert(tcp_hptsi_pace, (tp), (usecs), __LINE__, (diag)) #else -void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t slot, +void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, struct hpts_diag *diag); -#define tcp_hpts_insert(tp, slot, diag) \ - __tcp_hpts_insert(tcp_hptsi_pace, (tp), (slot), (diag)) +#define tcp_hpts_insert(tp, usecs, diag) \ + __tcp_hpts_insert(tcp_hptsi_pace, (tp), (usecs), (diag)) #endif void __tcp_set_hpts(struct tcp_hptsi *pace, struct tcpcb *tp); diff --git a/sys/netinet/tcp_hpts_test.c b/sys/netinet/tcp_hpts_test.c index fb2d9c0c7024..9217c3205587 100644 --- a/sys/netinet/tcp_hpts_test.c +++ b/sys/netinet/tcp_hpts_test.c @@ -57,11 +57,11 @@ #define tcp_hpts_init(pace, tp) __tcp_hpts_init((pace), (tp)) #define tcp_hpts_remove(pace, tp) __tcp_hpts_remove((pace), (tp)) #ifdef INVARIANTS -#define tcp_hpts_insert(pace, tp, slot, diag) \ - __tcp_hpts_insert((pace), (tp), (slot), __LINE__, (diag)) +#define tcp_hpts_insert(pace, tp, usecs, diag) \ + __tcp_hpts_insert((pace), (tp), (usecs), __LINE__, (diag)) #else -#define tcp_hpts_insert(pace, tp, slot, diag) \ - __tcp_hpts_insert((pace), (tp), (slot), (diag)) +#define tcp_hpts_insert(pace, tp, usecs, diag) \ + __tcp_hpts_insert((pace), (tp), (usecs), (diag)) #endif #define tcp_set_hpts(pace, tp) __tcp_set_hpts((pace), (tp)) @@ -607,7 +607,7 @@ KTEST_FUNC(tcpcb_insertion) struct tcp_hptsi *pace; struct tcpcb *tp; struct tcp_hpts_entry *hpts; - uint32_t slot = 10; + uint32_t timeout_usecs = 10; test_hpts_init(); @@ -623,7 +623,7 @@ KTEST_FUNC(tcpcb_insertion) INP_WLOCK(&tp->t_inpcb); tp->t_flags2 |= TF2_HPTS_CALLS; KTEST_EQUAL(call_counts[CCNT_SWI_SCHED], 0); - tcp_hpts_insert(pace, tp, slot, NULL); + tcp_hpts_insert(pace, tp, timeout_usecs, NULL); KTEST_EQUAL(tp->t_in_hpts, IHPTS_ONQUEUE); INP_WUNLOCK(&tp->t_inpcb); KTEST_EQUAL(call_counts[CCNT_TCP_OUTPUT], 0); @@ -635,7 +635,7 @@ KTEST_FUNC(tcpcb_insertion) hpts = pace->rp_ent[tp->t_hpts_cpu]; KTEST_EQUAL(hpts->p_on_queue_cnt, 1); KTEST_EQUAL(tp->t_hpts_request, 0); - KTEST_EQUAL(tp->t_hpts_slot, slot); + KTEST_EQUAL(tp->t_hpts_slot, HPTS_USEC_TO_SLOTS(timeout_usecs)); //KTEST_EQUAL(tp->t_hpts_gencnt, 1); INP_WLOCK(&tp->t_inpcb); @@ -686,7 +686,7 @@ KTEST_FUNC(timer_functionality) KTEST_LOG(ctx, "=> tcp_hpts_insert(%p)", tp); INP_WLOCK(&tp->t_inpcb); tp->t_flags2 |= TF2_HPTS_CALLS; /* Mark as needing HPTS processing */ - tcp_hpts_insert(pace, tp, HPTS_USEC_TO_SLOTS(500), NULL); + tcp_hpts_insert(pace, tp, 500, NULL); INP_WUNLOCK(&tp->t_inpcb); dump_tcpcb(tp); @@ -814,7 +814,7 @@ KTEST_FUNC(scalability_tcpcbs) INP_WLOCK(&tcpcbs[i]->t_inpcb); tcpcbs[i]->t_flags2 |= TF2_HPTS_CALLS; /* Insert with varying future timeouts to distribute across slots */ - tcp_hpts_insert(pace, tcpcbs[i], HPTS_USEC_TO_SLOTS(100 + (i % 1000)), NULL); + tcp_hpts_insert(pace, tcpcbs[i], 100 + (i % 1000), NULL); INP_WUNLOCK(&tcpcbs[i]->t_inpcb); } @@ -864,7 +864,7 @@ KTEST_FUNC(wheel_wrap_recovery) struct epoch_tracker et; struct tcp_hptsi *pace; struct tcpcb **tcpcbs; - uint32_t i, slot, num_tcpcbs = 500; + uint32_t i, timeout_usecs, num_tcpcbs = 500; int32_t slots_ran; test_hpts_init(); @@ -883,11 +883,11 @@ KTEST_FUNC(wheel_wrap_recovery) KTEST_NEQUAL(tcpcbs[i], NULL); TP_REMOVE_FROM_HPTS(tcpcbs[i]) = 1; - slot = (i * NUM_OF_HPTSI_SLOTS) / num_tcpcbs; /* Spread across slots */ + timeout_usecs = ((i * NUM_OF_HPTSI_SLOTS) / num_tcpcbs) * HPTS_USECS_PER_SLOT; /* Spread across slots */ INP_WLOCK(&tcpcbs[i]->t_inpcb); tcpcbs[i]->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tcpcbs[i], slot, NULL); + tcp_hpts_insert(pace, tcpcbs[i], timeout_usecs, NULL); INP_WUNLOCK(&tcpcbs[i]->t_inpcb); } @@ -957,12 +957,12 @@ KTEST_FUNC(tcpcb_moving_state) /* Insert both into the same slot */ INP_WLOCK(&tp1->t_inpcb); tp1->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp1, HPTS_USEC_TO_SLOTS(100), NULL); + tcp_hpts_insert(pace, tp1, 100, NULL); INP_WUNLOCK(&tp1->t_inpcb); INP_WLOCK(&tp2->t_inpcb); tp2->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp2, HPTS_USEC_TO_SLOTS(100), NULL); + tcp_hpts_insert(pace, tp2, 100, NULL); INP_WUNLOCK(&tp2->t_inpcb); hpts = pace->rp_ent[0]; @@ -1008,8 +1008,8 @@ KTEST_FUNC(deferred_requests) struct tcp_hptsi *pace; struct tcpcb *tp, *tp2; struct tcp_hpts_entry *hpts; - uint32_t large_slot = NUM_OF_HPTSI_SLOTS + 5000; /* Beyond wheel capacity */ - uint32_t huge_slot = NUM_OF_HPTSI_SLOTS * 3; /* 3x wheel capacity */ + uint32_t large_timeout_usecs = (NUM_OF_HPTSI_SLOTS + 5000) * HPTS_USECS_PER_SLOT; /* Beyond wheel capacity */ + uint32_t huge_timeout_usecs = (NUM_OF_HPTSI_SLOTS * 3) * HPTS_USECS_PER_SLOT; /* 3x wheel capacity */ uint32_t initial_request; int32_t slots_ran; @@ -1025,7 +1025,7 @@ KTEST_FUNC(deferred_requests) /* Insert with a request that exceeds current wheel capacity */ INP_WLOCK(&tp->t_inpcb); tp->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp, large_slot, NULL); + tcp_hpts_insert(pace, tp, large_timeout_usecs, NULL); INP_WUNLOCK(&tp->t_inpcb); /* Verify it was inserted with a deferred request */ @@ -1061,7 +1061,7 @@ KTEST_FUNC(deferred_requests) INP_WLOCK(&tp2->t_inpcb); tp2->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp2, huge_slot, NULL); + tcp_hpts_insert(pace, tp2, huge_timeout_usecs, NULL); INP_WUNLOCK(&tp2->t_inpcb); /* Verify initial deferred request */ @@ -1081,7 +1081,7 @@ KTEST_FUNC(deferred_requests) KTEST_VERIFY(tp2->t_hpts_request > 0); KTEST_EQUAL(tp2->t_in_hpts, IHPTS_ONQUEUE); /* Still queued */ - /* For huge_slot = NUM_OF_HPTSI_SLOTS * 3, we need ~3 cycles to complete. + /* For huge_timeout_usecs = NUM_OF_HPTSI_SLOTS * 3 * HPTS_USECS_PER_SLOT, we need ~3 cycles to complete. * Each cycle can reduce the request by at most NUM_OF_HPTSI_SLOTS. */ test_time_usec += NUM_OF_HPTSI_SLOTS * HPTS_USECS_PER_SLOT; HPTS_LOCK(hpts); @@ -1200,7 +1200,7 @@ KTEST_FUNC(slot_boundary_conditions) KTEST_NEQUAL(tp, NULL); INP_WLOCK(&tp->t_inpcb); tp->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp, 0, NULL); /* Should insert in next available slot */ + tcp_hpts_insert(pace, tp, 0, NULL); /* Should insert immediately (0 timeout) */ INP_WUNLOCK(&tp->t_inpcb); KTEST_EQUAL(tp->t_in_hpts, IHPTS_ONQUEUE); KTEST_VERIFY(tp->t_hpts_slot < NUM_OF_HPTSI_SLOTS); @@ -1212,7 +1212,7 @@ KTEST_FUNC(slot_boundary_conditions) /* Test insertion at maximum slot value */ INP_WLOCK(&tp->t_inpcb); tp->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp, NUM_OF_HPTSI_SLOTS - 1, NULL); + tcp_hpts_insert(pace, tp, (NUM_OF_HPTSI_SLOTS - 1) * HPTS_USECS_PER_SLOT, NULL); INP_WUNLOCK(&tp->t_inpcb); KTEST_EQUAL(tp->t_in_hpts, IHPTS_ONQUEUE); @@ -1220,13 +1220,13 @@ KTEST_FUNC(slot_boundary_conditions) tcp_hpts_remove(pace, tp); INP_WUNLOCK(&tp->t_inpcb); - /* Test very small slot values */ + /* Test very small timeout values */ INP_WLOCK(&tp->t_inpcb); tp->t_flags2 |= TF2_HPTS_CALLS; tcp_hpts_insert(pace, tp, 1, NULL); INP_WUNLOCK(&tp->t_inpcb); KTEST_EQUAL(tp->t_in_hpts, IHPTS_ONQUEUE); - KTEST_EQUAL(tp->t_hpts_slot, 1); /* Should be exactly slot 1 */ + KTEST_EQUAL(tp->t_hpts_slot, HPTS_USEC_TO_SLOTS(1)); /* Should convert 1 usec to slot */ INP_WLOCK(&tp->t_inpcb); tcp_hpts_remove(pace, tp); @@ -1269,7 +1269,7 @@ KTEST_FUNC(dynamic_sleep_adjustment) INP_WLOCK(&tcpcbs[i]->t_inpcb); tcpcbs[i]->t_flags2 |= TF2_HPTS_CALLS; TP_REMOVE_FROM_HPTS(tcpcbs[i]) = 1; /* Will be removed after output */ - tcp_hpts_insert(pace, tcpcbs[i], HPTS_USEC_TO_SLOTS(100), NULL); + tcp_hpts_insert(pace, tcpcbs[i], 100, NULL); INP_WUNLOCK(&tcpcbs[i]->t_inpcb); } @@ -1333,13 +1333,13 @@ KTEST_FUNC(concurrent_operations) /* Insert tp1 */ INP_WLOCK(&tp1->t_inpcb); tp1->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp1, HPTS_USEC_TO_SLOTS(100), NULL); + tcp_hpts_insert(pace, tp1, 100, NULL); INP_WUNLOCK(&tp1->t_inpcb); /* Insert tp2 into same slot */ INP_WLOCK(&tp2->t_inpcb); tp2->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp2, HPTS_USEC_TO_SLOTS(100), NULL); + tcp_hpts_insert(pace, tp2, 100, NULL); INP_WUNLOCK(&tp2->t_inpcb); /* Verify both are inserted */ @@ -1415,7 +1415,7 @@ KTEST_FUNC(queued_segments_processing) STAILQ_INSERT_TAIL(&tp->t_inqueue, fake_mbuf, m_stailqpkt); INP_WLOCK(&tp->t_inpcb); - tcp_hpts_insert(pace, tp, HPTS_USEC_TO_SLOTS(100), NULL); + tcp_hpts_insert(pace, tp, 100, NULL); INP_WUNLOCK(&tp->t_inpcb); hpts = pace->rp_ent[tp->t_hpts_cpu]; @@ -1549,6 +1549,7 @@ KTEST_FUNC(generation_count_validation) struct tcp_hpts_entry *hpts; struct tcpcb *tp1, *tp2; uint32_t initial_gencnt, slot_to_test = 10; + uint32_t timeout_usecs = slot_to_test * HPTS_USECS_PER_SLOT; uint32_t tp2_original_gencnt; int32_t slots_ran; @@ -1570,7 +1571,7 @@ KTEST_FUNC(generation_count_validation) INP_WLOCK(&tp1->t_inpcb); tp1->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp1, slot_to_test, NULL); + tcp_hpts_insert(pace, tp1, timeout_usecs, NULL); INP_WUNLOCK(&tp1->t_inpcb); /* Verify connection stored the generation count */ @@ -1604,7 +1605,7 @@ KTEST_FUNC(generation_count_validation) /* Insert second connection and record its generation count */ INP_WLOCK(&tp2->t_inpcb); tp2->t_flags2 |= TF2_HPTS_CALLS; - tcp_hpts_insert(pace, tp2, slot_to_test, NULL); + tcp_hpts_insert(pace, tp2, timeout_usecs, NULL); INP_WUNLOCK(&tp2->t_inpcb); /* Verify connection was inserted successfully */ diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index d035766d895d..66983edcdd73 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -480,7 +480,7 @@ bbr_find_lowest_rsm(struct tcp_bbr *bbr); static __inline uint32_t bbr_get_rtt(struct tcp_bbr *bbr, int32_t rtt_type); static void -bbr_log_to_start(struct tcp_bbr *bbr, uint32_t cts, uint32_t to, int32_t slot, +bbr_log_to_start(struct tcp_bbr *bbr, uint32_t cts, uint32_t to, int32_t pacing_delay, uint8_t which); static void bbr_log_timer_var(struct tcp_bbr *bbr, int mode, uint32_t cts, @@ -489,7 +489,7 @@ bbr_log_timer_var(struct tcp_bbr *bbr, int mode, uint32_t cts, static void bbr_log_hpts_diag(struct tcp_bbr *bbr, uint32_t cts, struct hpts_diag *diag); static void -bbr_log_type_bbrsnd(struct tcp_bbr *bbr, uint32_t len, uint32_t slot, +bbr_log_type_bbrsnd(struct tcp_bbr *bbr, uint32_t len, uint32_t pacing_delay, uint32_t del_by, uint32_t cts, uint32_t sloton, uint32_t prev_delay); static void @@ -724,7 +724,7 @@ bbr_minseg(struct tcp_bbr *bbr) } static void -bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_t frm, int32_t slot, uint32_t tot_len) +bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_t frm, int32_t pacing_delay, uint32_t tot_len) { struct inpcb *inp = tptoinpcb(tp); struct hpts_diag diag; @@ -751,40 +751,40 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ bbr->r_ctl.rc_timer_exp = 0; prev_delay = bbr->r_ctl.rc_last_delay_val; if (bbr->r_ctl.rc_last_delay_val && - (slot == 0)) { + (pacing_delay == 0)) { /* * If a previous pacer delay was in place we * are not coming from the output side (where * we calculate a delay, more likely a timer). */ - slot = bbr->r_ctl.rc_last_delay_val; + pacing_delay = bbr->r_ctl.rc_last_delay_val; if (TSTMP_GT(cts, bbr->rc_pacer_started)) { /* Compensate for time passed */ delay_calc = cts - bbr->rc_pacer_started; - if (delay_calc <= slot) - slot -= delay_calc; + if (delay_calc <= pacing_delay) + pacing_delay -= delay_calc; } } /* Do we have early to make up for by pushing out the pacing time? */ if (bbr->r_agg_early_set) { - bbr_log_pacing_delay_calc(bbr, 0, bbr->r_ctl.rc_agg_early, cts, slot, 0, bbr->r_agg_early_set, 2); - slot += bbr->r_ctl.rc_agg_early; + bbr_log_pacing_delay_calc(bbr, 0, bbr->r_ctl.rc_agg_early, cts, pacing_delay, 0, bbr->r_agg_early_set, 2); + pacing_delay += bbr->r_ctl.rc_agg_early; bbr->r_ctl.rc_agg_early = 0; bbr->r_agg_early_set = 0; } /* Are we running a total debt that needs to be compensated for? */ if (bbr->r_ctl.rc_hptsi_agg_delay) { - if (slot > bbr->r_ctl.rc_hptsi_agg_delay) { + if (pacing_delay > bbr->r_ctl.rc_hptsi_agg_delay) { /* We nuke the delay */ - slot -= bbr->r_ctl.rc_hptsi_agg_delay; + pacing_delay -= bbr->r_ctl.rc_hptsi_agg_delay; bbr->r_ctl.rc_hptsi_agg_delay = 0; } else { /* We nuke some of the delay, put in a minimal 100usecs */ - bbr->r_ctl.rc_hptsi_agg_delay -= slot; - bbr->r_ctl.rc_last_delay_val = slot = 100; + bbr->r_ctl.rc_hptsi_agg_delay -= pacing_delay; + bbr->r_ctl.rc_last_delay_val = pacing_delay = 100; } } - bbr->r_ctl.rc_last_delay_val = slot; + bbr->r_ctl.rc_last_delay_val = pacing_delay; hpts_timeout = bbr_timer_start(tp, bbr, cts); if (tp->t_flags & TF_DELACK) { if (bbr->rc_in_persist == 0) { @@ -810,7 +810,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ bbr->r_ctl.rc_hpts_flags = PACE_TMR_DELACK; hpts_timeout = delayed_ack; } - if (slot) { + if (pacing_delay) { /* Mark that we have a pacing timer up */ BBR_STAT_INC(bbr_paced_segments); bbr->r_ctl.rc_hpts_flags |= PACE_PKT_OUTPUT; @@ -820,7 +820,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ * wheel, we resort to a keep-alive timer if its configured. */ if ((hpts_timeout == 0) && - (slot == 0)) { + (pacing_delay == 0)) { if ((V_tcp_always_keepalive || inp->inp_socket->so_options & SO_KEEPALIVE) && (tp->t_state <= TCPS_CLOSING)) { /* @@ -849,7 +849,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ if (left < hpts_timeout) hpts_timeout = left; } - if (bbr->r_ctl.rc_incr_tmrs && slot && + if (bbr->r_ctl.rc_incr_tmrs && pacing_delay && (bbr->r_ctl.rc_hpts_flags & (PACE_TMR_TLP|PACE_TMR_RXT))) { /* * If configured to do so, and the timer is either @@ -867,7 +867,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ * this extra delay but this is easier and being more * conservative is probably better. */ - hpts_timeout += slot; + hpts_timeout += pacing_delay; } if (hpts_timeout) { /* @@ -879,10 +879,10 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ bbr->r_ctl.rc_timer_exp = cts + hpts_timeout; } else bbr->r_ctl.rc_timer_exp = 0; - if ((slot) && + if ((pacing_delay) && (bbr->rc_use_google || bbr->output_error_seen || - (slot <= hpts_timeout)) ) { + (pacing_delay <= hpts_timeout)) ) { /* * Tell LRO that it can queue packets while * we pace. @@ -900,15 +900,15 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ tp->t_flags2 &= ~TF2_DONT_SACK_QUEUE; bbr->rc_pacer_started = cts; - tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(slot), &diag); + tcp_hpts_insert(tp, pacing_delay, &diag); bbr->rc_timer_first = 0; bbr->bbr_timer_src = frm; - bbr_log_to_start(bbr, cts, hpts_timeout, slot, 1); + bbr_log_to_start(bbr, cts, hpts_timeout, pacing_delay, 1); bbr_log_hpts_diag(bbr, cts, &diag); } else if (hpts_timeout) { - tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(hpts_timeout), &diag); + tcp_hpts_insert(tp, hpts_timeout, &diag); /* - * We add the flag here as well if the slot is set, + * We add the flag here as well if the pacing delay is set, * since hpts will call in to clear the queue first before * calling the output routine (which does our timers). * We don't want to set the flag if its just a timer @@ -917,7 +917,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ * on a keep-alive timer and a request comes in for * more data. */ - if (slot) + if (pacing_delay) bbr->rc_pacer_started = cts; if ((bbr->r_ctl.rc_hpts_flags & PACE_TMR_RACK) && (bbr->rc_cwnd_limited == 0)) { @@ -934,12 +934,12 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ TF2_DONT_SACK_QUEUE); } bbr->bbr_timer_src = frm; - bbr_log_to_start(bbr, cts, hpts_timeout, slot, 0); + bbr_log_to_start(bbr, cts, hpts_timeout, pacing_delay, 0); bbr_log_hpts_diag(bbr, cts, &diag); bbr->rc_timer_first = 1; } bbr->rc_tmr_stopped = 0; - bbr_log_type_bbrsnd(bbr, tot_len, slot, delay_calc, cts, frm, prev_delay); + bbr_log_type_bbrsnd(bbr, tot_len, pacing_delay, delay_calc, cts, frm, prev_delay); } static void @@ -1031,8 +1031,8 @@ bbr_timer_audit(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts, struct sock } /* * Ok the timer originally started is not what we want now. We will - * force the hpts to be stopped if any, and restart with the slot - * set to what was in the saved slot. + * force the hpts to be stopped if any, and restart with the pacing + * delay set to what was in the saved delay. */ wrong_timer: if ((bbr->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) == 0) { @@ -2395,7 +2395,7 @@ bbr_log_hpts_diag(struct tcp_bbr *bbr, uint32_t cts, struct hpts_diag *diag) log.u_bbr.flex2 = diag->p_cur_slot; log.u_bbr.flex3 = diag->slot_req; log.u_bbr.flex4 = diag->inp_hptsslot; - log.u_bbr.flex5 = diag->slot_remaining; + log.u_bbr.flex5 = diag->time_remaining; log.u_bbr.flex6 = diag->need_new_to; log.u_bbr.flex7 = diag->p_hpts_active; log.u_bbr.flex8 = diag->p_on_min_sleep; @@ -2468,7 +2468,7 @@ bbr_log_pacing_delay_calc(struct tcp_bbr *bbr, uint16_t gain, uint32_t len, } static void -bbr_log_to_start(struct tcp_bbr *bbr, uint32_t cts, uint32_t to, int32_t slot, uint8_t which) +bbr_log_to_start(struct tcp_bbr *bbr, uint32_t cts, uint32_t to, int32_t pacing_delay, uint8_t which) { if (tcp_bblogging_on(bbr->rc_tp)) { union tcp_log_stackspecific log; @@ -2478,7 +2478,7 @@ bbr_log_to_start(struct tcp_bbr *bbr, uint32_t cts, uint32_t to, int32_t slot, u log.u_bbr.flex1 = bbr->bbr_timer_src; log.u_bbr.flex2 = to; log.u_bbr.flex3 = bbr->r_ctl.rc_hpts_flags; - log.u_bbr.flex4 = slot; + log.u_bbr.flex4 = pacing_delay; log.u_bbr.flex5 = bbr->rc_tp->t_hpts_slot; log.u_bbr.flex6 = TICKS_2_USEC(bbr->rc_tp->t_rxtcur); log.u_bbr.pkts_out = bbr->rc_tp->t_flags2; @@ -2728,13 +2728,13 @@ bbr_type_log_hdwr_pacing(struct tcp_bbr *bbr, const struct ifnet *ifp, } static void -bbr_log_type_bbrsnd(struct tcp_bbr *bbr, uint32_t len, uint32_t slot, uint32_t del_by, uint32_t cts, uint32_t line, uint32_t prev_delay) +bbr_log_type_bbrsnd(struct tcp_bbr *bbr, uint32_t len, uint32_t pacing_delay, uint32_t del_by, uint32_t cts, uint32_t line, uint32_t prev_delay) { if (tcp_bblogging_on(bbr->rc_tp)) { union tcp_log_stackspecific log; bbr_fill_in_logging_data(bbr, &log.u_bbr, cts); - log.u_bbr.flex1 = slot; + log.u_bbr.flex1 = pacing_delay; log.u_bbr.flex2 = del_by; log.u_bbr.flex3 = prev_delay; log.u_bbr.flex4 = line; @@ -5200,7 +5200,7 @@ bbr_process_timers(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts, uint8_t left = bbr->r_ctl.rc_timer_exp - cts; ret = -3; bbr_log_to_processing(bbr, cts, ret, left, hpts_calling); - tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(left), NULL); + tcp_hpts_insert(tp, left, NULL); return (1); } bbr->rc_tmr_stopped = 0; @@ -5249,7 +5249,7 @@ bbr_timer_cancel(struct tcp_bbr *bbr, int32_t line, uint32_t cts) else time_since_send = 0; if (bbr->r_ctl.rc_last_delay_val > time_since_send) { - /* Cut down our slot time */ + /* Cut down our pacing_delay time */ bbr->r_ctl.rc_last_delay_val -= time_since_send; } else { bbr->r_ctl.rc_last_delay_val = 0; @@ -5883,7 +5883,7 @@ bbr_log_output(struct tcp_bbr *bbr, struct tcpcb *tp, struct tcpopt *to, int32_t * sequence 1 for 10 bytes. In such an example the r_start would be * 1 (starting sequence) but the r_end would be r_start+len i.e. 11. * This means that r_end is actually the first sequence for the next - * slot (11). + * pacing delay (11). * */ INP_WLOCK_ASSERT(tptoinpcb(tp)); @@ -11851,7 +11851,7 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv) struct bbr_sendmap *rsm = NULL; int32_t tso, mtu; struct tcpopt to; - int32_t slot = 0; + int32_t pacing_delay = 0; struct inpcb *inp; struct sockbuf *sb; bool hpts_calling; @@ -11981,8 +11981,7 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv) delay_calc -= bbr->r_ctl.rc_last_delay_val; else { /* - * We are early setup to adjust - * our slot time. + * We are early setup to adjust out pacing delay. */ uint64_t merged_val; @@ -12099,7 +12098,7 @@ again: #endif error = 0; tso = 0; - slot = 0; + pacing_delay = 0; mtu = 0; sendwin = min(tp->snd_wnd, tp->snd_cwnd); sb_offset = tp->snd_max - tp->snd_una; @@ -12121,7 +12120,7 @@ recheck_resend: tot_len = tp->t_maxseg; if (hpts_calling) /* Retry in a ms */ - slot = 1001; + pacing_delay = 1001; goto just_return_nolock; } TAILQ_INSERT_TAIL(&bbr->r_ctl.rc_free, rsm, r_next); @@ -12694,9 +12693,9 @@ just_return: SOCK_SENDBUF_UNLOCK(so); just_return_nolock: if (tot_len) - slot = bbr_get_pacing_delay(bbr, bbr->r_ctl.rc_bbr_hptsi_gain, tot_len, cts, 0); + pacing_delay = bbr_get_pacing_delay(bbr, bbr->r_ctl.rc_bbr_hptsi_gain, tot_len, cts, 0); if (bbr->rc_no_pacing) - slot = 0; + pacing_delay = 0; if (tot_len == 0) { if ((ctf_outstanding(tp) + min((bbr->r_ctl.rc_high_rwnd/2), bbr_minseg(bbr))) >= tp->snd_wnd) { @@ -12746,7 +12745,7 @@ just_return_nolock: /* Dont update the time if we did not send */ bbr->r_ctl.rc_last_delay_val = 0; bbr->rc_output_starts_timer = 1; - bbr_start_hpts_timer(bbr, tp, cts, 9, slot, tot_len); + bbr_start_hpts_timer(bbr, tp, cts, 9, pacing_delay, tot_len); bbr_log_type_just_return(bbr, cts, tot_len, hpts_calling, app_limited, p_maxseg, len); if (SEQ_LT(tp->snd_nxt, tp->snd_max)) { /* Make sure snd_nxt is drug up */ @@ -12782,7 +12781,7 @@ send: flags &= ~TH_FIN; if ((len == 0) && ((tp->t_flags & TF_ACKNOW) == 0)) { /* Lets not send this */ - slot = 0; + pacing_delay = 0; goto just_return; } } @@ -13048,7 +13047,7 @@ send: /* * We have outstanding data, don't send a fin by itself!. */ - slot = 0; + pacing_delay = 0; goto just_return; } /* @@ -13758,7 +13757,7 @@ nomore: if (tp->snd_cwnd < maxseg) tp->snd_cwnd = maxseg; } - slot = (bbr_error_base_paceout + 1) << bbr->oerror_cnt; + pacing_delay = (bbr_error_base_paceout + 1) << bbr->oerror_cnt; BBR_STAT_INC(bbr_saw_enobuf); if (bbr->bbr_hdrw_pacing) counter_u64_add(bbr_hdwr_pacing_enobuf, 1); @@ -13807,18 +13806,18 @@ nomore: } /* * Nuke all other things that can interfere - * with slot + * with pacing delay */ if ((tot_len + len) && (len >= tp->t_maxseg)) { - slot = bbr_get_pacing_delay(bbr, + pacing_delay = bbr_get_pacing_delay(bbr, bbr->r_ctl.rc_bbr_hptsi_gain, (tot_len + len), cts, 0); - if (slot < bbr_error_base_paceout) - slot = (bbr_error_base_paceout + 2) << bbr->oerror_cnt; + if (pacing_delay < bbr_error_base_paceout) + pacing_delay = (bbr_error_base_paceout + 2) << bbr->oerror_cnt; } else - slot = (bbr_error_base_paceout + 2) << bbr->oerror_cnt; + pacing_delay = (bbr_error_base_paceout + 2) << bbr->oerror_cnt; bbr->rc_output_starts_timer = 1; - bbr_start_hpts_timer(bbr, tp, cts, 10, slot, + bbr_start_hpts_timer(bbr, tp, cts, 10, pacing_delay, tot_len); return (error); } @@ -13836,9 +13835,9 @@ nomore: } /* FALLTHROUGH */ default: - slot = (bbr_error_base_paceout + 3) << bbr->oerror_cnt; + pacing_delay = (bbr_error_base_paceout + 3) << bbr->oerror_cnt; bbr->rc_output_starts_timer = 1; - bbr_start_hpts_timer(bbr, tp, cts, 11, slot, 0); + bbr_start_hpts_timer(bbr, tp, cts, 11, pacing_delay, 0); return (error); } #ifdef STATS @@ -13976,12 +13975,12 @@ skip_again: tcp_log_end_status(tp, TCP_EI_STATUS_SERVER_RST); if (((flags & (TH_RST | TH_SYN | TH_FIN)) == 0) && tot_len) { /* - * Calculate/Re-Calculate the hptsi slot in usecs based on + * Calculate/Re-Calculate the hptsi timeout in usecs based on * what we have sent so far */ - slot = bbr_get_pacing_delay(bbr, bbr->r_ctl.rc_bbr_hptsi_gain, tot_len, cts, 0); + pacing_delay = bbr_get_pacing_delay(bbr, bbr->r_ctl.rc_bbr_hptsi_gain, tot_len, cts, 0); if (bbr->rc_no_pacing) - slot = 0; + pacing_delay = 0; } tp->t_flags &= ~(TF_ACKNOW | TF_DELACK); enobufs: @@ -13994,8 +13993,8 @@ enobufs: (more_to_rxt || ((bbr->r_ctl.rc_resend = bbr_check_recovery_mode(tp, bbr, cts)) != NULL))) { /* Rack cheats and shotguns out all rxt's 1ms apart */ - if (slot > 1000) - slot = 1000; + if (pacing_delay > 1000) + pacing_delay = 1000; } if (bbr->bbr_hdrw_pacing && (bbr->hw_pacing_set == 0)) { /* @@ -14009,7 +14008,7 @@ enobufs: tcp_bbr_tso_size_check(bbr, cts); } } - bbr_start_hpts_timer(bbr, tp, cts, 12, slot, tot_len); + bbr_start_hpts_timer(bbr, tp, cts, 12, pacing_delay, tot_len); if (SEQ_LT(tp->snd_nxt, tp->snd_max)) { /* Make sure snd_nxt is drug up */ tp->snd_nxt = tp->snd_max; @@ -14127,7 +14126,7 @@ bbr_switch_failed(struct tcpcb *tp) } } else toval = HPTS_USECS_PER_SLOT; - tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(toval), &diag); + tcp_hpts_insert(tp, toval, &diag); bbr_log_hpts_diag(bbr, cts, &diag); } diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index cff07b4932d9..c7962b57a69e 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -250,11 +250,11 @@ static int32_t rack_non_rxt_use_cr = 0; /* does a non-rxt in recovery use the co static int32_t rack_persist_min = 250000; /* 250usec */ static int32_t rack_persist_max = 2000000; /* 2 Second in usec's */ static int32_t rack_honors_hpts_min_to = 1; /* Do we honor the hpts minimum time out for pacing timers */ -static uint32_t rack_max_reduce = 10; /* Percent we can reduce slot by */ +static uint32_t rack_max_reduce = 10; /* Percent we can reduce pacing delay by */ static int32_t rack_sack_not_required = 1; /* set to one to allow non-sack to use rack */ static int32_t rack_limit_time_with_srtt = 0; static int32_t rack_autosndbuf_inc = 20; /* In percentage form */ -static int32_t rack_enobuf_hw_boost_mult = 0; /* How many times the hw rate we boost slot using time_between */ +static int32_t rack_enobuf_hw_boost_mult = 0; /* How many times the hw rate we boost pacing delay using time_between */ static int32_t rack_enobuf_hw_max = 12000; /* 12 ms in usecs */ static int32_t rack_enobuf_hw_min = 10000; /* 10 ms in usecs */ static int32_t rack_hw_rwnd_factor = 2; /* How many max_segs the rwnd must be before we hold off sending */ @@ -278,7 +278,7 @@ static int32_t rack_hptsi_segments = 40; static int32_t rack_rate_sample_method = USE_RTT_LOW; static int32_t rack_pace_every_seg = 0; static int32_t rack_delayed_ack_time = 40000; /* 40ms in usecs */ -static int32_t rack_slot_reduction = 4; +static int32_t rack_pacing_delay_reduction = 4; static int32_t rack_wma_divisor = 8; /* For WMA calculation */ static int32_t rack_cwnd_block_ends_measure = 0; static int32_t rack_rwnd_block_ends_measure = 0; @@ -478,7 +478,7 @@ rack_log_alt_to_to_cancel(struct tcp_rack *rack, uint16_t flex7, uint8_t mod); static void -rack_log_pacing_delay_calc(struct tcp_rack *rack, uint32_t len, uint32_t slot, +rack_log_pacing_delay_calc(struct tcp_rack *rack, uint32_t len, uint32_t pacing_delay, uint64_t bw_est, uint64_t bw, uint64_t len_time, int method, int line, struct rack_sendmap *rsm, uint8_t quality); static struct rack_sendmap * @@ -1107,7 +1107,7 @@ rack_init_sysctls(void) SYSCTL_ADD_S32(&rack_sysctl_ctx, SYSCTL_CHILDREN(rack_pacing), OID_AUTO, "burst_reduces", CTLFLAG_RW, - &rack_slot_reduction, 4, + &rack_pacing_delay_reduction, 4, "When doing only burst mitigation what is the reduce divisor"); SYSCTL_ADD_S32(&rack_sysctl_ctx, SYSCTL_CHILDREN(rack_sysctl_root), @@ -1399,7 +1399,7 @@ rack_init_sysctls(void) SYSCTL_CHILDREN(rack_timers), OID_AUTO, "hpts_max_reduce", CTLFLAG_RW, &rack_max_reduce, 10, - "Max percentage we will reduce slot by for pacing when we are behind"); + "Max percentage we will reduce pacing delay by for pacing when we are behind"); SYSCTL_ADD_U32(&rack_sysctl_ctx, SYSCTL_CHILDREN(rack_timers), OID_AUTO, "persmin", CTLFLAG_RW, @@ -2700,7 +2700,7 @@ rack_log_retran_reason(struct tcp_rack *rack, struct rack_sendmap *rsm, uint32_t } static void -rack_log_to_start(struct tcp_rack *rack, uint32_t cts, uint32_t to, int32_t slot, uint8_t which) +rack_log_to_start(struct tcp_rack *rack, uint32_t cts, uint32_t to, int32_t pacing_delay, uint8_t which) { if (tcp_bblogging_on(rack->rc_tp)) { union tcp_log_stackspecific log; @@ -2710,7 +2710,7 @@ rack_log_to_start(struct tcp_rack *rack, uint32_t cts, uint32_t to, int32_t slot log.u_bbr.flex1 = rack->rc_tp->t_srtt; log.u_bbr.flex2 = to; log.u_bbr.flex3 = rack->r_ctl.rc_hpts_flags; - log.u_bbr.flex4 = slot; + log.u_bbr.flex4 = pacing_delay; log.u_bbr.flex5 = rack->rc_tp->t_hpts_slot; log.u_bbr.flex6 = rack->rc_tp->t_rxtcur; log.u_bbr.flex7 = rack->rc_in_persist; @@ -3034,14 +3034,14 @@ rack_log_progress_event(struct tcp_rack *rack, struct tcpcb *tp, uint32_t tick, } static void -rack_log_type_bbrsnd(struct tcp_rack *rack, uint32_t len, uint32_t slot, uint32_t cts, struct timeval *tv, int line) +rack_log_type_bbrsnd(struct tcp_rack *rack, uint32_t len, uint32_t pacing_delay, uint32_t cts, struct timeval *tv, int line) { if (rack_verbose_logging && tcp_bblogging_on(rack->rc_tp)) { union tcp_log_stackspecific log; memset(&log, 0, sizeof(log)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_tp); - log.u_bbr.flex1 = slot; + log.u_bbr.flex1 = pacing_delay; if (rack->rack_no_prr) log.u_bbr.flex2 = 0; else @@ -3139,7 +3139,7 @@ rack_log_type_pacing_sizes(struct tcpcb *tp, struct tcp_rack *rack, uint32_t arg } static void -rack_log_type_just_return(struct tcp_rack *rack, uint32_t cts, uint32_t tlen, uint32_t slot, +rack_log_type_just_return(struct tcp_rack *rack, uint32_t cts, uint32_t tlen, uint32_t pacing_delay, uint8_t hpts_calling, int reason, uint32_t cwnd_to_use) { if (tcp_bblogging_on(rack->rc_tp)) { @@ -3148,7 +3148,7 @@ rack_log_type_just_return(struct tcp_rack *rack, uint32_t cts, uint32_t tlen, ui memset(&log, 0, sizeof(log)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_tp); - log.u_bbr.flex1 = slot; + log.u_bbr.flex1 = pacing_delay; log.u_bbr.flex2 = rack->r_ctl.rc_hpts_flags; log.u_bbr.flex4 = reason; if (rack->rack_no_prr) @@ -6482,7 +6482,7 @@ rack_log_hpts_diag(struct tcp_rack *rack, uint32_t cts, log.u_bbr.flex2 = diag->p_cur_slot; log.u_bbr.flex3 = diag->slot_req; log.u_bbr.flex4 = diag->inp_hptsslot; - log.u_bbr.flex5 = diag->slot_remaining; + log.u_bbr.flex5 = diag->time_remaining; log.u_bbr.flex6 = diag->need_new_to; log.u_bbr.flex7 = diag->p_hpts_active; log.u_bbr.flex8 = diag->p_on_min_sleep; @@ -6529,14 +6529,14 @@ rack_log_wakeup(struct tcpcb *tp, struct tcp_rack *rack, struct sockbuf *sb, uin static void rack_start_hpts_timer (struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts, - int32_t slot, uint32_t tot_len_this_send, int sup_rack) + int32_t usecs, uint32_t tot_len_this_send, int sup_rack) { struct hpts_diag diag; struct inpcb *inp = tptoinpcb(tp); struct timeval tv; uint32_t delayed_ack = 0; uint32_t hpts_timeout; - uint32_t entry_slot = slot; + uint32_t entry_usecs = usecs; uint8_t stopped; uint32_t left = 0; uint32_t us_cts; @@ -6557,7 +6557,7 @@ rack_start_hpts_timer (struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts, rack->r_ctl.rc_hpts_flags = 0; us_cts = tcp_get_usecs(&tv); /* Now early/late accounting */ - rack_log_pacing_delay_calc(rack, entry_slot, slot, 0, 0, 0, 26, __LINE__, NULL, 0); + rack_log_pacing_delay_calc(rack, entry_usecs, usecs, 0, 0, 0, 26, __LINE__, NULL, 0); if (rack->r_early && (rack->rc_ack_can_sendout_data == 0)) { /* * We have a early carry over set, @@ -6568,7 +6568,7 @@ rack_start_hpts_timer (struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts, * penalize the next timer for being awoke * by an ack aka the rc_agg_early (non-paced mode). */ - slot += rack->r_ctl.rc_agg_early; + usecs += rack->r_ctl.rc_agg_early; rack->r_early = 0; rack->r_ctl.rc_agg_early = 0; } @@ -6580,29 +6580,29 @@ rack_start_hpts_timer (struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts, * really depends on what * the current pacing time is. */ - if (rack->r_ctl.rc_agg_delayed >= slot) { + if (rack->r_ctl.rc_agg_delayed >= usecs) { /* * We can't compensate for it all. * And we have to have some time * on the clock. We always have a min - * 10 slots (10 x 10 i.e. 100 usecs). + * 10 HPTS timer units (10 x 10 i.e. 100 usecs). */ - if (slot <= HPTS_USECS_PER_SLOT) { + if (usecs <= HPTS_USECS_PER_SLOT) { /* We gain delay */ - rack->r_ctl.rc_agg_delayed += (HPTS_USECS_PER_SLOT - slot); - slot = HPTS_USECS_PER_SLOT; + rack->r_ctl.rc_agg_delayed += (HPTS_USECS_PER_SLOT - usecs); + usecs = HPTS_USECS_PER_SLOT; } else { /* We take off some */ - rack->r_ctl.rc_agg_delayed -= (slot - HPTS_USECS_PER_SLOT); - slot = HPTS_USECS_PER_SLOT; + rack->r_ctl.rc_agg_delayed -= (usecs - HPTS_USECS_PER_SLOT); + usecs = HPTS_USECS_PER_SLOT; } } else { - slot -= rack->r_ctl.rc_agg_delayed; + usecs -= rack->r_ctl.rc_agg_delayed; rack->r_ctl.rc_agg_delayed = 0; /* Make sure we have 100 useconds at minimum */ - if (slot < HPTS_USECS_PER_SLOT) { - rack->r_ctl.rc_agg_delayed = HPTS_USECS_PER_SLOT - slot; - slot = HPTS_USECS_PER_SLOT; + if (usecs < HPTS_USECS_PER_SLOT) { + rack->r_ctl.rc_agg_delayed = HPTS_USECS_PER_SLOT - usecs; + usecs = HPTS_USECS_PER_SLOT; } if (rack->r_ctl.rc_agg_delayed == 0) rack->r_late = 0; *** 561 LINES SKIPPED *** From nobody Mon Oct 13 20:39:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clq3L2wwyz6CKqb; Mon, 13 Oct 2025 20:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clq3L2TYPz3V4l; Mon, 13 Oct 2025 20:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YUVAqqdWH7TXNLaaCHHexYGTqqsHAbECSWY+ubFYQ4=; b=R7iH/+bksmRGRIOntFbZZb7fdSs4ar9blMTJZ7cG0CMNZ63Iw1WrNHWx/KfMkCQGPJExH3 KfNdGs3fWH7Wx/hQhxlI41qqiSJf04pTILy9u2FAaESffm0TCBufmBWFoSb1ngRS6WqcZb IzDGmLMDaomd8Qc31pf9cHFpYJXcKjduvcoETa7c0BU0nwFkBbw7GXuNt69TxjUOqzNmw1 4QLwEXLKpkcVb6rZkDlP80mzwL7IlvvoIEjODuUgCpZOxG0IF/LLobhyRmGw65RDwRKZY+ jxLMlDJeofsvcT5reButqgGYdinDZqp5HVbT+8YDdNvakddES7nTvVlGln2+vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760387998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YUVAqqdWH7TXNLaaCHHexYGTqqsHAbECSWY+ubFYQ4=; b=eQNLn798pUqT9dzamvanGUQE3tV+mBN5zHfVMXUi4iKs4fBXhUXrpInD22W1pkXUd/leN+ sOVSOFtDsxTnuWa2cktlDr5xB7njMmI+Dh8oXRPIz9gcNLpUMpT8+jNDHt+mXwvXqOUQOn W0GKbrPtKHI2TVYb61r14enA2WV3gV8+RxZzNdSgHbs9MB70f1Mk/1fEw4I1twsoBE8IvG N+pmUdFBrLIFxot/KqzlGtfA5uUrVQnZuSrFSWEjqNBKZTfxMU5jkvSYDZaArUccBhlBhB kjX7IREAZUKDFLSWe1179Y1T2TMLgbh8A4zwfz2gSm/yRPyjJbvHxPPZOU0jaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760387998; a=rsa-sha256; cv=none; b=AZpkl86rr5MNODIbg6QZ+0fmM0BsXuQaAxvcN81E9wvnjOAGd2ljO/f2eXdH369hEAqdnF juStnq3MBpxCcM7fAUhPeoWdbRCYHR9feRlAVZfPc/wV8sjQ2AtuPNfz6z51i72iGsglxZ KTDxIPNgJ7yGlOXjZaKO3B3iEZdLJB8dYnpOA0OcVQG1/LBKb8xRJvwDZtrBWuNSB19mv3 GV4CC3Ph/2GfE/eDxHiiUEB5fG4d8pWn9jd6yGoLcBUuSeQU4OmUELIQEKzPFkB+O8KSmk W93aKB/d/tLeo95RAXXbAqIsGLUQZ7crbbr7/RgKWptVoeUn83tRVuNuX21zqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clq3L1lZgz6hW; Mon, 13 Oct 2025 20:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DKdwk8034739; Mon, 13 Oct 2025 20:39:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DKdwxN034736; Mon, 13 Oct 2025 20:39:58 GMT (envelope-from git) Date: Mon, 13 Oct 2025 20:39:58 GMT Message-Id: <202510132039.59DKdwxN034736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: bf48bc994a92 - main - tcp: remove unused argument in HPTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf48bc994a92850f7717b79da3a10a80725073bd Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=bf48bc994a92850f7717b79da3a10a80725073bd commit bf48bc994a92850f7717b79da3a10a80725073bd Author: Nick Banks AuthorDate: 2025-10-13 20:38:51 +0000 Commit: Michael Tuexen CommitDate: 2025-10-13 20:38:51 +0000 tcp: remove unused argument in HPTS Reviewed by: tuexen Sponsored by: Netflix, Inc. --- sys/netinet/tcp_hpts.c | 9 ++------- sys/netinet/tcp_hpts.h | 7 ------- sys/netinet/tcp_hpts_test.c | 5 ----- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index a50ad3fa6b33..c54459bb5f01 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -798,7 +798,7 @@ max_slots_available(struct tcp_hpts_entry *hpts, uint32_t wheel_slot, uint32_t * #ifdef INVARIANTS static void check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct tcpcb *tp, - uint32_t hptsslot, int line) + uint32_t hptsslot) { /* * Sanity checks for the pacer with invariants @@ -830,13 +830,8 @@ check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct tcpcb *tp, #endif void -#ifdef INVARIANTS -__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, - int32_t line, struct hpts_diag *diag) -#else __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, struct hpts_diag *diag) -#endif { struct tcp_hpts_entry *hpts; struct timeval tv; @@ -934,7 +929,7 @@ __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, diag->inp_hptsslot = tp->t_hpts_slot; } #ifdef INVARIANTS - check_if_slot_would_be_wrong(hpts, tp, tp->t_hpts_slot, line); + check_if_slot_would_be_wrong(hpts, tp, tp->t_hpts_slot); #endif if (__predict_true(tp->t_in_hpts != IHPTS_MOVING)) tcp_hpts_insert_internal(tp, hpts); diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index 8b69e6af35ed..6b05f9701ac2 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -127,17 +127,10 @@ tcp_in_hpts(struct tcpcb *tp) * that INP_WLOCK() or from destroying your TCB where again * you should already have the INP_WLOCK(). */ -#ifdef INVARIANTS -void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, - int32_t line, struct hpts_diag *diag); -#define tcp_hpts_insert(tp, usecs, diag) \ - __tcp_hpts_insert(tcp_hptsi_pace, (tp), (usecs), __LINE__, (diag)) -#else void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, struct hpts_diag *diag); #define tcp_hpts_insert(tp, usecs, diag) \ __tcp_hpts_insert(tcp_hptsi_pace, (tp), (usecs), (diag)) -#endif void __tcp_set_hpts(struct tcp_hptsi *pace, struct tcpcb *tp); #define tcp_set_hpts(tp) __tcp_set_hpts(tcp_hptsi_pace, tp) diff --git a/sys/netinet/tcp_hpts_test.c b/sys/netinet/tcp_hpts_test.c index 9217c3205587..bab5827e0572 100644 --- a/sys/netinet/tcp_hpts_test.c +++ b/sys/netinet/tcp_hpts_test.c @@ -56,13 +56,8 @@ /* Custom definitions that take the tcp_hptsi */ #define tcp_hpts_init(pace, tp) __tcp_hpts_init((pace), (tp)) #define tcp_hpts_remove(pace, tp) __tcp_hpts_remove((pace), (tp)) -#ifdef INVARIANTS -#define tcp_hpts_insert(pace, tp, usecs, diag) \ - __tcp_hpts_insert((pace), (tp), (usecs), __LINE__, (diag)) -#else #define tcp_hpts_insert(pace, tp, usecs, diag) \ __tcp_hpts_insert((pace), (tp), (usecs), (diag)) -#endif #define tcp_set_hpts(pace, tp) __tcp_set_hpts((pace), (tp)) static MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts_test", "TCP hpts test"); From nobody Mon Oct 13 20:46:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clqBq0w3wz6CLLT; Mon, 13 Oct 2025 20:46: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 4clqBq0MRZz3Wjv; Mon, 13 Oct 2025 20:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760388387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f79AxI62p1R8zAhZI3R3+8iCT+YdsPMFnQmARYTGuMw=; b=FZ6BKAlcCoTdGDDlExYyOLr83/MD1IJWckWF6Z1KGebALjgYAZlEHyLWtt8Ce83Z7YcewG wus93ExvyRLEBL20GI2chbmLodij41eCp+nV1tbLzSJo4dgbArxEGmEW/KosW6qGxNu9mT O2XtIUyLEO3fIrkQb+EGhh8vAXFWuCCIzhb2ZQ/4yKCCWh82VdZR5AhMkjU/2DS9vd9wG4 Lrt4WteHBg7+QFCB9cQax+4A0Zy39VypTraF6M7n+H/MCRCzgAw2ms9aK9MWxXBDcK6nxL y/C44qXwIuGMjDV36e6JDOYV6HNk7dSeJLlj5HzmojfwxRThMiCMyVsZTFbylQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760388387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f79AxI62p1R8zAhZI3R3+8iCT+YdsPMFnQmARYTGuMw=; b=CWKSNurr7PUYWYDvbm+offQjNuXEN7men+V01N5HiSyDNGz8YR5hN7/aAXtayQnlCvJcr3 el0en6bsSItlFPMNFq66T5zNSxQ1s9t2vaTnSFq80/VPz9ENzDWGebBBoJbFAb974xBdZv ZNiMReGdv6uzlH5sHBNbmPDM6Nk+lom0sqc8iOgxgdk/kK81RligwL/mS62CNbArbgx/Hc IGXHDvsbqZHA1FfFoG1aufTDiLrcwIPcbLEfRDfL2Q0r2H67hBwbgrKVfz/XbQwdBSy3hm 8avQT84dVqLLNGHDdOBgj3jFYkPzHkOhbhEognWoYKlo3VFNsduO4iFyE3Zzww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760388387; a=rsa-sha256; cv=none; b=jvpK0ldymWeL5YgQj2h1jxWqcIIxYHZlryiDACeyzF096vclnql44zVLbk3hfHGoW6o80v y2oT/uOGKHGpH5L7bBTUI3jd7TB3q+FQIPN5VpCnWVVjAYnZjqLqstDA7R8yzqM3Z6FMZ7 tr56NrXeBeHnTEZ156q+DVFLzLTor1oSFAlt1H20ugpajm3DuTr00+8me7tQ1oMjCj0/EW rvnk1Td5Kbci7KTKBDqm3nCBJ+bL38mtPQ7KR7Qw2IVG6ivfmSoqq0bQvmSRSeLLMoyDLe GOLh1cwBMv+HENkbiTJgG7ZcFJ31NdlKbC75wFfxQo3XUlt1Cpq7WxvclSXfdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clqBp71YSz6hx; Mon, 13 Oct 2025 20:46:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DKkQ27052927; Mon, 13 Oct 2025 20:46:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DKkQ3r052924; Mon, 13 Oct 2025 20:46:26 GMT (envelope-from git) Date: Mon, 13 Oct 2025 20:46:26 GMT Message-Id: <202510132046.59DKkQ3r052924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 2241cd10d6e0 - main - tcp: add missing header file List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2241cd10d6e0eaf16d1f3090f1d438543e127f0c Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2241cd10d6e0eaf16d1f3090f1d438543e127f0c commit 2241cd10d6e0eaf16d1f3090f1d438543e127f0c Author: Nick Banks AuthorDate: 2025-10-13 20:45:39 +0000 Commit: Michael Tuexen CommitDate: 2025-10-13 20:45:39 +0000 tcp: add missing header file Reviewed by: tuexen Sponsored by: Netflix, Inc. --- sys/netinet/tcp_hpts_internal.h | 184 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) diff --git a/sys/netinet/tcp_hpts_internal.h b/sys/netinet/tcp_hpts_internal.h new file mode 100644 index 000000000000..8b33e03a6981 --- /dev/null +++ b/sys/netinet/tcp_hpts_internal.h @@ -0,0 +1,184 @@ +/*- + * Copyright (c) 2025 Netflix, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __tcp_hpts_internal_h__ +#define __tcp_hpts_internal_h__ + +/* + * TCP High Precision Timer System (HPTS) - Internal Definitions + * + * This header contains internal structures, constants, and interfaces that are + * implemented in tcp_hpts.c but exposed to enable comprehensive unit testing of + * the HPTS subsystem. + */ + +#if defined(_KERNEL) + +/* + * The hpts uses a 102400 wheel. The wheel + * defines the time in 10 usec increments (102400 x 10). + * This gives a range of 10usec - 1024ms to place + * an entry within. If the user requests more than + * 1.024 second, a remaineder is attached and the hpts + * when seeing the remainder will re-insert the + * inpcb forward in time from where it is until + * the remainder is zero. + */ + +#define NUM_OF_HPTSI_SLOTS 102400 + +/* The number of connections after which the dynamic sleep logic kicks in. */ +#define DEFAULT_CONNECTION_THRESHOLD 100 + +/* + * The hpts uses a 102400 wheel. The wheel + * defines the time in 10 usec increments (102400 x 10). + * This gives a range of 10usec - 1024ms to place + * an entry within. If the user requests more than + * 1.024 second, a remaineder is attached and the hpts + * when seeing the remainder will re-insert the + * inpcb forward in time from where it is until + * the remainder is zero. + */ + +#define NUM_OF_HPTSI_SLOTS 102400 + +/* Convert microseconds to HPTS slots */ +#define HPTS_USEC_TO_SLOTS(x) ((x+9) /10) + +/* The number of connections after which the dynamic sleep logic kicks in. */ +#define DEFAULT_CONNECTION_THRESHOLD 100 + +extern int tcp_bind_threads; /* Thread binding configuration + * (0=none, 1=cpu, 2=numa) */ + +/* + * Abstraction layer controlling time, interrupts and callouts. + */ +struct tcp_hptsi_funcs { + void (*microuptime)(struct timeval *tv); + int (*swi_add)(struct intr_event **eventp, const char *name, + driver_intr_t handler, void *arg, int pri, enum intr_type flags, + void **cookiep); + int (*swi_remove)(void *cookie); + void (*swi_sched)(void *cookie, int flags); + int (*intr_event_bind)(struct intr_event *ie, int cpu); + int (*intr_event_bind_ithread_cpuset)(struct intr_event *ie, + struct _cpuset *mask); + void (*callout_init)(struct callout *c, int mpsafe); + int (*callout_reset_sbt_on)(struct callout *c, sbintime_t sbt, + sbintime_t precision, void (*func)(void *), void *arg, int cpu, + int flags); + int (*_callout_stop_safe)(struct callout *c, int flags); +}; + +/* Default function table for system operation */ +extern const struct tcp_hptsi_funcs tcp_hptsi_default_funcs; + +/* Each hpts has its own p_mtx which is used for locking */ +#define HPTS_MTX_ASSERT(hpts) mtx_assert(&(hpts)->p_mtx, MA_OWNED) +#define HPTS_LOCK(hpts) mtx_lock(&(hpts)->p_mtx) +#define HPTS_TRYLOCK(hpts) mtx_trylock(&(hpts)->p_mtx) +#define HPTS_UNLOCK(hpts) mtx_unlock(&(hpts)->p_mtx) + +struct tcp_hpts_entry { + /* Cache line 0x00 */ + struct mtx p_mtx; /* Mutex for hpts */ + struct timeval p_mysleep; /* Our min sleep time */ + uint64_t syscall_cnt; + uint64_t sleeping; /* What the actual sleep was (if sleeping) */ + uint16_t p_hpts_active; /* Flag that says hpts is awake */ + uint8_t p_wheel_complete; /* have we completed the wheel arc walk? */ + uint32_t p_runningslot; /* Current slot we are at if we are running */ + uint32_t p_prev_slot; /* Previous slot we were on */ + uint32_t p_cur_slot; /* Current slot in wheel hpts is draining */ + uint32_t p_nxt_slot; /* The next slot outside the current range + * of slots that the hpts is running on. */ + int32_t p_on_queue_cnt; /* Count on queue in this hpts */ + uint8_t p_direct_wake :1, /* boolean */ + p_on_min_sleep:1, /* boolean */ + p_hpts_wake_scheduled:1,/* boolean */ + hit_callout_thresh:1, + p_avail:4; + uint8_t p_fill[3]; /* Fill to 32 bits */ + /* Cache line 0x40 */ + struct hptsh { + TAILQ_HEAD(, tcpcb) head; + uint32_t count; + uint32_t gencnt; + } *p_hptss; /* Hptsi wheel */ + uint32_t p_hpts_sleep_time; /* Current sleep interval having a max + * of 255ms */ + uint32_t overidden_sleep; /* what was overrided by min-sleep for logging */ + uint32_t saved_curslot; /* for logging */ + uint32_t saved_prev_slot; /* for logging */ + uint32_t p_delayed_by; /* How much were we delayed by */ + /* Cache line 0x80 */ + struct sysctl_ctx_list hpts_ctx; + struct sysctl_oid *hpts_root; + struct intr_event *ie; + void *ie_cookie; + uint16_t p_cpu; /* The hpts CPU */ + struct tcp_hptsi *p_hptsi; /* Back pointer to parent hptsi structure */ + /* There is extra space in here */ + /* Cache line 0x100 */ + struct callout co __aligned(CACHE_LINE_SIZE); +} __aligned(CACHE_LINE_SIZE); + +struct tcp_hptsi { + struct cpu_group **grps; + struct tcp_hpts_entry **rp_ent; /* Array of hptss */ + uint32_t *cts_last_ran; + uint32_t grp_cnt; + uint32_t rp_num_hptss; /* Number of hpts threads */ + struct hpts_domain_info { + int count; + int cpu[MAXCPU]; + } domains[MAXMEMDOM]; /* Per-NUMA domain CPU assignments */ + const struct tcp_hptsi_funcs *funcs; /* Function table for testability */ +}; + +/* + * Core tcp_hptsi structure manipulation functions. + */ +struct tcp_hptsi* tcp_hptsi_create(const struct tcp_hptsi_funcs *funcs, + bool enable_sysctl); +void tcp_hptsi_destroy(struct tcp_hptsi *pace); +void tcp_hptsi_start(struct tcp_hptsi *pace); +void tcp_hptsi_stop(struct tcp_hptsi *pace); +uint16_t tcp_hptsi_random_cpu(struct tcp_hptsi *pace); +int32_t tcp_hptsi(struct tcp_hpts_entry *hpts, bool from_callout); + +void tcp_hpts_wake(struct tcp_hpts_entry *hpts); + +/* + * LRO HPTS initialization and uninitialization, only for internal use by the + * HPTS code. + */ +void tcp_lro_hpts_init(void); +void tcp_lro_hpts_uninit(void); + +#endif /* defined(_KERNEL) */ +#endif /* __tcp_hpts_internal_h__ */ From nobody Mon Oct 13 21:16:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clqsD4Shcz6CNHF; Mon, 13 Oct 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 4clqsD4Dnmz3ZmQ; Mon, 13 Oct 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=1760390176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECcHVF80QrkcHD9Ocss9uYni1M/lHsLASYgrg4s0/e8=; b=D0wZPOTxMr1Gv10ONiHO0SI7gcQTYz4kz7BnxExyN4PnuZyIxvybr12u3OXCFJVhg+vW3+ 3Vyd7tPJMw8nUYgV+IvU5vudg/YzP99g9BeGtvjp8ea0mz5gOk5IbWLl9qiPCjJG/yEfjX ono4wkfr1YHk3/ZUlxYeYj5uCpBGJm9stDmXy8QeyuL+5KmKH2hrnKELnZZe+JjjTtJv4E /8ZuWuQ3auinIwquMoBtky+CsU/v2hHAfTSA3zGvos0HkglyRFE/3BNdBiHz/cXCcB2JYg LxDz6hAdM9T0fc3VH8qq4yHrioZIrqxVNDwPEJKKfOM7nwt8jjY+b4W4KqTzrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760390176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECcHVF80QrkcHD9Ocss9uYni1M/lHsLASYgrg4s0/e8=; b=v6fnU10uxNsHrEp8oYSfpZgZH6oJvBNavvQIKVt6ZYuHLO8bNPKr0PtJNruiCrw54BnKOM 3Fs7Zp/y1EODWPy9oREsHEcdRYG3OFkDXNPNzUgRJkH84TUy/ighGcWrie3jSUs2HVWbjV ekaitiVD5Eiq2tXNtIwtXRDdHalwE9AgxZLhfrXkja57Vwasj/ENuV0sUXyqYMwnww6Ug/ l7mIfLTIQgdL4BoXb1cAxvy7JDiwT3y1QzQ6yn2XhMFBigpT7lB5ZSzPCFs7n1ru0S943u ekfH8OOgNdv1dMosEAmsRmJgLJ90KJS8qv+XH0t8wQXOJf7/zh4gx50jAaYvPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760390176; a=rsa-sha256; cv=none; b=caowrPBF4aOfaoIkUL3zlerHQJ6q8+8tNunsza5yIqB7k8FJIt3ZfpcOw42b4V4BZ6zttF vJ/RyJcQlajIXSrnpwSZW0fYNe80wOHtrWyiIQLyuLZNCAhpkFKZuKQuSyIr8ph0WC8VKu qioTmNKTA4HwKPD29omZpj8ZFNIR5JHV6tQ1YM+A4JMhE3qvv5InHKiZQdm2SM4B5S52sR 6xpMl65mIrACbGXBiseAegLtT1v2t/Rb3mW3QYNSLKvYpPK0O8RaL5PxLdcbtZubI/7bRr xZP1EFeVQ6eMDVLseGWbFVUlTJ3iPuOoxlC2QuQRuvSkZ3EUCc1HYTNHkuXqUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clqsD3Q5qz7qP; Mon, 13 Oct 2025 21:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DLGG7n009942; Mon, 13 Oct 2025 21:16:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DLGGdS009938; Mon, 13 Oct 2025 21:16:16 GMT (envelope-from git) Date: Mon, 13 Oct 2025 21:16:16 GMT Message-Id: <202510132116.59DLGGdS009938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 0d4642a67e59 - main - Add --libxo support for geom status and list sub commands. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d4642a67e59f8da5e00a05001c342bdad2a806f Auto-Submitted: auto-generated The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=0d4642a67e59f8da5e00a05001c342bdad2a806f commit 0d4642a67e59f8da5e00a05001c342bdad2a806f Author: Kirk McKusick AuthorDate: 2025-10-13 21:15:05 +0000 Commit: Kirk McKusick CommitDate: 2025-10-13 21:15:51 +0000 Add --libxo support for geom status and list sub commands. Submitted-by: Johan Söllvander MFC-after: 1 week Differential Revision: https://reviews.freebsd.org/D37615 --- sbin/geom/Makefile | 2 +- sbin/geom/core/geom.c | 232 +++++++++++++++++++++++++++++++++----------------- 2 files changed, 157 insertions(+), 77 deletions(-) diff --git a/sbin/geom/Makefile b/sbin/geom/Makefile index 078503d3ae67..61561ef1ff1b 100644 --- a/sbin/geom/Makefile +++ b/sbin/geom/Makefile @@ -9,7 +9,7 @@ MAN= geom.8 CFLAGS+= -I${.CURDIR} -I${.CURDIR}/core CFLAGS+= -DGEOM_CLASS_DIR=\"${GEOM_CLASS_DIR}\" -LIBADD= geom util +LIBADD= geom util xo .if defined(RESCUE) .PATH: ${SRCTOP}/lib/geom/part \ diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index b78021194ddd..496123f08274 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -49,9 +49,12 @@ #include #include #include +#include #include "misc/subr.h" +#define GEOM_XO_VERSION "1" + #ifdef STATIC_GEOM_CLASSES extern uint32_t gpart_version; extern struct g_command gpart_class_commands[]; @@ -513,6 +516,7 @@ run_command(int argc, char *argv[]) gctl_free(req); if (verbose) printf("Done.\n"); + xo_finish(); exit(EXIT_SUCCESS); } @@ -810,6 +814,10 @@ main(int argc, char *argv[]) provider_name = NULL; tflag = false; + argc = xo_parse_args(argc, argv); + if (argc < 0) + return (argc); + if (strcmp(getprogname(), "geom") == 0) { while ((ch = getopt(argc, argv, "hp:t")) != -1) { switch (ch) { @@ -831,6 +839,7 @@ main(int argc, char *argv[]) * Don't adjust argc and argv, it would break get_class(). */ } + xo_set_version(GEOM_XO_VERSION); if (tflag && provider_name != NULL) { errx(EXIT_FAILURE, @@ -839,6 +848,7 @@ main(int argc, char *argv[]) if (provider_name != NULL) { list_one_geom_by_provider(provider_name); + xo_finish(); return (0); } @@ -882,29 +892,33 @@ find_geom(struct gclass *classp, const char *name) } static void -list_one_provider(struct gprovider *pp, const char *prefix) +list_one_provider(struct gprovider *pp, const char *padding) { struct gconfig *conf; char buf[5]; - printf("Name: %s\n", pp->lg_name); + xo_emit("{Lcw:Name}{:Name}\n", pp->lg_name); humanize_number(buf, sizeof(buf), (int64_t)pp->lg_mediasize, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_mediasize, - buf); - printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); + xo_emit("{P:/%s}{Lcw:Mediasize}{:Mediasize/%jd} ({N:/%s})\n", + padding, (intmax_t)pp->lg_mediasize, buf); + xo_emit("{P:/%s}{Lcw:Sectorsize}{:Sectorsize/%u} \n", + padding, pp->lg_sectorsize); if (pp->lg_stripesize > 0 || pp->lg_stripeoffset > 0) { - printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); - printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); + xo_emit("{P:/%s}{Lcw:Stripesize}{Stripesize/%ju}\n", + padding, pp->lg_stripesize); + xo_emit("{P:/%s}{Lcw:Stripeoffset}{Stripeoffset/%ju}\n", + padding, pp->lg_stripeoffset); } - printf("%sMode: %s\n", prefix, pp->lg_mode); + xo_emit("{P:/%s}{Lcw:Mode}{Mode}\n", padding, pp->lg_mode); LIST_FOREACH(conf, &pp->lg_config, lg_config) { - printf("%s%s: %s\n", prefix, conf->lg_name, conf->lg_val); + xo_emit("{P:/%s}{Lcwa:}{a:}\n", padding, conf->lg_name, + conf->lg_name, conf->lg_val); } } static void -list_one_consumer(struct gconsumer *cp, const char *prefix) +list_one_consumer(struct gconsumer *cp, const char *padding) { struct gprovider *pp; struct gconfig *conf; @@ -915,20 +929,24 @@ list_one_consumer(struct gconsumer *cp, const char *prefix) else { char buf[5]; - printf("Name: %s\n", pp->lg_name); + xo_emit("{Lcw:Name}{:Name}\n", pp->lg_name); humanize_number(buf, sizeof(buf), (int64_t)pp->lg_mediasize, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - printf("%sMediasize: %jd (%s)\n", prefix, - (intmax_t)pp->lg_mediasize, buf); - printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); + xo_emit("{P:/%s}{Lcw:Mediasize}{:Mediasize/%jd} ({N:/%s})\n", + padding, (intmax_t)pp->lg_mediasize, buf); + xo_emit("{P:/%s}{Lcw:Sectorsize}{:Sectorsize/%u}\n", + padding, pp->lg_sectorsize); if (pp->lg_stripesize > 0 || pp->lg_stripeoffset > 0) { - printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); - printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); + xo_emit("{P:/%s}{Lcw:Stripesize}{:Stripesize/%ju}\n", + padding, pp->lg_stripesize); + xo_emit("{P:/%s}{Lcw:Stripeoffset}{:Stripesize/%ju}\n", + padding, pp->lg_stripeoffset); } - printf("%sMode: %s\n", prefix, cp->lg_mode); + xo_emit("{P:/%s}{Lcw:Mode}{:Mode}\n", padding, pp->lg_mode); } LIST_FOREACH(conf, &cp->lg_config, lg_config) { - printf("%s%s: %s\n", prefix, conf->lg_name, conf->lg_val); + xo_emit("{P:/%s}{Lcwa:}{a:}\n", padding, conf->lg_name, + conf->lg_name, conf->lg_val); } } @@ -940,27 +958,36 @@ list_one_geom(struct ggeom *gp) struct gconfig *conf; unsigned n; - printf("Geom name: %s\n", gp->lg_name); + xo_emit("{Lcw:Geom name}{:Name}\n", gp->lg_name); LIST_FOREACH(conf, &gp->lg_config, lg_config) { - printf("%s: %s\n", conf->lg_name, conf->lg_val); + xo_emit("{Lcwa:}{a:}\n", conf->lg_name, conf->lg_name, + conf->lg_val); } if (!LIST_EMPTY(&gp->lg_provider)) { - printf("Providers:\n"); + xo_open_list("Providers"); + xo_emit("{Tc:Providers}\n"); n = 1; LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { - printf("%u. ", n++); + xo_emit("{T:/%u} ", n++); + xo_open_instance("provider"); list_one_provider(pp, " "); + xo_close_instance("provider"); } + xo_close_list("Providers"); } if (!LIST_EMPTY(&gp->lg_consumer)) { - printf("Consumers:\n"); + xo_open_list("Consumers"); + xo_emit("{Tc:Consumers}\n"); n = 1; LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { - printf("%u. ", n++); + xo_emit("{T:/%u} ", n++); + xo_open_instance("consumer"); list_one_consumer(cp, " "); + xo_close_instance("consumer"); } + xo_close_list("Consumers"); } - printf("\n"); + xo_emit("\n"); } static void @@ -978,8 +1005,10 @@ list_one_geom_by_provider(const char *provider_name) if (gp == NULL) errx(EXIT_FAILURE, "Cannot find provider '%s'.", provider_name); - printf("Geom class: %s\n", gp->lg_class->lg_name); + xo_open_container("Geom"); + xo_emit("{Lwc:Geom class}{:Class}\n", gp->lg_class->lg_name); list_one_geom(gp); + xo_close_container("Geom"); } static void @@ -1038,14 +1067,20 @@ std_list(struct gctl_req *req, unsigned flags __unused) "an instance named '%s'.", gclass_name, name); } + xo_open_container("Geom"); list_one_geom(gp); + xo_close_container("Geom"); } } else { + xo_open_list("Geoms"); LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { if (LIST_EMPTY(&gp->lg_provider) && !all) continue; + xo_open_instance("geom"); list_one_geom(gp); + xo_close_instance("geom"); } + xo_close_list("Geoms"); } geom_deletetree(&mesh); } @@ -1115,34 +1150,24 @@ status_update_len_prs(struct ggeom *gp, int *name_len, int *status_len) } static char * -status_one_consumer(struct gconsumer *cp) +status_one_consumer(struct gconsumer *cp, const char *value) { - static char buf[256]; struct gprovider *pp; struct gconfig *conf; - const char *state, *syncr; + char *ret; pp = cp->lg_provider; if (pp == NULL) return (NULL); - state = NULL; - syncr = NULL; + ret = NULL; LIST_FOREACH(conf, &cp->lg_config, lg_config) { - if (strcasecmp(conf->lg_name, "state") == 0) - state = conf->lg_val; - if (strcasecmp(conf->lg_name, "synchronized") == 0) - syncr = conf->lg_val; - } - if (state == NULL && syncr == NULL) - snprintf(buf, sizeof(buf), "%s", pp->lg_name); - else if (state != NULL && syncr != NULL) { - snprintf(buf, sizeof(buf), "%s (%s, %s)", pp->lg_name, - state, syncr); - } else { - snprintf(buf, sizeof(buf), "%s (%s)", pp->lg_name, - state ? state : syncr); + if (strcasecmp(conf->lg_name, value) == 0) + ret = conf->lg_val; } - return (buf); + + if (ret == NULL) + return (NULL); + return (ret); } static void @@ -1150,8 +1175,8 @@ status_one_geom(struct ggeom *gp, int script, int name_len, int status_len) { struct gconsumer *cp; struct gconfig *conf; - const char *name, *status, *component; - int gotone; + const char *name, *status, *cstate, *csyncr; + int gotone, len; name = gp->lg_name; status = "N/A"; @@ -1161,21 +1186,49 @@ status_one_geom(struct ggeom *gp, int script, int name_len, int status_len) break; } } - gotone = 0; + gotone = len = 0; + xo_open_instance("status"); LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { - component = status_one_consumer(cp); - if (component == NULL) + cstate = status_one_consumer(cp, "state"); + csyncr = status_one_consumer(cp, "synchronized"); + if (cstate == NULL && csyncr == NULL) continue; + if (!gotone || script) { + if (!gotone) { + xo_emit("{:name/%*s} {:status/%*s} ", + name_len, name, status_len, status); + } else { + xo_emit("{d:name/%*s} {d:status/%*s} ", + name_len, name, status_len, status); + } + xo_open_list("components"); + } + + xo_open_instance("components"); + if (cstate != NULL && csyncr != NULL) { + xo_emit("{P:/%*s}{:compontent} ({:state}, {:synchronized})\n", + len, "", cp->lg_provider->lg_name, cstate, csyncr); + } else if (cstate != NULL) { + xo_emit("{P:/%*s}{:compontent} ({:state})\n", + len, "", cp->lg_provider->lg_name, cstate); + } else { + xo_emit("{P:/%*s}{:compontent} ({:synchronized})\n", + len, "", cp->lg_provider->lg_name, csyncr); + } + xo_close_instance("components"); gotone = 1; - printf("%*s %*s %s\n", name_len, name, status_len, status, - component); - if (!script) - name = status = ""; + if (!len && !script) + len = name_len + status_len + 4; } if (!gotone) { - printf("%*s %*s %s\n", name_len, name, status_len, status, - "N/A"); + xo_emit("{:name/%*s} {:status/%*s} ", name_len, name, status_len, status); + xo_open_list("components"); + xo_open_instance("components"); + xo_emit("{P:/%*s}{d:compontent}\n", len, "", "N/A"); + xo_close_instance("components"); } + xo_close_list("components"); + xo_close_instance("status"); } static void @@ -1184,9 +1237,10 @@ status_one_geom_prs(struct ggeom *gp, int script, int name_len, int status_len) struct gprovider *pp; struct gconsumer *cp; struct gconfig *conf; - const char *name, *status, *component; - int gotone; + const char *name, *status, *cstate, *csyncr; + int gotone, len; + xo_open_instance("status"); LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { name = pp->lg_name; status = "N/A"; @@ -1202,22 +1256,50 @@ status_one_geom_prs(struct ggeom *gp, int script, int name_len, int status_len) break; } } - gotone = 0; + gotone = len = 0; LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { - component = status_one_consumer(cp); - if (component == NULL) + cstate = status_one_consumer(cp, "state"); + csyncr = status_one_consumer(cp, "synchronized"); + if (cstate == NULL && csyncr == NULL) continue; + + if (!gotone || script) { + if (!gotone) { + xo_emit("{:name/%*s} {:status/%*s} ", + name_len, name, status_len, status); + } else { + xo_emit("{d:name/%*s} {d:status/%*s} ", + name_len, name, status_len, status); + } + xo_open_list("components"); + } + + xo_open_instance("component"); + if (cstate != NULL && csyncr != NULL) { + xo_emit("{P:/%*s}{:compontent} ({:state}, {:synchronized})\n", + len, "", cp->lg_provider->lg_name, cstate, csyncr); + } else if (cstate != NULL) { + xo_emit("{P:/%*s}{:compontent} ({:state})\n", + len, "", cp->lg_provider->lg_name, cstate); + } else { + xo_emit("{P:/%*s}{:compontent} ({:synchronized})\n", + len, "", cp->lg_provider->lg_name, csyncr); + } + xo_close_instance("component"); gotone = 1; - printf("%*s %*s %s\n", name_len, name, - status_len, status, component); - if (!script) - name = status = ""; + if (!len && !script) + len = name_len + status_len + 4; } if (!gotone) { - printf("%*s %*s %s\n", name_len, name, - status_len, status, "N/A"); + xo_emit("{:name/%*s} {:status/%*s} ", name_len, name, status_len, status); + xo_open_list("components"); + xo_open_instance("components"); + xo_emit("{P:/%*s}{d:compontent}\n", len, "", "N/A"); + xo_close_instance("components"); } + xo_close_list("components"); } + xo_close_instance("status"); } static void @@ -1240,13 +1322,9 @@ std_status(struct gctl_req *req, unsigned flags __unused) all = gctl_get_int(req, "all"); geoms = gctl_get_int(req, "geoms"); script = gctl_get_int(req, "script"); - if (script) { - name_len = 0; - status_len = 0; - } else { - name_len = strlen("Name"); - status_len = strlen("Status"); - } + name_len = strlen("Name"); + status_len = strlen("Status"); + if (nargs > 0) { for (i = 0, n = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); @@ -1282,9 +1360,10 @@ std_status(struct gctl_req *req, unsigned flags __unused) goto end; } if (!script) { - printf("%*s %*s %s\n", name_len, "Name", status_len, "Status", - "Components"); + xo_emit("{T:/%*s} {T:/%*s} {T:Components}\n", + name_len, "Name", status_len, "Status"); } + xo_open_list("status"); if (nargs > 0) { for (i = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); @@ -1312,6 +1391,7 @@ std_status(struct gctl_req *req, unsigned flags __unused) } } } + xo_close_list("status"); end: geom_deletetree(&mesh); } From nobody Mon Oct 13 22:08:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cls0y4mrMz6CS23; Mon, 13 Oct 2025 22:08: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 4cls0y4Fvfz3drd; Mon, 13 Oct 2025 22:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760393282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nzSjtZgjl5FIbQsbNM8jiixBG4mwH+lb2K4cI71aeAw=; b=r0Y0dWWLLiOQA2p8XKdYhpbaG1Jgq1vFi2ogWjOpxmk1+3Nq9izY3w+QnTbjOFZmoOdYzO nSOp0a1yeBqXMX2bcRDqX6fqJAaULQc0slPcxsSRNewZ0YdINy86+eoXho8dYn8KBkTN1n UiC0a3fn+m3JscP6YvBXMVmubUb78kelnFBAvmJIDV2hvS7Ho2D+UJQfZon0NgnEx2FhCz 9or7rgIk27KN8kqbGNwHsGonsAm+IhjxI4M5Zj7scOEb6zybADsgpZqXZHC9Gha6Bs/D69 6fQ0lNDi/EFuV3FqYprKBM+yPOxsNW4T/r1qdOKImqpPXnxXZiTRT9iF5eaozg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760393282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nzSjtZgjl5FIbQsbNM8jiixBG4mwH+lb2K4cI71aeAw=; b=P3khNxIea/aQeedl+/7ljF07VAoNizs0E+pfjub1QqZtL4guo0lzyeXeMt7m15ekwWchq7 9I2404gFtTPm2kMcfo/PLBvMozkgcgUisU/+UKF1Zx0eZhs1dpTImtxrw/x8FrD58O8acW pCQOC4xPNhJzTlOMmpKpBTJAzI8g3pntJ8ye0j0Ij0OTzwoEF84O1VAA/xK8HRCxug9O92 k+nL23DKZEqxLRajuQ2x7T2xklWWlJQKHt3PJU0TF19tGtMKVj/e2ENyl+DRhwaBVElFts f23Xv+yfymQTOk5tkLB6MAl3UrdoLWjxui3pDYNwqAqAjJUFt19a3RgdzN7n4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760393282; a=rsa-sha256; cv=none; b=yQ6D7DlbTL0W8SPzOIL2cTVVBaP+VWl/65ngRkLq4gGD+/t7mQLqBkGr0Ur5/yYpdYl0jv 6viSXXtHNliJI+oSMGNZcyQ6gR2FBfLrfS+wrCmfRTICCr/qkeeG2Mr/aCN0Nxwcy5Rydo vpOHIN6Z1mEoJ+jxmGmtDC4ol5zvjXI7e5tNnhE6GRQ0TTnGh7CT2wnCZ28cg6mz2mE8+U 5NO/Ff7za0QTmks/5SC3K9cBnc1NuuqSkaX3Jg3HDHiOhUcu83P+q39Z1A693D4yJRfUfu T8Bznk4n6UpfIX8EWnj4K7voxqIkxBcHkXtL4TvJ73OUG0BUgCVZR5JSob3H8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cls0y3ZZrz8ty; Mon, 13 Oct 2025 22:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59DM82Fo004077; Mon, 13 Oct 2025 22:08:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DM82w6004074; Mon, 13 Oct 2025 22:08:02 GMT (envelope-from git) Date: Mon, 13 Oct 2025 22:08:02 GMT Message-Id: <202510132208.59DM82w6004074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 4fc1e7546f12 - main - RELNOTES: Fix a typo in the 5000d023a446 entry List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4fc1e7546f1289183ec5d0b80653cab090c60399 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4fc1e7546f1289183ec5d0b80653cab090c60399 commit 4fc1e7546f1289183ec5d0b80653cab090c60399 Author: Rick Macklem AuthorDate: 2025-10-13 22:04:24 +0000 Commit: Rick Macklem CommitDate: 2025-10-13 22:04:24 +0000 RELNOTES: Fix a typo in the 5000d023a446 entry Reported by: matteo --- RELNOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index 174ce12e4148..e34a5b23a005 100644 --- a/RELNOTES +++ b/RELNOTES @@ -11,7 +11,7 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. 5000d023a446, 03da141d59ae: - Add a "-f" option to "kadmin -l dump" with can be used to + Add a "-f" option to "kadmin -l dump" which can be used to dump the Heimdal KDC database in a format that can be loaded into the MIT KDC. See https://wiki.freebsd.org/Kerberos/Heimdal2MIT_KDC_Migration From nobody Tue Oct 14 02:52:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clzKb5gXrz6Cngc; Tue, 14 Oct 2025 02:52: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 4clzKb4x2sz3DZ4; Tue, 14 Oct 2025 02:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZfaXHLzZWOtwHYaTsEdLj0zsRhjGn95q0E96TbKNjwM=; b=KMp5oXpcSbh8ZPTmbVVlfxqZqWhtDbukrfOeV2XYOvkrtvufOukoDONd4/fwiRb8sOaUwy kzUbbGluhBY4xt4MY84kaTVV7FfIJrx69qdLa+J6jKsnWDnWpi94vuHflOJZXq7fquUNQn MeV/kbKH75i2ObRwSlbdlgi4eK4c7HInN7kys5i1LCSRdux9/cyqYjNcU0VN3cPrupAo5g p/fXl/BaZtszT/fnAnmziKK3HsgyMSUuGGbwtkjLM8UZ90Bswsy+6HOEg3W6+GPA9iIHjA H54uror4npFCW5BQhaZD+IYPKk0RaH8T3IOaZhQ78CbSdRkefr7L7tNcoyFbvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZfaXHLzZWOtwHYaTsEdLj0zsRhjGn95q0E96TbKNjwM=; b=WAw+QDGQazefxNWfjyR8XjaDxdR+6FOaWMPtqskLWkpfFFz9jJN8ncaCpSeyZPXBwN8xAK aFy1siCggD5Aw1YPGCwRhX3Kzl5WnH7+F8lsQogHmJlHkOQiHp04Ax+9q+WdIQbJe40I+/ 7PUYvFaXzwb1fhw/smQpI+nvF8AXIlO+YE6WzCkh9Ccp+31iPXEYVL2S7GtCU0iLKp4sqy dTDhHA7sSmKbpgZQBzG5n4o/n8by6D9jR4BIczI0tr613x1ctptaHErrVbOG3AWwzphKDB iOdViHSdOj6oH3bwXJrfshIPUjq+qR4O36G1YXW17G1b3fnL0bssVFe7OgfXQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760410371; a=rsa-sha256; cv=none; b=bxwTQzRMRBGm6IDBzJvLK86pikj5OsJVs2Z4yvGQW44/4n0FwE5OtZ37kq4pBK8CmXop0w +1TCy6pagHi52TsxCh9ojPJ+jMVjP6U8ov/MbWtkwG5p7VTPyLDbIK9EMjk01wOg+IcbpX jIFZ981Ib5kmUupTWwJGShxhUJwacTYzow/b6OjirmRcMJieWrwVEBZ6wQ14+nK50teVrh BHQHlCYgvw5qH41FVQJ9HnILqz2qZ+FXp8nIfHBzwHeLte1tbG+b5swAmpfFP1VAwdeyJO 17jr4tkPHk8GisEncsgYVprv2hHHplbvzQjqjV13ynIFhWof8SWEDeEaExwM+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]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clzKb4X55zb5p; Tue, 14 Oct 2025 02:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59E2qpJH046360; Tue, 14 Oct 2025 02:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E2qpmW046357; Tue, 14 Oct 2025 02:52:51 GMT (envelope-from git) Date: Tue, 14 Oct 2025 02:52:51 GMT Message-Id: <202510140252.59E2qpmW046357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 16155cccc4bf - main - packages: Compress in parallel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16155cccc4bf42a5a76806128e7ef637f9ae61fe Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=16155cccc4bf42a5a76806128e7ef637f9ae61fe commit 16155cccc4bf42a5a76806128e7ef637f9ae61fe Author: Colin Percival AuthorDate: 2025-10-12 21:44:14 +0000 Commit: Colin Percival CommitDate: 2025-10-14 02:50:52 +0000 packages: Compress in parallel The FreeBSD-base pkg repository is currrently dominated by a handful of large packages: Out of a compressed repository size of ~960 MB, about 160 MB is taken up by the FreeBSD-src package, 128 MB (on amd64) is used by the FreeBSD-kernel-generic-dbg package, and 91 MB is used by the FreeBSD-src-sys package. Consequently, running 'make packages -jN' provides less benefit than one might hope, as most of the packages finish building quickly, ultimately leaving the FreeBSD-src package building by itself for a couple minutes while all the other CPUs are idle. Pass -T${PKG_CTHREADS} to the 'pkg create' commands (with a default of -T0) in order to instruct pkg's zstd compression to use multiple threads. Testing on an EC2 r7i.48xlarge instance with -j192, this reduces the time taken by 'make packages' from 6m17s to 1m39s; package creation time itself (excluding the initial process of installing into world and kernel staging directories) dropped from 5m37s to 59s. Reviewed by: ivy MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53053 --- Makefile.inc1 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index e079a23552f1..a86dead09aa1 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1964,6 +1964,7 @@ REPODIR?= ${OBJROOT}repo PKG_FORMAT?= tzst PKG_LEVEL?= -1 PKG_CLEVEL?= ${"${PKG_FORMAT:Mtar}" != "":?:-l ${PKG_LEVEL}} +PKG_CTHREADS?= 0 PKG_REPO_SIGNING_KEY?= # empty PKG_OUTPUT_DIR?= ${PKG_VERSION} PKG_ABI_FILE?= ${WSTAGEDIR}/usr/bin/uname @@ -2144,7 +2145,7 @@ create-source-src-package: _pkgbootstrap .PHONY ${SSTAGEDIR}/src.ucl ${PKG_CMD} -o ABI=${PKG_ABI} \ -o OSVERSION="${SRCRELDATE}" \ - create -f ${PKG_FORMAT} ${PKG_CLEVEL} \ + create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \ -M ${SSTAGEDIR}/src.ucl \ -p ${SSTAGEDIR}/src.plist \ -r ${SRCDIR} \ @@ -2170,7 +2171,7 @@ create-source-src-sys-package: _pkgbootstrap .PHONY ${SSTAGEDIR}/src-sys.ucl ${PKG_CMD} -o ABI=${PKG_ABI} \ -o OSVERSION="${SRCRELDATE}" \ - create -f ${PKG_FORMAT} ${PKG_CLEVEL} \ + create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \ -M ${SSTAGEDIR}/src-sys.ucl \ -p ${SSTAGEDIR}/src-sys.plist \ -r ${SRCDIR} \ @@ -2210,7 +2211,7 @@ create-world-package-${pkgname}: .PHONY ' ${WSTAGEDIR}/${pkgname}.ucl ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \ -o OSVERSION="${SRCRELDATE}" \ - create -f ${PKG_FORMAT} ${PKG_CLEVEL} \ + create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \ -M ${WSTAGEDIR}/${pkgname}.ucl \ -p ${WSTAGEDIR}/${pkgname}.plist \ -r ${WSTAGEDIR} \ @@ -2229,7 +2230,7 @@ create-sets-packages: .PHONY @for manifest in ${WSTAGEDIR}/set-*.ucl; do \ echo "--> Processing manifest: $$manifest"; \ ${PKG_CMD} -o ABI=${PKG_ABI} -o OSVERSION="${SRCRELDATE}" \ - create -f ${PKG_FORMAT} ${PKG_CLEVEL} \ + create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \ -M $$manifest \ -o "${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}" \ || exit 1; \ @@ -2259,7 +2260,7 @@ create-dtb-package: .PHONY ${KSTAGEDIR}/${DISTDIR}/dtb.ucl ; \ ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \ -o OSVERSION="${SRCRELDATE}" \ - create -f ${PKG_FORMAT} ${PKG_CLEVEL} \ + create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \ -M ${KSTAGEDIR}/${DISTDIR}/dtb.ucl \ -p ${KSTAGEDIR}/${DISTDIR}/dtb.plist \ -r ${KSTAGEDIR}/${DISTDIR} \ @@ -2296,7 +2297,7 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \ ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \ -o OSVERSION="${SRCRELDATE}" \ - create -f ${PKG_FORMAT} ${PKG_CLEVEL} \ + create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \ -M ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl \ -p ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.plist \ -r ${KSTAGEDIR}/${DISTDIR} \ @@ -2339,7 +2340,7 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \ ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \ -o OSVERSION="${SRCRELDATE}" \ - create -f ${PKG_FORMAT} ${PKG_CLEVEL} \ + create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \ -M ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl \ -p ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.plist \ -r ${KSTAGEDIR}/kernel.${_kernel} \ From nobody Tue Oct 14 02:52:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clzKd0C5Qz6Cnrc; Tue, 14 Oct 2025 02:52: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 4clzKc5HJXz3Dd7; Tue, 14 Oct 2025 02:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vfvnC7fuoUWTGvsjPsta5d9DO81qI4X5aj/bkhM1l2U=; b=YgbpoVxUFUGJ6rZOqVqe/jDYmBOJXURK9urGUimF2MlVMHYZSQdo//1Ar4zMXrzENHnSnp geeJxKs6uKcxWsfPtsVIn9lzdXBLTDdS4ifbDW+0AeVDV4TRjoDYosRxfBaKyMGl652SHD auiUare9mYCyQ4YVYr+scyUtigj2eah6LFvKTO9GJBs1gucnRaDJiruXOuTTFl6Fq5KY5y /wPdFfOZgddztW5mrhQQmwF40oQdFFi7rMB+04B/p/7fEZ8hP1tBzJRIx9HdCN5yOGy0EY eJAB+bviv9+4c+uRLkdXXvPy2BRXRcrvSSbS4x0afu5LoMdp7zLtRAP/MYBD0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vfvnC7fuoUWTGvsjPsta5d9DO81qI4X5aj/bkhM1l2U=; b=XRcTSSRtHepwQzQCZ8fGaxbaTiF8/5jIVpeX0GRjdg7FUYFWV0SgnB83tDMxuUOfuOVf5f yhslvm5MBWRLTmwKwO6YuF7XwfqtqwfnwvqYDuWqi5RcPujrucPtKgnfaN6VBznWfeLLBO jfTmREBAzpYMZz6V6vkTOjJ4WG8vpvl2voyB8ID3ie/Pb9y2HFJO3WD74mEvG3IAiSptci DRJjRFkHp+N2mLJLtMshmUgb7GSJ8Uzz/uNCO0AFf2VH2uS4iWU24TQ8ZM7qTPYQpOFz2P aPhSjVxXH2gUO5f68JTb53xlj1rSbZMGWlLX5Be2Tatvf3dHK0siK421ey/INA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760410372; a=rsa-sha256; cv=none; b=B1gKWQv1PRKiKdXOjmuaF/e7HdaamRrcZF2QL3fXDe48fc0a6lbzu3JAKQ/+2uD7g8DJTL 1AFEqFI22UE1Oifn+LkCEA7rYs6wYH4hseM09z4q0omH5GWaJr8aqu3AyGMMSJa/pPVzBZ ASt0c4OVElut/fk4pfrrayplFYFYVJdK695aIaw4tKZVO2VT35zrGDVM6pMEZSZI4UYfSL F/aCi55ShXO1p+lFuUZm7iqtC3eoeaqw3k/AE03Y5XT3gQuhfIY/ZZk7fSka8Vmqy4r0Lw 6bnKU5mlC4vbSt6CP7Z1dSSTymk5N4GDuN5DWrzW9oe6SfEF1Ms15rEy8qcoHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clzKc4g7QzbGP; Tue, 14 Oct 2025 02:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59E2qqPV046399; Tue, 14 Oct 2025 02:52:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E2qq1m046396; Tue, 14 Oct 2025 02:52:52 GMT (envelope-from git) Date: Tue, 14 Oct 2025 02:52:52 GMT Message-Id: <202510140252.59E2qq1m046396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 3c9a2f383fc2 - main - Ping: Make build reproducible List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c9a2f383fc25cdffa80c1348cb5388290e0f283 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=3c9a2f383fc25cdffa80c1348cb5388290e0f283 commit 3c9a2f383fc25cdffa80c1348cb5388290e0f283 Author: Colin Percival AuthorDate: 2025-10-13 15:58:10 +0000 Commit: Colin Percival CommitDate: 2025-10-14 02:52:35 +0000 Ping: Make build reproducible As recently fixed in sockstat (9934558460e4), having tests/Makefile include files from the parent directory with SRCS= ../foo.c results in a race condition as the parent build and the tests build try to produce the same object file but contain different paths. Use .PATH to tell make to find sockstat.c in the parent directory but place the object file in the current object directory. Reviewed by: emaste, jrtc27, kevans MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53075 --- sbin/ping/tests/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/ping/tests/Makefile b/sbin/ping/tests/Makefile index 0520b1d634cf..7d3ab02b9a86 100644 --- a/sbin/ping/tests/Makefile +++ b/sbin/ping/tests/Makefile @@ -1,5 +1,6 @@ ATF_TESTS_C+= in_cksum_test -SRCS.in_cksum_test= in_cksum_test.c ../utils.c +.PATH: ${.CURDIR:H} +SRCS.in_cksum_test= in_cksum_test.c utils.c PACKAGE= tests From nobody Tue Oct 14 08:14:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cm6TC3l31z6C0p1; Tue, 14 Oct 2025 08:14: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 4cm6TC3DlXz3k02; Tue, 14 Oct 2025 08:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760429695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PnkIOttKsq2/ewUkygNMQKeC8DoIKZCH6IbzDwkxo8g=; b=FlZ+KCMH0lplwQiksZk59KuOBlT12H+EvNRbZpkPzsfzCi2XkT1jwQjrc824YTUdBOs2P7 Me4L4XTvMrpZDJrCdJK/B56NAqtDXVtR3kXTK3kWsrBymHo0yqwPUCvd4VCTz9cflPTj2u f0LVXC4Hi3o9bRtLorEsOWc3jSpOdXRFaFuN0Q1SRUVLjdtEWxblOSiASFSzhtvgx05N01 x8rXTUhDlR6fSrED8EL20s3byweF2cOILYmmfUtIcB4WJ4MsESzHXzZYVVdtTO14aHRVfZ RLzFD3mwoYU9tkh7zsqUeKyRTF5sXjQjyv+ou7F88uYsE6AfWgoQsTx+SYU3Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760429695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PnkIOttKsq2/ewUkygNMQKeC8DoIKZCH6IbzDwkxo8g=; b=w3OqrLeG71MaZUGOSHadAJI2OcK0H52kDL4TzFctMJ9SEiy5Cp6Xy5U5eFQ7I5hXDoZlpi WigGDcwxE9RVV+UeCj2WRhOdtIMptQ0w2iQshDtrLcLGgHBhEYTzP3I3sQfvNfdRdxcK9X rjlAruKt2PWm1rTom66JlBOwSTbrT/SJ2YbjtxnTVXoh2Hk8DxTSrCX7iDmtTw/GyGmfOa PEb+wLn27d+HPldV2HZx/kXUpRm/Q/1uDJ8piYrbP5o+UjJ5Eqb9tDjWpH2S+w+hbdjjIH VsOY0zfNTK1Nth0G91v11AAJxoJivAphVZibl9v38q4si7WILaKtNCfsW+bXAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760429695; a=rsa-sha256; cv=none; b=qnmqPoWlZkje/OVlDyEarY+xbBV+39Mpwu/GsYouvrq2qOJOkDt2Q9F1SVqh+JJgHpmgtT FxbL2cuCoyBcaep4EqcpId+yVjUpKBsGgIaAMhBj+uVEo8XcC3UykYg86pwrCSFK7pEwLA 0kQjIuu9qjlfsbekg6Hs+Jjy15M3cVRxWlXYTWVzCItgrwugZDKRbiHZaedFL/mPbDZPjI roxlS5RUryWrzH3LoVZEbJGuME+GX1PAC93807YTBhXpeVoFUHM50/yrYOH/RiFDMIgwfV +c6aioL7gWNz3mWCXTbrziq4V+IFF9Lowa/LyRaKLDD5UNOwKDNLjk0/xgfDnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cm6TC2qvLzlPd; Tue, 14 Oct 2025 08:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59E8Et8g050401; Tue, 14 Oct 2025 08:14:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E8EtEl050398; Tue, 14 Oct 2025 08:14:55 GMT (envelope-from git) Date: Tue, 14 Oct 2025 08:14:55 GMT Message-Id: <202510140814.59E8EtEl050398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: dfd822b1f084 - main - ipfw: do not use errno value for error reporting List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dfd822b1f0846bdaa9a14457346f7431a86d3a64 Auto-Submitted: auto-generated The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=dfd822b1f0846bdaa9a14457346f7431a86d3a64 commit dfd822b1f0846bdaa9a14457346f7431a86d3a64 Author: Boris Lytochkin AuthorDate: 2025-10-14 08:02:20 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-10-14 08:02:20 +0000 ipfw: do not use errno value for error reporting table_do_modify_record() already uses errno value on error. Also this fixes problem when `ipfw table add` returns ENOTTY that is unrelated to operation. Tested by: dhw Fixes: 09025a714708 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53050 --- sbin/ipfw/tables.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c index 7c3b1bb35a01..245c0c9e0399 100644 --- a/sbin/ipfw/tables.c +++ b/sbin/ipfw/tables.c @@ -1037,9 +1037,6 @@ table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add, } } - /* Get real OS error */ - error = errno; - /* Report results back */ ptent = tent_buf; for (i = 0; i < count; ptent++, i++) { From nobody Tue Oct 14 12:05:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmCbJ2s8fz6CJvK; Tue, 14 Oct 2025 12:05: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 4cmCbJ2MKnz3C38; Tue, 14 Oct 2025 12:05:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760443532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A9HUDJCbm3S0xcHKfldm0BUY945vOGP8ILR+MlOfTMo=; b=T4OrMckAU9WoJTHpaRCAf0l7nD5qDRMw/QWMVXjHs3AV/xZvFLb4O2j066Ovi1PV7XrWRQ qSSvTH3WEOu7TbvY1wmLlN3zm54Nc1NoXOuoAo/DaH/Z/6wxsLjiqDMiTrjeiMyxycWzg6 6LqVW2qccwcx5WBZwB+zys68bx3tUzP2MJUDYiSgnks7vbUSspP9q5aUq6fGAvdVsBBgQD iwiAXlzeW4Jj+9AxaPUv9v6pHhR1YVJRaoxieH1ucEl9M+zKDgsaIchSWN6OKeffaHcqDV hwnrdCVL3fRsW7aLI9TGLXh1XVP1pAubykKnPW6SPva/UjcrzryqC07OBg8CJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760443532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A9HUDJCbm3S0xcHKfldm0BUY945vOGP8ILR+MlOfTMo=; b=dFZUrqqhyXezOREbFA0di89FdgjgYQ4MKsjViY/i2GrSg/bEpQnRZAPvwJwXhRe2ktICXR CUkKsN9yCoBz/c7fw/0+lH5+VlAMIIqEuEFDFCSAgXA4iiSiQBlm94bj2J1uyRnpc7T3OC 3oOAToDzxPqIr3KgOkdxhtw3rTqpBhbbHhFRS4fxFTI80D/uwgrk97uYn0eZlR679L57AL /u5CW2IySvqOhPulmkkN1uJsVsgQUcrTpzdAaIe3ij4P3NF0ixhQh4eTR9loorkaP2pwj2 Kk20FxJZeMaCkc9EFgFr7QW45V7iJ4NB4Glou9CdBeReTTYiIw3kK5kOYKkPOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760443532; a=rsa-sha256; cv=none; b=m8cNfZj0/CZzi98byFSS781sZ+P9/XFAypEHjtLlp+wO3t/P2WPezVOpZx1IMn3T6BwbUC 84c8jXQ1NHklUZnlfqw62SuLJHZwHqObhAcY+UJmJO+EEamd0zBTPcTMtPFV/y3xZXlttx Pp9KxmDjig9g4N1HtzQzonQZI6FSAZdqa0Mhsjt85QoR+xd5FZkhFC0/54W0+HpSU0uoQo GORuojEMS1b1j/cwgyJyOAaosUjYqXEwcZnh15K5ZKoDynKi2A7w1szC1U4L3mPP/FHhhu +qxVUy6mQMPIr5+dOdhuhZ+ofCoQVfpWmIP4iUZrDT4+WFw8NrrHUcUHVlwjKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmCbJ1ddSzsFV; Tue, 14 Oct 2025 12:05:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EC5WIA082897; Tue, 14 Oct 2025 12:05:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EC5WA2082894; Tue, 14 Oct 2025 12:05:32 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:05:32 GMT Message-Id: <202510141205.59EC5WA2082894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Popov Subject: git: af30e8d90b77 - main - fuse_flush: Reuse the struct mount *mp variable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af30e8d90b772c0997da013b17e67a64841282ac Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/src/commit/?id=af30e8d90b772c0997da013b17e67a64841282ac commit af30e8d90b772c0997da013b17e67a64841282ac Author: Gleb Popov AuthorDate: 2025-10-14 09:24:27 +0000 Commit: Gleb Popov CommitDate: 2025-10-14 12:05:17 +0000 fuse_flush: Reuse the struct mount *mp variable Approved by: asomers Differential Revision: https://reviews.freebsd.org/D53082 --- sys/fs/fuse/fuse_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 5c28db29fc63..683ee2f7ad56 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -284,7 +284,7 @@ fuse_flush(struct vnode *vp, struct ucred *cred, pid_t pid, int fflag) struct mount *mp = vnode_mount(vp); int err; - if (fsess_not_impl(vnode_mount(vp), FUSE_FLUSH)) + if (fsess_not_impl(mp, FUSE_FLUSH)) return 0; err = fuse_filehandle_getrw(vp, fflag, &fufh, cred, pid); @@ -292,7 +292,7 @@ fuse_flush(struct vnode *vp, struct ucred *cred, pid_t pid, int fflag) return err; if (fufh->fuse_open_flags & FOPEN_NOFLUSH && - (!fsess_opt_writeback(vnode_mount(vp)))) + (!fsess_opt_writeback(mp))) return (0); fdisp_init(&fdi, sizeof(*ffi)); From nobody Tue Oct 14 12:22:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmCzC00cDz6CLN4; Tue, 14 Oct 2025 12:22: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 4cmCzB6ZqHz3D7N; Tue, 14 Oct 2025 12:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DzFiCtl8kpmmMHLDvSOhbS/9uf2TXq74y4cHNiPc+74=; b=tY8wa+VA8FvW92ce4fDl7+Efel5ftLo8XmfElXwoYaagWqyW8U/0EYGxCC7Rjmu27zsAvB izqRZeHSFCkLsvxTp58bzNt7fNCOew0d+pzt4NociIhqRLFLlxnL3+SZwYZEJj6FNIfzHF GW0aYEMAtxl+/lxT8M0X/OZo4hoyszcHOlQ7AJg5LrrBCnKvc2iMzg0vuZTMm7OF/4Iu8I TstfSC6ADslyKEXqOvEkNl3xnU5t5etiTDyDD9skyGPKdr/mr5gowQywMLuPOtwcYBHP9o iJmoGr7q6OtvSoM3glPTzSRp+4F96Q8f85yrg+8Dv0lNYCSEvwokA5FlsnsJEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DzFiCtl8kpmmMHLDvSOhbS/9uf2TXq74y4cHNiPc+74=; b=w9+8p43pTJWtcgzxMyJekyJ1U8++LXxi2Vcyv6xNa4mHGM9tOI+n9mI8uaJi084+iCpvju FsXhMr5/jKcKXBVNk6x8L6Fvfc+ss2aBS2fZfyZ5IvNHxLB9R30U4+1UfmtdQQkbwetyTG Kl1wDcPCm0ceDyl/5pihikXA5bi8aLbDG9v7aC5jlbGKVn+sVvzShiaIFgCiD2Kq6a7M2t 9sX+rpcLCp9lUhy6ahp5k4vNFV8B/PLHhI6nKV71gdnbyMgKEtbyctvE5nphDH8zLl6XlM F+unJ/ymzfcP2F2TAzBhiUyAIFqGvYyxO7VLwU82ptta0nU+efpNedrSbk5ESg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760444566; a=rsa-sha256; cv=none; b=rERUHeGMUU8A2T2wyS5nfdT9yitkRS/FOFp+OjblJklMSVvpS0YAt13kqU9CLIx4FQEiQU NacllAP9yHWsR+1f2814MQV+pUeo7vXGUsXdmOE39Rd5zryrBp0Em/ERxCfSn3cPJWVH9m ohVj+vz1n1LmdFNklxvbb5MdKT8Jq7rKZenPJxJ88HsH0/hgM3w5EqFBHDnGvb6Msxpdj6 PL3lTuWFSWD1mYd4vzt3FyCF2QmEk4mX1Fk3v/SJDIzWDwplZnQaB9f2wLfeNubwsChxXM 9w5Q/9z21PD8RLa8j4Aagu/6oQZSIfVlm5IYktS5DhB9tpA1hqDP8+geT2RouA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmCzB6663zrfX; Tue, 14 Oct 2025 12:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ECMkUU019510; Tue, 14 Oct 2025 12:22:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECMknJ019507; Tue, 14 Oct 2025 12:22:46 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:22:46 GMT Message-Id: <202510141222.59ECMknJ019507@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: bda3b61512b2 - main - sys/rpc: UNIX auth: Rename 'ngroups' => 'supp_ngroups' for clarity List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bda3b61512b2597d4c77d2b9c9074b844dec0405 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=bda3b61512b2597d4c77d2b9c9074b844dec0405 commit bda3b61512b2597d4c77d2b9c9074b844dec0405 Author: Olivier Certner AuthorDate: 2025-10-07 10:03:07 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:21:43 +0000 sys/rpc: UNIX auth: Rename 'ngroups' => 'supp_ngroups' for clarity MFC after: 2 days Sponsored by: The FreeBSD Foundation --- sys/rpc/authunix_prot.c | 16 ++++++++-------- sys/rpc/svc_auth_unix.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index b107d5541c50..f63a6d3f9dc6 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -60,7 +60,7 @@ bool_t xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) { uint32_t namelen; - uint32_t ngroups, i; + uint32_t supp_ngroups, i; uint32_t junk; char hostbuf[MAXHOSTNAMELEN]; @@ -102,14 +102,14 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) * historical layout of preserving the egid in cr_ngroups and * cr_groups[0] == egid. */ - ngroups = cred->cr_ngroups - 1; - if (ngroups > NGRPS) - ngroups = NGRPS; + supp_ngroups = cred->cr_ngroups - 1; + if (supp_ngroups > NGRPS) + supp_ngroups = NGRPS; } - if (!xdr_uint32_t(xdrs, &ngroups)) + if (!xdr_uint32_t(xdrs, &supp_ngroups)) return (FALSE); - for (i = 0; i < ngroups; i++) { + for (i = 0; i < supp_ngroups; i++) { if (i < ngroups_max) { if (!xdr_uint32_t(xdrs, &cred->cr_groups[i + 1])) return (FALSE); @@ -120,10 +120,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) } if (xdrs->x_op == XDR_DECODE) { - if (ngroups > ngroups_max) + if (supp_ngroups > ngroups_max) cred->cr_ngroups = ngroups_max + 1; else - cred->cr_ngroups = ngroups + 1; + cred->cr_ngroups = supp_ngroups + 1; } return (TRUE); diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index 963f4f272964..aad4e7610795 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -65,7 +65,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) uint32_t time; struct xucred *xcr; u_int auth_len; - size_t str_len, gid_len; + size_t str_len, supp_ngroups; u_int i; xcr = rqst->rq_clntcred; @@ -84,12 +84,12 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) buf += str_len / sizeof (int32_t); xcr->cr_uid = IXDR_GET_UINT32(buf); xcr->cr_gid = IXDR_GET_UINT32(buf); - gid_len = (size_t)IXDR_GET_UINT32(buf); - if (gid_len > NGRPS) { + supp_ngroups = (size_t)IXDR_GET_UINT32(buf); + if (supp_ngroups > NGRPS) { stat = AUTH_BADCRED; goto done; } - for (i = 0; i < gid_len; i++) { + for (i = 0; i < supp_ngroups; i++) { /* * Note that this is a `struct xucred`, which maintains * its historical layout of preserving the egid in @@ -100,18 +100,18 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) else buf++; } - if (gid_len + 1 > XU_NGROUPS) + if (supp_ngroups + 1 > XU_NGROUPS) xcr->cr_ngroups = XU_NGROUPS; else - xcr->cr_ngroups = gid_len + 1; + xcr->cr_ngroups = supp_ngroups + 1; /* * five is the smallest unix credentials structure - * timestamp, hostname len (0), uid, gid, and gids len (0). */ - if ((5 + gid_len) * BYTES_PER_XDR_UNIT + str_len > auth_len) { + if ((5 + supp_ngroups) * BYTES_PER_XDR_UNIT + str_len > auth_len) { (void) printf("bad auth_len gid %ld str %ld auth %u\n", - (long)gid_len, (long)str_len, auth_len); + (long)supp_ngroups, (long)str_len, auth_len); stat = AUTH_BADCRED; goto done; } From nobody Tue Oct 14 12:22:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmCzD1pz5z6CLWr; Tue, 14 Oct 2025 12:22: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 4cmCzD0Fp1z3D9q; Tue, 14 Oct 2025 12:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Nzh9BuVfo+xHxFjR08gUFlQT6ctbZPvVxGh+gAEKqo=; b=wZX9hOmwoCATmF62g1E8oUioTm6hjWJswcvbUjt6IRVMbA7tbILutEqgORqZrWDa7609B1 WFvqqlt4eM5vFPBzXKQx1BQt2TkuF5YKrQPfj8tmGlXQQnvujLczOVnmw3InxCPTwXbx0Q UIkI9AllMyqDtoT/vtolQrIgSVgDMV33imPlAt1D58XAe5L6dtmHJ8uXooIS0kpe1V2fm0 ejqiE5Ci5ax/TgdGvyQ4Scicnka4SvWQjjqf5INTZgJA01jUqjb5uTaxoYUhytngwR/jnv IcHxEJ1UZiOj1RbBiRVRbJ/He1RpUYvFtAwn4Z4DR7LGHF63Y9q+6kMQt3HeYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Nzh9BuVfo+xHxFjR08gUFlQT6ctbZPvVxGh+gAEKqo=; b=RDkSwtVwsY6gGLUlY+sHvhB3ksyMALvHQtJDaf2gC8FJ2VLiY3n4dd2TmQWBoY5rsapVqI fVbWu5G5YZVSxwY8ozyCBRbaxaFPC/5nvPf+naR/74ybPpmQMX4Pg9dEQix7zI58mxJRWW VoQG3dX28Pol2zHqCm2R9D4PShbDElVxSq6/wUZFAveSccKGsLNR9J2FVcpQRSzngv74Rs hqJAC0l5otWRFrtzya1ama5g0DQSvLt0WPISR0zV5B5nJNspwPl9CBrLoSQR5nrAbiytio AO/jKmFX30ab5YogWDzFTAqB368nP5Z6/TLpEbiQeAPiC7hptMQY8SWuz6nJYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760444568; a=rsa-sha256; cv=none; b=U1pZ7ZjJvKT7Rn/04mrtdnWgL+rTFKd6JYItJHwdkEkFsjNS9hjrcbzzNOIdgEHR8PgM6q oJh3aCT71XpnE+4whpG1ppMpi0sFzlf3W6DzKa5xIjuUvbxwTg8hyPpk0Ey82ZEaTNzjyU BM+00CIVwI3eiIFb26TGHITn/x6VJVnSTU3dnoe/WAKMMWQW0rGCfkrp6TBkQ8yvai9yQ7 qlFXi9xocZRaXtGKLiYjmZmWKcBPFxCnKuwnERTPybOLFuid63X6j+OqL4SJZ6MrPgV5UC zuy8K4jOp/iKXVRzo2/Fm12ONYozFv9cDbS617S67G9jgHqXb0Lsr8V4CY+7kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmCzC6vmWzsNK; Tue, 14 Oct 2025 12:22:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ECMl9Z019543; Tue, 14 Oct 2025 12:22:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECMluk019540; Tue, 14 Oct 2025 12:22:47 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:22:47 GMT Message-Id: <202510141222.59ECMluk019540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 47e9c81d4f13 - main - sys/rpc: UNIX auth: Fix OOB accesses, notably writes on decode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47e9c81d4f1324674c624df02a51ad3a72aa7444 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=47e9c81d4f1324674c624df02a51ad3a72aa7444 commit 47e9c81d4f1324674c624df02a51ad3a72aa7444 Author: Olivier Certner AuthorDate: 2025-10-07 10:02:23 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:21:48 +0000 sys/rpc: UNIX auth: Fix OOB accesses, notably writes on decode When the received authentication message had more than XU_NGROUPS, we would write group IDs beyond the end of cr_groups[] in the 'struct xucred' being filled (as 'ngroups_max' is always greater than XU_NGROUPS). For robustness, prevent various OOB accesses that would result from a change of value of XU_NGROUPS or a 'struct xucred' with an invalid 'cr_ngroups' field, even if these cases are unlikely. Reviewed by: rmacklem Fixes: dfdcada31e79 ("Add the new kernel-mode NFS Lock Manager.") MFC after: 2 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52960 --- sys/rpc/authunix_prot.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index f63a6d3f9dc6..89f0ab3ed44e 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -75,7 +75,6 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) } else { namelen = 0; } - junk = 0; if (!xdr_uint32_t(xdrs, time) || !xdr_uint32_t(xdrs, &namelen)) @@ -93,15 +92,25 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) if (!xdr_uint32_t(xdrs, &cred->cr_uid)) return (FALSE); + + /* + * Safety check: The protocol needs at least one group (access to + * 'cr_gid', decrementation of 'cr_ngroups' below). + */ + if (xdrs->x_op == XDR_ENCODE && cred->cr_ngroups == 0) + return (FALSE); if (!xdr_uint32_t(xdrs, &cred->cr_gid)) return (FALSE); if (xdrs->x_op == XDR_ENCODE) { /* - * Note that this is a `struct xucred`, which maintains its - * historical layout of preserving the egid in cr_ngroups and - * cr_groups[0] == egid. + * Note that this is a 'struct xucred', which still has the + * historical layout where the effective GID is in cr_groups[0] + * and is accounted in 'cr_ngroups'. We substract 1 to obtain + * the number of "supplementary" groups, passed in the AUTH_SYS + * credentials variable-length array called gids[] in RFC 5531. */ + MPASS(cred->cr_ngroups <= XU_NGROUPS); supp_ngroups = cred->cr_ngroups - 1; if (supp_ngroups > NGRPS) supp_ngroups = NGRPS; @@ -109,22 +118,15 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) if (!xdr_uint32_t(xdrs, &supp_ngroups)) return (FALSE); - for (i = 0; i < supp_ngroups; i++) { - if (i < ngroups_max) { - if (!xdr_uint32_t(xdrs, &cred->cr_groups[i + 1])) - return (FALSE); - } else { - if (!xdr_uint32_t(xdrs, &junk)) - return (FALSE); - } - } - if (xdrs->x_op == XDR_DECODE) { - if (supp_ngroups > ngroups_max) - cred->cr_ngroups = ngroups_max + 1; - else - cred->cr_ngroups = supp_ngroups + 1; - } + junk = 0; + for (i = 0; i < supp_ngroups; ++i) + if (!xdr_uint32_t(xdrs, i < XU_NGROUPS - 1 ? + &cred->cr_sgroups[i] : &junk)) + return (FALSE); + + if (xdrs->x_op != XDR_ENCODE) + cred->cr_ngroups = MIN(supp_ngroups + 1, XU_NGROUPS); return (TRUE); } From nobody Tue Oct 14 12:22:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmCzF5QJqz6CLQh; Tue, 14 Oct 2025 12:22: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 4cmCzF29zFz3DPd; Tue, 14 Oct 2025 12:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FWgdaTLNXPIFSP22lm9cIrAd4DQYZON821JDj7xwb5Q=; b=VwWhbcjspvfuzz4D2kygmR53wH1TTew7RVNENPhxqHe+AGccJst7iOivgYRiCGbfxiq8K5 onELucMfw/HaNDdAYB7iVrjk2n+VIk54yQddN4oGM2Ppud504qxgu4T7M+58WHf+zurx0i jF7dslp/eRqCsV6yr9u+Q8b7xttxSAoDvdKPl6D9pis7lE92ffYqu+7ev9Br03GQghP4U4 VSuRKnCnlKuqAIrsLgw/Hs5bkQO2XeEKfPCgtUVzsI+Kppul4rzF7X04t28l4Afc+Q2keS o5h85HqjgdeSA3uwdankavgtXRi627tkULMm0boqDiJqk82H3MFtkI4i2MFETQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FWgdaTLNXPIFSP22lm9cIrAd4DQYZON821JDj7xwb5Q=; b=F8FneX8Bi6tDqOmMJYXoaIx1WKcYANzplf85C1N0XQE/1bTwK4BX5ohNr2K5Ft/m+GfPvh AZ29LONLX7pASnYUanx5Q71Y0eHKmhwq04i0z8Z++YtUmWLDFRJZ14F2wR/uFRfq0a5dih ZkjsYhcRoL9CY+T/mEca5qMw5oW2pgNGHfINO+ppX3BAyE1nW+6sg2WNi9lQrOUBESa75H jYjwpZ1ZTzGm74cSk0M5fEwQvP1nfcMRltaybsBjsHBsSPU7M/aNPS7X2am00pAMsGTQ8w 3fziXhcNCnDMQxa4DFejwh1Kh8nw1sTiFuWVvdpW/ZRaCKlJ9XncDnvB3M2ypQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760444569; a=rsa-sha256; cv=none; b=DDvzKmiZw1CIhGo3oNMdPq3Yi/yONkTjgzd3drxYRRRyMRL0ajyhCBF78v3NZ7KbywF+QN yBtsY2xxbLjp7sBOLlXate5cLlOFE8WKnFI94xxucQx5Oy1l+szwkpU10k4ibSgfqC7wVr +PlMSSkskQOjamrFfbXyF4NN6VT0TOe0xo/1JS+vfkYrmZ0DRPX17gixEY1GdwZq346JSB AIVCDHRTvF5WPXeSWRreix9yUAIsd/Tp5CQoJrMhc5CCrJ4000PRS1TgnSjLqHDTiN6hTB iwNepaXtK7IN39NbZ+2mnOMJQprUGJzpXnOa0oqCnEX8p1y0pITmhdiidcJcXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmCzF0n4szrfY; Tue, 14 Oct 2025 12:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ECMn1H019576; Tue, 14 Oct 2025 12:22:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECMmsU019573; Tue, 14 Oct 2025 12:22:48 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:22:48 GMT Message-Id: <202510141222.59ECMmsU019573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: f7c4f800cc0b - main - sys/rpc: Define AUTH_SYS_MAX_{GROUPS,HOSTNAME} List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7c4f800cc0b4fac1c99cda8e22d46b67592f9fa Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=f7c4f800cc0b4fac1c99cda8e22d46b67592f9fa commit f7c4f800cc0b4fac1c99cda8e22d46b67592f9fa Author: Olivier Certner AuthorDate: 2025-10-07 07:51:23 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:21:48 +0000 sys/rpc: Define AUTH_SYS_MAX_{GROUPS,HOSTNAME} As, respectively, the maximum number of "supplementary" groups and the maximum hostname size allowed in the credentials structure for AUTH_SYS (aka, AUTH_UNIX). Will be used in subsequent commits. Reviewed by: rmacklem MFC after: 2 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52961 --- sys/rpc/auth.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/rpc/auth.h b/sys/rpc/auth.h index 33c33ffd594d..648fb99a3a27 100644 --- a/sys/rpc/auth.h +++ b/sys/rpc/auth.h @@ -354,6 +354,10 @@ __END_DECLS #define RPCSEC_GSS 6 /* RPCSEC_GSS */ #define AUTH_TLS 7 /* Initiate RPC-over-TLS */ +/* RFC 5531's prescribed limits for variable-lenth arrays. */ +#define AUTH_SYS_MAX_HOSTNAME 255 +#define AUTH_SYS_MAX_GROUPS 16 /* Supplementary groups. */ + /* * Pseudo auth flavors for RPCSEC_GSS. */ From nobody Tue Oct 14 12:22:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmCzG5Br8z6CLWw; Tue, 14 Oct 2025 12:22: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 4cmCzG2HcKz3DXQ; Tue, 14 Oct 2025 12:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+7H3TR+J/q1hUbrHtgBzRSPKUodFmw5+D6ygj4Y256U=; b=L0IxcWXxeIey2cLd+G4U0jBhpI7Q5B8eIvauEEEf9wViw1vVf0DY9rTLs4rf86FIvocJM5 6K8FesYjq8D9kX/YSjDk5WlWbzcMu6j4LEbuUgx5TVw2cxb37ILpsxK2t5L1ZHnn2wofy3 5ryDIKiB1NblWkp0Ix2OwJ2j3B2TSjjRyEFHP2KtGND9yfyizzLPxOZapLBpfQOn10Ysex cxhmdWsVGIZToQMfNiAC6b58rbHV71s6spyhuuxIs0XvEhr+y8iFvRd22WZv3r7JIdjV+b /F/4e+L0BDdmVKNVoywTRK3edw+KKt4K8j97bpv7PoAYmbfiYQJS/YH+6lj5mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+7H3TR+J/q1hUbrHtgBzRSPKUodFmw5+D6ygj4Y256U=; b=qjAVS4lUaN6gGZQtpTBYMyJxGpLxV9gFLx3BDsVJoRxoyItiX6fOSJU2gs1gtTTlgs1geI c9DroqM3vR0HNQJfNICPC5MihKsB7XlppnDbZYls7mmp9hOmHeaiJ5IDhyt73ZGJvF79jm dUZGvoS93bFHtbK7fXiipFfVfej5vmeX3hdGo9Y6IPcM4GrNSqwoJYeH3viAZpT0qZrr4K 7UwcZ0Ryl6XAn0WSTqO3dTP924fs/2bZ4zT/nm9i7kw+o5UmRNdboHZIGTFtyCGGDLtzNA HLZNhhg5Wf4DQZr6943zsk8nsg6YLMjZFblxq4su10xDXj1Krp+JjxK2SnepMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760444570; a=rsa-sha256; cv=none; b=S7RZxU34UiMy50qi3PvsUBL57AlvTZ7ndteFr1IE/XMSBKOV4izPbjEgpiPg+6UfpGwAHu yZ5ex+ZDEGIwFyod4fDKskNYMuNdUpngmddRPvJcoVdD5p9b0dl8mgSFuxzo+DKLgXvz8d Zhy1r8HzVwdXGxp2WilUBgcZ3mgprqO9zWmXicpHWC4jiHvnpdFHREe0n6jRaCmMSS7bbs QHq2AbzUF6XaQeZbmNW58oGSvCSsgWZvBG9VSp8YZ4wvtHk6+x6fSydTyU5OnO9cBi6mx7 dl/glcgMFguOTifHqbRwiA8MVxoSjKHhjG6wlkFjvtzU8H8JZI5sHAT3eWOJCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmCzG1lLmzsLm; Tue, 14 Oct 2025 12:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ECMojm019610; Tue, 14 Oct 2025 12:22:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECMoBK019607; Tue, 14 Oct 2025 12:22:50 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:22:50 GMT Message-Id: <202510141222.59ECMoBK019607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: b119ef0f6a81 - main - sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (1/2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b119ef0f6a81eb32b0e1cd0075cec499543e7ddd Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b119ef0f6a81eb32b0e1cd0075cec499543e7ddd commit b119ef0f6a81eb32b0e1cd0075cec499543e7ddd Author: Olivier Certner AuthorDate: 2025-10-07 08:46:56 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:21:48 +0000 sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (1/2) Consistently with the XDR_INLINE() variant of xdr_authunix_parms() (_svcauth_unix() in 'svc_auth_unix.c'), reject messages with credentials having a machine name length in excess of AUTH_SYS_MAX_HOSTNAME or more than AUTH_SYS_MAX_GROUPS supplementary groups, which do not conform to RFC 5531. This is done mainly because we cannot store excess groups anyway, even if at odds with the robustness principle ("be liberal in what you accept"). While here, make sure the current code is immune to AUTH_SYS_MAX_GROUPS changing value (in future RFCs?) even if that seems improbable. Reviewed by: rmacklem Fixes: dfdcada31e79 ("Add the new kernel-mode NFS Lock Manager.") MFC after: 2 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52962 --- sys/rpc/authunix_prot.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index 89f0ab3ed44e..c1a9f90bbe28 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -50,9 +50,6 @@ #include -/* gids compose part of a credential; there may not be more than 16 of them */ -#define NGRPS 16 - /* * XDR for unix authentication parameters. */ @@ -65,13 +62,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) char hostbuf[MAXHOSTNAMELEN]; if (xdrs->x_op == XDR_ENCODE) { - /* - * Restrict name length to 255 according to RFC 1057. - */ getcredhostname(NULL, hostbuf, sizeof(hostbuf)); namelen = strlen(hostbuf); - if (namelen > 255) - namelen = 255; + if (namelen > AUTH_SYS_MAX_HOSTNAME) + namelen = AUTH_SYS_MAX_HOSTNAME; } else { namelen = 0; } @@ -87,6 +81,8 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) if (!xdr_opaque(xdrs, hostbuf, namelen)) return (FALSE); } else { + if (namelen > AUTH_SYS_MAX_HOSTNAME) + return (FALSE); xdr_setpos(xdrs, xdr_getpos(xdrs) + RNDUP(namelen)); } @@ -112,13 +108,30 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) */ MPASS(cred->cr_ngroups <= XU_NGROUPS); supp_ngroups = cred->cr_ngroups - 1; - if (supp_ngroups > NGRPS) - supp_ngroups = NGRPS; + if (supp_ngroups > AUTH_SYS_MAX_GROUPS) + /* With current values, this should never execute. */ + supp_ngroups = AUTH_SYS_MAX_GROUPS; } if (!xdr_uint32_t(xdrs, &supp_ngroups)) return (FALSE); + /* + * Because we cannot store more than XU_NGROUPS in total (16 at time of + * this writing), for now we choose to be strict with respect to RFC + * 5531's maximum number of supplementary groups (AUTH_SYS_MAX_GROUPS). + * That would also be an accidental DoS prevention measure if the + * request handling code didn't try to reassemble it in full without any + * size limits. Although AUTH_SYS_MAX_GROUPS and XU_NGROUPS are equal, + * since the latter includes the "effective" GID, we cannot store the + * last group of a message with exactly AUTH_SYS_MAX_GROUPS + * supplementary groups. We accept such messages so as not to violate + * the protocol, silently dropping the last group on the floor. + */ + + if (xdrs->x_op != XDR_ENCODE && supp_ngroups > AUTH_SYS_MAX_GROUPS) + return (FALSE); + junk = 0; for (i = 0; i < supp_ngroups; ++i) if (!xdr_uint32_t(xdrs, i < XU_NGROUPS - 1 ? From nobody Tue Oct 14 12:22:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmCzK04Nxz6CLLY; Tue, 14 Oct 2025 12:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmCzJ4WQ7z3DQQ; Tue, 14 Oct 2025 12:22:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5kQqxxJtmIGNSw1i6RDovXqzmYp+L/sKOlLiWfnQLV0=; b=Vp75M1UkrkkW5dd4+Q6uBxSUtklKrhXDqkkeb1pxP0qj73cJ0xvATkiFaIMgv2ZBtNMrqv WnZQxIJapnxu08KfGlzTDHVyEJwvMB66uMGDbv4HNEwXpytPMSXdIDu/oWT7whVkhtGxzx Jfto1sh5tM1s9oNlI+PlGY2GB48c4o5stYQkpXbpGdd5Q2mZBQyJ9Pg/0kyCD02yk/mILQ v/+RwihOmqdLMBzNtMQmuZt3QvPYMyMvsPs7UHsaMhl0cBUW8RUQjfFRjzdQ1iaYjaj4Xn +mu72F0mVuPTwMsu9QYe7oKvT6lmhYaa+GGs5XSMn6lrRUFAfRpWzu2j+Ask5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5kQqxxJtmIGNSw1i6RDovXqzmYp+L/sKOlLiWfnQLV0=; b=qeH/1WuROEocPJjIBiAw8wRDlHQ3XBnWIP9U+v8SgPqCGeU/0tHCXR08jHch02CUprIlEI 8GhdJ61B4ZsH71t9Lqmh98u9r7TNW19kt5/0bzGNuVY3Rt/BqH0ao3wg8TGU+S6JWE8Rbx xyB5ntysnOJiuWzTfOsXBvgr7W391ogwkWqYN9SEfzvGI/5sT/aLiXPm28oAS7ZMy6K8n5 K8YOlM3EP8zSyP07pmlx56NWZtl+BYvnLXYSvX3ejCcQxQc/naUET2/wsYyjEvimZBciyy CFGXRYASGcgvpT4laL0zu1vxGtfYy++WdKk5gLUB1urL2rNVP1kxANQF+nKjCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760444572; a=rsa-sha256; cv=none; b=e7wwibh2ABjeTF+eJZMw5eFCflUlsBr34+96hhwOGHK956PjiqSq0KWhkHCUZrL12v56oB eZAEdZVvJkImqBeBe4CNYfa+xupudUKYrGUoObcBZa63aYeXt+yw6B/Y0VdDkka9zKvx9r mKn2wJBLNWis1ayWZ9fLVCYCaHayXvM2kJlzyv5EVBlXUNKJG9ztw1YSWIzL7DpbHIMXL0 fvOgl7n2A2Tl8GUi+by0Devzkxewcd2S3x5htttEPIPM4q93ECn1DtzptBFM//q6s3wJPA TOuU0S6QW+K7MsqUHfMmZnJeP2Ju2cQMcA7Hj/O87URNHeXPIuR3M3kHNqw9MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmCzJ3gg0zrfZ; Tue, 14 Oct 2025 12:22:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ECMqVY019686; Tue, 14 Oct 2025 12:22:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECMqYt019683; Tue, 14 Oct 2025 12:22:52 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:22:52 GMT Message-Id: <202510141222.59ECMqYt019683@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: d4cc791f3b2e - main - sys/rpc: UNIX auth: Fix OOB reads on too short message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4cc791f3b2e1b6926420649a481eacaf3bf268e Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d4cc791f3b2e1b6926420649a481eacaf3bf268e commit d4cc791f3b2e1b6926420649a481eacaf3bf268e Author: Olivier Certner AuthorDate: 2025-10-07 15:51:16 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:21:49 +0000 sys/rpc: UNIX auth: Fix OOB reads on too short message In the inline version (_svcauth_unix()), fix multiple possible OOB reads when the credentials part of a request is too short to contain mandatory fields or with respect to the hostname length or number of groups it advertises. The previously existing check was arriving too late and relied on possibly wrong data coming from earlier OOB reads. While here, use 'uint32_t' as the length/size type, as it is more than enough and removes the need for conversions, explicit or implicit. While here, factor out setting 'stat' to AUTH_BADCRED and then jumping to 'done' on error, through the new 'badcred' label. While here, through comments, refer to what the non-inline version is doing (xdr_authunix_parms() in 'authunix_prot.c') and the reasons. Reviewed by: rmacklem Fixes: dfdcada31e79 ("Add the new kernel-mode NFS Lock Manager.") MFC after: 2 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52964 --- sys/rpc/svc_auth_unix.c | 99 ++++++++++++++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 39 deletions(-) diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index b3389bc79511..4d5535a4fee2 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -59,11 +59,8 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) enum auth_stat stat; XDR xdrs; int32_t *buf; - uint32_t time; struct xucred *xcr; - u_int auth_len; - size_t str_len, supp_ngroups; - u_int i; + uint32_t auth_len, time; xcr = rqst->rq_clntcred; auth_len = (u_int)msg->rm_call.cb_cred.oa_length; @@ -71,51 +68,71 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) XDR_DECODE); buf = XDR_INLINE(&xdrs, auth_len); if (buf != NULL) { - time = IXDR_GET_UINT32(buf); - str_len = (size_t)IXDR_GET_UINT32(buf); - if (str_len > AUTH_SYS_MAX_HOSTNAME) { - stat = AUTH_BADCRED; - goto done; + /* 'time', 'str_len', UID, GID and 'supp_ngroups'. */ + const uint32_t min_len = 5 * BYTES_PER_XDR_UNIT; + uint32_t str_len, supp_ngroups; + + if (auth_len < min_len) { + (void)printf("AUTH_SYS: Too short credentials (%u)\n", + auth_len); + goto badcred; } + time = IXDR_GET_UINT32(buf); + str_len = IXDR_GET_UINT32(buf); + if (str_len > AUTH_SYS_MAX_HOSTNAME) + goto badcred; str_len = RNDUP(str_len); + /* + * Recheck message length now that we know the value of + * 'str_len' (and that it won't cause an overflow in additions + * below) to protect access to the credentials part. + */ + if (auth_len < min_len + str_len) { + (void)printf("AUTH_SYS: Inconsistent credentials and " + "host name lengths (%u, %u)\n", + auth_len, str_len); + goto badcred; + } buf += str_len / sizeof (int32_t); xcr->cr_uid = IXDR_GET_UINT32(buf); xcr->cr_gid = IXDR_GET_UINT32(buf); - supp_ngroups = (size_t)IXDR_GET_UINT32(buf); - if (supp_ngroups > AUTH_SYS_MAX_GROUPS) { - stat = AUTH_BADCRED; - goto done; - } - for (i = 0; i < supp_ngroups; i++) { - /* - * Note that this is a `struct xucred`, which maintains - * its historical layout of preserving the egid in - * cr_ngroups and cr_groups[0] == egid. - */ - if (i + 1 < XU_NGROUPS) - xcr->cr_groups[i + 1] = IXDR_GET_INT32(buf); - else - buf++; + supp_ngroups = IXDR_GET_UINT32(buf); + /* + * See the herald comment before a similar test at the end of + * xdr_authunix_parms() for why we strictly respect RFC 5531 and + * why we may have to drop the last supplementary group when + * there are AUTH_SYS_MAX_GROUPS of them. + */ + if (supp_ngroups > AUTH_SYS_MAX_GROUPS) + goto badcred; + /* + * Final message length check, as we now know how much we will + * read in total. + */ + if (auth_len < min_len + str_len + + supp_ngroups * BYTES_PER_XDR_UNIT) { + (void)printf("AUTH_SYS: Inconsistent lengths " + "(credentials %u, machine name %u, " + "supplementary groups %u)\n", + auth_len, str_len, + supp_ngroups * BYTES_PER_XDR_UNIT); + goto badcred; } - if (supp_ngroups + 1 > XU_NGROUPS) - xcr->cr_ngroups = XU_NGROUPS; - else - xcr->cr_ngroups = supp_ngroups + 1; /* - * five is the smallest unix credentials structure - - * timestamp, hostname len (0), uid, gid, and gids len (0). + * Note that 'xcr' is a 'struct xucred', which still has the + * historical layout where the effective GID is in cr_groups[0] + * and is accounted in 'cr_ngroups'. */ - if ((5 + supp_ngroups) * BYTES_PER_XDR_UNIT + str_len > auth_len) { - (void) printf("bad auth_len gid %ld str %ld auth %u\n", - (long)supp_ngroups, (long)str_len, auth_len); - stat = AUTH_BADCRED; - goto done; + for (uint32_t i = 0; i < supp_ngroups; ++i) { + if (i < XU_NGROUPS - 1) + xcr->cr_sgroups[i] = IXDR_GET_INT32(buf); + else + buf++; } - } else if (! xdr_authunix_parms(&xdrs, &time, xcr)) { - stat = AUTH_BADCRED; - goto done; - } + xcr->cr_ngroups = MIN(supp_ngroups + 1, XU_NGROUPS); + } else if (! xdr_authunix_parms(&xdrs, &time, xcr)) + goto badcred; rqst->rq_verf = _null_auth; stat = AUTH_OK; @@ -123,6 +140,10 @@ done: XDR_DESTROY(&xdrs); return (stat); + +badcred: + stat = AUTH_BADCRED; + goto done; } From nobody Tue Oct 14 12:22:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmCzH69GSz6CLND; Tue, 14 Oct 2025 12:22: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 4cmCzH3F3Qz3DDr; Tue, 14 Oct 2025 12:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6UO7Xb9vIGbsi0I3MDtPX9inFZrj6PzqTFOudC/gwA=; b=oPoyzUh9wTjpyOOjfuj/CMeLYyttTmUbf/QaC7CqVktzop4T581cqyp09BrYqgoytWqv3J uuN3Fcxi8tz65Fa1Tvo8AufVv5co2UEDEfKEoAvBKxN9PyOhsh9yAJsxaw3VPGhuDJywQW n8+28fgI0f4HtRADli3CDt1wwzwkP8/W60wOcQeML4DqrYtO/Wem8JlhUBoCKZ/WRS9vPN U61Z7OW07Q0Vj7vOqBP0DWfal4/UCRzGuH3eQWgb2cSAch4sSqb/ntXDRabeLln2JoSBoe NK18JKxtgwdW3fIt02faWNMoF7DxXZy2MvcjFmq6B3zeDoJLR/D4H9Q0/c1eww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6UO7Xb9vIGbsi0I3MDtPX9inFZrj6PzqTFOudC/gwA=; b=Q92aPJ/qvMg77h+TAF7LfcLGhwvs8oIs2omzkAXWxLWKcMYn4tZAY0TScMJfP/+q6rlw5x 9UaoejJlpknxQ23ARHrQobSypgZeD63e/HoWkXjL1JVxUk1aukChVSCMJJKHlvGhGOYMKp GTDK1efNTuLfBdDROnZGhDpmCXy4wDlHNcys8YvPvcVThMawJLnIioB0BzvcgCWf2fTsCU ejGsk2d1dM/NxxWQOH2i9PsQF8lgwRQu24FhwQcAcdOhgCaNnT/pMVraPT+52FHvz2XBGC uWUfXLna76LyvQlydNnpxhILVLPm77eT9QRci9arRyeAGtVMeLUti35MwzrAeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760444571; a=rsa-sha256; cv=none; b=GyyrIwZG/IXgvfa5cioFTy3FcDpPT3+RBd3ZgDo3mxZotdXKwZvwvgFqkUOqskfmC2F4GT mpS2pMfH12+XE0g2z/iu/4PEtwm3nOfeQxP7rEraHkWrpiLxA6RyyL65QcPX+MuLdz0GNi hc6WYJ7bNURmrXikt59+ksCj6Z3kji8wgQqfeLIHW32vD+M8zbW1bF08vQgjqLEWare7Zo Ox7uKXEnKwnG/J1fUT82UGJKNl8FK+CtZuShh8pmFknXccZXvFr65Ndg4Y1lJUL5dhKy1F liEtlLjDFQ23A09NX+nlVyIgZVoQw/kGbekA20pQn2oH7eDbD/Fdvee6mJ0KZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmCzH2fr7zsQb; Tue, 14 Oct 2025 12:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ECMprg019646; Tue, 14 Oct 2025 12:22:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECMpuF019643; Tue, 14 Oct 2025 12:22:51 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:22:51 GMT Message-Id: <202510141222.59ECMpuF019643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: e665c0f6f7a6 - main - sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (2/2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e665c0f6f7a611d25d9d7e7f64d98c84b3a92820 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=e665c0f6f7a611d25d9d7e7f64d98c84b3a92820 commit e665c0f6f7a611d25d9d7e7f64d98c84b3a92820 Author: Olivier Certner AuthorDate: 2025-10-07 13:33:53 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:21:49 +0000 sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (2/2) Remove local defines from 'svc_auth_unix.c' and use the new limit macros instead. Reviewed by: rmacklem MFC after: 2 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52963 --- sys/rpc/svc_auth_unix.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index aad4e7610795..b3389bc79511 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -50,9 +50,6 @@ #include -#define MAX_MACHINE_NAME 255 -#define NGRPS 16 - /* * Unix longhand authenticator */ @@ -76,7 +73,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) if (buf != NULL) { time = IXDR_GET_UINT32(buf); str_len = (size_t)IXDR_GET_UINT32(buf); - if (str_len > MAX_MACHINE_NAME) { + if (str_len > AUTH_SYS_MAX_HOSTNAME) { stat = AUTH_BADCRED; goto done; } @@ -85,7 +82,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) xcr->cr_uid = IXDR_GET_UINT32(buf); xcr->cr_gid = IXDR_GET_UINT32(buf); supp_ngroups = (size_t)IXDR_GET_UINT32(buf); - if (supp_ngroups > NGRPS) { + if (supp_ngroups > AUTH_SYS_MAX_GROUPS) { stat = AUTH_BADCRED; goto done; } From nobody Tue Oct 14 12:22:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmCzK71mtz6CLWx; Tue, 14 Oct 2025 12:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmCzK5JZfz3DSc; Tue, 14 Oct 2025 12:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FLIosuQf8SATCRXpo4hQCMX5pvzYpa3dJQ0aE6apgYs=; b=QQcN5fHga+ojMzwv82jf38KjBQcRUnVnGkEvO+WIyq8/hxyhNy46BQuZR4gkXHJD0s4TsK oWBJPgg5vmKrr08k78AUHjGPvtC5tGyQlA+E/dMs29EitwDpfgiIYIrIchxYDSowUDFS7i wpr+gquIWASGMBUslOmNOMQSjwFuqm/f3y/gc0tMCWvGloJjHg8WIF54pWf5ivnKV3N0kJ 12mfrG8qABGDMxVAa2SXfn9v+lhhBErPCExAuE1wze7iYsPt7W+N3eo81xUQQ7qZxXC28M nba6kRMhVZqTBMviOyKl2LVFXHr5AAMbrrEM2DjWrh0YV5G+TObg5S1Rvha3pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FLIosuQf8SATCRXpo4hQCMX5pvzYpa3dJQ0aE6apgYs=; b=t3+/Qb9MpzJkLdYXvFVSmBJsx/CfFzsA8MoXZUh2HNfG/sQT76o59RufK2IwUWhwYMvhx3 rgPpM/P1Dh09uY+B3KarKBQLYOCboW3uRtQ2VtQeSwGwAk+uGXFgOcDAQQGZXQhg0VFcib 6ailgWZaI6Q6lCz5p7XVcbXKGN97AuzDE6C71i7TqsWpRX0yqLpH5gH44uoBlspaFOy9Vm 1MJ84PDbEqBDpJcRzNz05OC4rjYVsmJssjdQqHb6muS4BSVB8YVlrD/NjKoLs8rznG2zDR vYLum5xiC89MIJ2gnPjFvunuFw6qEm9HgH2ouAw00XgzbluUSK8ZdnQe0cad7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760444573; a=rsa-sha256; cv=none; b=dBmwtW+jtS+IMb3n/WMWpgmdovclln4jyvcJ7mxoQpnEf8vs2O5i4T4u77Wzsd9WVV6KGC gHCVdM+UvQwjgyVSlDb9F3e/vzKB209UNgEiAmHkTZ89/2DUXh+Wb66DASRoSG4NAq4esi QUEq3lAbTy88A4gn5Aa6hTCLUqYqRiNgrctpl8wDzPc3cVVtP3dIi5wrlEF6MNXxZ2Y+tE uCvV8IEZJDbj0qVnurt7cV1Owg2wkcJ4GAiYkRvg2yNdUCmdXr65JDaNSTRCh8YaDU/m5L j0cUabGr9O8qKAq5mk7ar3ncFjI5t2L5I3SrDH1EQKCHFuJ4eyPFCCPIPKSTXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmCzK43krzsp1; Tue, 14 Oct 2025 12:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ECMr0b019721; Tue, 14 Oct 2025 12:22:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECMruh019718; Tue, 14 Oct 2025 12:22:53 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:22:53 GMT Message-Id: <202510141222.59ECMruh019718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4ae70c3ea498 - main - sys/rpc: UNIX auth: Support XDR_FREE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ae70c3ea498e06676040ee99254d261e29ae82e Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4ae70c3ea498e06676040ee99254d261e29ae82e commit 4ae70c3ea498e06676040ee99254d261e29ae82e Author: Olivier Certner AuthorDate: 2025-10-13 15:13:09 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:21:49 +0000 sys/rpc: UNIX auth: Support XDR_FREE xdr_authunix_parms() does not allocate any auxiliary memory, so we can simply support XDR_FREE by just returning TRUE. Although there are currently no callers passing XDR_FREE, this makes us immune to such a change in a way that doesn't cost more but is more constructive than a mere KASSERT(). Suggested by: rmacklem MFC after: 2 days Sponsored by: The FreeBSD Foundation --- sys/rpc/authunix_prot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index c1a9f90bbe28..0274a713ff2b 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -61,6 +61,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) uint32_t junk; char hostbuf[MAXHOSTNAMELEN]; + if (xdrs->x_op == XDR_FREE) + /* This function does not allocate auxiliary memory. */ + return (TRUE); + if (xdrs->x_op == XDR_ENCODE) { getcredhostname(NULL, hostbuf, sizeof(hostbuf)); namelen = strlen(hostbuf); From nobody Tue Oct 14 12:22:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmCzL74Twz6CLGx; Tue, 14 Oct 2025 12:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmCzL5ZD6z3DfD; Tue, 14 Oct 2025 12:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BAqIHX9i/DXHMHgSrJhh39bKXYH4NbKCOO5rcwoNfJc=; b=nSE5vhSWjkf/rg+VAbzQub+cOYffurV9Taqgv90OZanASYbKeaJyKGpEj9QlbQ5F4a/0jl V1vtwNiTxuL7r8kcCbj5WplZl0OTukyGeORfX9CRFjNOYLISvsm8advsLBQeu3dY7Dbxl/ pmrfdS5BZRbor5fXfTb4VGr81DlgIrptMRhDp/ijz2snA7iafeDMhJM4JuJ1yrWycMKYzI GIyGLrIKjAh9SBVwNBGUq+KJE6INIRzkiHIJMo8vVlJ1Ym5rcA18Xj52FqQ9JbtMNCLoIr jI2D3iRjWvvLQuul4o2X55gPMT8C3NhVbQTqO0XNs5FPJK4UYqHY+6h8zBLh1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BAqIHX9i/DXHMHgSrJhh39bKXYH4NbKCOO5rcwoNfJc=; b=SVu+Yi4KEInwP5iKEEHuLJP32NwHGEC5LAKNiK+6Som+NRlrwD0CMztaBX4y1aKVU1yXu9 sRWlH26szeVKwcNinRurE9UeRSyvJbJBRrWRKs/yOXkGDpNd2AlFsctpaKR7cMf1uOCcd9 AHJVapaOYRZhPl+KyuN2k3pwGNOToq2LXrO8Rum7hKMKpbg0k1HUoiCMSivoUO4+WzBzDa 2LiIAIyODHTttneB2zsnFIBKji72Djq2K6QvlcaS0hYrqeRmuvN98aX5ekDL003lWHIOFo axjfso9PUUPtQueaNcNbjSajgbkh7scFQcJhkFASGkbfn8JmsYW6ryujYXAEXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760444574; a=rsa-sha256; cv=none; b=HCY0EaN8mrDb6W/EcM6ufT7dcGTTv4CA0bklPTuf0xcLH3JZoobMnt7o25CUhd7aCVOZdB b4NtKewtG+fXpXIdFiIfyxbPm3t7U0rZ8ymC+4HLfSOTdQWzCBv0DjOeeEYMCEDnyS0DAs BVZZfMsmKheUETFIzXtA3s6Qe0XhkIeGCcb+4BU2J0ij1AQ9qP88Hm/yjXzSDzfMaFjVp5 N+U57MZPAm6ZV9giHJL7owY4LOC5rqwIiMrVFYDv4b8HhcyTwGvWxs+01d7X+yzi88o+Hs EOBOXIWa12HD7j+WNb3zAYzLGGJYwqCre5aU/GN2fVExBuDIjNHlms+fGZQRLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmCzL532ZzsLn; Tue, 14 Oct 2025 12:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ECMs0A019760; Tue, 14 Oct 2025 12:22:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECMsfS019757; Tue, 14 Oct 2025 12:22:54 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:22:54 GMT Message-Id: <202510141222.59ECMsfS019757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a4105a5d4e17 - main - sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4105a5d4e179aa1ef661ee45d6008e83fefd2a7 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a4105a5d4e179aa1ef661ee45d6008e83fefd2a7 commit a4105a5d4e179aa1ef661ee45d6008e83fefd2a7 Author: Olivier Certner AuthorDate: 2025-10-07 17:10:12 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:21:50 +0000 sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes MFC after: 2 days Sponsored by: The FreeBSD Foundation --- sys/rpc/authunix_prot.c | 10 +++------- sys/rpc/svc_auth_unix.c | 4 +--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index 0274a713ff2b..ff4c12c3f52e 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -30,7 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include /* * authunix_prot.c * XDR for UNIX style authentication parameters for RPC @@ -40,8 +39,7 @@ #include #include -#include -#include +#include #include #include @@ -70,12 +68,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) namelen = strlen(hostbuf); if (namelen > AUTH_SYS_MAX_HOSTNAME) namelen = AUTH_SYS_MAX_HOSTNAME; - } else { + } else namelen = 0; - } - if (!xdr_uint32_t(xdrs, time) - || !xdr_uint32_t(xdrs, &namelen)) + if (!xdr_uint32_t(xdrs, time) || !xdr_uint32_t(xdrs, &namelen)) return (FALSE); /* diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index 4d5535a4fee2..9e4b0b8483b5 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -41,8 +41,6 @@ */ #include -#include -#include #include #include @@ -131,7 +129,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) buf++; } xcr->cr_ngroups = MIN(supp_ngroups + 1, XU_NGROUPS); - } else if (! xdr_authunix_parms(&xdrs, &time, xcr)) + } else if (!xdr_authunix_parms(&xdrs, &time, xcr)) goto badcred; rqst->rq_verf = _null_auth; From nobody Tue Oct 14 12:57:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmDl53zcYz6CPmg; Tue, 14 Oct 2025 12:57: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 4cmDl5390Dz3Jv2; Tue, 14 Oct 2025 12:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760446641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3lNqkmzuzJZCwJW++cGx04Z9om+qVDRgEFWqlzg8liY=; b=DWoJoYxAHr0o+88N1WZLm46R+rms4LV2BkEF1YwIDJ9OPJTeGFzZVa1cyJH5DDqlHuGais DEiKKJiXfn7i1PjbKxg8WlTWN6iixfIe3laKGVNKpeqRiRhBXgN/UI30TdXhTHp8NIrhps FVl6vQo4hnPBsS2er6EbBydiu4ym9tiYKGolxDWkAkaVTkHpf++DGuS+DWhc+mr4G7eP0S gFWuUoLjheKyCS93I2mfJ5CpTZXxxJBJMqVycc5fgF2Xud6v0jf33jGD95pKEAJhASpPxS jO2uMlXFkyOZ74I3HZlWmSRkPgjbzEubUDcSD5RX6hR5qKAWxlLf2ifPXjb5tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760446641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3lNqkmzuzJZCwJW++cGx04Z9om+qVDRgEFWqlzg8liY=; b=yJJH5/rkEMn5mKiRTBOdHDKx2KLnbyArdFx+BjXTW0VYGm2ixsfi2Egfh85WW14U9rbdnr W9Noj+iTrYqKiVVJAh48mmfKk0rRLy7HvfsZzpGiYtCZPyFBQQTGSuL0DHJz1gbUMWfrhz 0j/jHFIVjJGH4eWBaRGmgX1HwYPfFPJlM2aGgondMsq2R1sSpOvILYUZLlu1rfoI5qKwEs jhNwCfBWbSq21dwTJL9BwPRtsWRwlCpeXHrDQP13Mb3LGxQGzFdPTHDcgSxdGk4WPXzQAO gnn9rSLofQ8C2pmgw59zsbxTH1iqXZNjUftD24sSLyiugp5CyQ4Un66WLvfazA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760446641; a=rsa-sha256; cv=none; b=dL5UexfSBDON65pYC4wGxJqWlozjOF/d+ePaO2YlTxdthKh4W6rDhPpRZ2E3QvVnQCPvpd 2tXXNmkzoz7S2mvO8UqQVM0wul/sIBHYTofU8h2BVRnUhKqjal7z6udcguYZqJ8lYnAy5k k8T7ST9wtACjSm0jeoppk1a/+VKQEfWHiJdL5Io8x/v5Gj/ezyrsM3C98nR4bFdBGJJ7us JHysDFvsxJ9P1dFdoEaMCTBCuWYSapA1aVncEgyfQ+uoBbzKJisWb7azJX1SNZbe8y7UNJ dlofNa0CIT6VLqZZm+0KekY0W9ZzhpiqsTVDc9xtrq1UCZz3VYtYObQLfa6I+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmDl52kBQzstQ; Tue, 14 Oct 2025 12:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ECvLJW077091; Tue, 14 Oct 2025 12:57:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECvLQV077088; Tue, 14 Oct 2025 12:57:21 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:57:21 GMT Message-Id: <202510141257.59ECvLQV077088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 2110ae0ef9d6 - main - sys/rpc: UNIX auth: Do not log on bogus AUTH_SYS messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2110ae0ef9d6ca8cf52b29fcaf926c4343f56826 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=2110ae0ef9d6ca8cf52b29fcaf926c4343f56826 commit 2110ae0ef9d6ca8cf52b29fcaf926c4343f56826 Author: Olivier Certner AuthorDate: 2025-10-14 12:54:55 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:56:54 +0000 sys/rpc: UNIX auth: Do not log on bogus AUTH_SYS messages Remove the printf() stances added in commit d4cc791f3b2e ("sys/rpc: UNIX auth: Fix OOB reads on too short message"). Even if it can be helpful to know why an authentication message is rejected, printing explanatory messages on each request attempt is a remote log filler that could be triggered by accident, and the generic RPC code generally does not do that. These printf() calls should be restored only after some limiting or configuration mechanism is devised. MFC with: d4cc791f3b2e ("sys/rpc: UNIX auth: Fix OOB reads on too short message") Sponsored by: The FreeBSD Foundation --- sys/rpc/svc_auth_unix.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index 9e4b0b8483b5..aa0fc585865f 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -41,7 +41,6 @@ */ #include -#include #include #include @@ -70,11 +69,8 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) const uint32_t min_len = 5 * BYTES_PER_XDR_UNIT; uint32_t str_len, supp_ngroups; - if (auth_len < min_len) { - (void)printf("AUTH_SYS: Too short credentials (%u)\n", - auth_len); + if (auth_len < min_len) goto badcred; - } time = IXDR_GET_UINT32(buf); str_len = IXDR_GET_UINT32(buf); if (str_len > AUTH_SYS_MAX_HOSTNAME) @@ -85,12 +81,8 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) * 'str_len' (and that it won't cause an overflow in additions * below) to protect access to the credentials part. */ - if (auth_len < min_len + str_len) { - (void)printf("AUTH_SYS: Inconsistent credentials and " - "host name lengths (%u, %u)\n", - auth_len, str_len); + if (auth_len < min_len + str_len) goto badcred; - } buf += str_len / sizeof (int32_t); xcr->cr_uid = IXDR_GET_UINT32(buf); xcr->cr_gid = IXDR_GET_UINT32(buf); @@ -108,14 +100,8 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) * read in total. */ if (auth_len < min_len + str_len + - supp_ngroups * BYTES_PER_XDR_UNIT) { - (void)printf("AUTH_SYS: Inconsistent lengths " - "(credentials %u, machine name %u, " - "supplementary groups %u)\n", - auth_len, str_len, - supp_ngroups * BYTES_PER_XDR_UNIT); + supp_ngroups * BYTES_PER_XDR_UNIT) goto badcred; - } /* * Note that 'xcr' is a 'struct xucred', which still has the From nobody Tue Oct 14 13:51:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmFxR1YCKz6CTBv; Tue, 14 Oct 2025 13:51: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 4cmFxQ6wD1z3Str; Tue, 14 Oct 2025 13: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=1760449882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KiqNDlNefRDB3iSO3GALyo+Du/s5hNJM8cp1qAq6Kfk=; b=PEvKMeRLOyJI666ON2DwJiSNdo83nJJ1Dp6xCL2NGRNzYO196flhUOQ6t93Na6RgtRLhYI zgBmz2Pen0+Fgl4ViLSPGDtdHL0Ukpn245LMsl1TgMqfonuOJpFEgBkHhbcaV2Xtgmzm8G y0zZIY+bS//K0jQDs7RcUBh0m3phiQPQf8pWr+UbdoBb37g+QYLy6axDJPg5Uyd57ADDN1 WzAcOwuMHvOOG+8G/UcaC9784FiHbg5uj/B5/pNfFF/PaHBrhtKcUaNCVU1L3LgnqNqF3d ZGZwQcbAmObmog3ESnjQk6YoWk1JZoGBma1s8JZ7sxhelEDvvJTq80xzJlGQxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760449882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KiqNDlNefRDB3iSO3GALyo+Du/s5hNJM8cp1qAq6Kfk=; b=jCAQshRYv4wQAQlBMB6Ohc62JmiQR4tUacA+ot/y4BE9d9nhSQ8mOLiK90q0oZquy9s9sv Qm5iHVXYAdAzqRTdHaFTFaybd9ZSsVqFVVqg3a0iJrbW/JyaPLh2DiMwzHIl6NLkL+dOxZ ng9YL7AKWBjXE9j4j8fz9h7jKFWz8YiZ1RsGllop3vB374eOuTEIbkDknEHcNsV2Oa7yAF Zwkx9B15TWCapfzjFFlPgIVBwzVa1cwVJKK03TqXeWsP9w/DReXrN0xQCL94f4R+SJnM+S oFAq9pBRg0Itk8kubX3in3OQTyJN7BNd6ugC66fFhaObGo+ihJP7QOESpbHZiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760449882; a=rsa-sha256; cv=none; b=vLz1MDk1RWeYeLhpLx7J7frvZ1fFwRvbeIrSxmaRjeo7BWEibqxXOjigAPAtg2zFYJArPd Etf2lZJH+jSA0SXbVns6Y0E32U4I0g9CxGa8B3uFJuTd+afPMSpP/SYberyQcR74VJ6jvY VfrvyPkuL1y3Ws98AhmEC/xr5+2ADCdZQpLrlXU3GoAPcvF9GqQdnpOyPPnm+OmsuuZKmU MWGeYaalCjRsEPVYYbyjVJRSlh/N+NwWuZSnjpPCmb084cagGnBsGJrXSt5HmCLcJ5klmi FlA/cFhg99kte74i+/+jEZrKQ1BX8hNNEBqFi2m3MJiEcy2+q8CMAdHFOci4rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmFxQ6QBfzvdj; Tue, 14 Oct 2025 13:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EDpMxP083124; Tue, 14 Oct 2025 13:51:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EDpMhK083121; Tue, 14 Oct 2025 13:51:22 GMT (envelope-from git) Date: Tue, 14 Oct 2025 13:51:22 GMT Message-Id: <202510141351.59EDpMhK083121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 80336636b6b9 - main - imgact: Mark brandinfo and note structures as const List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80336636b6b9f7a3bdad007c400e85eae017d2a2 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=80336636b6b9f7a3bdad007c400e85eae017d2a2 commit 80336636b6b9f7a3bdad007c400e85eae017d2a2 Author: Mark Johnston AuthorDate: 2025-10-14 13:31:06 +0000 Commit: Mark Johnston CommitDate: 2025-10-14 13:32:25 +0000 imgact: Mark brandinfo and note structures as const No functional change intended. Reviewed by: olce, kib, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53062 --- sys/amd64/amd64/elf_machdep.c | 14 ++++++-------- sys/amd64/linux/linux_sysvec.c | 12 ++++++------ sys/amd64/linux32/linux32_sysvec.c | 12 ++++++------ sys/arm64/arm64/elf_machdep.c | 7 +++---- sys/arm64/linux/linux_sysvec.c | 10 +++++----- sys/compat/ia32/ia32_sysvec.c | 24 +++++++++--------------- sys/compat/linux/linux_futex.c | 2 +- sys/kern/imgact_elf.c | 28 ++++++++++++++-------------- sys/kern/kern_exec.c | 2 +- sys/sys/imgact_elf.h | 8 ++++---- sys/sys/proc.h | 2 +- 11 files changed, 56 insertions(+), 65 deletions(-) diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c index 6cc2d58bbbcc..933f1ac0051f 100644 --- a/sys/amd64/amd64/elf_machdep.c +++ b/sys/amd64/amd64/elf_machdep.c @@ -179,7 +179,7 @@ freebsd_brand_info_la57_img_compat(const struct image_params *imgp, return (!prefer_uva_la48); } -static Elf64_Brandinfo freebsd_brand_info_la48 = { +static const Elf64_Brandinfo freebsd_brand_info_la48 = { .brand = ELFOSABI_FREEBSD, .machine = EM_X86_64, .compat_3_brand = "FreeBSD", @@ -190,7 +190,7 @@ static Elf64_Brandinfo freebsd_brand_info_la48 = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, }; -static Elf64_Brandinfo freebsd_brand_info_la57 = { +static const Elf64_Brandinfo freebsd_brand_info_la57 = { .brand = ELFOSABI_FREEBSD, .machine = EM_X86_64, .compat_3_brand = "FreeBSD", @@ -216,7 +216,7 @@ sysinit_register_elf64_brand_entries(void *arg __unused) SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST, sysinit_register_elf64_brand_entries, NULL); -static Elf64_Brandinfo freebsd_brand_oinfo = { +static const Elf64_Brandinfo freebsd_brand_oinfo = { .brand = ELFOSABI_FREEBSD, .machine = EM_X86_64, .compat_3_brand = "FreeBSD", @@ -226,11 +226,10 @@ static Elf64_Brandinfo freebsd_brand_oinfo = { .brand_note = &elf64_freebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; - -SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, +C_SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_oinfo); -static Elf64_Brandinfo kfreebsd_brand_info = { +static const Elf64_Brandinfo kfreebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_X86_64, .compat_3_brand = "FreeBSD", @@ -240,8 +239,7 @@ static Elf64_Brandinfo kfreebsd_brand_info = { .brand_note = &elf64_kfreebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_MANDATORY }; - -SYSINIT(kelf64, SI_SUB_EXEC, SI_ORDER_ANY, +C_SYSINIT(kelf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t)elf64_insert_brand_entry, &kfreebsd_brand_info); void diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index c8579c5da4ad..890cf01c46a0 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -857,7 +857,7 @@ linux_vdso_reloc(char *mapping, Elf_Addr offset) } } -static Elf_Brandnote linux64_brandnote = { +static const Elf_Brandnote linux64_brandnote = { .hdr.n_namesz = sizeof(GNU_ABI_VENDOR), .hdr.n_descsz = 16, .hdr.n_type = 1, @@ -866,7 +866,7 @@ static Elf_Brandnote linux64_brandnote = { .trans_osrel = linux_trans_osrel }; -static Elf64_Brandinfo linux_glibc2brand = { +static const Elf64_Brandinfo linux_glibc2brand = { .brand = ELFOSABI_LINUX, .machine = EM_X86_64, .compat_3_brand = "Linux", @@ -877,7 +877,7 @@ static Elf64_Brandinfo linux_glibc2brand = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -static Elf64_Brandinfo linux_glibc2brandshort = { +static const Elf64_Brandinfo linux_glibc2brandshort = { .brand = ELFOSABI_LINUX, .machine = EM_X86_64, .compat_3_brand = "Linux", @@ -888,7 +888,7 @@ static Elf64_Brandinfo linux_glibc2brandshort = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -static Elf64_Brandinfo linux_muslbrand = { +static const Elf64_Brandinfo linux_muslbrand = { .brand = ELFOSABI_LINUX, .machine = EM_X86_64, .compat_3_brand = "Linux", @@ -900,7 +900,7 @@ static Elf64_Brandinfo linux_muslbrand = { LINUX_BI_FUTEX_REQUEUE }; -static Elf64_Brandinfo *linux_brandlist[] = { +static const Elf64_Brandinfo *linux_brandlist[] = { &linux_glibc2brand, &linux_glibc2brandshort, &linux_muslbrand, @@ -910,7 +910,7 @@ static Elf64_Brandinfo *linux_brandlist[] = { static int linux64_elf_modevent(module_t mod, int type, void *data) { - Elf64_Brandinfo **brandinfo; + const Elf64_Brandinfo **brandinfo; int error; struct linux_ioctl_handler **lihp; diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 8fac626f9053..735ebb151017 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -954,7 +954,7 @@ linux_vdso_reloc(char *mapping, Elf_Addr offset) } } -static Elf_Brandnote linux32_brandnote = { +static const Elf_Brandnote linux32_brandnote = { .hdr.n_namesz = sizeof(GNU_ABI_VENDOR), .hdr.n_descsz = 16, /* XXX at least 16 */ .hdr.n_type = 1, @@ -963,7 +963,7 @@ static Elf_Brandnote linux32_brandnote = { .trans_osrel = linux_trans_osrel }; -static Elf32_Brandinfo linux_brand = { +static const Elf32_Brandinfo linux_brand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", @@ -974,7 +974,7 @@ static Elf32_Brandinfo linux_brand = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -static Elf32_Brandinfo linux_glibc2brand = { +static const Elf32_Brandinfo linux_glibc2brand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", @@ -985,7 +985,7 @@ static Elf32_Brandinfo linux_glibc2brand = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -static Elf32_Brandinfo linux_muslbrand = { +static const Elf32_Brandinfo linux_muslbrand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", @@ -997,7 +997,7 @@ static Elf32_Brandinfo linux_muslbrand = { LINUX_BI_FUTEX_REQUEUE }; -static Elf32_Brandinfo *linux_brandlist[] = { +static const Elf32_Brandinfo *linux_brandlist[] = { &linux_brand, &linux_glibc2brand, &linux_muslbrand, @@ -1007,7 +1007,7 @@ static Elf32_Brandinfo *linux_brandlist[] = { static int linux_elf_modevent(module_t mod, int type, void *data) { - Elf32_Brandinfo **brandinfo; + const Elf32_Brandinfo **brandinfo; int error; struct linux_ioctl_handler **lihp; diff --git a/sys/arm64/arm64/elf_machdep.c b/sys/arm64/arm64/elf_machdep.c index 13af5c5065d6..207b37180a26 100644 --- a/sys/arm64/arm64/elf_machdep.c +++ b/sys/arm64/arm64/elf_machdep.c @@ -121,7 +121,7 @@ static struct sysentvec elf64_freebsd_sysvec = { }; INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); -static Elf64_Brandinfo freebsd_brand_info = { +static const Elf64_Brandinfo freebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_AARCH64, .compat_3_brand = "FreeBSD", @@ -131,8 +131,7 @@ static Elf64_Brandinfo freebsd_brand_info = { .brand_note = &elf64_freebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; - -SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST, +C_SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_info); static bool @@ -336,7 +335,7 @@ elf_cpu_parse_dynamic(caddr_t loadbase __unused, Elf_Dyn *dynamic __unused) return (0); } -static Elf_Note gnu_property_note = { +static const Elf_Note gnu_property_note = { .n_namesz = sizeof(GNU_ABI_VENDOR), .n_descsz = 16, .n_type = NT_GNU_PROPERTY_TYPE_0, diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 084b7a11b01f..ac05820f89bc 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -584,7 +584,7 @@ linux_vdso_reloc(char *mapping, Elf_Addr offset) } } -static Elf_Brandnote linux64_brandnote = { +static const Elf_Brandnote linux64_brandnote = { .hdr.n_namesz = sizeof(GNU_ABI_VENDOR), .hdr.n_descsz = 16, .hdr.n_type = 1, @@ -593,7 +593,7 @@ static Elf_Brandnote linux64_brandnote = { .trans_osrel = linux_trans_osrel }; -static Elf64_Brandinfo linux_glibc2brand = { +static const Elf64_Brandinfo linux_glibc2brand = { .brand = ELFOSABI_LINUX, .machine = EM_AARCH64, .compat_3_brand = "Linux", @@ -604,7 +604,7 @@ static Elf64_Brandinfo linux_glibc2brand = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -Elf64_Brandinfo *linux_brandlist[] = { +const Elf64_Brandinfo *linux_brandlist[] = { &linux_glibc2brand, NULL }; @@ -612,8 +612,8 @@ Elf64_Brandinfo *linux_brandlist[] = { static int linux64_elf_modevent(module_t mod, int type, void *data) { - Elf64_Brandinfo **brandinfo; - struct linux_ioctl_handler**lihp; + const Elf64_Brandinfo **brandinfo; + struct linux_ioctl_handler **lihp; int error; error = 0; diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c index 0ea7d072e911..b9dada4eee7b 100644 --- a/sys/compat/ia32/ia32_sysvec.c +++ b/sys/compat/ia32/ia32_sysvec.c @@ -145,7 +145,7 @@ struct sysentvec ia32_freebsd_sysvec = { }; INIT_SYSENTVEC(elf_ia32_sysvec, &ia32_freebsd_sysvec); -static Elf32_Brandinfo ia32_brand_info = { +static const Elf32_Brandinfo ia32_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_386, .compat_3_brand = "FreeBSD", @@ -155,12 +155,10 @@ static Elf32_Brandinfo ia32_brand_info = { .brand_note = &elf32_freebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; +C_SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_MIDDLE, + (sysinit_cfunc_t)elf32_insert_brand_entry, &ia32_brand_info); -SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_MIDDLE, - (sysinit_cfunc_t) elf32_insert_brand_entry, - &ia32_brand_info); - -static Elf32_Brandinfo ia32_brand_oinfo = { +static const Elf32_Brandinfo ia32_brand_oinfo = { .brand = ELFOSABI_FREEBSD, .machine = EM_386, .compat_3_brand = "FreeBSD", @@ -170,12 +168,10 @@ static Elf32_Brandinfo ia32_brand_oinfo = { .brand_note = &elf32_freebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; +C_SYSINIT(oia32, SI_SUB_EXEC, SI_ORDER_ANY, + (sysinit_cfunc_t)elf32_insert_brand_entry, &ia32_brand_oinfo); -SYSINIT(oia32, SI_SUB_EXEC, SI_ORDER_ANY, - (sysinit_cfunc_t) elf32_insert_brand_entry, - &ia32_brand_oinfo); - -static Elf32_Brandinfo kia32_brand_info = { +static const Elf32_Brandinfo kia32_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_386, .compat_3_brand = "FreeBSD", @@ -184,10 +180,8 @@ static Elf32_Brandinfo kia32_brand_info = { .brand_note = &elf32_kfreebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_MANDATORY }; - -SYSINIT(kia32, SI_SUB_EXEC, SI_ORDER_ANY, - (sysinit_cfunc_t) elf32_insert_brand_entry, - &kia32_brand_info); +C_SYSINIT(kia32, SI_SUB_EXEC, SI_ORDER_ANY, + (sysinit_cfunc_t)elf32_insert_brand_entry, &kia32_brand_info); void elf32_dump_thread(struct thread *td, void *dst, size_t *off) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 37d0142bae8b..0586eb55a8f3 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -251,7 +251,7 @@ linux_futex(struct thread *td, struct linux_futex_args *args) * set LINUX_BI_FUTEX_REQUEUE bit of Brandinfo flags. */ p = td->td_proc; - Elf_Brandinfo *bi = p->p_elf_brandinfo; + const Elf_Brandinfo *bi = p->p_elf_brandinfo; if (bi == NULL || ((bi->flags & LINUX_BI_FUTEX_REQUEUE)) == 0) return (EINVAL); args->val3_compare = false; diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 1bc2491a1a12..c53707a1286c 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -92,7 +92,7 @@ #define ELF_ABI_ID __CONCAT(elf, __ELF_WORD_SIZE) static int __elfN(check_header)(const Elf_Ehdr *hdr); -static Elf_Brandinfo *__elfN(get_brandinfo)(struct image_params *imgp, +static const Elf_Brandinfo *__elfN(get_brandinfo)(struct image_params *imgp, const char *interp, int32_t *osrel, uint32_t *fctl0); static int __elfN(load_file)(struct proc *p, const char *file, u_long *addr, u_long *entry); @@ -104,7 +104,7 @@ static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel); static bool kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel); static bool __elfN(check_note)(struct image_params *imgp, - Elf_Brandnote *checknote, int32_t *osrel, bool *has_fctl0, + const Elf_Brandnote *checknote, int32_t *osrel, bool *has_fctl0, uint32_t *fctl0); static vm_prot_t __elfN(trans_prot)(Elf_Word); static Elf_Word __elfN(untrans_prot)(vm_prot_t); @@ -227,7 +227,7 @@ SYSCTL_BOOL(ELF_NODE_OID, OID_AUTO, allow_wx, CTLFLAG_RWTUN, &__elfN(allow_wx), 0, "Allow pages to be mapped simultaneously writable and executable"); -static Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; +static const Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; #define aligned(a, t) (rounddown2((u_long)(a), sizeof(t)) == (u_long)(a)) @@ -286,7 +286,7 @@ kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel) } int -__elfN(insert_brand_entry)(Elf_Brandinfo *entry) +__elfN(insert_brand_entry)(const Elf_Brandinfo *entry) { int i; @@ -305,7 +305,7 @@ __elfN(insert_brand_entry)(Elf_Brandinfo *entry) } int -__elfN(remove_brand_entry)(Elf_Brandinfo *entry) +__elfN(remove_brand_entry)(const Elf_Brandinfo *entry) { int i; @@ -321,7 +321,7 @@ __elfN(remove_brand_entry)(Elf_Brandinfo *entry) } bool -__elfN(brand_inuse)(Elf_Brandinfo *entry) +__elfN(brand_inuse)(const Elf_Brandinfo *entry) { struct proc *p; bool rval = false; @@ -338,12 +338,12 @@ __elfN(brand_inuse)(Elf_Brandinfo *entry) return (rval); } -static Elf_Brandinfo * +static const Elf_Brandinfo * __elfN(get_brandinfo)(struct image_params *imgp, const char *interp, int32_t *osrel, uint32_t *fctl0) { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; - Elf_Brandinfo *bi, *bi_m; + const Elf_Brandinfo *bi, *bi_m; bool ret, has_fctl0; int i, interp_name_len; @@ -492,7 +492,7 @@ __elfN(phdr_in_zero_page)(const Elf_Ehdr *hdr) static int __elfN(check_header)(const Elf_Ehdr *hdr) { - Elf_Brandinfo *bi; + const Elf_Brandinfo *bi; int i; if (!IS_ELF(*hdr) || @@ -1109,7 +1109,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) struct vmspace *vmspace; vm_map_t map; char *interp; - Elf_Brandinfo *brand_info; + const Elf_Brandinfo *brand_info; struct sysentvec *sv; u_long addr, baddr, entry, proghdr; u_long maxalign, maxsalign, mapsz, maxv, maxv1, anon_loc; @@ -1925,7 +1925,7 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, Elf_Phdr *phdr; Elf_Shdr *shdr; struct phdr_closure phc; - Elf_Brandinfo *bi; + const Elf_Brandinfo *bi; ehdr = (Elf_Ehdr *)hdr; bi = td->td_proc->p_elf_brandinfo; @@ -2861,7 +2861,7 @@ ret: } struct brandnote_cb_arg { - Elf_Brandnote *brandnote; + const Elf_Brandnote *brandnote; int32_t *osrel; }; @@ -2883,7 +2883,7 @@ brandnote_cb(const Elf_Note *note, void *arg0, bool *res) return (true); } -static Elf_Note fctl_note = { +static const Elf_Note fctl_note = { .n_namesz = sizeof(FREEBSD_ABI_VENDOR), .n_descsz = sizeof(uint32_t), .n_type = NT_FREEBSD_FEATURE_CTL, @@ -2918,7 +2918,7 @@ note_fctl_cb(const Elf_Note *note, void *arg0, bool *res) * as for headers. */ static bool -__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote, +__elfN(check_note)(struct image_params *imgp, const Elf_Brandnote *brandnote, int32_t *osrel, bool *has_fctl0, uint32_t *fctl0) { const Elf_Phdr *phdr; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 0fc2d0e7f1bc..70a9a419a674 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -418,7 +418,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p, #endif int error, i, orig_osrel; uint32_t orig_fctl0; - Elf_Brandinfo *orig_brandinfo; + const Elf_Brandinfo *orig_brandinfo; size_t freepath_size; static const char fexecv_proc_title[] = "(fexecv)"; diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 2845a9dbc1e2..9e2a233248b4 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -86,7 +86,7 @@ typedef struct { struct sysentvec *sysvec; const char *interp_newpath; int flags; - Elf_Brandnote *brand_note; + const Elf_Brandnote *brand_note; bool (*header_supported)(const struct image_params *, const int32_t *, const uint32_t *); /* High 8 bits of flags is private to the ABI */ @@ -111,9 +111,9 @@ struct sseg_closure { size_t size; /* Total size of all writable segments. */ }; -bool __elfN(brand_inuse)(Elf_Brandinfo *entry); -int __elfN(insert_brand_entry)(Elf_Brandinfo *entry); -int __elfN(remove_brand_entry)(Elf_Brandinfo *entry); +bool __elfN(brand_inuse)(const Elf_Brandinfo *entry); +int __elfN(insert_brand_entry)(const Elf_Brandinfo *entry); +int __elfN(remove_brand_entry)(const Elf_Brandinfo *entry); int __elfN(freebsd_fixup)(uintptr_t *, struct image_params *); int __elfN(coredump)(struct thread *, struct coredump_writer *, off_t, int); size_t __elfN(populate_note)(int, void *, void *, size_t, void **); diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 9140cee56885..8c0729d3ec66 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -741,7 +741,7 @@ struct proc { reaper which spawned our subtree. */ uint64_t p_elf_flags; /* (x) ELF flags */ - void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for + const void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for non ELF binaries. */ sbintime_t p_umtx_min_timeout; /* End area that is copied on creation. */ From nobody Tue Oct 14 13:51:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmFxS12cvz6CTKN; Tue, 14 Oct 2025 13:51: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 4cmFxS0LKMz3T0Q; Tue, 14 Oct 2025 13:51:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760449884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KMbGi+oRbN/nmxTPAPPM8JFx7ScSwNvnyXl12e+r8n8=; b=eJ2EOP2CqROvXNUasWwC3B0mH4wywrI5dPCvgdLzuNNBdwkXkCvmVzCKeFInMkR5g8qf+D MRxR8Du+XWJ/Kkt/zSMXMBQmfg28OdzcTMYAeYmUh2ChlhuL0mBVcPPka3G/7wG6JMa8xZ Ndk4nUp21iu9cnkw28cZ/3ZMzvRSu8J+Xqz6DIECVxus+DZbJtLoF7U3NN9Ltq+q45UOgF hV9QamAQtJQvv426Yc7MG2kaPwijE6jmVIGwzqpzu6evi3UcekrOYGKT96RXQw9pmfgBjn 263Be8qaIJbZS5fmOl2GamZgUmzo/5RSDMRLA55xCnhX+vNk96BiPKrNaCa8ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760449884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KMbGi+oRbN/nmxTPAPPM8JFx7ScSwNvnyXl12e+r8n8=; b=pVKMqwDFjweBVTEYrClOVyb6lx2Ip31cD6ZhLDz5CG8Fu7hrBLcsDiICi+FLgg+ffpSFAV 5Q/SDy/XqRdnnW67+OolJ/D2B2wEIZPvDNko6Mak+6SyKYu0aZPs6n7mcGggBzqhawx6Nz jFNXAmFy3PEdeGdvNK/l6bg/kEZZ9xhrk6YWZTEGe51S+9VdzT5i55jx5VOGVWm3/PZwOY ZgwbMmm+HsdUFi5wkgdLB+TEtYckP3ki30WlVelQr6tOdaANvlCgkAYcCFeqg7lWf6n27E DlVRvo8gIUN1pVbWobuKx05bQLTcgHWEvllvWP9g6PGP7dblOU55m6j8YpyJiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760449884; a=rsa-sha256; cv=none; b=gIp6fGD+Y66XfgD8VxvSOJHwP+IahK9kpxmKB0Lb9uWdHAhS0Cs8rcK6aJ4MMo6+nBRNr1 gW7KaS53/mq6aVkPYZwxmzPvELTfZjjvSniB9j66ASPTAtI0nuJm08ZQX6Sc8iLWXwcIXU lE9J2orAvK33ORSzkkAPBDfBQ13pFG5hGWaWPE2tDYewbzVo751f2o0BW8YLckcNKYt+yL 3mPBdAhMDWI2Dh7XkpdWjRqdBfHbe+ko5UYMFaUA+nNILiH2TLwgAs0ebg3VO0WuOcbeuX V86z0qzsslNib+oJbhzByFqZO6IGXGbL+DIAPCXPcpuRCB3B+27iSR4JXtr2Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmFxR72yczvvp; Tue, 14 Oct 2025 13:51:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EDpNIl083163; Tue, 14 Oct 2025 13:51:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EDpNjZ083160; Tue, 14 Oct 2025 13:51:23 GMT (envelope-from git) Date: Tue, 14 Oct 2025 13:51:23 GMT Message-Id: <202510141351.59EDpNjZ083160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ec8e07e8fa94 - main - certctl.8: Update documentation of BUNDLE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec8e07e8fa94767dceb409c4c7c1840bba39172b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ec8e07e8fa94767dceb409c4c7c1840bba39172b commit ec8e07e8fa94767dceb409c4c7c1840bba39172b Author: Mark Johnston AuthorDate: 2025-10-14 13:32:46 +0000 Commit: Mark Johnston CommitDate: 2025-10-14 13:41:20 +0000 certctl.8: Update documentation of BUNDLE - Fix a typo. - Provide the default path. Reviewed by: des MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53001 --- usr.sbin/certctl/certctl.8 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/certctl/certctl.8 b/usr.sbin/certctl/certctl.8 index edf993e1361a..e58da8e7ff84 100644 --- a/usr.sbin/certctl/certctl.8 +++ b/usr.sbin/certctl/certctl.8 @@ -24,7 +24,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 18, 2025 +.Dd October 9, 2025 .Dt CERTCTL 8 .Os .Sh NAME @@ -110,7 +110,7 @@ A copy of each trusted certificate is placed in and each untrusted certificate in .Ev UNTRUSTDESTDIR . In addition, a bundle containing the trusted certificates is placed in -.Ev BUNDLEFILE . +.Ev BUNDLE . .It Ic untrust Add the specified file to the untrusted list. .It Ic trust @@ -151,6 +151,8 @@ Default: .Pa ${DESTDIR}${DISTBASE}/etc/ssl/untrusted .It Ev BUNDLE File name of bundle to produce. +Default: +.Pa ${DESTDIR}${DISTBASE}/etc/ssl/cert.pem .El .Sh SEE ALSO .Xr openssl 1 From nobody Tue Oct 14 13:51:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmFxT3LMgz6CT3k; Tue, 14 Oct 2025 13:51: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 4cmFxT1JDyz3Stw; Tue, 14 Oct 2025 13:51:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760449885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btTAF2xBJwI4HTTmO1jUS+IXDsAtZHGhFo6fU8bpYt8=; b=h+vBGcU/GUK+AYrlfWntjf/Wz2dV5MmVAN7kpd3j8mEhQCQ/MzNSxR/cxCUKOlxq4Grfvj 6toebCb6q1Mh9fDVuasZcokRCxXYZSkw7vX3MXuHxbWYTnpU2WzTXNiBIFght44i8Fi9EJ aHX9aKanod9acjSbjp/ugyjwQfbs22WAWsuxley6G1NxLz1ew4iDk0uWLtF85CNLuerfRs ARybrCEidqClNahDzLNMXQK/Q1lHYua3pT0QSVg3NAFuis4pasl6it+HaZu3LX2GbyBblV 6njUCb/TpZS9SOYFDzB+pigAoNH/L++r9o+kR7lrs+QO2Ra4F8uVohZ3g3DTbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760449885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btTAF2xBJwI4HTTmO1jUS+IXDsAtZHGhFo6fU8bpYt8=; b=fpA954sv6533JmrsUjbLV6CiHuv032l5t6UvdOUbFzXkr0cVbUrrhakMq291GmUsO0qElf pF9sV35KMoss5I/MnCYGn6ryq+8kKuVO0RH7i36yEoWg0y+TlQWN7MFuDoPze1tQcf1Pqq ki5XU1Jh/VrBJjxAVAPU96cTJSSApt/p0j8BE57FQZNC2X2OLInP+HE/FkV4AyoBughEsy /pil64SguZbg1hBOYmu8j28DkCPg9QH7W+Ub6Q/Wg0jQokoliQ4u0VHhHyATe2N0aa/5Gt 2F8r/NoAz3J7NCSB+eT6GWdncyMDvPsJ9d+yloiZzL4gpOGibEmV0WG0qlgYKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760449885; a=rsa-sha256; cv=none; b=OZj9E62gz2Hmy0bPXo2tlBtReIMaLiBdT3CI470rJOjxCtlyd8cF35++3WNqmPtGaYNFQl UMoM7yOCCymGomOESvRyZCyy/jwz7qd/06s+hHMlIMXZIXifVpLzWsy623ao+M9SQLRh9k PquUNdoGekT4EZHeiu/P6ZKU3SmPriIPD4prH0A0Ev9JUg2WQ0YmapDsfFHM+vBM3O1DBi d3E7HZVJsI1XJJlzCk/DX8n31uqeECCoimdCYWLO95LSiEj/3JcmZDmnuOQqQsmEwS8nea qXIuGtWIN+aAbWejZ1UNvqvZHPcvQ0dEh+8k6pcDdCiXZzleFzsnFbA05pL7/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]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmFxT0t6kzvsN; Tue, 14 Oct 2025 13:51:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EDpP6K083199; Tue, 14 Oct 2025 13:51:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EDpPaW083196; Tue, 14 Oct 2025 13:51:25 GMT (envelope-from git) Date: Tue, 14 Oct 2025 13:51:25 GMT Message-Id: <202510141351.59EDpPaW083196@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2df39ce5d4a8 - main - ipfw: Check for errors from sooptcopyin() and sooptcopyout() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2df39ce5d4a8836ef5fd3c2666f48041042eff42 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2df39ce5d4a8836ef5fd3c2666f48041042eff42 commit 2df39ce5d4a8836ef5fd3c2666f48041042eff42 Author: Mark Johnston AuthorDate: 2025-10-14 13:33:13 +0000 Commit: Mark Johnston CommitDate: 2025-10-14 13:41:20 +0000 ipfw: Check for errors from sooptcopyin() and sooptcopyout() Note, it looks like this code may be unused since commit 4a77657cbc01 ("ipfw: migrate ipfw to 32-bit size rule numbers"). In particular, it looks like the ipfw_nat_*_ptr pointers are unused now. Reviewed by: ae MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53068 --- sys/netpfil/ipfw/ip_fw_nat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 1cee7873de31..8bd27f6885ab 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -999,9 +999,11 @@ ipfw_nat_del(struct sockopt *sopt) { struct cfg_nat *ptr; struct ip_fw_chain *chain = &V_layer3_chain; - int i; + int error, i; - sooptcopyin(sopt, &i, sizeof i, sizeof i); + error = sooptcopyin(sopt, &i, sizeof i, sizeof i); + if (error != 0) + return (error); /* XXX validate i */ IPFW_UH_WLOCK(chain); ptr = lookup_nat(&chain->nat, i); @@ -1104,7 +1106,7 @@ ipfw_nat_get_log(struct sockopt *sopt) { uint8_t *data; struct cfg_nat *ptr; - int i, size; + int error, i, size; struct ip_fw_chain *chain; IPFW_RLOCK_TRACKER; @@ -1134,9 +1136,9 @@ ipfw_nat_get_log(struct sockopt *sopt) i += LIBALIAS_BUF_SIZE; } IPFW_RUNLOCK(chain); - sooptcopyout(sopt, data, size); + error = sooptcopyout(sopt, data, size); free(data, M_IPFW); - return(0); + return (error); } static int From nobody Tue Oct 14 13:51:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmFxV5QHgz6CTPf; Tue, 14 Oct 2025 13:51: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 4cmFxV2d0Fz3Sxb; Tue, 14 Oct 2025 13:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760449886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PBB1XLxcamJTqq3G7B8gP6fO015DLACkRhZH/8G6USc=; b=Ga4QrLhALJgz1164ePxSkdgmnbEX2AyFBd4TnlND4cUEdCgsSVbY8sjLC39I0AimFqMU8V ifrj/Dxbp1tt/TwfV74AiEUbrOo/Vs8iwfYDzvwsP1g3FZ4BGWmK434R7uGlPM1hpiw2qT edkGrS9qwasT64rZfCqUaLcuqsmVIrqvoU7DfU4OLg2DUxN9QJHO4XtJyX+B5q+TuxgeUw FVtavObOcs4Tr9TcgeOOMKCv1ta2EHgNyouGbkLg9OHaOEOdmdSqDxw6u6yWB47FTZqr6S Ds4acPwqxd6wBGl3vsaKuhSHcfzSt3yp0wkxfwacaAkfmCpBjnGwEiA9qu06ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760449886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PBB1XLxcamJTqq3G7B8gP6fO015DLACkRhZH/8G6USc=; b=ECi7/dla2nsGGnID2M2erE7aUXi/Qh9aBXcw6DaQy6JusLUJhKk7gyVHmiFLFJZNrEQr9C P1hLWQkk8j/BqzCOfIQDTmNGY8SeZUz2vzTLqwdyi9TOFoaEsy19wayZ3DeG8zZ8tiF2oC MyMS1IYtM8l3vvra5OEAuOXV6U5fwsyFexAzyPTbE0sBdneSMSh6lLkobPMLjlFyVWZJWU DNlJvj6VdZ0CRJ/XfEz8W+70jIiTzY9BpqLjV65+CDrNcxwk5nR35Iej93DHBSMQ4IRvlB c7PGYPNA1t+b6Nmuk3Bf2/nausaGnxgcyBVL2PscM1CiVhZ+ojpQ+fbI0CEu1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760449886; a=rsa-sha256; cv=none; b=Vq9shLeX1LAislZ7F3OuFoTdLCF0be5z3CZhJedtrSEAv9e7ZWQaEZ9E62lPcoxzbCdDsN blNHHeqCkc2maF/jI2n4JwluKx0foEGpfqHCC0NzVpL1lvkj+pnHZ47hiFPxjvt6eUcZDE nc/qZcAk7fM57Mt7tZ0w4cIc1KajhdPtv0J9up4DEFXTMDcU/0ta/HpwJ6QmKBSrFvicfE sHtLL/3ihgebxnRakln26iMFKgSzyX+kmsobNdD5n+By2/MnSOJfRLUVwfcPHdQvxoKa6C 6eNuiVsZWkQsUu9CsNKVs6M3FwPnbsKQaS7gyzkZSd3WZmcy07iE9f9j66JhQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmFxV1m7xzvdk; Tue, 14 Oct 2025 13:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EDpQFl083235; Tue, 14 Oct 2025 13:51:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EDpQ4P083232; Tue, 14 Oct 2025 13:51:26 GMT (envelope-from git) Date: Tue, 14 Oct 2025 13:51:26 GMT Message-Id: <202510141351.59EDpQ4P083232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 7117c86fcb7e - main - exec: Check for errors when mapping the shared object List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7117c86fcb7ebee4483097cefa9b143de8d78ee0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7117c86fcb7ebee4483097cefa9b143de8d78ee0 commit 7117c86fcb7ebee4483097cefa9b143de8d78ee0 Author: Mark Johnston AuthorDate: 2025-10-14 13:33:33 +0000 Commit: Mark Johnston CommitDate: 2025-10-14 13:41:20 +0000 exec: Check for errors when mapping the shared object In the non-ASLR case, there is no check for an error from vm_map_fixed(). Restore it, it was dropped in commit 939f0b6323e0a. This bug could result in a refcount leak of the object used to map the VDSO page. Reviewed by: kib Reported by: Ilja Van Sprundel MFC after: 1 week Fixes: 939f0b6323e0 ("Implement shared page address randomization") Differential Revision: https://reviews.freebsd.org/D53065 --- sys/kern/kern_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 70a9a419a674..2bdd6faa025a 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1314,7 +1314,7 @@ exec_map_stack(struct image_params *imgp) MAP_INHERIT_SHARE | MAP_ACC_NO_CHARGE); } else { sharedpage_addr = sv->sv_shared_page_base; - vm_map_fixed(map, obj, 0, + error = vm_map_fixed(map, obj, 0, sharedpage_addr, sv->sv_shared_page_len, VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_READ | VM_PROT_EXECUTE, From nobody Tue Oct 14 14:47:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmH9r1g0Lz6CYD8; Tue, 14 Oct 2025 14:47: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 4cmH9r17NWz3cMB; Tue, 14 Oct 2025 14:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760453232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hiH1J4L4SaMI3SAfRaGgcr4tp8vIhUMoXl9W6SUQCTk=; b=F9ZckLpQhKsjWWP7UVT2Xr/g+5n4qdakia/KcG+aVEq2Ak/YEtehKVsYZtUfMEKIkyS42A p/sMHHk811kAbe0E1pWAmDPrMxlY3xJPMxm4Ez/5ihukpkhgZNF0oSw+EqHeXrTqYsA/ZU kRiscfrVmRS5Ek/K/xUK/JQA9ki2L8rlXYayYSgKUeyggmmJpxVXnGAb+s5bbLrg511dLg +a7lC7ksYjCM+qwBEyBiOXF8GqTAoXGL8L4qFxcMazDw8JXGZ5ElyI1tv50uZ5vLc0a37e jr4sN3hzuYAc4k64hXqPXwYWsZAhEM6iSYu70jpCK7Q/reOUt0wtwhluekzzLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760453232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hiH1J4L4SaMI3SAfRaGgcr4tp8vIhUMoXl9W6SUQCTk=; b=UDOOCa1IJjCpnoDOOQ3ooQ9gFShV423EbFXYHyy504wI8/SOeXR2rGjZuvRT2hy/Ecv5A/ LUNQB9npNOIbzJ4ldjFYHoyWerbW3e7Zl1KY0aiNuzDsLyfJzYE/OB8Tc+E0Rzk+oBD7kO HUaQr1hz3ftNIyUvg+ujG5PS8PJJjGEUMxHHiSAATYOwK4afrauDEMNGxog7drTRk7KPCF 6WHTmHqFYa2OhYUL9DkVZiCcqYrwNCYDOaAerbfY5evW46/JU9G5kn3YZq8L7wnRiIwtWB eFP8X9SsEof/MQr/lzug4Vl1UmLo5iAMKvmuvhygkXBREiEu9+JBWdHfCQP4jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760453232; a=rsa-sha256; cv=none; b=MBLUkITljMV01S/q/0LuZJw9yEjxYx0GtkH4NlM8JE+tsEUTHJchU1hjrF8gsT6ITcugFh N0m7f4gcopycd4XJgL/vSxsmet1vno9euoh1yvW8juTvKMmQGo/aH3YJ4VhKuA5j8ldNWX 4QEKEM3mxuUUWz5wesLSKGSetH8cRgKFMI6vWiSc83bvLOJMEgB01IFEb5/JwGT3jMa/F1 HXCLjIxUiSIICIUCos4rTS2Dgt9vAAp3f0rY2ETcG519nzMnTjJmluWDYQQ8mAs3SiGZwi TchauBOKpaMJmGMzWoJnXpq8FQ+PT9scaY4kCz5zUJ82ZCwFpJW4eVKYMo+2Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmH9r0C8qzx6f; Tue, 14 Oct 2025 14:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EElBcV085192; Tue, 14 Oct 2025 14:47:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EElBea085189; Tue, 14 Oct 2025 14:47:11 GMT (envelope-from git) Date: Tue, 14 Oct 2025 14:47:11 GMT Message-Id: <202510141447.59EElBea085189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: d1bd541b385d - main - fusefs: fix intermittency in the BadServer.ShortWrite test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1bd541b385d49d2ae3a8bad9df72779b606e208 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d1bd541b385d49d2ae3a8bad9df72779b606e208 commit d1bd541b385d49d2ae3a8bad9df72779b606e208 Author: Alan Somers AuthorDate: 2025-10-14 02:18:48 +0000 Commit: Alan Somers CommitDate: 2025-10-14 14:46:54 +0000 fusefs: fix intermittency in the BadServer.ShortWrite test This test implicitly depended on the order in which two threads completed. If the test thread finished first, the test would pass. But if the mock file system thread did, it would attempt to read from an unmounted file system, and fail. As a result, the test would randomly fail once out of every several thousand executions. Fix it by telling the mock file system's event loop to exit without attempting to read any more events. Reported by: Siva Mahadevan MFC after: 1 week Reviewed by: Siva Mahadevan Differential Revision: https://reviews.freebsd.org/D53080 --- tests/sys/fs/fusefs/bad_server.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/sys/fs/fusefs/bad_server.cc b/tests/sys/fs/fusefs/bad_server.cc index af2ca146e431..c3d195735446 100644 --- a/tests/sys/fs/fusefs/bad_server.cc +++ b/tests/sys/fs/fusefs/bad_server.cc @@ -65,6 +65,11 @@ TEST_F(BadServer, ShortWrite) out.header.unique = 0; // Asynchronous notification out.expected_errno = EINVAL; m_mock->write_response(out); + /* + * Tell the event loop to quit. The kernel has already disconnected us + * because of the short write. + */ + m_mock->m_quit = true; } /* From nobody Tue Oct 14 18:41:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmNN70F2qz6CrZF; Tue, 14 Oct 2025 18:41: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 4cmNN66jwyz4HFv; Tue, 14 Oct 2025 18:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760467287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BI/Q4t6SiNk71CuU04HPUXgXO0f0bMyskZEekfHwsew=; b=wDk2NWumxGBXPPwoDY7XAxWVbz8qz5eW0TgZGq/F999g64FznUVToRBtSzAikWFAZEBNMi N/052skOTZHnDixeYtsaojPd+QPutTrLE17z2B/An0Estn5gcHsoFRyZKSDaiSZzYts00B 6VMHyZicszVwihwKQiVi7OBmYJ5wKGRm7hnK7gIdU/GGo3vuvI8viA5ajyKki+2Gt5KzgI Rj4/Ktav7Ml5gufCUnxr91J17W5wSs5oWAvjV9ONNkn7VGjw8Qch9dlZWkcPXmD4nsuZuY KKrad2++HUhc7L1lO4Fk99Qe5kl603gzIl6cGNvpwmaA2E80IJ2NPPDgG19XQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760467287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BI/Q4t6SiNk71CuU04HPUXgXO0f0bMyskZEekfHwsew=; b=pjoGC/279k8xiE08tgbxeqPJFPW2Lph29q75ULNfu0IJAVtx8u0t0FkMTrbXh4cVeVFu4+ cdcTohFRKZ3Zm8Q4qo8hJcFhepuwLNhP2Sr7hsdpzNfbKNjWIknjV0rkpkQPIeD/HSQ8St dD6+NiyPJZEXRMMpHkzZxukOjS5TZSpQeyFWyom1i0DMSfE5ArPj4PPSMBh8CLPZqkII52 1dqypT/Ppqn5Uz80a1IrXzYRSGQuTaTUe1V3xTDbt9iTtjJVNlZaqaEHmDDq4HD9zRhom3 2IgL67upNs7KOBond0yYRx1xw02GkhHZSzQiiblaXH7BwD/PXzFt/rOwiv34Tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760467287; a=rsa-sha256; cv=none; b=SOOEoC6qa5DaT73bU3KovEmgZVRtKBW64hOFtF9/F1xl6taJeq7SWsejt+j5o0l1YKA/Cm CxsATWe+gGgYQ4kwr6beXyJaoX40BJQbeJaFrWJaE1XzUUcA3+aY95ppdV9uwzQYhJRblC Q0pgCpcNU3tc5uALIcLSzsX9othfImRSkBm0zZQzgBi0eXfhRPXxxS969dZK5MqEhq09q0 FNyoIAuDAGSbDJyD8iGS3PFrGEYq6YLCwufbmXtMZ99dI0pKHzq0Vwl/oSGXlQFK6Ocd1g C2xn1COyf5OSeh6khu+rQ48gmCrwL2Omt9YrrHaUUZ4EpH2XafhvzIHtOCO6XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmNN66HYvz13bM; Tue, 14 Oct 2025 18:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EIfQrA035947; Tue, 14 Oct 2025 18:41:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EIfQhg035944; Tue, 14 Oct 2025 18:41:26 GMT (envelope-from git) Date: Tue, 14 Oct 2025 18:41:26 GMT Message-Id: <202510141841.59EIfQhg035944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 663a571514fb - main - sockets: add PF_HYPERV alias List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 663a571514fbbc237ac841f7ff2f5e26db966445 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=663a571514fbbc237ac841f7ff2f5e26db966445 commit 663a571514fbbc237ac841f7ff2f5e26db966445 Author: Gleb Smirnoff AuthorDate: 2025-10-14 18:41:25 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-14 18:41:25 +0000 sockets: add PF_HYPERV alias Just make it like all other sockets that have PF_FOO -> AF_FOO alias. --- lib/libsys/socket.2 | 2 +- sys/sys/socket.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libsys/socket.2 b/lib/libsys/socket.2 index b211611c6354..979f6227c9b8 100644 --- a/lib/libsys/socket.2 +++ b/lib/libsys/socket.2 @@ -64,7 +64,7 @@ PF_NETGRAPH Netgraph sockets, PF_NETLINK Netlink protocols, PF_BLUETOOTH Bluetooth protocols, PF_INET_SDP OFED socket direct protocol (IPv4), -AF_HYPERV HyperV sockets +PF_HYPERV HyperV sockets .Ed .Pp Each protocol family is connected to an address family, which has the diff --git a/sys/sys/socket.h b/sys/sys/socket.h index cdd4fa3b4b89..cf1d95da6168 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -396,6 +396,7 @@ struct sockproto { #define PF_NETLINK AF_NETLINK #define PF_INET_SDP AF_INET_SDP #define PF_INET6_SDP AF_INET6_SDP +#define PF_HYPERV AF_HYPERV #define PF_DIVERT AF_DIVERT #define PF_IPFWLOG AF_IPFWLOG From nobody Tue Oct 14 18:41:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmNN82FQdz6CrnZ; Tue, 14 Oct 2025 18:41: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 4cmNN80FG0z4HL5; Tue, 14 Oct 2025 18:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760467288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gWhpGhtQaIKXR4G0GYRSZMtjtjfc6JmZMwpk9RNeWkY=; b=eiEv3f/YndSqlNEJl257GYjOL5oKAFZkk2hgKA8PKIwTl+mrCHmG/XuX6QrddbvLofOS2t AUZrQ60Cv06b9vFyungSHwt7+y5HW5bAgxUxfZ90rzaFtHLSbVkwM3xZjyElk0+bXBXgLn WEECqypienhhutnKqqiQZmN1gmDAYINcdvFXIMYFSbyi95TGi+jEEUUTSvk3AuRax4V1Zd jHOJ5dru/He+9CmthppceBKT2G7gs1jx8716J5n7/vTlZDdfHgIuEZIlwfT8yXefPku/8I B1RflxMfJs96xQtIH8Qwb5aII4+cfcM5YTbegi3tFuTbPEZvjEspGWBQGZwrRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760467288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gWhpGhtQaIKXR4G0GYRSZMtjtjfc6JmZMwpk9RNeWkY=; b=DgMS7+BXSBlRt/mhr70NPCiQs662Jm8ZQN2LFwyZjmngeEI5loUv3KZtUWCqrHwy6ndxRK ZGYiSFnIQt4WFncxYYpObFFee/4r5JEcctR0HcipmNH67NNYdVphpihTRn1GTa6q120bNp WCOR+G6jOpl7Uon/aHvxgE3ikPLZVkeHQd4ge+LU4dBJMyavrMlJcE7hm7fTf2C4unTIF5 qWhxJNlAHY10ZiimoZpuHEbkmBuhKDJ7vlK8lAl5+UtncQuTaf1anaC8s5DLETwWxNmNTp YF/d9KkgGIp575gZy+QJ5LPJTzUdRJcrfGz8hKuGFm5O63gUfasUs+7H8JNI9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760467288; a=rsa-sha256; cv=none; b=dzo8a0EW54BU0Np/LETvJT556qnB3/3oD67qjTfvLmn5YW+3twpL1G/v48X6JYv/PbbUJC wdjatzWQ3wlVicYg+Kq8HxOijFqh7yqINM7AaCEtLBx3Rl9Aax+m9AIwb5670OVl5aaMgm vAY4nD87yPz5f97ZsdhF3mZ5M3diYoSSMZeB3oaJR3mkF2oyTY8z4ko8nu8bM8MEpJnxRF 258/KZv2Zj/FiHvxau9jyNiKffgUfryF9/5A1JZasp7ohCTwu6rJRcqUOpzAAGJC1sZSt4 GUX6myMs13VQq5hXjlJbUjB3BCCOMNfU1GD56IEVAycxLHWnBzIFcdpDNxS/hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmNN76yDTz13bP; Tue, 14 Oct 2025 18:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EIfRJ9035984; Tue, 14 Oct 2025 18:41:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EIfRTw035981; Tue, 14 Oct 2025 18:41:27 GMT (envelope-from git) Date: Tue, 14 Oct 2025 18:41:27 GMT Message-Id: <202510141841.59EIfRTw035981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 86d17239233e - main - socket(2): refactor the manual page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86d17239233ea4f5766bee68ba6355804525cefa Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=86d17239233ea4f5766bee68ba6355804525cefa commit 86d17239233ea4f5766bee68ba6355804525cefa Author: Gleb Smirnoff AuthorDate: 2025-10-14 18:41:25 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-14 18:41:25 +0000 socket(2): refactor the manual page Create a chapter on every important socket type: stream, datagram, seqpacket. Always list what protocol families do support what kinds of sockets. Improve some statements possessing language from the specification [1]. Reduce some statements that are mostly specific to TCP. Provide more external links and references to various important syscalls that can be used on sockets. Add a paragrph on non-blocking mode. The big factual change is documentation of SOCK_SEQPACKET. In FreeBSD 15 this socket now fully follows the specification and is a stream socket with record boundaries. [1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html#tag_16_10_06 Differential Revision: https://reviews.freebsd.org/D52771 --- lib/libsys/socket.2 | 300 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 213 insertions(+), 87 deletions(-) diff --git a/lib/libsys/socket.2 b/lib/libsys/socket.2 index 979f6227c9b8..c4d8941bad21 100644 --- a/lib/libsys/socket.2 +++ b/lib/libsys/socket.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 17, 2025 +.Dd September 28, 2025 .Dt SOCKET 2 .Os .Sh NAME @@ -89,32 +89,6 @@ SOCK_RAW Raw-protocol interface, SOCK_SEQPACKET Sequenced packet stream .Ed .Pp -A -.Dv SOCK_STREAM -type provides sequenced, reliable, -two-way connection based byte streams. -An out-of-band data transmission mechanism may be supported. -A -.Dv SOCK_DGRAM -socket supports -datagrams (connectionless, unreliable messages of -a fixed (typically small) maximum length). -A -.Dv SOCK_SEQPACKET -socket may provide a sequenced, reliable, -two-way connection-based data transmission path for datagrams -of fixed maximum length; a consumer may be required to read -an entire packet with each read system call. -This facility may have protocol-specific properties. -.Dv SOCK_RAW -sockets provide access to internal network protocols and interfaces. -The -.Dv SOCK_RAW -type is available only to the super-user and is described in -.Xr ip 4 -and -.Xr ip6 4 . -.Pp Additionally, the following flags are allowed in the .Fa type argument: @@ -140,32 +114,23 @@ particular to the in which communication is to take place; see .Xr protocols 5 . -.Pp The .Fa protocol argument may be set to zero (0) to request the default implementation of a socket type for the protocol, if any. -.Pp -Sockets of type +.Sh STREAM SOCKET TYPE +The +.Dv SOCK_STREAM +socket type provides reliable, sequenced, full-duplex octet streams between +the socket and a peer to which the socket is connected. +A socket of type .Dv SOCK_STREAM -are full-duplex byte streams, similar -to pipes. -A stream socket must be in a +needs to be in a .Em connected -state before any data may be sent or received -on it. +state before any data can be sent or received. A connection to another socket is created with a .Xr connect 2 system call. -Once connected, data may be transferred using -.Xr read 2 -and -.Xr write 2 -calls or some variant of the -.Xr send 2 -and -.Xr recv 2 -functions. (Some protocol families, such as the Internet family, support the notion of an .Dq implied connect , @@ -173,62 +138,210 @@ which permits data to be sent piggybacked onto a connect operation by using the .Xr sendto 2 system call.) -When a session has been completed a -.Xr close 2 -may be performed. -Out-of-band data may also be transmitted as described in +Once connected, data may be sent using +.Xr send 2 , +.Xr sendto 2 , +.Xr sendmsg 2 +and +.Xr write 2 +system calls. +Data may be received using +.Xr recv 2 , +.Xr recvfrom 2 , +.Xr recvmsg 2 , +and +.Xr read 2 +system calls. +Record boundaries are not maintained; data sent on a stream socket using output +operations of one size can be received using input operations of smaller or +larger sizes without loss of data. +Data may be buffered; successful return from an output function does not imply +that the data has been delivered to the peer or even transmitted from the local +system. +For certain protocols out-of-band data may also be transmitted as described in .Xr send 2 and received as described in .Xr recv 2 . .Pp -The communications protocols used to implement a -.Dv SOCK_STREAM -ensure that data -is not lost or duplicated. -If a piece of data for which the -peer protocol has buffer space cannot be successfully transmitted -within a reasonable length of time, then -the connection is considered broken and calls -will indicate an error with --1 returns and with -.Er ETIMEDOUT -as the specific code -in the global variable -.Va errno . -The protocols optionally keep sockets -.Dq warm -by forcing transmissions -roughly every minute in the absence of other activity. -An error is then indicated if no response can be -elicited on an otherwise -idle connection for an extended period (e.g.\& 5 minutes). -By default, a +If data cannot be successfully transmitted within a given time then the +connection is considered broken, and subsequent operations shall fail with +a protocol specific error code. +A .Dv SIGPIPE -signal is raised if a process sends -on a broken stream, but this behavior may be inhibited via +signal is raised if a thread attempts to send data on a broken stream (one that +is no longer connected). +The signal can be suppressed by the +.Dv MSG_NOSIGNAL +flag with distinct +.Xr send 2 , +.Xr sendto 2 , +and +.Xr sendmsg 2 +system calls or by the +.Dv SO_NOSIGPIPE +socket option set on the socket with .Xr setsockopt 2 . .Pp -.Dv SOCK_SEQPACKET -sockets employ the same system calls -as +The .Dv SOCK_STREAM -sockets. -The only difference -is that -.Xr read 2 -calls will return only the amount of data requested, -and any remaining in the arriving packet will be discarded. +socket is supported by the following protocol families: +.Dv PF_INET , +.Dv PF_INET6 , +.Dv PF_UNIX , +.Dv PF_BLUETOOTH , +.Dv PF_HYPERV , +and +.Dv PF_INET_SDP . +Out-of-band data transmission mechanism is supported for stream sockets of +.Dv PF_INET +and +.Dv PF_INET6 +protocol families. +.Sh DATAGRAM SOCKET TYPE +The +.Dv SOCK_DGRAM +socket type supports connectionless data transfer which is not necessarily +acknowledged or reliable. +Datagrams can be sent to the address specified (possibly multicast or +broadcast) in each output operation, and incoming datagrams can be received +from multiple sources. +The source address of each datagram is available when receiving the datagram +with +.Xr recvfrom 2 +or +.Xr recvmsg 2 . +An application can also pre-specify a peer address with +.Xr sendto 2 +or +.Xr sendmsg 2 , +in which case calls to output functions that do not specify a peer address +shall send to the pre-specified peer. +If a peer has been specified, only datagrams from that peer shall be received. +A datagram shall be sent in a single output operation, and needs to be received +in a single input operation. +The maximum size of a datagram is protocol-specific. +Output datagrams may be buffered within the system; thus, a successful return +from an output function does not guarantee that a datagram is actually sent or +received. .Pp +The .Dv SOCK_DGRAM +socket is supported by the following protocol families: +.Dv PF_INET , +.Dv PF_INET6 , +.Dv PF_UNIX , +.Dv PF_NETGRAPH , and -.Dv SOCK_RAW -sockets allow sending of datagrams to correspondents -named in +.Dv PF_NETLINK . +.Sh SEQUENCED PACKET SOCKET TYPE +The +.Dv SOCK_SEQPACKET +socket type is similar to the +.Dv SOCK_STREAM +type, and is also connection-oriented. +The only difference between these types is that record boundaries are +maintained using the +.Dv SOCK_SEQPACKET +type. +A record can be sent using one or more output operations and received using one +or more input operations, but a single operation never transfers parts of more +than one record. +Record boundaries are set by the sender with the +.Dv MSG_EOR +flag of .Xr send 2 -calls. -Datagrams are generally received with +or +.Xr sendmsg 2 +functions. +There is no possibility to set a record boundary with +.Xr write 2 . +Record boundaries are visible to the receiver via the +.Dv MSG_EOR +flag in the received message flags returned by the +.Xr recvmsg 2 +function. +It is protocol-specific whether a maximum record size is imposed. +.Pp +The +.Dv SOCK_SEQPACKET +socket is supported by the following protocol families: +.Dv PF_INET , +.Dv PF_INET6 , +and +.Dv PF_UNIX . +.Pp +.Sh RAW SOCKET TYPE +The +.Dv SOCK_RAW +socket type provides access to internal network protocols and interfaces. +It is a datagram socket in its nature, thus has the same semantics of +read and write operations. +The +.Dv SOCK_RAW +type is available only to the super-user and is described in +.Xr ip 4 +and +.Xr ip6 4 . +.Sh NON-BLOCKING MODE +A socket can be created in +.Em non-blocking mode +with the help of +.Dv SOCK_NONBLOCK +flag. +Alternatively, the non-blocking mode on a socket can be turned on and off with +the help of the +.Dv O_NONBLOCK +flag of the +.Xr fcntl 2 +system call. +.Pp +When a non-blocking socket has not enough data in its receive buffer to fulfil +the application supplied buffer, then data receiving system calls like +.Xr recv 2 , .Xr recvfrom 2 , -which returns the next datagram with its return address. +.Xr recvmsg 2 +and +.Xr read 2 +will not block waiting for the data but immediately return. +Return value will indicate amount of bytes read into the supplied buffer. +The +.Va errno +will be set to +.Dv EAGAIN +.Po +has same value as +.Dv EWOULDBLOCK +.Pc . +.Pp +If application tries to send more data on a non-blocking socket than the socket +send buffer can accomodate with +.Xr send 2 , +.Xr sendto 2 , +.Xr sendmsg 2 +or +.Xr write 2 +system calls partial data will be sent. +Return value will indicate amount of bytes sent. +The +.Va errno +will be set to +.Dv EAGAIN . +Note that sockets of +.Dv SOCK_DGRAM +type are unreliable, thus for these sockets sending operations will never fail +with +.Dv EAGAIN +in non-blocking mode neither will block in blocking mode. +.Sh OTHER OPERATIONS ON SOCKETS +Since socket descriptors are file descriptors, many generic file operations +performed by +.Xr fcntl 2 , +apply. +Socket descriptors can be used with all event engines, such as +.Xr kevent 2 , +.Xr select 2 +and +.Xr poll 2 . .Pp An .Xr fcntl 2 @@ -250,6 +363,12 @@ The and .Xr getsockopt 2 system calls are used to set and get options, respectively. +.Pp +Connection associated with a socket can be terminated by +.Xr close 2 +system call. +One direction of communication can be disabled with +.Xr shutdown 2 . .Sh RETURN VALUES A -1 is returned if an error occurs, otherwise the return value is a descriptor referencing the socket. @@ -282,16 +401,23 @@ The socket type is not supported by the protocol. .Sh SEE ALSO .Xr accept 2 , .Xr bind 2 , +.Xr close 2 , .Xr connect 2 , +.Xr fcntl 2 , .Xr getpeername 2 , .Xr getsockname 2 , .Xr getsockopt 2 , .Xr ioctl 2 , +.Xr kevent 2 , .Xr listen 2 , +.Xr poll 2 , .Xr read 2 , .Xr recv 2 , .Xr select 2 , .Xr send 2 , +.Xr sendmsg 2 , +.Xr sendto 2 , +.Xr signal 3 , .Xr shutdown 2 , .Xr socketpair 2 , .Xr write 2 , From nobody Tue Oct 14 18:49:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmNYz04Fqz6Cs2L; Tue, 14 Oct 2025 18:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmNYy6Qdfz4JPn; Tue, 14 Oct 2025 18:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760467798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0438FE3Y9WMIi3XkkoYnt8NCGwxOpRIolBglhu3+XE=; b=r0Abe+O5E0BHP40nU0FWCl11uXjNJ1S9Afp/hJcWlG9D9tv4ul5L9txj1l+RePWRw1IUPs z54+vKl+Ppn49tsgYEL6+CylEO3JwLeK9/mq7JuMV8+cd8q/8NgeNd2sJ8SikHfI3OHEp3 auqvDx8EjqG6pEj2jxfrayIIsqnpaxrf4SUNkVAtLdrfOcVPUcPN6zf+sZo1vJxA7oEvg5 FCOcd+yXS4fU9D+0BWBrYPk22hHS6h0E0q8nneeCW9lOxBLaa+FTCzr83S/eVsRVtEE68Q 9Ch7I9rA6JIWUIH6sNr3+lFxoOboQ4g2xKy+6760ejuEg1krUq0UVGRA4+qGug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760467798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0438FE3Y9WMIi3XkkoYnt8NCGwxOpRIolBglhu3+XE=; b=xZtuz4eW0anlOJdUl/YHZIJQD7TvrsPX2AiKPTSe93e2U52GyWrYZ01WvuEzwIr2DQ4TTG LwuPdD+/aWzo4O6xl+cDl52G8ONVPtbtaQwSus43NM1NLCXxgNMseEEwMorwCFoQBw6/dr t0uizJWqb1U+zJmipIHNJUOeUT4iC22vkk0hooej7rngtpU0LstZPRn6iJNFHusp0xqEau 8+EurAbVPjtY4QajsTZyO36SshoBzkERRQvsmacb0DWlAGueHyWWy76vPavXSjbidGCmIp tovv72GAC23/quq14n6K8M6jtblFEdrSOx5IGjn2XwlFjXBXYn5hzYXzL5jrRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760467798; a=rsa-sha256; cv=none; b=G6PeBeWiyCmxPsmM80gpKw80mNLy0hzptQeDfpS4Xvzj96ihJJiqME8UKND+zCIjJnVD3p j3u9XBMzEnL3dduHOFDCJSIZctLLe4yoOibfSS2Tt5MnXz1Uc+Wj6+UIg98K8MnUKcbQI3 DugfMwE1g87MVGqnXWMMHyNbSV43ThMfljrqj4dqRHjJTqnrClhVNuwZTa4z+14mkFkkxD cvtN8FYbSPvg5XXPZIeXTk4VCkw3KHKpJZbCH8wZYLCIPHLBf+hMDIXbPiptR2gmMf3H3A 3fcWr6Ofzm3u8BSRjj1dTCFhHuExGIWLa76CqOro3QHJQ34WL7oxsvg/AJy2zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmNYy60Rlz149P; Tue, 14 Oct 2025 18:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EInwDl039553; Tue, 14 Oct 2025 18:49:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EInwsE039550; Tue, 14 Oct 2025 18:49:58 GMT (envelope-from git) Date: Tue, 14 Oct 2025 18:49:58 GMT Message-Id: <202510141849.59EInwsE039550@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 880d180bb21c - main - unionfs: fix NULL deref on closing an fd passed through SCM_RIGHTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 880d180bb21c764aec6bd5bc8c0a6b07b8c2e199 Auto-Submitted: auto-generated The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=880d180bb21c764aec6bd5bc8c0a6b07b8c2e199 commit 880d180bb21c764aec6bd5bc8c0a6b07b8c2e199 Author: Jason A. Harmening AuthorDate: 2025-10-13 20:40:46 +0000 Commit: Jason A. Harmening CommitDate: 2025-10-14 18:48:51 +0000 unionfs: fix NULL deref on closing an fd passed through SCM_RIGHTS If the last reference to an open file is contained in an SCM_RIGHTS message in a UNIX domain socket, and that message is discarded without being read out by the receiver, VOP_CLOSE will ultimately be called with ap->a_td == NULL. Change unionfs_close() to check for this condition instead of blindly passing the thread to unionfs_find_node_status() which will try to dereference it. Also add relevant asserts on the node status lookup paths. PR: 289700 Reported by: asomers Reviewed by: asomers, olce MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53079 --- sys/fs/unionfs/union_subr.c | 2 ++ sys/fs/unionfs/union_vnops.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index a14f9ca74305..b6d6db60ca3d 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -587,6 +587,7 @@ unionfs_find_node_status(struct unionfs_node *unp, struct thread *td) struct unionfs_node_status *unsp; pid_t pid; + MPASS(td != NULL); pid = td->td_proc->p_pid; ASSERT_VOP_ELOCKED(UNIONFSTOV(unp), __func__); @@ -612,6 +613,7 @@ unionfs_get_node_status(struct unionfs_node *unp, struct thread *td, struct unionfs_node_status *unsp; pid_t pid; + MPASS(td != NULL); pid = td->td_proc->p_pid; KASSERT(NULL != unspp, ("%s: NULL status", __func__)); diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 627b2f6e9a1d..26fa14603c85 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -814,7 +814,7 @@ unionfs_close(struct vop_close_args *ap) unp = VTOUNIONFS(vp); lvp = unp->un_lowervp; uvp = unp->un_uppervp; - unsp = unionfs_find_node_status(unp, td); + unsp = (td != NULL) ? unionfs_find_node_status(unp, td) : NULL; if (unsp == NULL || (unsp->uns_lower_opencnt <= 0 && unsp->uns_upper_opencnt <= 0)) { From nobody Tue Oct 14 20:32:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmQrh65DGz6C255; Tue, 14 Oct 2025 20:32: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 4cmQrh40drz3H0r; Tue, 14 Oct 2025 20:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760473972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqcmGklbwiqwZK5OvhApKESizLTngyYrKnjGLHqcBOo=; b=vVYwBZYOoLrGHw0T4i+NXOnrBXF1d3T2JfealqRJDULNHflax3AJRtcxinq03DGEkUKd7/ VbHyLEh63+HmMqWo9YpvU5WKGYPBHNU7/BYl1t7nzQdN8twJZVrOtTEhQsvuuRP8f9dYzp 1KZj0gkvO64THii+Mf/5aCW2KTJ0qhmAsNLSu2dH6oO7el+ubMk7Bsjfbwosa5f3TJAHX5 EU9wwQ/qxhsFTkAP52uhb7hbZegQ1qx+idaahpyxR1r09IRgn+t6cuL8/f8Cxtc/BCZObt 1vSsKaQ+2p+KW7UMr1g8b45OcgDHMTrUfNrBLhnXFMkQzlWDAQhyh08rg9YeCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760473972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqcmGklbwiqwZK5OvhApKESizLTngyYrKnjGLHqcBOo=; b=o6CZUkv/38vg6QsfJqoE5xlxWDywju4M3LGDJp6L1n/r4ZlrExVJlXDZn4hYEouV5DAvnC GQ06pDDj+o1Kcs3bpxjFMz6I/uW3FlJlKsCZpll0ofZ+Tkf0cgzQuwrn9vm7XVBa8pJazz TTsJsR1RkHMAas4b2yAhuigYNbktfDQrr9oxxtmTLKEoK3qVghb+mYMQTzb42yqu8sVFW1 dHNHl/UGyPpdJnHnD1JxJhnuxUlK1phDJUefYzMva36+ysYYI2r2X0PZXwNgQ1zE5CePkL ZTwVqi95f1Zrt/4G00dozA8LZBr+vlvenFKVxRmswIC8k/4s/u08JrDB598/Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760473972; a=rsa-sha256; cv=none; b=fhOPKPtLZS2yFlsiK+MS2UIEVdVx3U3sLb1U/G2UtamHFkd3xitZXyB4G9eTT3fGcEXxPa TgKLgGk4B5u6HlGvOJmV0M0s37r8ZgunJqbOA1dRDca+Xw+/kGujIC+yEhMQQFYeeRVm/o fAfb4sK7blydAjAzD1Xq17ReaAILoI0FEVuQ41aqNVX3cCqxwcAxb3DfP6dkwe01FoaWpB mt0HiyI2oUcWz4WX7kF1+jJGTTn+kv9cimTsC2bOC/SVRVSGgFC+wCppwMODTkNhanbUDi GPU6EgZF4/PSahbYRIli+2ghNeh72S9xAO3n4vuuingvmGzXsPJqtBIWxDV7Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmQrh3Zjpz17Xl; Tue, 14 Oct 2025 20:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EKWqmR046363; Tue, 14 Oct 2025 20:32:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EKWqv8046360; Tue, 14 Oct 2025 20:32:52 GMT (envelope-from git) Date: Tue, 14 Oct 2025 20:32:52 GMT Message-Id: <202510142032.59EKWqv8046360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: ad13fd5a8fa1 - main - socket.2: spell List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad13fd5a8fa1607805d11ced3428e86dbd94778e Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=ad13fd5a8fa1607805d11ced3428e86dbd94778e commit ad13fd5a8fa1607805d11ced3428e86dbd94778e Author: Maxim Konovalov AuthorDate: 2025-10-14 20:32:07 +0000 Commit: Maxim Konovalov CommitDate: 2025-10-14 20:32:07 +0000 socket.2: spell --- lib/libsys/socket.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libsys/socket.2 b/lib/libsys/socket.2 index c4d8941bad21..48b8f4e87489 100644 --- a/lib/libsys/socket.2 +++ b/lib/libsys/socket.2 @@ -295,7 +295,7 @@ flag of the .Xr fcntl 2 system call. .Pp -When a non-blocking socket has not enough data in its receive buffer to fulfil +When a non-blocking socket has not enough data in its receive buffer to fulfill the application supplied buffer, then data receiving system calls like .Xr recv 2 , .Xr recvfrom 2 , From nobody Tue Oct 14 20:43:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmR4w2rKdz6C2tq; Tue, 14 Oct 2025 20:43: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 4cmR4w2B5Rz3HQg; Tue, 14 Oct 2025 20:43:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760474608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r71dr7BZl/W7LALcmN51udb86TapNtUUjoA9ZniuFiI=; b=S/dFczgR10TGOlgzZG3X+IS59VvBMl4bx8Bs172ZUy2mJuL0MglU8Yp4OixOPvpN5ShSPD pgzZiD07HZr7Pw722ky8CzChlKY7sHP9lNnAJUDkmVv4WdOvmr5dqCA4GALQ4BxZrsuAgF X79kGYugEOgDjBvMqxzVo9Mug4tVxmZSiGqyZW6EaH5ixuef1snD8XBsaHguvltZZ7LAzo 8sXym3+MQY6ZjC3DnqCqmj+js257t3o0h3kraGxHT4iZW7m4novYEhjvYPyVoANQN1XBQo 68/vdAMf+LDGd3QvSCO9psxcGGEofnqJtCKTp8e8BlWuo7sZSKswWQCEC9ac9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760474608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r71dr7BZl/W7LALcmN51udb86TapNtUUjoA9ZniuFiI=; b=PealjznEc4BpUsi0L0q01OXDBZ+py+JhgZRTYgK4dytyUZZWA4+kehzUZofAzZ267PSf/p Xb+SH21rq+tZsW2PXQNtRMKATjW+lE0/+7MYBQyIPHuAWkOvcKioseyi4pjn4lGNlekZin NVlpzVt9rSc8O1GXWGj7e4QH2DIop9zdty2rdv9I//1KFAaa9CTFX91/P4cCdr0U7zEZ4U mhsUIWivb0eyeU2KgErDQGvb2gZiiD1nUdaIim9dLdOWe4ZA+YKVo2xpjcYPFa7rb8wWHc H/mg9NXXRh83TGEkBQZZfQnCqomEWhwLJjFy2y65E7XRxaay+MmUdV/2uN6ZTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760474608; a=rsa-sha256; cv=none; b=Th7pNXiVqC1gGf2grnOad5PcaPvGg+6G/YxMoo2MK4Fk9jX1PzSDiVup3zERNs+Q5OH571 AxX8cXdJnvK8m75AD/r16qBG2lIfd6M+jmlZTRI7NGtMoOh2U9CDMgs8t53vo984ddgLDL Tp9j7uDcRRSZyBMsT5kpnmZ7rnOvrdc+KqDaVHOYCRx6N/bca9S14wHNZ8KJL9IfzzqeIH gY99ogUSaFHkHuHFMJ4QUnKp+pv6KV/v80FTXTngJLAjmUTbV8NLSMKKyCcNHCYxTZ0pTU QPQ/RzXtMujuUktXuIBNBHZP862OJ62HFRt8SsjtDN9IY4hZ2PMrbkZa+lAQWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmR4w1cFpz17BR; Tue, 14 Oct 2025 20:43:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EKhSTO065157; Tue, 14 Oct 2025 20:43:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EKhSoe065154; Tue, 14 Oct 2025 20:43:28 GMT (envelope-from git) Date: Tue, 14 Oct 2025 20:43:28 GMT Message-Id: <202510142043.59EKhSoe065154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 97e858f5b335 - main - sockstat: improve handling of path state List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97e858f5b335ae8f98619f9cee8ab9a0501cd06d Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=97e858f5b335ae8f98619f9cee8ab9a0501cd06d commit 97e858f5b335ae8f98619f9cee8ab9a0501cd06d Author: Michael Tuexen AuthorDate: 2025-10-14 06:39:37 +0000 Commit: Michael Tuexen CommitDate: 2025-10-14 06:48:43 +0000 sockstat: improve handling of path state Only suppress the path state column when producing traditional text output. When generating html output, always include the column. Please note that when generating json or xml output, optional fields like the path state are only generated if they is applicable. This has not been changed. The changes in this patch were suggested by asomers. Reviewed by: asomers Fixes: 746eadecaa7d ("sockstat: show path state column only when useful") MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D53005 --- usr.bin/sockstat/main.c | 8 +++++--- usr.bin/sockstat/sockstat.1 | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index 7fedfd5b8724..d1ea6b1bc958 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -1789,9 +1789,11 @@ main(int argc, char *argv[]) argc = xo_parse_args(argc, argv); if (argc < 0) exit(1); - if (xo_get_style(NULL) != XO_STYLE_TEXT && - xo_get_style(NULL) != XO_STYLE_HTML) - is_xo_style_encoding = true; + if (xo_get_style(NULL) != XO_STYLE_TEXT) { + show_path_state = true; + if (xo_get_style(NULL) != XO_STYLE_HTML) + is_xo_style_encoding = true; + } opt_j = -1; while ((o = getopt(argc, argv, "46AbCcfIij:Llnp:P:qSsUuvw")) != -1) switch (o) { diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1 index d14eb967ad0f..1498fb1d88f7 100644 --- a/usr.bin/sockstat/sockstat.1 +++ b/usr.bin/sockstat/sockstat.1 @@ -25,7 +25,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 October 9, 2025 +.Dd October 14, 2025 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -205,7 +205,8 @@ is specified (only for SCTP or TCP). The path state if .Fl s is specified (only for SCTP). -This column is only shown when there is at least one path state shown. +When using traditional text output, this column is only shown when there is at +least one path state to show. .It Li CONN STATE The connection state if .Fl s From nobody Tue Oct 14 21:32:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmS9B4b2Rz6C6Wy; Tue, 14 Oct 2025 21:32:14 +0000 (UTC) (envelope-from phil@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmS9923x2z3PQm; Tue, 14 Oct 2025 21:32:13 +0000 (UTC) (envelope-from phil@juniper.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=juniper.net header.s=PPS1017 header.b=jSHB8U9a; dkim=none ("invalid DKIM record") header.d=juniper.net header.s=selector1 header.b=DodC5iGI; dmarc=pass (policy=reject) header.from=juniper.net; spf=pass (mx1.freebsd.org: domain of phil@juniper.net designates 67.231.152.164 as permitted sender) smtp.mailfrom=phil@juniper.net; arc=pass ("microsoft.com:s=arcselector10001:i=1") Received: from pps.filterd (m0108162.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 59EIh2oI013193; Tue, 14 Oct 2025 14:32:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS1017; bh=0n /FQthbgsnp20RUmSKd6we8RIDBZtW0A2x/w0/pOzo=; b=jSHB8U9ava9g/I19bT N1Ixh/2j1zvKQ0Ax/MvCHYeaTr83RPXiKNA07Itm0fvKhm2/KwpmPe9JBK4k6ZsQ u/c7F3CoasUN+pptkbzxgX00eXXHhz55dtLlHSPPqzPUDJlLmgEM35oiaQJDvsJu 5DWT+83xRDpAsysx0hzGqjjhhWNOgyYlNbFsC5s/dtx2m+r0UF0bKreCkte50ked bzbPVu4FNVpg3B24sviUHOcixCaPX6QUZxgqjzqnePSMGp2D4lgBHweqz4Sd6hRW wcczLsDYl3ccpbLhQGMnBkEM//6u0Gwl9VOfzuo47IFFgvPXWJS3PC8CNFpY4yfc B0QA== Received: from bl0pr03cu003.outbound.protection.outlook.com (mail-eastusazon11012059.outbound.protection.outlook.com [52.101.53.59]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 49sv1u8bp2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Oct 2025 14:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LdnbJB5Zf2xX3lFuIrsBZf46pK7CAja4qvYgLP5l+ZykYCFlR49qCvDY2aZ1yei6r8YFbG045lSQzmYnQ++UxhfcOLhX3+fBvvm9+TFRKbth8eG00022TwgNJp1AaW1Q5KLZb6uiIsNIxcM+k0f4GrSz5M5DKQW9Jzf0558u3X3AIQ+wj0QjF4AHsYFFLj1DRWgNj3tHLP+6KYGGhtieVPPo1qGmTzLcq7JR4HgkWshpMNWVMo5JvkpZyIH9U1nRig03Ij5jGEI/sVpxbDu5L9tvQbvFgrVMd3qgR0Emr28aFO/jPym4ccp/nmeVVohXNkiFsJsm0f3Qe1aK+JNQbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0n/FQthbgsnp20RUmSKd6we8RIDBZtW0A2x/w0/pOzo=; b=HfZDyOT8QDDirrfLXVjfCVIkl8ksCiyhuCmf9a7YF96ttVCf5prC3MaP5rv0n0UzapupKgdxpURvlNeVqMuMrErfrRc2p6d3Qxo7VpmfPpp4AsPIb6lIARr6VOArVZdGhIDiTTB7nRaUA/2jjIs0PNK1FlNixSoBWUettlmfneUoz3AgF7UyvrUfaSSHALhHXE9gTy0HEbUXo6TttPMnYAIxfg42cbCUM4n7IFXqTGN0v+XhnMSnQPlVnsZq4YozSd65d4iz4f7R+WU1kISz5b+9WkbA1NlbH/xg9nz9MtE55eYyJOgJj4RQaWlzhRhvEWBzwTC42YGpAE2Mj4M4Dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.15) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0n/FQthbgsnp20RUmSKd6we8RIDBZtW0A2x/w0/pOzo=; b=DodC5iGIKqK4HIsQ7EWgri9Sa6taRI6cz+muJTd4b7nDM2CdnaFl25Avs/kO2IT9hUktCM+rtYdYYs0xn28Ri9pFHfKvw6txA0gHggPo+jmHXbbcCl8sz7cbjPQ5rHDe861MDVjgXf+TPAdsDSUfAvXpOB3wMQCKViZJboYRA7g= Received: from CH0PR03CA0095.namprd03.prod.outlook.com (2603:10b6:610:cd::10) by DS0PR05MB11116.namprd05.prod.outlook.com (2603:10b6:8:298::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9228.10; Tue, 14 Oct 2025 21:32:09 +0000 Received: from DS2PEPF0000343D.namprd02.prod.outlook.com (2603:10b6:610:cd:cafe::48) by CH0PR03CA0095.outlook.office365.com (2603:10b6:610:cd::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9228.10 via Frontend Transport; Tue, 14 Oct 2025 21:32:09 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.15) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.15 as permitted sender) Received: from p-exchfe-eqx-02.jnpr.net (66.129.239.15) by DS2PEPF0000343D.mail.protection.outlook.com (10.167.18.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9228.7 via Frontend Transport; Tue, 14 Oct 2025 21:32:09 +0000 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchfe-eqx-02.jnpr.net (10.104.9.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Tue, 14 Oct 2025 16:32:08 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14 via Frontend Transport; Tue, 14 Oct 2025 16:32:08 -0500 Received: from idleski.juniper.net (idleski.juniper.net [172.25.4.10]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 59ELW7Xt028410; Tue, 14 Oct 2025 14:32:08 -0700 (envelope-from phil@juniper.net) Received: from [172.25.4.153] (localhost [127.0.0.1]) by idleski.juniper.net (8.18.1/8.18.1) with ESMTP id 59ELXOQZ000667; Tue, 14 Oct 2025 17:33:24 -0400 (EDT) (envelope-from phil@juniper.net) From: Phil Shafer To: Kirk McKusick CC: , , Subject: Re: git: 0d4642a67e59 - main - Add --libxo support for geom status and list sub commands. Date: Tue, 14 Oct 2025 17:32:06 -0400 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: <202510132116.59DLGGdS009938@gitrepo.freebsd.org> References: <202510132116.59DLGGdS009938@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF0000343D:EE_|DS0PR05MB11116:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b8187f5-6d32-4acd-4db9-08de0b692182 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?fRhDpVWpxMlm3SZN+d6FEyqzJYS3rBttLuv3d5+XNQ6owzXt04FsV6mRG6ow?= =?us-ascii?Q?du4yXLZa+QjS7fpfYrMjPeCaacmK/wSfos7fzH4cpBpSTZDBMtcNCafKehU/?= =?us-ascii?Q?Ivfqj68LwJzVpAnX/sUeGIFT/8MXBD6qmStk5a34dEwN/TN9v/HNJ9CuN9mD?= =?us-ascii?Q?hnCGlJvuBTdFKlRxS+qRa+GGHF7zP88W2oafGSPKSZ1af82p+P8v3g8lNEPa?= =?us-ascii?Q?kQ8yoOY1IednWWIYTp47Af/LHDBD3TQk+g0YYBchXFrSwSTaqnRviXOx6cPg?= =?us-ascii?Q?2AbGpCvsaROPl+HcHRNNhuzeiEvdQXhd+4p/3BmLPLmr1UsumrYnbJtIV4ok?= =?us-ascii?Q?DcYaaRA3QgnOk37rI+AeS3OjthgzAM+qabrZ/jpnglvNf+5OMeVCmT6O3JKy?= =?us-ascii?Q?ClKsSfTZZPvLnEIxYXd/q0CBMrG43TafHeTo8qaW1bzld3wEwjIMjy2Lxnjg?= =?us-ascii?Q?vbgltWiBh7XIDGPoZOSyKIxWnTUdJZcozXGoqraeXufIqBTEB2IZ3XFyNFd1?= =?us-ascii?Q?MOhZZGYR1JSbS4jScfOYD6og8CeS2NfSAimM15zXSEvs9xVRcmwa5EKeb8BA?= =?us-ascii?Q?YyzGAOpvGpVsr48YVWGN6ggMdeUYcRUuY7T1lJK+RVXbjjx6R/egWFfulKcN?= =?us-ascii?Q?esVlPFdkcpc+WTmgBxEb3l+6Y7YD6FT14KWvbRIBUWKl+HY/G7jQTAc/I2lQ?= =?us-ascii?Q?3+bK9Itwb/Mqyl/JkgbsOm1AJfl0Rx6J2tH5RJZzvl1DmIl/oSHOvjDa2KCj?= =?us-ascii?Q?OhG82vAwuJTQu0ngx6jku2LZDPmJYhGIDABzPqYLFgH9tnjNY8LD6Cvn0gqP?= =?us-ascii?Q?8HEBJboOQM0UkBXvkOMm5s1yw4xVDqwPaN5BZ6ViKvsyfqhKmhhfjJjYI/uo?= =?us-ascii?Q?sHwJqKPbi79h96HFyrHhOalDSA9XCm+R6JLNdDXBbOxD2wdf91qUrGOOXzHm?= =?us-ascii?Q?BrLVYvntatvwu50XQmk7TrKFujjCgUpNnEZM0TlZIBe71aYYqiLS1h5Y7p//?= =?us-ascii?Q?oM9dwccBo4jO+njVMclsgSsNt3nFOjudo7yFc/j9tWmmnXx+m6p5CYdKouB8?= =?us-ascii?Q?ONrbKdFWr+rL2FVv3ccoINdXTir/c7NLy+MK3mAuEXNzA7Nw6oyNbXUafghO?= =?us-ascii?Q?b8WiWkOd6XZKUlPosy9HlBEHgUeGK9mUAZHV9mF65i3J+e41mW77Qv5jPSaO?= =?us-ascii?Q?cCisLWZoMQfAEpH+KtCsUqka6aK1LMwxj0fY1ZwHoVT97Gu6TBt7gXtugpuO?= =?us-ascii?Q?FePkyTBnSUAyl+alEth9U9OdcySdrkw0+G3o4QVqJ6vw0GBFnRtO6tnbzxom?= =?us-ascii?Q?K6KvP6+4WInrzuv1Rgntxv59Y1MPXAE2zu6+mjAWDQmjKzV68F4OVg7MAyLO?= =?us-ascii?Q?xau505Ll+Rk0WlScDS69QdF3EkMpzZYSQomGcRGiugEYLgdzeQJnRwCHoij3?= =?us-ascii?Q?tYuhl2HFYCWV1ZCfZZ2epyZJ7Gg9M4O782eWRLCRaIVejfVIvq0zBgut6qYm?= =?us-ascii?Q?uuCqGQn+Xba52B8=3D?= X-Forefront-Antispam-Report: CIP:66.129.239.15;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-02.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2025 21:32:09.3962 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b8187f5-6d32-4acd-4db9-08de0b692182 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.15];Helo=[p-exchfe-eqx-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF0000343D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR05MB11116 X-Proofpoint-GUID: 70fRAvpwG50AVVEvk-UX1ThZ6-M236I8 X-Proofpoint-ORIG-GUID: 70fRAvpwG50AVVEvk-UX1ThZ6-M236I8 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDE0MDEzNiBTYWx0ZWRfX5rJ06ja76K25 GRQ5Fmj0jTiQA6qTRpkiH3Fhs5RyMJa3Emz0YHhA7aW1Pz8mCdMeSzJ4QQZzQtZOn3O8aGOIQfL HZMISZ6iMebLFCNisXzJXG0s9Rlc7/3/xYe8VpDr9C++gZ+1Dgil1eW4PHu6gNC2vcuQq84kg04 sWzmJg3x8R56H7OmCIl7hBm9dXSXJw6JWdcON0n225tUfRI6o9BIKT3ACCLlDAElRwmsoub3fgL 9NQ/EW5DQ2q2eHMz8Zlx6UX3tru5OtaCjdwd/PHdcyh4WZphq+NXqRkzfkwE1SKuTGapAJYOPnr mssmc62kVFE+B6uCt8Yt7NYvB9/MnToxz4R2dSNz2u3UKjHsHuHg4tyFcG6F8+DPH50LoUhvFoj LcMuRCg4PYia0fayeVG28oUqaewBvQ== X-Authority-Analysis: v=2.4 cv=Wq0m8Nfv c=1 sm=1 tr=0 ts=68eec15c cx=c_pps a=BKMVb8u7xwlFrvPG8etDZw==:117 a=YQU41r7WENJiSYrYYNJVsQ==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=x6icFKpwvdMA:10 a=s63m1ICgrNkA:10 a=rhJc5-LppCAA:10 a=VkNPw1HP01LnGYTKEx00:22 a=UXIAUNObAAAA:8 a=GIgwrTwaEVm9zTZ1qiwA:9 a=pT8Wv8JN1uoA:10 a=a1s67YnXd6TbAZZNj1wK:22 a=poXaRoVlC6wW9_mwW8W4:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-14_04,2025-10-13_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 phishscore=0 malwarescore=0 spamscore=0 suspectscore=0 impostorscore=0 clxscore=1011 priorityscore=1501 lowpriorityscore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2510020000 definitions=main-2510140136 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.56 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector10001:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.959]; R_MISSING_CHARSET(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; R_SPF_ALLOW(-0.20)[+ip4:67.231.152.164]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[67.231.152.164:from]; FREEFALL_USER(0.00)[phil]; RCVD_IN_DNSWL_NONE(0.00)[52.101.53.59:received]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+,juniper.net:~]; DKIM_MIXED(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_DKIM_PERMFAIL(0.00)[juniper.net:s=selector1]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; RCPT_COUNT_THREE(0.00)[4]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_SEVEN(0.00)[9] X-Rspamd-Queue-Id: 4cmS9923x2z3PQm On 13 Oct 2025, at 17:16, Kirk McKusick wrote: > static void > -list_one_provider(struct gprovider *pp, const char *prefix) > +list_one_provider(struct gprovider *pp, const char *padding) > { > struct gconfig *conf; > char buf[5]; > > - printf("Name: %s\n", pp->lg_name); > + xo_emit("{Lcw:Name}{:Name}\n", pp->lg_name); > humanize_number(buf, sizeof(buf), (int64_t)pp->lg_mediasize, ""= , > HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); Tag names should be lower case, for consistency and ease of use: s/:Name/= :name/ (This applies throughout) > - printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_medi= asize, > - buf); > - printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); > + xo_emit("{P:/%s}{Lcw:Mediasize}{:Mediasize/%jd} ({N:/%s})\n", > + padding, (intmax_t)pp->lg_mediasize, buf); > + xo_emit("{P:/%s}{Lcw:Sectorsize}{:Sectorsize/%u} \n", > + padding, pp->lg_sectorsize); Using the "humanize" features will allow human-readable numbers in human-= friendly styles (text, html) and real numbers in encoding styles (xml and= json). https://libxo.readthedocs.io/en/latest/field-modifiers.html?highlight=3Dh= umanize#field-modifiers-1 Modifiers ~~~~~~~~~~~~~~~ Field modifiers are flags which modify the way content emitted for particular output styles: =3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D M Name Description =3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ... h humanize (hn) Format large numbers in human-readable style \ hn-space Humanize: Place space between numeric and unit \ hn-decimal Humanize: Add a decimal digit, if number < 10 \ hn-1000 Humanize: Use 1000 as divisor instead of 1024 Hmm.... looks like I'm lacking a flag for HN_B, sadly. Not sure how I mi= ssed that. I'll open a PR to add it. If you want the full numbers, you can use the "e" flag to restrict emitti= ng values to encodings styles. > if (pp->lg_stripesize > 0 || pp->lg_stripeoffset > 0) { > - printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize= ); > - printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeof= fset); > + xo_emit("{P:/%s}{Lcw:Stripesize}{Stripesize/%ju}\n", > + padding, pp->lg_stripesize); > + xo_emit("{P:/%s}{Lcw:Stripeoffset}{Stripeoffset/%ju}\n"= , > + padding, pp->lg_stripeoffset); Missing some colons before the tag names. Testing with the "warn" flag s= hould point this out, if the code gets hit. Style-wise, using hyphens ("{:strip-size/%ju}", "{:strip-offset/%ju}") he= lps make readable tag names. > - printf("%sMode: %s\n", prefix, pp->lg_mode); > + xo_emit("{P:/%s}{Lcw:Mode}{Mode}\n", padding, pp->lg_mode); {:mode} > @@ -940,27 +958,36 @@ list_one_geom(struct ggeom *gp) > struct gconfig *conf; > unsigned n; > > - printf("Geom name: %s\n", gp->lg_name); > + xo_emit("{Lcw:Geom name}{:Name}\n", gp->lg_name); > LIST_FOREACH(conf, &gp->lg_config, lg_config) { > - printf("%s: %s\n", conf->lg_name, conf->lg_val); > + xo_emit("{Lcwa:}{a:}\n", conf->lg_name, conf->lg_name, > + conf->lg_val); > } > if (!LIST_EMPTY(&gp->lg_provider)) { > - printf("Providers:\n"); > + xo_open_list("Providers"); Style-wise, list and container names should also be lower case. > + xo_emit("{Tc:Providers}\n"); > n =3D 1; > LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { > - printf("%u. ", n++); > + xo_emit("{T:/%u} ", n++); > + xo_open_instance("provider"); > list_one_provider(pp, " "); > + xo_close_instance("provider"); > } > + xo_close_list("Providers"); > } > if (!LIST_EMPTY(&gp->lg_consumer)) { > - printf("Consumers:\n"); > + xo_open_list("Consumers"); > + xo_emit("{Tc:Consumers}\n"); > n =3D 1; > LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { > - printf("%u. ", n++); > + xo_emit("{T:/%u} ", n++); > + xo_open_instance("consumer"); > list_one_consumer(cp, " "); > + xo_close_instance("consumer"); > } > + xo_close_list("Consumers"); > } For simple lists like this, use the "l" flag here, since it will yield mo= re useable JSON (dropping the open/close list/instance): https://libxo.readthedocs.io/en/latest/field-modifiers.html?highlight=3Dl= eaf#the-leaf-list-modifier-l The Leaf-List Modifier ({l:}) +++++++++++++++++++++++++++++ .. index:: Field Modifiers; Leaf-List The leaf-list modifier is used to distinguish lists where each instance consists of only a single value. In XML, these are rendered as single elements, where JSON renders them as arrays:: EXAMPLE: for (i =3D 0; i < num_users; i++) { xo_emit("Member {l:user}\\n", user[i].u_name); } XML: phil pallavi JSON: "user": [ "phil", "pallavi" ] The name of the field must match the name of the leaf list. FWIW, there's some example code showing the differences between list and = leaf-list rendering in XML and JSON appended below. > @@ -1038,14 +1067,20 @@ std_list(struct gctl_req *req, unsigned flags _= _unused) > "an instance named '%s'.", > gclass_name, name); > } > + xo_open_container("Geom"); > list_one_geom(gp); > + xo_close_container("Geom"); > } > } else { > + xo_open_list("Geoms"); > LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { > if (LIST_EMPTY(&gp->lg_provider) && !all) > continue; > + xo_open_instance("geom"); > list_one_geom(gp); > + xo_close_instance("geom"); > } > + xo_close_list("Geoms"); Same here ("l:"). > + xo_open_instance("status"); > LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { > - component =3D status_one_consumer(cp); > - if (component =3D=3D NULL) > + cstate =3D status_one_consumer(cp, "state"); > + csyncr =3D status_one_consumer(cp, "synchronized"); > + if (cstate =3D=3D NULL && csyncr =3D=3D NULL) > continue; > + if (!gotone || script) { > + if (!gotone) { > + xo_emit("{:name/%*s} {:status/%*s} ",= > + name_len, name, status_len, status)= ; > + } else { > + xo_emit("{d:name/%*s} {d:status/%*s} = ", > + name_len, name, status_len, status)= ; > + } > + xo_open_list("components"); > + } > + > + xo_open_instance("components"); > + if (cstate !=3D NULL && csyncr !=3D NULL) { > + xo_emit("{P:/%*s}{:compontent} ({:state}, {:syn= chronized})\n", > + len, "", cp->lg_provider->lg_name, cstate, csyn= cr); > + } else if (cstate !=3D NULL) { > + xo_emit("{P:/%*s}{:compontent} ({:state})\n", > + len, "", cp->lg_provider->lg_name, cstate); > + } else { > + xo_emit("{P:/%*s}{:compontent} ({:synchronized}= )\n", > + len, "", cp->lg_provider->lg_name, csyncr); > + } Extra "n"s in the tag names: s/compontent/component/ > + xo_close_instance("components"); Do these instances have keys? Or is this a simple list (leaf-list)? > gotone =3D 1; > - printf("%*s %*s %s\n", name_len, name, status_len, st= atus, > - component); > - if (!script) > - name =3D status =3D ""; > + if (!len && !script) > + len =3D name_len + status_len + 4; > } > if (!gotone) { > - printf("%*s %*s %s\n", name_len, name, status_len, st= atus, > - "N/A"); > + xo_emit("{:name/%*s} {:status/%*s} ", name_len, name,= status_len, status); > + xo_open_list("components"); > + xo_open_instance("components"); > + xo_emit("{P:/%*s}{d:compontent}\n", len, "", "N/A"); > + xo_close_instance("components"); > } > + xo_close_list("components"); > + xo_close_instance("status"); Avoid the close_list call if you didn't call open_list. libxo's internal= state transition FSM will generally catch this (and warn you), but it's = better to avoid it. Otherwise looks good. Thanks, Phil ----------------- Bock % cat /tmp/foo.c #include const char *user[] =3D { "alice", "bob", "carl", "doug", NULL }; const int num_users =3D 4; int main (int argc, char **argv) { int i; argc =3D xo_parse_args(argc, argv); if (argc < 0) return (argc); int yes =3D (argc > 1); xo_open_container("top"); if (yes) { for (i =3D 0; i < num_users; i++) { xo_emit("Member {l:user}\n", user[i]); } } else { xo_open_list("test"); for (i =3D 0; i < num_users; i++) { xo_open_instance("test"); xo_emit("Member {k:user}\n", user[i]); xo_close_instance("test"); } xo_close_list("test"); } xo_close_container("top"); xo_finish(); exit(0); } Bock % cc -I work/root/include/ -L work/root/lib -lxo -o /tmp/foo /tmp/fo= o.c Bock % /tmp/foo Member alice Member bob Member carl Member doug Bock % /tmp/foo --libxo:XP alice bob carl doug Bock % /tmp/foo --libxo:XP yes alice bob carl doug Bock % /tmp/foo --libxo:JP { "top": { "test": [ { "user": "alice" }, { "user": "bob" }, { "user": "carl" }, { "user": "doug" } ] } } Bock % /tmp/foo --libxo:JP yes { "top": { "user": [ "alice", "bob", "carl", "doug" ] } } From nobody Tue Oct 14 23:39:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmW0L2FPDz6CH0T; Tue, 14 Oct 2025 23:39: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 4cmW0L1Yr1z3cFq; Tue, 14 Oct 2025 23:39:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760485186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ArnQUweWQrOlzmC9r1Ea/cBgHpNkBbYO8cW9XE8s7q4=; b=BmAnxvqWm/yAJcSF8QykxSIt0QCFyLsfJh/pfv4oCQO6vPK2rVI9/+omeafKQ/2IDz0+PG 04Wfc0jC0D6SAxcMv7RnwuQHKmsDd3msOgpDXD0E7vF/qa0RaeCJcFWNW9qyhTHRiUFKCj kNQ5/DPUzljmDQZq1vJ9fjV8DV+KRQ+wvQ0tMPAD1l6Awg38vDdsuOIgw1zCuziDWP2LIJ 6IWS05pvBYypbjAxl/78rxWRzyg+jQYGKHw4bbsruihyapFz73baQCUdykpJioOBAeC1JZ dPKwH6PMEjBshldgCwGeNq6m2KbiEXuBJCjpYNPQ7MQU3rgiC9uWAIYP1/XOIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760485186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ArnQUweWQrOlzmC9r1Ea/cBgHpNkBbYO8cW9XE8s7q4=; b=lMULzjPDA7ePKjcpUYOLYSlf5sQMhxBpJr43dOfXSiHYaMF23/GH/k4Q/NDSqG0rhLXnYv 7B3oAHeaJRsejuB64lRa5WVzgnStWy8Hv54a8JDRY41lSnmstPr1/2J4ELAG2I1nZ/W50E TaLww9LNBjfKPhiueXtYald4SFV/RlgF2uyowNYSRuc/vN5MkYfBDUA+Sd/YCXv/82giVA +Ni7EHpSLR1qvvhjLOR0CWifNG3Xex0eJnp5xR1dN+7MhtkA/2EzwzOKrXM1YEYUdoMpsL yiwAurzeWjx/1zV0PHyYq6NTtJgwqt25165ccq6KLjHpPrxs7s8QbU9vdE2Yjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760485186; a=rsa-sha256; cv=none; b=bsifWGSug3EPolFoh2Db8315PvqT7TheFEz5rab5uP4T8wItcZDG5wJQB/yi6petOefImk tmH9nHKuDVe8uFieW9pyJ3SxMhHQCkg4NX16eupU2UH5/x6bUnNnIe8xlmoySPduQRgXlv yCIc9JKNv8V7kmiBNJETO6kkkWmRwNvA7KpRFhG7sli0ZV8pfJfZXuPky2PSFS7CPsXuvA mtG7Laem49bRHXyPw0tUlTdz5N+z07XwoQQdoI/fZ97GDtZqM4jXfP4TSgwMQCjihVdYHW reQBK2jNROfsSXyHUEPzKmMF/xqXWMXdUoZFU0HXQovBlopPF8g59fS8EBjsRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmW0L0qQHz1CnH; Tue, 14 Oct 2025 23:39:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ENdjO3086542; Tue, 14 Oct 2025 23:39:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ENdjv4086539; Tue, 14 Oct 2025 23:39:45 GMT (envelope-from git) Date: Tue, 14 Oct 2025 23:39:45 GMT Message-Id: <202510142339.59ENdjv4086539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 1985940204dc - main - conf: enable TCP_HPTS_KTEST on debug builds List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1985940204dc01d4524c6351ab25a182bfde23ae Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1985940204dc01d4524c6351ab25a182bfde23ae commit 1985940204dc01d4524c6351ab25a182bfde23ae Author: Michael Tuexen AuthorDate: 2025-10-14 23:36:54 +0000 Commit: Michael Tuexen CommitDate: 2025-10-14 23:36:54 +0000 conf: enable TCP_HPTS_KTEST on debug builds Enable the kernel build option TCP_HPTS_KTEST on debug builds and disable it on non-debug builds. PR: 290234 Reviewed by: Nick Banks, glebius Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D53108 --- sys/conf/std.debug | 1 + sys/conf/std.nodebug | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/conf/std.debug b/sys/conf/std.debug index f5ed5582c78d..0149779b3e5c 100644 --- a/sys/conf/std.debug +++ b/sys/conf/std.debug @@ -16,3 +16,4 @@ options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence options KDTRACE_MIB_SDT # Add SDT probes to network counters +options TCP_HPTS_KTEST # Add KTEST support for HPTS diff --git a/sys/conf/std.nodebug b/sys/conf/std.nodebug index 4035e28d2a62..79676a1d618f 100644 --- a/sys/conf/std.nodebug +++ b/sys/conf/std.nodebug @@ -16,6 +16,7 @@ nooptions KCOV nooptions MALLOC_DEBUG_MAXZONES nooptions QUEUE_MACRO_DEBUG_TRASH nooptions KDTRACE_MIB_SDT +nooptions TCP_HPTS_KTEST # Net80211 debugging nooptions IEEE80211_DEBUG From nobody Tue Oct 14 23:44:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmW6D5BVPz6CHYx; Tue, 14 Oct 2025 23: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 4cmW6D4b7lz3crB; Tue, 14 Oct 2025 23: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=1760485492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0TV0POI3v5W0xLh+uv/nu0hrJKiV0kxG2E53htzrqwg=; b=RsPAr/WkgN32sDs8pXINpO473T8LIn65/DQN+2g2b/Emh4sTSVi7LMdC0MzVZs7zB5+3uI yDp1+C+PgKye0euVL0KquP21Nr2FOwloh3SdvwYz4OiV4EtnDE8U8mB2m9g3284JErLL8R b1vGjLgt6f3Sox+kJEB6hjhH65Mrez1Z2vvDMvAeqMmz/4zlyYj2+d0CKOnwFw/OAuCmVY 7B6myC+sMKKPjFC2oLaKd3zlsd82P80JDZk/vUyYwPrsuM9gsYfzhi5Mtop6aXU55MbdtN YC6odqmcK6VGwKcjUcqRhWlWzIfQYzksIO5AhxrbAuElBg8O6xnHMsGk2unl3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760485492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0TV0POI3v5W0xLh+uv/nu0hrJKiV0kxG2E53htzrqwg=; b=Af0l4Rx55ttiXz0MaNM3bvZIdGmXtpF+z50PbOv/wJGFFGhmZtDbhZJA5bqYdRdoe6y7G6 BRIqnp5sQqa7wLeAOI/kBCf+beZys4HOJox5Z5kcHCqa2VwpBCNEay7sAabnfI+W3At5RM IIbemgX8zY6UkN8oeFFCxHQk0zICHO02ex2iXU5Go/SFPBnFMKQ+Mz3OQCd99/0m9HxGcT uHvIamFpKxpXQvfdmU/N8KlcyJ5UH6TS8KKcd6z20nWGjGBAL3jwaQ63ke6VjvFLpx1b6I MhD91bhNeLBlmq+UgnXQx0PuHJ2Dc+fsubwjfRvxKTB7hHTAPNeW+WRFwqGeiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760485492; a=rsa-sha256; cv=none; b=JNkuhAB5p2vOoas7He9NPgXC9FZMJkdbUiNRU8PNcr9pReEzCo+3iaoBwwxXtN1xLHMjW5 MWBHcqNRmx1LoUglQWpDyETmkt/+5oKweby14bRx7xSma6KLhlKB+WzknIFUg78eJShjLG NO2hRN+ehI3j+4D2bdJDIA+VqyuZ1OQKfbSoodqgvq1Qtdz+4pTX9vj8CpwZIKDPdmE2Bi pGBndvUvnNV5DTrJI4rIVw2X2ERx8lDYetHRTNPb5qOGBDSqBbep8W19+DtnLy5kTaFEMD BpXUdxGSuYYZpaK53/P3TuwbMEFc89irJte0j5xAEiJQ3Nq+aCaAlvtKOdatVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmW6D3dj0zDl; Tue, 14 Oct 2025 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ENiqTl003942; Tue, 14 Oct 2025 23:44:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ENiqVc003939; Tue, 14 Oct 2025 23:44:52 GMT (envelope-from git) Date: Tue, 14 Oct 2025 23:44:52 GMT Message-Id: <202510142344.59ENiqVc003939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: c8359b327104 - main - tests/multicast: fix test flakyness List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8359b327104325af6dc97202e21d6131acb0573 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c8359b327104325af6dc97202e21d6131acb0573 commit c8359b327104325af6dc97202e21d6131acb0573 Author: Gleb Smirnoff AuthorDate: 2025-10-14 23:43:15 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-14 23:43:15 +0000 tests/multicast: fix test flakyness The receiver is run as a background job, so we need a wait loop to make sure it has been fully functional before launching sender. Reported by: Siva Mahadevan PR: 290210 --- tests/sys/netinet/multicast.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tests/sys/netinet/multicast.sh b/tests/sys/netinet/multicast.sh index a3854fd2fd20..273970d0f7ea 100755 --- a/tests/sys/netinet/multicast.sh +++ b/tests/sys/netinet/multicast.sh @@ -45,6 +45,15 @@ multicast_vnet_init() jexec mjail2 ifconfig ${epair2}b 192.0.3.2/24 } +multicast_join() +{ + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + $1 233.252.0.1 6676 $2 > out & pid=$! + while ! jexec mjail2 ifmcstat | grep -q 233\.252\.0\.1; do + sleep 0.01 + done +} + atf_test_case "IP_ADD_MEMBERSHIP_ip_mreq" "cleanup" IP_ADD_MEMBERSHIP_ip_mreq_head() { @@ -56,8 +65,7 @@ IP_ADD_MEMBERSHIP_ip_mreq_body() multicast_vnet_init # join group on interface with IP address 192.0.2.2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - ip_mreq 233.252.0.1 6676 192.0.2.2 > out & pid=$! + multicast_join ip_mreq 192.0.2.2 atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 192.0.2.1 hello @@ -65,8 +73,7 @@ IP_ADD_MEMBERSHIP_ip_mreq_body() atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out # join group on interface with IP address 192.0.3.2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - ip_mreq 233.252.0.1 6676 192.0.3.2 > out & pid=$! + multicast_join ip_mreq 192.0.3.2 atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 192.0.3.1 hello @@ -90,8 +97,7 @@ IP_ADD_MEMBERSHIP_ip_mreqn_body() multicast_vnet_init # join group on interface epair2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - ip_mreqn 233.252.0.1 6676 ${epair1}b > out & pid=$! + multicast_join ip_mreqn ${epair1}b atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair1}a hello @@ -99,8 +105,7 @@ IP_ADD_MEMBERSHIP_ip_mreqn_body() atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out # join group on interface epair2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - ip_mreqn 233.252.0.1 6676 ${epair2}b > out & pid=$! + multicast_join ip_mreqn ${epair2}b atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello @@ -123,9 +128,8 @@ MCAST_JOIN_GROUP_body() { multicast_vnet_init - # join group on interface epair2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - group_req 233.252.0.1 6676 ${epair1}b > out & pid=$! + # join group on interface epair1 + multicast_join group_req ${epair1}b atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair1}a hello @@ -133,8 +137,7 @@ MCAST_JOIN_GROUP_body() atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out # join group on interface epair2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - group_req 233.252.0.1 6676 ${epair2}b > out & pid=$! + multicast_join group_req ${epair2}b atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello From nobody Wed Oct 15 00:29:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmX6B1TLGz6CM4c; Wed, 15 Oct 2025 00:29: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 4cmX6B0txZz3kFs; Wed, 15 Oct 2025 00:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760488194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DzZuB2GenN8wmkoRzoR4GaG5U18mZlCqFsmSX/D2ozo=; b=wXRawO44JqGxAreFrJsa5RfFNh7QCkIhW/qOXVaJBysXBQ6Kcg9iL5S48wPORB2t7QfPb4 JdHFv4PCARr0GVnLhXKcu+Hmlslw4nHTQ1yvHJiBc5z1WT7SQu99LBjxbBtY9Oyyug/c2v jwhzV0cpOU2fuaIZnsJ7QkYznpU7CDms3KL5vheOK/24KGOhV053Jk5muOpve+7rigzIT7 0q6rZ67IVLWP39bLWqRfngQRInUHIkxMUiOao4Ofrdp7LtMpX+1JWm+/McWMjM4Zml7AYk jMCjhbUhr7A1uR6U9jEQz0HE3BSqcK40fFVeDO44n5ekCwlnZHw4a2gYe/9/zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760488194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DzZuB2GenN8wmkoRzoR4GaG5U18mZlCqFsmSX/D2ozo=; b=bDCC7mhJPApld1psiEumbvxERakrpqYKK4GfXuSTAxzdiygviNSx9bo7qsf6RMymgeyBX2 OX4hKgY9Qh368BuArNrmq/nMZyBNXZT5ZZ7//ygoQanLnSa8UJP6JbnITepwLQca0WzS97 yWYgE7kVZYRRzI/fh+opxdR3saJncuNNf6thvrXN25Ll3Y4ohC83lz2qjKBmqpT+VTA8h7 SLUYlZW2S9tUPcyAy4zHCtugXarm5CVpaLNM3ZBQyQVHkfKkd9IOrnH2k9JYNHgOncjGHk JU+X7PjqIYCaJBtGGlxeaxfbVvjp8Cnf+LTpLdPEajcWEtUtdfzWlH2lawjdFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760488194; a=rsa-sha256; cv=none; b=srCrCn8NZX+XUrv27vbEGdkUpf+s0FmobNO41jBu5TLxzVg8Hdn+66b+Gs/gqVfC0w3guU dCbrJGRSp8Nj2HPRzh9vFze348UmIkb7eWhDsh2SXoLc9UOMQmTzDpzO35faKNYOtaGxcn MN3jYXnZEtEqNq1wpuaguHXN6772h7Ks7voGHovI53ckXDopGtDPQ2UjKD9mrsJjubuRSC PJ6y/cROsO2JLdRPxCeG76QYx+RT3/kNCNtV9qRvm3TN3+npPCenHpfHsmBXh5hekvYwco lKF1RKJ4OCjIGox0LNdm6vwxiytodGIF6G1FxXQ8ZBcmDx/nqI30R7US1ncpOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmX6B0Nbyz13M; Wed, 15 Oct 2025 00:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59F0Trh1080142; Wed, 15 Oct 2025 00:29:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F0Trvw080139; Wed, 15 Oct 2025 00:29:53 GMT (envelope-from git) Date: Wed, 15 Oct 2025 00:29:53 GMT Message-Id: <202510150029.59F0Trvw080139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ead721935251 - main - unix/stream: repair SO_SNDTIMEO List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ead721935251ab5640ea736d4269814b7f9d2f64 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ead721935251ab5640ea736d4269814b7f9d2f64 commit ead721935251ab5640ea736d4269814b7f9d2f64 Author: Gleb Smirnoff AuthorDate: 2025-10-15 00:29:31 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 00:29:31 +0000 unix/stream: repair SO_SNDTIMEO The send operations are waiting on the peer's socket buffer, but we shall use our timeout value. Provide a test for that. Reported by: phk Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D53081 Fixes: d15792780760ef94647af9b377b5f0a80e1826bc --- sys/kern/uipc_usrreq.c | 20 ++++++++++++++++++-- tests/sys/kern/unix_stream.c | 27 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 340d84666459..c5fc1e84ce3f 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1069,6 +1069,21 @@ uipc_stream_sbspace(struct sockbuf *sb) return (min(space, mbspace)); } +/* + * UNIX version of generic sbwait() for writes. We wait on peer's receive + * buffer, using our timeout. + */ +static int +uipc_stream_sbwait(struct socket *so, sbintime_t timeo) +{ + struct sockbuf *sb = &so->so_rcv; + + SOCK_RECVBUF_LOCK_ASSERT(so); + sb->sb_flags |= SB_WAIT; + return (msleep_sbt(&sb->sb_acc, SOCK_RECVBUF_MTX(so), PSOCK | PCATCH, + "sbwait", timeo, 0, 0)); +} + static int uipc_sosend_stream_or_seqpacket(struct socket *so, struct sockaddr *addr, struct uio *uio0, struct mbuf *m, struct mbuf *c, int flags, @@ -1203,7 +1218,8 @@ restart: error = EWOULDBLOCK; goto out4; } - if ((error = sbwait(so2, SO_RCV)) != 0) { + if ((error = uipc_stream_sbwait(so2, + so->so_snd.sb_timeo)) != 0) { SOCK_RECVBUF_UNLOCK(so2); goto out4; } else @@ -2397,7 +2413,7 @@ uipc_sendfile_wait(struct socket *so, off_t need, int *space) } if (!sockref) soref(so2); - error = sbwait(so2, SO_RCV); + error = uipc_stream_sbwait(so2, so->so_snd.sb_timeo); if (error == 0 && __predict_false(sb->sb_state & SBS_CANTRCVMORE)) error = EPIPE; diff --git a/tests/sys/kern/unix_stream.c b/tests/sys/kern/unix_stream.c index 49d621dc5b0a..442b766ac885 100644 --- a/tests/sys/kern/unix_stream.c +++ b/tests/sys/kern/unix_stream.c @@ -1,6 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2025 Gleb Smirnoff * Copyright (c) 2018 Alan Somers * * Redistribution and use in source and binary forms, with or without @@ -30,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -490,6 +492,30 @@ ATF_TC_BODY(ourshutdown_kevent, tc) close(sv[1]); } +ATF_TC_WITHOUT_HEAD(SO_SNDTIMEO); +ATF_TC_BODY(SO_SNDTIMEO, tc) +{ + struct timespec tp1, tp2, rtp, sleep = { .tv_nsec = 100000000 }; + int sv[2]; + char buf[10]; + + full_socketpair(sv); + ATF_REQUIRE_EQ(0, setsockopt(sv[0], SOL_SOCKET, SO_SNDTIMEO, + &(struct timeval){ .tv_usec = sleep.tv_nsec / 1000 }, + sizeof(struct timeval))); + ATF_REQUIRE_EQ(0, clock_gettime(CLOCK_MONOTONIC_PRECISE, &tp1)); + ATF_REQUIRE_EQ(-1, send(sv[0], buf, sizeof(buf), 0)); + ATF_REQUIRE(errno == EAGAIN); + ATF_REQUIRE_EQ(0, clock_gettime(CLOCK_MONOTONIC_PRECISE, &tp2)); + timespecsub(&tp2, &tp1, &rtp); + ATF_REQUIRE(timespeccmp(&rtp, &sleep, >=)); + ATF_REQUIRE_EQ(sizeof(buf), recv(sv[1], buf, sizeof(buf), 0)); + ATF_REQUIRE_EQ(sizeof(buf), send(sv[0], buf, sizeof(buf), 0)); + + close(sv[0]); + close(sv[1]); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, getpeereid); @@ -506,6 +532,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, peershutdown_wakeup_poll); ATF_TP_ADD_TC(tp, peershutdown_wakeup_kevent); ATF_TP_ADD_TC(tp, ourshutdown_kevent); + ATF_TP_ADD_TC(tp, SO_SNDTIMEO); return atf_no_error(); } From nobody Wed Oct 15 07:25:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmjKc2kHsz6CspC; Wed, 15 Oct 2025 07:25: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 4cmjKc24DTz3RfB; Wed, 15 Oct 2025 07:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760513124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9sqsiSxDqW5pRaDymBDTAPVNdi84F6Da17bNwny+YPI=; b=DSR91QPUB9CiL/wHHHzJa4D6HwyHSaql9UqM+glmJz2XRdTOjrSSIa2Ym49JwRbESAdn8t HkwEhr9ce/tbko7uP+iyu/CX5HAT5qq6thOVqb819G96R8UCFGoCcwcf8f13LpMhfGHrfA EzoeAqkfdnEppUPKtcvUBEMWeCajdHSOk1Yz92k2fIikur1xhUEeL+yQ1uggga8s85HhBH WC1yPfzaLriGGNz7YHC52opkH0xsa58x3kVWUXmhwZzLbYjgvK9Nyc0fDWNKMR/jvgnsfm 45RYG/HLAxTXtn+fQS0knIlq2ZlC1cUkJTPEVDN1Z1fJWoxh59YhEiXKh6jNcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760513124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9sqsiSxDqW5pRaDymBDTAPVNdi84F6Da17bNwny+YPI=; b=djefKQYn9PWb4gB3V4xieXTZf9bGrmQP8JnniwnNSpznNnYsoJhEy4Fj172oC3nLs6t4Vt cE0NUHcy/+2i15f72UWlA1R2yyc+tNQkGn61NVHfKKNfEXtDLJn0cfWrQ7PUpky7fkCzP6 oqFTGVuwTdTVy1x8yHjMfavojVt4T//+hNaZheit11nzzUWQ6pDWGDA85Uf2QBNbgsMu85 tV0so8vQafLelff2YrD3kjPdNcADhlJHFgXSCVQs+vMOB0quL2B0WFmqkAYuKYy073F7FF KH54YkJOEBqqeHMPoG6yTbvlMF5oODhR9D15yZmUVPDnuvfmsHu23iHe0e5jXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760513124; a=rsa-sha256; cv=none; b=ozBshbo57iH8vG6kJT4cScEGQTz66XdHQ+6PM5HZ2IkUQMQuUNMrTjEGHicImrkAFxCGm3 Kze4mwtuGPaFS8wsGyOKeiGQ8ogaxKD+hRDERZgnaOUaGz25n1P6RdHSTV1zA0qbSVfQ5g 7XHfm3duWWaSLkpkR9AiWXfr/A7TEb/LwARCFPuhDHonppo2AMyto0zefVqwiurzvQEQJZ Jqarte3N92uOdXB1ILQQTbWV6FAZoLu5U2Ot0+oLgTUn7Vnj04jindgohmTgo9lB+n+s7q pUz3xp/bGDvGp7oUxtweIJDVO3iVcjBt5Gs8m5iBnNVvxLIRXJKLFbmFSlpBuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmjKc1WtlzDNX; Wed, 15 Oct 2025 07:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59F7PO9P072363; Wed, 15 Oct 2025 07:25:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F7POZt072360; Wed, 15 Oct 2025 07:25:24 GMT (envelope-from git) Date: Wed, 15 Oct 2025 07:25:24 GMT Message-Id: <202510150725.59F7POZt072360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 68501a93076a - main - mv88e151x: fix potential attach and autonegotiation issues List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68501a93076ac095be7a96ecd55d15287c497c9d Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=68501a93076ac095be7a96ecd55d15287c497c9d commit 68501a93076ac095be7a96ecd55d15287c497c9d Author: Ryan Libby AuthorDate: 2025-10-15 04:01:48 +0000 Commit: Ryan Libby CommitDate: 2025-10-15 04:01:48 +0000 mv88e151x: fix potential attach and autonegotiation issues Reported by: GCC -Wmaybe-uninitialized, -Wtautological-compare Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D45919 --- sys/dev/mii/mv88e151x.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/mii/mv88e151x.c b/sys/dev/mii/mv88e151x.c index 618ad81471c9..fb03b2a7a917 100644 --- a/sys/dev/mii/mv88e151x.c +++ b/sys/dev/mii/mv88e151x.c @@ -97,7 +97,7 @@ mv88e151x_attach(device_t dev) { const struct mii_attach_args *ma; struct mii_softc *sc; - uint32_t cop_cap, cop_extcap; + uint32_t cop_cap = 0, cop_extcap = 0; sc = device_get_softc(dev); ma = device_get_ivars(dev); @@ -224,10 +224,12 @@ mv88e151x_fiber_status(struct mii_softc *phy) else if (reg & MV88E151X_STATUS_LINK && reg & MV88E151X_STATUS_SYNC && (reg & MV88E151X_STATUS_ENERGY) == 0) { - if ((reg & MV88E151X_STATUS_SPEED_MASK) == + if (((reg & MV88E151X_STATUS_SPEED_MASK) >> + MV88E151X_STATUS_SPEED_SHIFT) == MV88E151X_STATUS_SPEED_1000) mii->mii_media_active |= IFM_1000_SX; - else if ((reg & MV88E151X_STATUS_SPEED_MASK) == + else if (((reg & MV88E151X_STATUS_SPEED_MASK) >> + MV88E151X_STATUS_SPEED_SHIFT) == MV88E151X_STATUS_SPEED_100) mii->mii_media_active |= IFM_100_FX; else From nobody Wed Oct 15 07:25:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmjKd41Hxz6CsfJ; Wed, 15 Oct 2025 07:25: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 4cmjKd2ybhz3RCL; Wed, 15 Oct 2025 07:25:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760513125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ptZzOEwKThRWzuByLPoCjvwI8wuWhkS6L/Brl0fJM78=; b=Htg1nqG/SKgzwZCGsrLgJ1nTI68uuHxkOvhjfHhx6mkbqubjPB71cjv2C8zE6We22iT/BL COpw9rC32LYWO4FC0QNjcsIQSksGGBMqBIZWSEenW+lXTFjuRkhuVoamwwFmuS2RAr+vKa azN4VYrwQTl1DVxyFALrNC2IxQL9xIY6ImHeESpC2fpjkpY0Jn3/wEy3HOremHGizevAT/ Fv695ACrgz9ke3AOfQMhRWO46+b+JvQyUgsQVS9pnoKqdOuEFuLSjnKwMw+rUyPB1kqYjh zOy6d5dSYkyPzGck1yA+h1rWgmMxohVbn9KK1CiBOvbhDPKQNbAzeCYZCQLU6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760513125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ptZzOEwKThRWzuByLPoCjvwI8wuWhkS6L/Brl0fJM78=; b=omnfAiKBFNQCN+iJ6nsUrrnkKhI/d4ecTaTOrl50IgzHwubX5XVB5R6jrLLogrgePUBWoo YV2gSW1pHPvYDFqJKNUGcPcDeS3m35MBk83wSj3i8OP+U9+a9v8dMlW45jHc76Mjbob8sT QLqYgcF9yzluo2gpT1OqOGH3n/AoBNM5JcnQN9F07Jc/5PeLTdT5EJx3r7vwo1Fo4Q8hS6 IUxMlmM4NEKpoTrdg4hPUhdCaB/NmbUYirWpUd7RepyGVSz3HJBHgZsbqh8HTXB64s8YLr cwGTcWRlvd437s8KxhTvvHyP4ETBYqq3xE13eONZII+UhXS/Wy0v8vicOdvOJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760513125; a=rsa-sha256; cv=none; b=MSou8XdrVex6S+ZhHXzIr13KZebCmT/aj2Vw6JNnz3lUOCgtbWqiYC1elWYOZwrUpculLv 0DQIXsCTv/EGCHB8IQZsobAm9wNSXM5EJiNhyfx/B8ffDlvGwtt2UNnyudNYy93nuBgRfe jvgy3VirxR7TEq4cBlaU7oyHo8CAZhwDKvwfP8TzAAk5WaASXnr9nKirlyE08hhSfPxHVo rOwB21IXjqTIL4NpjtCPleMVtGw3IO55Ldz6z2uEqrdZxkbiaVfOs/WTpr10+KDGOAW+nz 55eu/c4pw/G07F0YkrMYIj9SiN0c8mtIrLFGszdTI+ZUO12k5+Bolx3kic8xTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmjKd2TsdzD8W; Wed, 15 Oct 2025 07:25:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59F7PP36072397; Wed, 15 Oct 2025 07:25:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F7PP0s072394; Wed, 15 Oct 2025 07:25:25 GMT (envelope-from git) Date: Wed, 15 Oct 2025 07:25:25 GMT Message-Id: <202510150725.59F7PP0s072394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: a0ea4c04b526 - main - ffs_truncate: correct INVARIANTS panic debug output List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0ea4c04b5269ac138a3cf551047076472c6028e Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=a0ea4c04b5269ac138a3cf551047076472c6028e commit a0ea4c04b5269ac138a3cf551047076472c6028e Author: Ryan Libby AuthorDate: 2025-10-15 04:03:04 +0000 Commit: Ryan Libby CommitDate: 2025-10-15 04:03:04 +0000 ffs_truncate: correct INVARIANTS panic debug output Reported by: GCC -Warray-bounds Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D53037 --- sys/ufs/ffs/ffs_inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 970536a13aa5..f47cfd08f75a 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -653,8 +653,8 @@ done: for (i = 0; i < UFS_NDADDR; i++) if (newblks[i] != DIP(ip, i_db[i])) panic("ffs_truncate2: blkno %d newblks %jd != i_db %jd", - i, (intmax_t)newblks[UFS_NDADDR + level], - (intmax_t)DIP(ip, i_ib[level])); + i, (intmax_t)newblks[i], + (intmax_t)DIP(ip, i_db[i])); BO_LOCK(bo); if (length == 0 && (fs->fs_magic != FS_UFS2_MAGIC || ip->i_din2->di_extsize == 0) && From nobody Wed Oct 15 07:25:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmjKg0bwkz6Csbq; Wed, 15 Oct 2025 07:25: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 4cmjKf55vfz3RlD; Wed, 15 Oct 2025 07:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760513126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q42l99J7mKJGFsEfnA/xKrQfklxRB0kCl4OySdj1zec=; b=KOdOL4K07tY8eyD0oDztoLgBCKWuR0UcIOlgkSL0m2G4ylBlMiBjkckyW7GmBEVt0s/P1l +jAFiVZI0YyBaiuJ69T/sKpD/Mw/xh5DpaczmrxKcwGfgVNrrCwMsCYBw3W9IslFqXnkPG oKIeXtghwb/yp9yLTjiGHWXdwn8DJuCfSNiVrkYKPsjk8mY4Qw4vdYEv+cDTFHH/AOBJx6 DfWkpw15zjP2otVdFF9SN8cQ+9CfLfwkXC6MlE0dE7oHWShGW6IzslvwIA/GFgrBT2kYJZ /MHCAI1y8WCOuNInSePGmU4YPO0kCkZ1y9s5qGjEBrnesYVW1+rYYRQgngm7kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760513126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q42l99J7mKJGFsEfnA/xKrQfklxRB0kCl4OySdj1zec=; b=rRYLn7EABUoN+cOh0JVF0ttl0Yt15Ph+fECxuS9/wlJKMGxc4ClhFc0X/B8i+1/qf+M/HX KcPQWdVPhQC5RfevKzSqpaos50fvOHzRS15AhT7KstsRjMJChQoIRkvN45Uw/dSIT8X3q9 khtY/eqA7FzWPUupy5jFyQdXd7lHDQzD4AQLlsF7p0BISchu6Q5EkjmMH2Qyslu3bMWhs+ 6cQrKaZppjmFCG3TcI35mu4hRQ2T4Hw5AThI7W195Tfsjmu49zY/3iyReuT5sjb4QD9tkz 3Q2BCCaGt4puGHYzKdLCU+aNXZD4UuQOnld+2pcDXaHuD/PsEO97QASaoyBDNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760513126; a=rsa-sha256; cv=none; b=OCi4fVhiTickAhZa46ePuBuuzmcpUjxxY4c0ZK4tnhSf96x2r+dOu7vmk2yNX+ubQ4Qtlp 7ehqLlkHdosHer/pFyqEet+KHZX2mFmXd4uPR9vIOnyV/J9JL9OYACuSL3H4ePHWvEMdLg 69e4K0ZmnhMZPwRpbMkfC83c1ndAUW/tqAxvUBmR1GFjUKwa/YczUkYrZjgzrCDXIKII4g ue+W+WQDiZ+EZQ2gsEqRXyLy5vABo4/WtOFWSfkSNG6r82y3rKMdP1jfOaY7ZNAjipLZTV idvLM5rz5kjHfV3PpndWz4N+XtnUGjcpkhVaIOxZtbqKLFzxlC7nI1Izt6jYFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmjKf3QWLzDL4; Wed, 15 Oct 2025 07:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59F7PQw5072430; Wed, 15 Oct 2025 07:25:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F7PQC1072427; Wed, 15 Oct 2025 07:25:26 GMT (envelope-from git) Date: Wed, 15 Oct 2025 07:25:26 GMT Message-Id: <202510150725.59F7PQC1072427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: b679303544b3 - main - fsck_ffs: garbage collect calcsb List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b679303544b37b980a3128af9248ee97b0bca5e8 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=b679303544b37b980a3128af9248ee97b0bca5e8 commit b679303544b37b980a3128af9248ee97b0bca5e8 Author: Ryan Libby AuthorDate: 2025-10-15 04:03:57 +0000 Commit: Ryan Libby CommitDate: 2025-10-15 04:03:57 +0000 fsck_ffs: garbage collect calcsb calcsb is unused since the logic moved to sbsearch / ffs_sbsearch in e68866164212 ("Move the ability to search for alternate UFS superblocks from fsck_ffs(8) into ffs_sbsearch() to allow use by other parts of the system.") Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D53038 --- sbin/fsck_ffs/setup.c | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index f10f02d159c3..41b4a5336350 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -58,7 +58,6 @@ char *copybuf; /* buffer to copy snapshot blocks */ static int sbhashfailed; #define POWEROF2(num) (((num) & ((num) - 1)) == 0) -static int calcsb(char *dev, int devfd, struct fs *fs); static void saverecovery(int readfd, int writefd); static int chkrecovery(int devfd); static int getlbnblkno(struct inodesc *); @@ -500,52 +499,6 @@ sblock_init(void) dev_bsize = secsize = DEV_BSIZE; } -/* - * Calculate a prototype superblock based on information in the boot area. - * When done the cgsblock macro can be calculated and the fs_ncg field - * can be used. Do NOT attempt to use other macros without verifying that - * their needed information is available! - */ -static int -calcsb(char *dev, int devfd, struct fs *fs) -{ - struct fsrecovery *fsr; - char *fsrbuf; - u_int secsize; - - /* - * We need fragments-per-group and the partition-size. - * - * Newfs stores these details at the end of the boot block area - * at the start of the filesystem partition. If they have been - * overwritten by a boot block, we fail. But usually they are - * there and we can use them. - */ - if (ioctl(devfd, DIOCGSECTORSIZE, &secsize) == -1) - return (0); - fsrbuf = Balloc(secsize); - if (fsrbuf == NULL) - errx(EEXIT, "calcsb: cannot allocate recovery buffer"); - if (blread(devfd, fsrbuf, - (SBLOCK_UFS2 - secsize) / dev_bsize, secsize) != 0) { - free(fsrbuf); - return (0); - } - fsr = (struct fsrecovery *)&fsrbuf[secsize - sizeof *fsr]; - if (fsr->fsr_magic != FS_UFS2_MAGIC) { - free(fsrbuf); - return (0); - } - memset(fs, 0, sizeof(struct fs)); - fs->fs_fpg = fsr->fsr_fpg; - fs->fs_fsbtodb = fsr->fsr_fsbtodb; - fs->fs_sblkno = fsr->fsr_sblkno; - fs->fs_magic = fsr->fsr_magic; - fs->fs_ncg = fsr->fsr_ncg; - free(fsrbuf); - return (1); -} - /* * Check to see if recovery information exists. * Return 1 if it exists or cannot be created. From nobody Wed Oct 15 07:25:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmjKh0JgZz6Csbt; Wed, 15 Oct 2025 07:25: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 4cmjKg4x0Kz3RJH; Wed, 15 Oct 2025 07:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760513127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+kb0Wp1+QU42zulFckUxFavf8yJfiedoFCpvwEVGabg=; b=f7Lt+Y8GtPGiNUiv7r6HVD9TH9huxnX3zuXrD4mbisrPpU5pgQcVZHHxItPisB4b9ozgHN L5HRtv94wrRGh8JyWwiLefFW5FcPRGrZ4N1AVC/r19tO6ipS3Y/5cnLz/LVhOeMgNpQLcL aI1pdmEMd8uCOir1fdOx1sP6AAw0ZAIiTWqY3dnVWZ0M7q4d61z4dfAp2gwxQ/5xLFjCPC 7ZN0jXDMkQLnaZhOJrXRk68m9MbKh7/8KV1ytntoqU347xu9I0T/PKlOnFwFkDZpoFIo+I sKHC2MzLhdhxE4ERVxMDyYWiTfi5LFFpWengDK0yirgxYBI9k2WB5l3+js4jCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760513127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+kb0Wp1+QU42zulFckUxFavf8yJfiedoFCpvwEVGabg=; b=wZU6DJRnzMNN4ieD5GGYcusDSnofZ25b0iL/z+mHLCd5vOQireb+x8m3cVtbM2fTp1BkzA GtFUjA1459Acp+QvD5I5Nt/4F+/LJXvNObs/C3WS44PDfPeGuaDyampVqegIrZDAbkTKBy WZC5UU52189fkPnbdPOWsj55czI+GRcNg/zyfdXYTzPwQIcdull4MaKMpPxAhMY5Xc9CNq yCuNYAQ7MYGPHf2qXzH3lTFzArlBAth8l9G4+Ul7niCAh5CyTsx+HypW56mW74w7gHA/ps TTLSDcvjAjegwowKTsQkHxgH7AYth+t/jJPKsCx3M5O/ERVAxTtDMdRI7r9yRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760513127; a=rsa-sha256; cv=none; b=v/HU21dXYNWnPnd3zAkR/INcPXW1Qc894bXr8Y0bSX67DK34FhoAQG3BaPOlj8AUFBPn9T XBdYQaVuN8iVXzsaduJGgb3yaC8dFKz0bz4LDe+feyQiTefGurWOc74ErDJkUQrkFjNXDN 8Fys+XqGMMd4nT0703LqrcEba4NcG7DNHVzc08j1o36yLhnMZ2xZUN8Whj87k4oMF/EwWp JwjXRsmguLQB5tDRUc5HGVzDawb5hwMP5aWVQLGhoj1YXrnJf7BABWDh+PrAjSlPnePfTe UWQu61Ouo8vSbqjrdQfg2OIwJ5EwDR6kRkHOhUXkpMzqm1mZ417sO8u8Rhk34Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmjKg4NlYzCvQ; Wed, 15 Oct 2025 07:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59F7PRQ3072463; Wed, 15 Oct 2025 07:25:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F7PRrN072460; Wed, 15 Oct 2025 07:25:27 GMT (envelope-from git) Date: Wed, 15 Oct 2025 07:25:27 GMT Message-Id: <202510150725.59F7PRrN072460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: c44d2663a790 - main - rb tree: remove strict aliasing violations List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c44d2663a790b31bc1cd08958b45a661487c0287 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=c44d2663a790b31bc1cd08958b45a661487c0287 commit c44d2663a790b31bc1cd08958b45a661487c0287 Author: Ryan Libby AuthorDate: 2025-10-15 04:05:19 +0000 Commit: Ryan Libby CommitDate: 2025-10-15 06:44:47 +0000 rb tree: remove strict aliasing violations Rework internal RB macros to avoid assignments via type punned pointers. RB uses low order pointer bits to encode information (whether children are red), and was manipulating those values via (*(__uintptr_t *)&elm), which leads to strict aliasing warnings. In the kernel we use -fno-strict-aliasing, but this isn't necessarily the case in user space. This quiets thousands of -Wstrict-aliasing warnings in the user space build. Reported by: GCC -Wstrict-aliasing Reviewed by: dougm Discussed with: kib Differential Revision: https://reviews.freebsd.org/D52939 --- sys/sys/tree.h | 57 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/sys/sys/tree.h b/sys/sys/tree.h index c11bccfb387c..194ad505b038 100644 --- a/sys/sys/tree.h +++ b/sys/sys/tree.h @@ -334,10 +334,13 @@ struct { \ #define _RB_L ((__uintptr_t)1) #define _RB_R ((__uintptr_t)2) #define _RB_LR ((__uintptr_t)3) -#define _RB_BITS(elm) (*(__uintptr_t *)&elm) +#define _RB_BITS(elm) ((__uintptr_t)elm) #define _RB_BITSUP(elm, field) _RB_BITS(_RB_UP(elm, field)) -#define _RB_PTR(elm) (__typeof(elm)) \ - ((__uintptr_t)elm & ~_RB_LR) +#define _RB_PTR_OP(elm, op, dir) ((__typeof(elm)) \ + ((__uintptr_t)(elm) op (dir))) +#define _RB_PTR(elm) _RB_PTR_OP((elm), &, ~_RB_LR) +#define _RB_MOD_OR(elm, dir) ((elm) = _RB_PTR_OP((elm), |, (dir))) +#define _RB_MOD_XOR(elm, dir) ((elm) = _RB_PTR_OP((elm), ^, (dir))) #define RB_PARENT(elm, field) _RB_PTR(_RB_UP(elm, field)) #define RB_LEFT(elm, field) _RB_LINK(elm, _RB_L, field) @@ -346,8 +349,8 @@ struct { \ #define RB_EMPTY(head) (RB_ROOT(head) == NULL) #define RB_SET_PARENT(dst, src, field) do { \ - _RB_BITSUP(dst, field) = (__uintptr_t)src | \ - (_RB_BITSUP(dst, field) & _RB_LR); \ + _RB_UP(dst, field) = (__typeof(src))((__uintptr_t)src | \ + (_RB_BITSUP(dst, field) & _RB_LR)); \ } while (/*CONSTCOND*/ 0) #define RB_SET(elm, parent, field) do { \ @@ -546,12 +549,12 @@ name##_RB_INSERT_COLOR(struct name *head, \ elmdir = RB_RIGHT(parent, field) == elm ? _RB_R : _RB_L; \ if (_RB_BITS(gpar) & elmdir) { \ /* shorten the parent-elm edge to rebalance */ \ - _RB_BITSUP(parent, field) ^= elmdir; \ + _RB_MOD_XOR(_RB_UP(parent, field), elmdir); \ return (NULL); \ } \ sibdir = elmdir ^ _RB_LR; \ /* the other edge must change length */ \ - _RB_BITSUP(parent, field) ^= sibdir; \ + _RB_MOD_XOR(_RB_UP(parent, field), sibdir); \ if ((_RB_BITS(gpar) & _RB_LR) == 0) { \ /* both edges now short, retry from parent */ \ child = elm; \ @@ -583,11 +586,14 @@ name##_RB_INSERT_COLOR(struct name *head, \ RB_ROTATE(elm, child, elmdir, field); \ child_up = _RB_UP(child, field); \ if (_RB_BITS(child_up) & sibdir) \ - _RB_BITSUP(parent, field) ^= elmdir; \ + _RB_MOD_XOR(_RB_UP(parent, field), \ + elmdir); \ if (_RB_BITS(child_up) & elmdir) \ - _RB_BITSUP(elm, field) ^= _RB_LR; \ + _RB_MOD_XOR(_RB_UP(elm, field), \ + _RB_LR); \ else \ - _RB_BITSUP(elm, field) ^= elmdir; \ + _RB_MOD_XOR(_RB_UP(elm, field), \ + elmdir); \ /* if child is a leaf, don't augment elm, \ * since it is restored to be a leaf again. */ \ if ((_RB_BITS(child_up) & _RB_LR) == 0) \ @@ -656,7 +662,7 @@ name##_RB_REMOVE_COLOR(struct name *head, \ /* the rank of the tree rooted at elm shrank */ \ gpar = _RB_UP(parent, field); \ elmdir = RB_RIGHT(parent, field) == elm ? _RB_R : _RB_L; \ - _RB_BITS(gpar) ^= elmdir; \ + _RB_MOD_XOR(gpar, elmdir); \ if (_RB_BITS(gpar) & elmdir) { \ /* lengthen the parent-elm edge to rebalance */ \ _RB_UP(parent, field) = gpar; \ @@ -664,7 +670,7 @@ name##_RB_REMOVE_COLOR(struct name *head, \ } \ if (_RB_BITS(gpar) & _RB_LR) { \ /* shorten other edge, retry from parent */ \ - _RB_BITS(gpar) ^= _RB_LR; \ + _RB_MOD_XOR(gpar, _RB_LR); \ _RB_UP(parent, field) = gpar; \ gpar = _RB_PTR(gpar); \ continue; \ @@ -672,7 +678,7 @@ name##_RB_REMOVE_COLOR(struct name *head, \ sibdir = elmdir ^ _RB_LR; \ sib = _RB_LINK(parent, sibdir, field); \ up = _RB_UP(sib, field); \ - _RB_BITS(up) ^= _RB_LR; \ + _RB_MOD_XOR(up, _RB_LR); \ if ((_RB_BITS(up) & _RB_LR) == 0) { \ /* shorten edges descending from sib, retry */ \ _RB_UP(sib, field) = up; \ @@ -703,24 +709,29 @@ name##_RB_REMOVE_COLOR(struct name *head, \ /* elm is a 1-child. First rotate at elm. */ \ RB_ROTATE(sib, elm, sibdir, field); \ up = _RB_UP(elm, field); \ - _RB_BITSUP(parent, field) ^= \ - (_RB_BITS(up) & elmdir) ? _RB_LR : elmdir; \ - _RB_BITSUP(sib, field) ^= \ - (_RB_BITS(up) & sibdir) ? _RB_LR : sibdir; \ - _RB_BITSUP(elm, field) |= _RB_LR; \ + _RB_MOD_XOR(_RB_UP(parent, field), \ + (_RB_BITS(up) & elmdir) ? _RB_LR : elmdir); \ + _RB_MOD_XOR(_RB_UP(sib, field), \ + (_RB_BITS(up) & sibdir) ? _RB_LR : sibdir); \ + _RB_MOD_OR(_RB_UP(elm, field), _RB_LR); \ } else { \ if ((_RB_BITS(up) & elmdir) == 0 && \ RB_STRICT_HST && elm != NULL) { \ /* if parent does not become a leaf, \ do not demote parent yet. */ \ - _RB_BITSUP(parent, field) ^= sibdir; \ - _RB_BITSUP(sib, field) ^= _RB_LR; \ + _RB_MOD_XOR(_RB_UP(parent, field), \ + sibdir); \ + _RB_MOD_XOR(_RB_UP(sib, field), \ + _RB_LR); \ } else if ((_RB_BITS(up) & elmdir) == 0) { \ /* demote parent. */ \ - _RB_BITSUP(parent, field) ^= elmdir; \ - _RB_BITSUP(sib, field) ^= sibdir; \ + _RB_MOD_XOR(_RB_UP(parent, field), \ + elmdir); \ + _RB_MOD_XOR(_RB_UP(sib, field), \ + sibdir); \ } else \ - _RB_BITSUP(sib, field) ^= sibdir; \ + _RB_MOD_XOR(_RB_UP(sib, field), \ + sibdir); \ elm = sib; \ } \ \ From nobody Wed Oct 15 12:34:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmr9z64L2z6CJj4; Wed, 15 Oct 2025 12:34: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 4cmr9z5StQz44xH; Wed, 15 Oct 2025 12:34:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760531655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IbfSg/4P/GdmCiItnWdMC2AbvO1eSTBNp93HR29S6rc=; b=yx/WodZl+rSGN6KPjdyHdwRz51N771FQ7rUmD5yigZBTbffeI9Cz2MRfBFB3gFZI2euEPJ XtshZG1qbz1NxOoNMUS8wfUA4pA5BmF6v1xomEzQYR2EcnB/J0/AL+30rUUPv1RCLN2ITt yhGPsOvSlbLuC4XhqbUePbyolxF9H06zMyf3RGmwwLHiOS2cHs0QJervEe9b28eFb9qGYA virVskLXBc+kkrlrg+nzRAgTw3gxSugSkLUEWm7WOJeyWJhl2xHWWF/o8/pgak9JRuPagp ftshjTE3Pmz4qFICNZalrxbAlcM2ASXr5ORR0lW/5XY7Uri2XsWh10kO4lvzEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760531655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IbfSg/4P/GdmCiItnWdMC2AbvO1eSTBNp93HR29S6rc=; b=bjBtCpfUi0CphA9M/W2sdb8o2YmyJy6HLE5f6B0QXXJP4I58fhFIFCzIJofrPOKp1RUNBj 9uSi+Yj4+2gVVhOtAvavW7SCBggmxE2v4NT3jj7ekTexTM3KPS7+8jhmV66z7HrOx4PZET vzFax35T28MhLHyqNzVtYhuj2vdghnI6NlTcUOA7W8QWEW5nQesYP4DVprfWROremE6V1u 9j83cq18RFcXT4NIdVp7KvzOKdT3yJR8AsMgnZVYsU2s9gmh1ncW5zP84KE1HceC/EVarE W8f/UEnJazLFCXGf5072GzMPD9vkf+D0kiCYb2diR8zikK9dWDOPga6jimDubA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760531655; a=rsa-sha256; cv=none; b=xUQZHnNPZo9XAludE/RgfktkQTTQuigY2tOVNgOAKWMw6+8d1EG3K6CS70jlFzaerG6G0L GRrkjLsTdYa6z1WgKKh9BbmZcvNOIPVT/znyOF8K5BVyylc0KJTDwtJgi/qOhnUgipfJPh HQDoZC3+YQ5UxGuW4AkXa4/c/J2kpJ2Mw7mOkZqNql8ZUun83Vxa5NeGLcGr29vIn5Cf5M 0nDi6l3CljZzyIEN0Y0XovgTtEtU3qDYJRSwGO8d/+JjDQ8Ddw5tWQfcFYVGiF66FLeD6H x5shlOCjHsnog5At05sQnCHrP6xqoNhQH3Kdd849y6gcr42JGmLIM+9L/+/Luw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmr9z519qzfry; Wed, 15 Oct 2025 12:34:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FCYFvf055595; Wed, 15 Oct 2025 12:34:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FCYFtO055592; Wed, 15 Oct 2025 12:34:15 GMT (envelope-from git) Date: Wed, 15 Oct 2025 12:34:15 GMT Message-Id: <202510151234.59FCYFtO055592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: bf84861460f9 - main - packages: Rename unbound to local-unbound List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf84861460f9287fe9cf66b2cd22fefe8e242a28 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=bf84861460f9287fe9cf66b2cd22fefe8e242a28 commit bf84861460f9287fe9cf66b2cd22fefe8e242a28 Author: Lexi Winter AuthorDate: 2025-10-15 11:00:35 +0000 Commit: Lexi Winter CommitDate: 2025-10-15 12:29:18 +0000 packages: Rename unbound to local-unbound This more accurately reflects its purpose, and its contents, since everything in the package is prefixed with "local-". While here, add a message on upgrade about regenerating the config. MFC after: 3 seconds Requested by: des Reviewed by: des Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53056 --- UPDATING | 8 +++++++ etc/Makefile | 2 +- etc/mtree/BSD.var.dist | 4 ++-- lib/libunbound/Makefile | 6 ++--- libexec/rc/rc.d/Makefile | 2 +- .../ucl/{unbound-all.ucl => local-unbound-all.ucl} | 0 release/packages/ucl/local-unbound.ucl | 27 ++++++++++++++++++++++ usr.sbin/unbound/Makefile.inc | 2 +- 8 files changed, 43 insertions(+), 8 deletions(-) diff --git a/UPDATING b/UPDATING index 9c8bd3a9fd6b..ed49bd76e917 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20251015: + The "FreeBSD-unbound" package is renamed to "FreeBSD-local-unbound". + If you have set-optional or set-base installed, the new package will + be installed automatically, otherwise you should manually install the + new package and remove the old one. + + This change only affects pkgbase users. + 20251012: Blacklist has been renamed upstream to Blocklist. If you have it configured, rename all configuration files, firewall anchors or diff --git a/etc/Makefile b/etc/Makefile index 93d4b489ec7d..bda70b8af391 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -68,7 +68,7 @@ distribution: # install the /etc/unbound symlink, otherwise, don't overwrite the user's # existing symlink. if [ "${NO_ROOT:Dtrue}" = true -o ! -e ${DESTDIR}/etc/unbound ]; then \ - ${INSTALL_SYMLINK} -Tpackage=unbound ../var/unbound \ + ${INSTALL_SYMLINK} -Tpackage=local-unbound ../var/unbound \ ${DESTDIR}/etc/unbound; \ fi .endif diff --git a/etc/mtree/BSD.var.dist b/etc/mtree/BSD.var.dist index b3372196f5f9..b55c0150848e 100644 --- a/etc/mtree/BSD.var.dist +++ b/etc/mtree/BSD.var.dist @@ -104,8 +104,8 @@ vi.recover mode=01777 .. .. - unbound uname=unbound gname=unbound mode=0755 tags=package=unbound - conf.d uname=unbound gname=unbound mode=0755 tags=package=unbound + unbound uname=unbound gname=unbound mode=0755 tags=package=local-unbound + conf.d uname=unbound gname=unbound mode=0755 tags=package=local-unbound .. .. yp diff --git a/lib/libunbound/Makefile b/lib/libunbound/Makefile index e2cd25ea8b34..1a31e50e6416 100644 --- a/lib/libunbound/Makefile +++ b/lib/libunbound/Makefile @@ -1,4 +1,3 @@ -PACKAGE=lib${LIB} # Vendor sources and generated files LDNSDIR= ${SRCTOP}/contrib/ldns UNBOUNDDIR= ${SRCTOP}/contrib/unbound @@ -6,9 +5,10 @@ UNBOUNDDIR= ${SRCTOP}/contrib/unbound # Hold my beer and watch this .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/cachedb ${UNBOUNDDIR}/dns64 ${UNBOUNDDIR}/iterator ${UNBOUNDDIR}/sldns ${UNBOUNDDIR}/libunbound ${UNBOUNDDIR}/services ${UNBOUNDDIR}/services/cache ${UNBOUNDDIR}/util ${UNBOUNDDIR}/util/data ${UNBOUNDDIR}/respip ${UNBOUNDDIR}/util/storage ${UNBOUNDDIR}/validator -LIB= unbound +PACKAGE= local-unbound + +LIB= unbound PRIVATELIB= -PACKAGE= unbound CFLAGS+= -I${UNBOUNDDIR} -I${LDNSDIR} -I${.OBJDIR} -I${.CURDIR} CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 093da31ed787..3b7f45e8f101 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -294,7 +294,7 @@ SSHPACKAGE= ssh SSH= sshd CONFGROUPS.${MK_UNBOUND}+= UNBOUND -UNBOUNDPACKAGE= unbound +UNBOUNDPACKAGE= local-unbound UNBOUND= local_unbound CONFGROUPS.${MK_VI}+= VI diff --git a/release/packages/ucl/unbound-all.ucl b/release/packages/ucl/local-unbound-all.ucl similarity index 100% rename from release/packages/ucl/unbound-all.ucl rename to release/packages/ucl/local-unbound-all.ucl diff --git a/release/packages/ucl/local-unbound.ucl b/release/packages/ucl/local-unbound.ucl new file mode 100644 index 000000000000..0f1c77a0d0ee --- /dev/null +++ b/release/packages/ucl/local-unbound.ucl @@ -0,0 +1,27 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +messages = [ + { + type: upgrade + message: < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: bde703e8b6ab - main - ncurses: Add an ncurses-lib package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bde703e8b6ab3acc73bbb20f1ebe26221f33e9f1 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=bde703e8b6ab3acc73bbb20f1ebe26221f33e9f1 commit bde703e8b6ab3acc73bbb20f1ebe26221f33e9f1 Author: Lexi Winter AuthorDate: 2025-10-15 12:28:43 +0000 Commit: Lexi Winter CommitDate: 2025-10-15 12:29:28 +0000 ncurses: Add an ncurses-lib package Set LIB_PACKAGE= in lib/ncurses/Makefile.inc so the ncurses libraries go into the ncurses-lib subpackage rather than the base package. This means applications that depend on ncurses can be installed without needing to install the various utilities and manpages. This removes a dependency from runtime to ncurses (it now depends on ncurses-lib instead). MFC after: 3 seconds Reviewed by: kevans Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53060 --- lib/ncurses/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ncurses/Makefile.inc b/lib/ncurses/Makefile.inc index eea49908474c..e14867696834 100644 --- a/lib/ncurses/Makefile.inc +++ b/lib/ncurses/Makefile.inc @@ -1,6 +1,7 @@ # This is to include src/lib/Makefile.inc PACKAGE?= ncurses +LIB_PACKAGE= WARNS?= 3 .include "../Makefile.inc" From nobody Wed Oct 15 13:32:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsTH1F4Kz6CPCB; Wed, 15 Oct 2025 13:32:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmsTH0M4dz3Q3h; Wed, 15 Oct 2025 13:32:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760535155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZLJcWVzjfiXnZKJhMGJkGOKObqlTIs7WSWkseP6/p5w=; b=skOvgSXnurC1mI4DU1U73aVANjn7eFx0pYaI6YXC38QzrLlKYvY5NB12dxSwy6e05Y5S53 xIsmQI3yXiaKeLqxxKGHhrbueueMkfRlj6h15o+TPCXEgw76IA7e+k59xRoli39/NM9ZoN dxqPQ/k246v/9Jfg0Z2wI3nwPMaeP+ZZhBTQsDpTHb1p/t+V6RZeSpmXslz1jaCXQwLezJ wkXOiKm6m+REG/15xPjcWTVpZnSDSs7gfdw9XIF3aKDQyytLq3NL5DHMZ9RAnfXgWwnOFu cQn2DVB8hYrXjUEAXHX5U6yF33hzyxPoiZobDVjqMDdNlMlhnNXNfVdH7mv9pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760535155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZLJcWVzjfiXnZKJhMGJkGOKObqlTIs7WSWkseP6/p5w=; b=OFkcra9XoUcksKu+LWk1EdX73XvN4807BdGR6OCRORr3kdN+/Gb0UNXBRK7+p4S26SH0M6 /RJ2VdFdfsn0oubA6aVdR2HwG92Z8mwnKzwjv7P0xt92e3K1RYI7kTHkFzYRPTHPNYrlXD tRTU9AY2Z6Pq2VjNAS7FnNmugkssUoGz6ewMfAu2ndVOaowuS3lc6l8BthhGhd3UD9cVcZ HIdMYtFk+b2hPGzoMDQKE10X3SDYHca7yDn8nkhU1YFgF710xeqiyqrCEBJHhygntzBK2y S4D8opDAJ1o8c7T8hNUFXeQChNlCN1uxnGx5GO+yidjV03jkHum093Of7mrGug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760535155; a=rsa-sha256; cv=none; b=mw/VsNm6z//JmSQW1tIxU1IcWutzGm10hnSOKgCO6iY03HFTqXDTfaEp2zkl6WyLJJzdfB Ae+hJ+guewI8vWL6dFfksIIx9q6Cldcb4OcRuumEDIOkM51wMgbYUXAWIX8Xq00Zx2zhFO +mkp21HM8TeCJFfd6QSf/NzaiaeNswG7Da7U1gKiEWWLEcXFgpNfeRJf2ZCjzef04ypUY2 eriWBUKLkPBgqciBdtaFOcnOy/3aT16ik/xkb+KTMc2b39vt+07uY4Hbyb5+EEumUphtWF OPKOmSbFTAk1zkiEtlsFn+gjFyAcWtCW9jirO9LuvuHYP/LWJfKFITOOerRrHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmsTG6nW3zgkq; Wed, 15 Oct 2025 13:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FDWYcK068543; Wed, 15 Oct 2025 13:32:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDWYWH068540; Wed, 15 Oct 2025 13:32:34 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:32:34 GMT Message-Id: <202510151332.59FDWYWH068540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 9c82c17c2a3a - main - openssh: blocklist: Remove non async-signal safe probe List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c82c17c2a3ac61a69cb5337cb6f92ae88bc0b08 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=9c82c17c2a3ac61a69cb5337cb6f92ae88bc0b08 commit 9c82c17c2a3ac61a69cb5337cb6f92ae88bc0b08 Author: Jose Luis Duran AuthorDate: 2025-10-15 13:29:30 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-15 13:31:44 +0000 openssh: blocklist: Remove non async-signal safe probe BLOCKLIST_NOTIFY() is called within a signal handler for the alarm after the grace period has expired that may only take async-signal safe actions. Reviewed by: emaste Fixes: e02003bce726 ("openssh: blocklist: Use NetBSD probes") MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D53109 --- crypto/openssh/sshd-session.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/crypto/openssh/sshd-session.c b/crypto/openssh/sshd-session.c index e8299c254567..ca35790149ac 100644 --- a/crypto/openssh/sshd-session.c +++ b/crypto/openssh/sshd-session.c @@ -217,8 +217,6 @@ mm_is_monitor(void) static void grace_alarm_handler(int sig) { - BLOCKLIST_NOTIFY(the_active_state, BLOCKLIST_AUTH_FAIL, - "Grace period expired"); /* * Try to kill any processes that we have spawned, E.g. authorized * keys command helpers or privsep children. From nobody Wed Oct 15 15:32:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmw7q3jS5z6CYK1; Wed, 15 Oct 2025 15:32: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 4cmw7q3BK7z3l1N; Wed, 15 Oct 2025 15:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760542359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eZvp9Ma2f4bqhwG8xnj5U38IAzVYsjnEUrq0hBSR/x4=; b=RYvK+HWZxBLxFHS/3PgURxUKTnzk7yWfZVotW9Ddgcj7oGkNHltbFBQUGSmha3JsJgSWHQ vt0q/IDLLTcCKbucmy3NumuUmB24NTi1bt6x6B3M56vQrvz8gQGpUtABmHNVPvksjcEAkV y/drF9SA+4Kv3EmA3XbMVcxT9hZ+B1Fx9NBhYE9eXriJjWUuFulY7VUvvRSCoP80vrlz4w TXPqGAgH14h9bUDcYC4u0wE9mWCC42OEBKWmwzj+JsoSUgutS7GTn3C1CByFr5H1fFNb13 TUM+3MP62z/aYVl2lOF9uX828c+nVVKfhHOvpU4odyo6fb8pkkTSi46bT/To8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760542359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eZvp9Ma2f4bqhwG8xnj5U38IAzVYsjnEUrq0hBSR/x4=; b=ABJ028hyhrh9073J8LH1mwYPcA2fYN9OfLTVOakTSDNdyjThBSD1y7fxOUW1suo4yeGrOP bLtJhM6UAgG21/nexDVVBZIw2pETZVGF3hLIWxQHMyfRuD+AKiSeeAQjxvWF9bSZ/pOfw2 e6JrMtbol/xESV6Ji13DBAogI4lLQLDxVZqN9tByNOi3mr8GQf+TrruIll99eBu7KTVHYn uA2VCZXiZLggwB0kEjMYoOkH7VeGJJSItbXjvawwfHm03pHm2VPrkF7xFRok3q6g3OwL9B mIZ7+WVsKX4tlSQIy2rm4ZBqMLK26MBaPyR0PYPtk+hbhDZN7KVMvY9uZ0HWqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760542359; a=rsa-sha256; cv=none; b=D70809l7lgu84Gj0Duv5jQ1+IKIXStoIRV98boOF0T1jh7DpQbgd3N+0eKSxqPZpoGluhi hDgcGD/Fc4qOpP2cnhAzQHoxi9cpP1+ChJXxE5Z7CxAtnptncydZy6zIfjh3GqJC9FMPzS tDnFuAUB8YUTSTDPU6JsBchziKmizxC62HCINe5FBNK6GR7TB+C7H7aRd06dNyf0WDCGdb ZZ1jscCS7uEV01P3S50jT1CnbJhzPG3C1CYGzjLcMO61x1kbVDLIyP3XnqzIE+DAM2RhGb Oo4qcC+iimmt3g2woN3o6hVzyDEK9UvciDDV8KY6e72dOmNIZ+TTBUs1rD12mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmw7q2hCvzlS4; Wed, 15 Oct 2025 15:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FFWdWw094685; Wed, 15 Oct 2025 15:32:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FFWdSp094682; Wed, 15 Oct 2025 15:32:39 GMT (envelope-from git) Date: Wed, 15 Oct 2025 15:32:39 GMT Message-Id: <202510151532.59FFWdSp094682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2976a7ce2e9b - main - libpam: Add newline at EOF in modules.inc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2976a7ce2e9b0ba1f59601218583c6330776f401 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2976a7ce2e9b0ba1f59601218583c6330776f401 commit 2976a7ce2e9b0ba1f59601218583c6330776f401 Author: Ed Maste AuthorDate: 2025-10-15 15:30:43 +0000 Commit: Ed Maste CommitDate: 2025-10-15 15:32:07 +0000 libpam: Add newline at EOF in modules.inc --- lib/libpam/modules/modules.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libpam/modules/modules.inc b/lib/libpam/modules/modules.inc index f3ab65333f4f..1e9eb8970317 100644 --- a/lib/libpam/modules/modules.inc +++ b/lib/libpam/modules/modules.inc @@ -30,4 +30,4 @@ MODULES += pam_ssh .endif MODULES += pam_tacplus MODULES += pam_unix -MODULES += pam_xdg \ No newline at end of file +MODULES += pam_xdg From nobody Wed Oct 15 17:32:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmynm71xRz6CjY2; Wed, 15 Oct 2025 17:32: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 4cmynm5Tytz41W5; Wed, 15 Oct 2025 17:32:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760549532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wgbxkwHKxk7PfcBrKL8ioH590FkoOXPwNzGKoS8Xc1k=; b=Nn5C+RIV+Zf7oMQCy8oTJgsnP6C+DeLvttmLCLSJ+dZ3u5XSJLdEGajX1JJ0R3BEU6HQ+8 uuH/R0uQOz/IqgCP9ev9RpN5rj3o+Je1K27r/Nr0dUn4sJyqNNwPNJMS7IvLgeJ0bhcwUO UqPof77OKrTonk95Pd5s8KMhasx0OD0d10/cu1c205eFXpzHG6s/4tG7kHV6DCDx5Bmn0f YdpClN7Lpw0Fd4lVfLj+2QFmlWYG2pvVIhjz5bM6Hs8dxfeBXEwU8WgIpimlZMYh6F0s0E U+q6j3oDCnDhi+2rAWn5WRSjpx9eYNQaMuvNYwiOuvLP3Fkh+Np+NWZzuDjK2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760549532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wgbxkwHKxk7PfcBrKL8ioH590FkoOXPwNzGKoS8Xc1k=; b=iqrjvHYxEXMsmfJIhYqMwYqf9flpzBeMUpi5ZD/wlH7XD8ofhVc2HBKFm0F2lb9jwOzp1N EPAKl18Acaqs2gZg24UAtInoANb42sImvzVoW/qhE8G06Ph+GFxNpTft2STBlsS+I7mNFB vCe/470LzjygIFMKgVb7staA8xlLGNCGBY2rRJPnzyHyydUdBZ/lbewiRk+vwJ6xxUWGmU EYkeFF4X/r894eL+mclh3eYMi84Ek34/C0XXklRknsmHQZrpc8KX3XgtvxlxZu/n94q6If 9uTouD1kHJv95kYUzNepXN6srs6pWdYZw1t+zlO6XLyfUHqcG4BqVC0xjy7t4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760549532; a=rsa-sha256; cv=none; b=WDa4bup7vTbF4qRcxOdrt0RZWgU9gEGIHTgQD2ddEi9Z6IHYkgblPDLfAIYH1xtYqJajdd Af3+nJt66J/IOJh2D2CnGw7zWIEAyvvJNAki7JQA+JvA7js9u/hJb4rt1MENt3U9Sn8EGm 5Y8kH8lWQi/XtiYCfQj/xtt1JH1SHYl1wVXDsPXx/Kl0qRwHkssTF3jTCsE594MMnoLsa4 7/5GcWnQoPq6rwx2zQ4yYtdb/eIYDmloP57is5APowbZUwzJQk5VAAtlILeX47NGuNPWJL h31QTTYNgI9NuCt07Gel3dyjKUqnziFdkrc9qQVNEyHZQzpHatRjLwailsntbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmynm50nwzpS9; Wed, 15 Oct 2025 17:32:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FHWCor021548; Wed, 15 Oct 2025 17:32:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FHWCnJ021545; Wed, 15 Oct 2025 17:32:12 GMT (envelope-from git) Date: Wed, 15 Oct 2025 17:32:12 GMT Message-Id: <202510151732.59FHWCnJ021545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 52f9722e6fff - main - bsdinstall: Limit default swap to maximum supported by kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52f9722e6ffff6fee309e6040b7b5313499a03ef Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=52f9722e6ffff6fee309e6040b7b5313499a03ef commit 52f9722e6ffff6fee309e6040b7b5313499a03ef Author: Ed Maste AuthorDate: 2023-03-06 20:24:05 +0000 Commit: Ed Maste CommitDate: 2025-10-15 16:29:56 +0000 bsdinstall: Limit default swap to maximum supported by kernel PR: 251993 Reviewed by: cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53106 --- usr.sbin/bsdinstall/partedit/part_wizard.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c index 90a8da1c3c9b..9146a2af782f 100644 --- a/usr.sbin/bsdinstall/partedit/part_wizard.c +++ b/usr.sbin/bsdinstall/partedit/part_wizard.c @@ -27,6 +27,7 @@ */ #include +#include #include #include @@ -34,6 +35,7 @@ #include #include #include +#include #include #include @@ -41,10 +43,29 @@ #include "partedit.h" #define MIN_FREE_SPACE (1023*1024*1024) /* Just under 1 GB */ -#define SWAP_SIZE(available) MIN(available/20, 4*1024*1024*1024LL) static char *wizard_partition(struct gmesh *mesh, const char *disk); +/* + * Determine default swap (partition) size in bytes for a given amount of free + * disk space in bytes. The algorithm should likely be revisited in light of + * contemporary memory and disk sizes. + */ +static intmax_t +swap_size(intmax_t available) +{ + intmax_t swapsize; + unsigned long swap_maxpages; + size_t sz; + + swapsize = MIN(available/20, 4*1024*1024*1024LL); + sz = sizeof(swap_maxpages); + if (sysctlbyname("vm.swap_maxpages", &swap_maxpages, &sz, NULL, 0) == 0) + swapsize = MIN(swapsize, (intmax_t)swap_maxpages * getpagesize()); + + return (swapsize); +} + int part_wizard(const char *fsreq) { @@ -383,7 +404,7 @@ wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, return (!retval); /* Editor -> return 0 */ } - swapsize = SWAP_SIZE(available); + swapsize = swap_size(available); humanize_number(swapsizestr, 7, swapsize, "B", HN_AUTOSCALE, HN_NOSPACE | HN_DECIMAL); humanize_number(rootsizestr, 7, available - swapsize - 1024*1024, From nobody Wed Oct 15 17:39:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmyyH0BDJz6Ck9v; Wed, 15 Oct 2025 17:39: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 4cmyyG6Ksyz42LB; Wed, 15 Oct 2025 17:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760549974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWaz3BNSNLzzTTH4r9Kp9tJqIrzsav/vsNvsw2nUyZg=; b=fe78qm64YbktIlxWuIlytOk07zSbUi8TvpHOecXoMv53qxQOXCSF9zeZpBTpjZCTW8Ls20 nYxwlt1aYMWW8ci/0RUhHefil9p2kP3GIZ8eZKWwE2aNbKcQ8t+URmgpJXfuJvScQwl5td GnZJ+XdyN2yhqqrTMDGol99MLWP+rQqFOyYCYGDdxxg6SaMOrxSjGBhBYzIXj3fpM0sr2S 076e6Y090PTTD+MfBhKYs1VKccX3s7pW0co5u2sQUR84nKV1wLi6bE2s3cMMkOxgS1T9Rz 9EXxjyrAzOa3t3x0D9jPuN6TeTs8kpxpyQu+li0ElI0H5HITbHEt2z2o5zfOxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760549974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWaz3BNSNLzzTTH4r9Kp9tJqIrzsav/vsNvsw2nUyZg=; b=cIuqRJ/pOAAVp0vAzMBln9zNgy3O15U8dVdG24RN5qhwc2gD6KuTSfcQiY9X0U3qd6L04r sdfpZbEE7/jAGakIgTH031Io01iwfLCPWdHi4runT5d68CtyYyfr2f1swaUbCxx4FKImCW jkRsVuw/DkiNl/IK9QqzS4ZTENxyMv2Wk2w5i+eFZY5SEJCLvIVBbKLnFgF4bwPttCvSQ2 D9SEBztAW3JloJxIR7xrdJjGtoFYPaL8uFOhr2wB9PXGP6qLAiIh1TwP+3cCiK+kHNw0Ck w3hFBQe91v8KbI4Ao6Y6i+7QHieYQnU4wjQmA/c4d7ntX4Nvz1yKrA8HqmkQ6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760549974; a=rsa-sha256; cv=none; b=DtfyjXcRwcIZetEgHTn1vbX2WSl6jcYLbwVhxAGsjIMafFPBcPqhbuu2jBf+1mw66h1GfM 9J9fYhFM0sjVws3XijkvvS6z/Ufv6M/dfGQvJuVg3UZ2MREzTaoCJHasmJ/OneLQXHexGr Xu7IZWz3sPBU2vtTlA1ulpMRDpOsEql5kP5I3Yi7Fv3MJoD8wiszgeScKqEB5lx0r+vYTS 1XsqUHiMMhD9dUYXNIJtgxvDKo7ISlrzdJQ6/HFhf78+DUjrmRuf1NqQYBUuir8MuJzxyr Ax+B+b4xd3kAeIul158/6PGx/QZohsmlV3rP6yKy7RRJY6+m8HHBAADD35aPJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmyyG5mTRzpPk; Wed, 15 Oct 2025 17:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FHdYgD023821; Wed, 15 Oct 2025 17:39:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FHdYvA023818; Wed, 15 Oct 2025 17:39:34 GMT (envelope-from git) Date: Wed, 15 Oct 2025 17:39:34 GMT Message-Id: <202510151739.59FHdYvA023818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: f8b76ec4cac7 - main - tests/hpts: provide stub KTEST module compiled without TCP_HPTS_KTEST List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8b76ec4cac745fcb1659e1ae34033a777d35a40 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f8b76ec4cac745fcb1659e1ae34033a777d35a40 commit f8b76ec4cac745fcb1659e1ae34033a777d35a40 Author: Nick Banks AuthorDate: 2025-10-15 17:37:07 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 17:37:07 +0000 tests/hpts: provide stub KTEST module compiled without TCP_HPTS_KTEST This will close a panic on test run when kernel is compiled without HPTS KTEST support. --- sys/netinet/tcp_hpts_test.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/netinet/tcp_hpts_test.c b/sys/netinet/tcp_hpts_test.c index bab5827e0572..c5dc9cb5b03b 100644 --- a/sys/netinet/tcp_hpts_test.c +++ b/sys/netinet/tcp_hpts_test.c @@ -27,6 +27,7 @@ #include #include +#include "opt_inet.h" #include #include #include @@ -119,6 +120,8 @@ SYSCTL_INT(_net_inet_tcp_hpts_test, OID_AUTO, exit_on_failure, CTLFLAG_RW, } \ } while (0) +#ifdef TCP_HPTS_KTEST + static void dump_hpts_entry(struct ktest_test_context *ctx, struct tcp_hpts_entry *hpts) { @@ -1658,5 +1661,22 @@ static const struct ktest_test_info tests[] = { KTEST_INFO(generation_count_validation), }; +#else /* TCP_HPTS_KTEST */ + +/* + * Stub to indicate that the TCP HPTS ktest is not enabled. + */ +KTEST_FUNC(module_load_without_tests) +{ + KTEST_LOG(ctx, "Warning: TCP HPTS ktest is not enabled"); + return (0); +} + +static const struct ktest_test_info tests[] = { + KTEST_INFO(module_load_without_tests), +}; + +#endif + KTEST_MODULE_DECLARE(ktest_tcphpts, tests); KTEST_MODULE_DEPEND(ktest_tcphpts, tcphpts); From nobody Wed Oct 15 18:55:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn0dx3FSRz6CqCq; Wed, 15 Oct 2025 18:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cn0dx2c0Rz4FG4; Wed, 15 Oct 2025 18:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aJque+3pHz58MdmGt8N+SsyezbvbVLoe3a2Y+blfpFI=; b=kkJ9QSU/O6pGIs0R7jb2l0mODfW42u2xmpxIUKE6kaQk60XhHH0lHk3CBtvUsqiGqoIDKT D5m+F2bFPdLJNZ090NrVqb1BjQLXyRwV+tyQsKMikOyNu+T2dD11qw198l/n6wtu/HHN9y k+r0EbV5yU+NoJj/aiUhKirTGGK2e/V+rZWkFYhUa7KkRoG74b/WVUVDubpo/IjqmBJDLC Jws5UrQjMHta1HPo6tdwZX8bIWWnXt4pudO9m4y0GxMoV78kCJuRcztuQLayZSi/KhUFio 9i5FnqOKEiDn9PPBngJicmT22DCE3IcUS9otsbtW+qwL0pPtkWfLIsAndx1MYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aJque+3pHz58MdmGt8N+SsyezbvbVLoe3a2Y+blfpFI=; b=e5TUfESa4+15BPtGeyH+2mpLzflK2+4tsYKafVOSmNobLxIfitT/VJ1rozJzHVLagY0HJi einV6yXFCF4ZtSqEimIRG9w/Hpg7M+DPARGM8+zkzx1jYRy/YK28nKr4E+WGp//FcmTVsj V6a8fUKLzPxt7np/uo1wgOE0smEwGRn5Bzh6USrR2zNVH+/6+NbAslRCEJEPyIe31aR5BY IjbShIldlequLWn+FQNBuF8Yl283oa2MHUhCLTQKFb5dETGoozG2qw2ODB5Z5MKU4jNbzH 2+bUCuDQfoNN+H4rl3XKVYbx6imTurpsHcO5HfGUFBQXyfUZ3EO90pskbmD0tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760554533; a=rsa-sha256; cv=none; b=fd3USw2E7PUBa8zr9zPytShycDGoO6C2wM+SR0vXtY65usLmL1VU/gcQ7Iy9FBENZJCyLD FHeUsz4INgw71xKwzGq2Bz4oLHdUFfMtacuqrP8dqzejoJi4/cQgC2fTFUfDi/DjjFLw9S ZhxP55f/w969puXdx+KUl5+OKjeMKJ40ZjGeMcFZ22UL9LKZearwFiOTRCHKkEGFM1QkPy B1IpIFMckqYXGmBh/1eZvPucBlooICE9EE+Qw25zLE8Motf5GVfZfM4E0m2r/BW70kYm1b UTL+0mXdJvOPITpOKzFq0HylnirpSSaQShGYKYk31lA4xw+PElXICMxRJzxrBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn0dx1yR4zqN2; Wed, 15 Oct 2025 18:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FItXca072784; Wed, 15 Oct 2025 18:55:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FItXxP072781; Wed, 15 Oct 2025 18:55:33 GMT (envelope-from git) Date: Wed, 15 Oct 2025 18:55:33 GMT Message-Id: <202510151855.59FItXxP072781@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: be7bdb1cf0b0 - main - netinet: do route lookup when asked to join multicast group on ifindex 0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be7bdb1cf0b0f665bcd57c03fde41bd6c01d8ead Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=be7bdb1cf0b0f665bcd57c03fde41bd6c01d8ead commit be7bdb1cf0b0f665bcd57c03fde41bd6c01d8ead Author: Gleb Smirnoff AuthorDate: 2025-10-15 18:54:57 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 18:54:57 +0000 netinet: do route lookup when asked to join multicast group on ifindex 0 The code to do the route lookup was already there, but was used only for the legacy IP_ADD_MEMBERSHIP when called without index. Do same lookup for IP_ADD_MEMBERSHIP with index and what is more important for MCAST_JOIN_GROUP, if the supplied index is 0. This is a neat feature and Linux does that, so this should make a few applications easier portable to FreeBSD. Differential Revision: https://reviews.freebsd.org/D52918 --- sys/netinet/in_mcast.c | 113 ++++++++++++++-------------------- tests/sys/netinet/multicast-receive.c | 16 +++-- tests/sys/netinet/multicast.sh | 47 ++++++++++++++ 3 files changed, 104 insertions(+), 72 deletions(-) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index f5b20c49ffd2..ba112afbf002 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -159,9 +159,6 @@ static struct ip_moptions * static int inp_get_source_filters(struct inpcb *, struct sockopt *); static int inp_join_group(struct inpcb *, struct sockopt *); static int inp_leave_group(struct inpcb *, struct sockopt *); -static struct ifnet * - inp_lookup_mcast_ifp(const struct inpcb *, - const struct sockaddr_in *, const struct in_addr); static int inp_block_unblock_source(struct inpcb *, struct sockopt *); static int inp_set_multicast_if(struct inpcb *, struct sockopt *); static int inp_set_source_filters(struct inpcb *, struct sockopt *); @@ -1832,69 +1829,55 @@ inp_getmoptions(struct inpcb *inp, struct sockopt *sopt) } /* - * Look up the ifnet to use for a multicast group membership, - * given the IPv4 address of an interface, and the IPv4 group address. - * - * This routine exists to support legacy multicast applications - * which do not understand that multicast memberships are scoped to - * specific physical links in the networking stack, or which need - * to join link-scope groups before IPv4 addresses are configured. - * - * Use this socket's current FIB number for any required FIB lookup. - * If ina is INADDR_ANY, look up the group address in the unicast FIB, - * and use its ifp; usually, this points to the default next-hop. - * - * If the FIB lookup fails, attempt to use the first non-loopback - * interface with multicast capability in the system as a - * last resort. The legacy IPv4 ASM API requires that we do - * this in order to allow groups to be joined when the routing - * table has not yet been populated during boot. - * - * Returns NULL if no ifp could be found, otherwise return referenced ifp. + * Look up the ifnet to join a multicast group membership via legacy + * IP_ADD_MEMBERSHIP or via more modern MCAST_JOIN_GROUP. * - * FUTURE: Implement IPv4 source-address selection. + * If the interface index was specified explicitly, just use it. If the + * address was specified (legacy), try to find matching interface. Else + * (index == 0 && no address) do a route lookup. If that fails for a modern + * MCAST_JOIN_GROUP return failure, for legacy IP_ADD_MEMBERSHIP find first + * multicast capable interface. */ static struct ifnet * -inp_lookup_mcast_ifp(const struct inpcb *inp, - const struct sockaddr_in *gsin, const struct in_addr ina) +inp_lookup_mcast_ifp(const struct inpcb *inp, const struct in_addr maddr, +const struct in_addr *ina, const u_int index) { struct ifnet *ifp; struct nhop_object *nh; NET_EPOCH_ASSERT(); - KASSERT(inp != NULL, ("%s: inp must not be NULL", __func__)); - KASSERT(gsin->sin_family == AF_INET, ("%s: not AF_INET", __func__)); - KASSERT(IN_MULTICAST(ntohl(gsin->sin_addr.s_addr)), - ("%s: not multicast", __func__)); - ifp = NULL; - if (!in_nullhost(ina)) { - INADDR_TO_IFP(ina, ifp); + if (index != 0) + return (ifnet_byindex_ref(index)); + + if (ina != NULL && !in_nullhost(*ina)) { + INADDR_TO_IFP(*ina, ifp); if (ifp != NULL) if_ref(ifp); - } else { - nh = fib4_lookup(inp->inp_inc.inc_fibnum, gsin->sin_addr, 0, NHR_NONE, 0); - if (nh != NULL) { - ifp = nh->nh_ifp; - if_ref(ifp); - } else { - struct in_ifaddr *ia; - struct ifnet *mifp; - - mifp = NULL; - CK_STAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { - mifp = ia->ia_ifp; - if (!(mifp->if_flags & IFF_LOOPBACK) && - (mifp->if_flags & IFF_MULTICAST)) { - ifp = mifp; - if_ref(ifp); - break; - } + return (ifp); + } + + nh = fib4_lookup(inp->inp_inc.inc_fibnum, maddr, 0, NHR_NONE, 0); + if (nh != NULL) { + ifp = nh->nh_ifp; + if_ref(ifp); + return (ifp); + } + + if (ina != NULL) { + struct in_ifaddr *ia; + + CK_STAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { + if (!(ia->ia_ifp->if_flags & IFF_LOOPBACK) && + (ia->ia_ifp->if_flags & IFF_MULTICAST)) { + ifp = ia->ia_ifp; + if_ref(ifp); + return (ifp); } } } - return (ifp); + return (NULL); } /* @@ -1926,13 +1909,13 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt) switch (sopt->sopt_name) { case IP_ADD_MEMBERSHIP: { struct ip_mreqn mreqn; + bool mreq; - if (sopt->sopt_valsize == sizeof(struct ip_mreqn)) - error = sooptcopyin(sopt, &mreqn, - sizeof(struct ip_mreqn), sizeof(struct ip_mreqn)); - else - error = sooptcopyin(sopt, &mreqn, - sizeof(struct ip_mreq), sizeof(struct ip_mreq)); + mreq = (sopt->sopt_valsize != sizeof(struct ip_mreqn)); + + error = sooptcopyin(sopt, &mreqn, + mreq ? sizeof(struct ip_mreq) : sizeof(struct ip_mreqn), + mreq ? sizeof(struct ip_mreq) : sizeof(struct ip_mreqn)); if (error) return (error); @@ -1943,12 +1926,9 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt) return (EINVAL); NET_EPOCH_ENTER(et); - if (sopt->sopt_valsize == sizeof(struct ip_mreqn) && - mreqn.imr_ifindex != 0) - ifp = ifnet_byindex_ref(mreqn.imr_ifindex); - else - ifp = inp_lookup_mcast_ifp(inp, &gsa->sin, - mreqn.imr_address); + ifp = inp_lookup_mcast_ifp(inp, mreqn.imr_multiaddr, + mreq ? &mreqn.imr_address : NULL, + mreq ? 0 : mreqn.imr_ifindex); NET_EPOCH_EXIT(et); break; } @@ -1971,8 +1951,8 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt) ssa->sin.sin_addr = mreqs.imr_sourceaddr; NET_EPOCH_ENTER(et); - ifp = inp_lookup_mcast_ifp(inp, &gsa->sin, - mreqs.imr_interface); + ifp = inp_lookup_mcast_ifp(inp, mreqs.imr_multiaddr, + &mreqs.imr_interface, 0); NET_EPOCH_EXIT(et); CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", __func__, ntohl(mreqs.imr_interface.s_addr), ifp); @@ -2013,7 +1993,8 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt) return (EINVAL); NET_EPOCH_ENTER(et); - ifp = ifnet_byindex_ref(gsr.gsr_interface); + ifp = inp_lookup_mcast_ifp(inp, gsa->sin.sin_addr, NULL, + gsr.gsr_interface); NET_EPOCH_EXIT(et); if (ifp == NULL) return (EADDRNOTAVAIL); diff --git a/tests/sys/netinet/multicast-receive.c b/tests/sys/netinet/multicast-receive.c index 81d0f10f5cfe..62fc68200dd6 100644 --- a/tests/sys/netinet/multicast-receive.c +++ b/tests/sys/netinet/multicast-receive.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -93,8 +94,9 @@ usage: .imr_multiaddr = maddr, .imr_interface = ifaddr, }; - assert(setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, - sizeof(mreq)) == 0); + if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, + sizeof(mreq)) != 0) + err(EX_OSERR, "setsockopt"); } else if (strcmp(argv[1], "ip_mreqn") == 0) { /* * ip_mreqn shall be used with index, but for testing @@ -105,8 +107,9 @@ usage: .imr_address = index ? (struct in_addr){ 0 } : ifaddr, .imr_ifindex = index ? ifindex : 0, }; - assert(setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreqn, - sizeof(mreqn)) == 0); + if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreqn, + sizeof(mreqn)) != 0) + err(EX_OSERR, "setsockopt"); } else if (strcmp(argv[1], "group_req") == 0) { if (!index) errx(1, "group_req expects index"); @@ -116,8 +119,9 @@ usage: gsa->sin_family = AF_INET; gsa->sin_len = sizeof(struct sockaddr_in); gsa->sin_addr = maddr; - assert(setsockopt(s, IPPROTO_IP, MCAST_JOIN_GROUP, &greq, - sizeof(greq)) == 0); + if (setsockopt(s, IPPROTO_IP, MCAST_JOIN_GROUP, &greq, + sizeof(greq)) != 0) + err(EX_OSERR, "setsockopt"); } else goto usage; diff --git a/tests/sys/netinet/multicast.sh b/tests/sys/netinet/multicast.sh index 273970d0f7ea..34094ff08705 100755 --- a/tests/sys/netinet/multicast.sh +++ b/tests/sys/netinet/multicast.sh @@ -79,6 +79,27 @@ IP_ADD_MEMBERSHIP_ip_mreq_body() 0.0.0.0 6676 233.252.0.1 6676 192.0.3.1 hello atf_check -s exit:0 sh -c "wait $pid; exit $?" atf_check -s exit:0 -o inline:"192.0.3.1:6676 hello\n" cat out + + # join group on the first multicast capable interface (epair1a) + multicast_join ip_mreq 0.0.0.0 + atf_check -s exit:0 -o empty \ + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 192.0.2.1 hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out + + # Set up the receiving jail so that first multicast capable interface + # is epair1a and default route points into epair2a. This will allow us + # to exercise both branches of inp_lookup_mcast_ifp(). + jexec mjail2 route add default 192.0.3.254 + + # join group on the interface determined by the route lookup + multicast_join ip_mreq 0.0.0.0 + atf_check -s exit:0 -o empty \ + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 192.0.3.1 hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.3.1:6676 hello\n" cat out } IP_ADD_MEMBERSHIP_ip_mreq_cleanup() { @@ -111,6 +132,19 @@ IP_ADD_MEMBERSHIP_ip_mreqn_body() 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello atf_check -s exit:0 sh -c "wait $pid; exit $?" atf_check -s exit:0 -o inline:"192.0.3.1:6676 hello\n" cat out + + # try to join group on the interface determined by the route lookup + atf_check -s exit:71 -e inline:"multicast-receive: setsockopt: Can't assign requested address\n" \ + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + ip_mreqn 233.252.0.1 6676 0 + # add route and try again + jexec mjail2 route add default 192.0.3.254 + multicast_join ip_mreqn 0 + atf_check -s exit:0 -o empty \ + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 192.0.3.1 hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.3.1:6676 hello\n" cat out } IP_ADD_MEMBERSHIP_ip_mreqn_cleanup() { @@ -143,6 +177,19 @@ MCAST_JOIN_GROUP_body() 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello atf_check -s exit:0 sh -c "wait $pid; exit $?" atf_check -s exit:0 -o inline:"192.0.3.1:6676 hello\n" cat out + + # try to join group on the interface determined by the route lookup + atf_check -s exit:71 -e inline:"multicast-receive: setsockopt: Can't assign requested address\n" \ + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + group_req 233.252.0.1 6676 0 + # add route and try again + jexec mjail2 route add default 192.0.3.254 + multicast_join group_req 0 + atf_check -s exit:0 -o empty \ + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 192.0.3.1 hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.3.1:6676 hello\n" cat out } MCAST_JOIN_GROUP_cleanup() { From nobody Wed Oct 15 18:55:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn0dy4sDGz6CqcH; Wed, 15 Oct 2025 18:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cn0dy46NGz4F5g; Wed, 15 Oct 2025 18:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g+2KafZBQj+L1Rj1xtREf01TvACepJQPYNmID9a2s7s=; b=WDBRy3JXBklRzEigWdssd81TYliE4axmNQIgpXH5H/iQpoNL/Mt9YLt3B70ZJcIiRsuzf8 5Ym1Z4NBEuxHUzgHAqzYyG2/UgB8vIc2IvknyIFNi6VMw4xxV89lHa6nc95SQWNyFetS7w XrS9P3Fh6xZPJp51MSpitXDJCJ0q+gPtK2UVYzmUxQWbINRvN4RYN38Ck4ASta+6jXlej+ 3gAlfXfN3MF2keLG44Gv9wjVKGKIgeHNEG3jWaa5HAHepUX+AwkBrv3KmE7DJaIYowQwW+ Ilj5xkYmiqsKTouieOwqrpVLyT0YiN4AV6X/eeKuzXQAQw7sor2AErmqIZ7FkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g+2KafZBQj+L1Rj1xtREf01TvACepJQPYNmID9a2s7s=; b=pn1unqdgs/3F9z4YRMkQXGYsKzMu+DAalKrpo25otxp0+bkahLbUtcTXkAYZT2JXkFGFjI cTlNwzxO1lLMcMowr/n97O0pliIdhrczhntRHKnljARBkbNnapnmTr7qMor/C4L7XaC0UL YtkVOGnERlI7jevfmCfkCEsNWn9t8CfNnJJoE+tiBj4CDdmYxDi0sTkHqsE/NS4CrfThZV NjwDMw3oCK7ayeQgzxrHl3aMgwpSNgE3RLAzLqsJOxT+rR9l83qVPQEIZLvaiKM2cH4ZeL pqdn7glDBB0lZQjzY7SjEZDqTh7KWYENf/ZP8ijSUcJHDPkQLOvCkjH50RTAQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760554534; a=rsa-sha256; cv=none; b=LOn5TGGSSqYmRIg25E5b7o0ayWPOcqdbsc3hf9ounepqiZZnT/O4W5qc0w6vZVitlgm0nM hOAtuf0pJnf+14GbtGEC20kVe9kweTsVYAK3Xkewxq041YQiQepc6gHBXWFRCTuZ2GyWS/ Talb+I+1yIJl2oFY8cDEZvaSpMdcWTo5kl5q2qzbQF7ZZPtGqVASUz5RbT1a05ME+c9ZUJ JabTdE63IvWgLelIcDT+OZQTvOtDnA94wqpom2Gvz/0dtycz/r7nvwZKs6yntb1AGzj160 FgJ8eWZ8e8exAnBuicfMwdG3vlOqLk1rg/1vuS4FPynf6SoC0ENXY9fNVARIRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn0dy328lzrSy; Wed, 15 Oct 2025 18:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FItYmc072818; Wed, 15 Oct 2025 18:55:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FItY1G072815; Wed, 15 Oct 2025 18:55:34 GMT (envelope-from git) Date: Wed, 15 Oct 2025 18:55:34 GMT Message-Id: <202510151855.59FItY1G072815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 479e29157259 - main - linux: make linux_to_bsd_sockaddr() use memory supplied by caller List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 479e29157259086c40eb61b1326299c22de5a59c Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=479e29157259086c40eb61b1326299c22de5a59c commit 479e29157259086c40eb61b1326299c22de5a59c Author: Gleb Smirnoff AuthorDate: 2025-10-15 18:55:06 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 18:55:06 +0000 linux: make linux_to_bsd_sockaddr() use memory supplied by caller No functional change. Differential Revision: https://reviews.freebsd.org/D52936 --- sys/compat/linux/linux.c | 26 ++++++++++++++++++-------- sys/compat/linux/linux_common.h | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 61b207070963..a40f110634f7 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -578,8 +578,13 @@ bsd_to_linux_sockaddr(const struct sockaddr *sa, struct l_sockaddr **lsa, return (0); } +/* + * If sap is NULL, then osa points at already copied in linux sockaddr that + * should be edited in place. Otherwise memory is allocated, sockaddr + * copied in and returned in *sap. + */ int -linux_to_bsd_sockaddr(const struct l_sockaddr *osa, struct sockaddr **sap, +linux_to_bsd_sockaddr(struct l_sockaddr *osa, struct sockaddr **sap, socklen_t *len) { struct sockaddr *sa; @@ -609,10 +614,12 @@ linux_to_bsd_sockaddr(const struct l_sockaddr *osa, struct sockaddr **sap, } #endif - kosa = malloc(salen, M_SONAME, M_WAITOK); - - if ((error = copyin(osa, kosa, *len))) - goto out; + if (sap != NULL) { + kosa = malloc(salen, M_SONAME, M_WAITOK); + if ((error = copyin(osa, kosa, *len))) + goto out; + } else + kosa = osa; bdom = linux_to_bsd_domain(kosa->sa_family); if (bdom == AF_UNKNOWN) { @@ -686,12 +693,15 @@ linux_to_bsd_sockaddr(const struct l_sockaddr *osa, struct sockaddr **sap, sa->sa_family = bdom; sa->sa_len = salen; - *sap = sa; - *len = salen; + if (sap != NULL) { + *sap = sa; + *len = salen; + } return (0); out: - free(kosa, M_SONAME); + if (sap != NULL) + free(kosa, M_SONAME); return (error); } diff --git a/sys/compat/linux/linux_common.h b/sys/compat/linux/linux_common.h index 97f5a259f300..814c183b338a 100644 --- a/sys/compat/linux/linux_common.h +++ b/sys/compat/linux/linux_common.h @@ -43,7 +43,7 @@ sa_family_t bsd_to_linux_domain(sa_family_t domain); #define AF_UNKNOWN UINT8_MAX int bsd_to_linux_sockaddr(const struct sockaddr *sa, struct l_sockaddr **lsa, socklen_t len); -int linux_to_bsd_sockaddr(const struct l_sockaddr *lsa, +int linux_to_bsd_sockaddr(struct l_sockaddr *lsa, struct sockaddr **sap, socklen_t *len); void linux_to_bsd_poll_events(struct thread *td, int fd, short lev, short *bev); From nobody Wed Oct 15 18:55:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn0dz6kbPz6Cq6V; Wed, 15 Oct 2025 18:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cn0dz4lqPz4FGN; Wed, 15 Oct 2025 18:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kKA+aQxF933vLSDa9aqBiIq0MFltIRyY3JCx1FBB7aU=; b=AGPqdieSvkc0Bt7ZSddRrVqukFm9czWs4v70rCdlNrwCtS7E7YqjbrtyUYoiQpZEmVVNhu Tegj9r7Hv4yHc5Z0BNtzLO2iGth3A9cOw2VLHGN2Z7uQUCtM/WXwFDYSssCCy492yhyTd9 HLjPwMOyuYmKPv2VyLQTr1XbpRql/7Lt5zvY6TB7iP2uivLRUg+22ReIvyUogZ+vsg14t0 20WRmD+AQi5HlPoyf1n/gityY7A/yrViDB2imKFIbuk+Ys8FfeLEto72Xs2dVFx/M/DapH nA7om92efjl1BibEoRUUd2Yc9mB9r+KNacoBOx48D2njcGSbDyrldxRCtGFNpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kKA+aQxF933vLSDa9aqBiIq0MFltIRyY3JCx1FBB7aU=; b=WNjaMa94Y6e6XS7ifMxrdm9ihWDYDL5YncVkk7nxMw4SKn4ghI5AG161pBA0AmZHvI1SA6 LYkEDS6nwTi8jYGFHfFnyevCzSdMT+VaGNp03rcNf0WAtknc1/esDYYGp7EHUpEluw6kzY eKJCRMKCjIxrZGz80tnnwvLW8zz9LzJKYekKEu/ayqBmGhe9X6loFTu5eHz0hHlOMRsguL XkSX8jgi4vUM11QN2t1irmYW0ebA256omDvQ2irlIQKXHPHcN2G3hzRM8dhuEg1HhTma/f uCYB9XRgHu5aHQvQNdexZZEOy/y+HVntnGzPSB5ZXkvUiGFS1t67rcEllAAyug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760554535; a=rsa-sha256; cv=none; b=FUXhZzxHEEtTd33terO2cKZ1fgNZoEh0uUwma0SI7+zzyYond8FWx+O0dxwtJHw/2eWbhN +EIm6i8KQo2zlbvZVRBCerfMLpJi+cz8ZcR/IMlG+V04SHBQERjvGbrSW3XuGr83IveAFn JMlncwgt/VycZPp4uJOtwbv8GXgOTLYzKKRKDJqWe/Jyifan2HpcQF278UmTcHYKCATRMW 8r3VnODk1WyDnWtUR5fvVsVqSTeiDVWwLfaqqYwKbmy0iEmGx2voBXtrDzMA5y774/Je82 8wcoYw1E15uMARoErNwZYCEu98OY9/md5KLu9kI+nEklOgqMN3M8s5l2xE446Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn0dz3vfTzqp4; Wed, 15 Oct 2025 18:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FItZt5072856; Wed, 15 Oct 2025 18:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FItZPa072853; Wed, 15 Oct 2025 18:55:35 GMT (envelope-from git) Date: Wed, 15 Oct 2025 18:55:35 GMT Message-Id: <202510151855.59FItZPa072853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 47b273265025 - main - linux: add translation for MCAST_JOIN_GROUP family of socket options List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47b2732650252a1d31b25f6008aaa42e963eb8c1 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=47b2732650252a1d31b25f6008aaa42e963eb8c1 commit 47b2732650252a1d31b25f6008aaa42e963eb8c1 Author: Gleb Smirnoff AuthorDate: 2025-10-15 18:55:14 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 18:55:14 +0000 linux: add translation for MCAST_JOIN_GROUP family of socket options Differential Revision: https://reviews.freebsd.org/D52937 --- sys/compat/linux/linux_socket.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 0e07b0a60ced..b1a483ce611c 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -2146,7 +2146,8 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) return (ENOPROTOOPT); } - if (name == IPV6_NEXTHOP) { + switch (name) { + case IPV6_NEXTHOP: { len = args->optlen; error = linux_to_bsd_sockaddr(PTRIN(args->optval), &sa, &len); if (error != 0) @@ -2155,7 +2156,34 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) error = kern_setsockopt(td, args->s, level, name, sa, UIO_SYSSPACE, len); free(sa, M_SONAME); - } else { + break; + } + case MCAST_JOIN_GROUP: + case MCAST_LEAVE_GROUP: + case MCAST_JOIN_SOURCE_GROUP: + case MCAST_LEAVE_SOURCE_GROUP: { + struct group_source_req req; + size_t size; + + size = (name == MCAST_JOIN_SOURCE_GROUP || + name == MCAST_LEAVE_SOURCE_GROUP) ? + sizeof(struct group_source_req) : sizeof(struct group_req); + + if ((error = copyin(PTRIN(args->optval), &req, size))) + return (error); + len = sizeof(struct sockaddr_storage); + if ((error = linux_to_bsd_sockaddr( + (struct l_sockaddr *)&req.gsr_group, NULL, &len))) + return (error); + if (size == sizeof(struct group_source_req) && + (error = linux_to_bsd_sockaddr( + (struct l_sockaddr *)&req.gsr_source, NULL, &len))) + return (error); + error = kern_setsockopt(td, args->s, level, name, &req, + UIO_SYSSPACE, size); + break; + } + default: error = kern_setsockopt(td, args->s, level, name, PTRIN(args->optval), UIO_USERSPACE, args->optlen); } From nobody Wed Oct 15 18:55:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn0f06rFlz6CqlV; Wed, 15 Oct 2025 18:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cn0f050gmz4FPK; Wed, 15 Oct 2025 18:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YZmgvCEmLbCgiNhPqB0qntk0PR0qkVh8Oqoxd713UYg=; b=GcNeU+gdjpsintqZgSJHQ1leYxJTZKxqHsVzkY7pb5fBxL+XvaYgmOeTsrFjNOF20QqtYv wsFR8ur+iKCqyNhxx0dRDk6Kx3GhepGiKfIhdcLl9NWR2MKXiyTSPYs3ke/weM+b5/OSBY rwKeH56z/ByjC/+xtOyNQT0iZHi3GlS7C9Vu5XOm4/ArOo3yHOb9PklKJ9F5zId4jlSd75 gKbEEzOGYnjzxc5I34LVgzSqlBJ6yRuls4bwasjhVU5ATCypgTxSdy0vthNeDgp89a+g+X jkFHxvZr1GcQQyzJbI+OZln2Lkk/k9iE4Ar4YzxyY5zlCoVXlJTxmXDpxh//Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YZmgvCEmLbCgiNhPqB0qntk0PR0qkVh8Oqoxd713UYg=; b=F+bFq/RNWvV4cZd67quhD6cdwknBQxtxFrcYUsjInQON+rFOHJ6xQCHaVjrwCMEP+IBJmk 99a49ArIiLAukJizxIBv4vpALbWnolzZzHsAvUyQfq6iCN/1LDkUHb5yYM5lFSa1iYEEng XjLTFJmzplDI2AcQudtyaNB0iAnig8MNKPmDDnj4KtPhmzYqm+YJXsHhKfDijSqLIpsxVj lxAZrXApxv1vGG1QRYyhCicu6me6mi1QU1PvVfAiOBBNmlKaFjOvuwLuv9FXRdmfmmAZUa sYdMp8tbnVpesZnMnZfeDoXIOmlVd82GVkOTiCqixLTLSbFIx/ew+KDlVaTmoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760554536; a=rsa-sha256; cv=none; b=CSk+zsc1cs3CvJoQOwuBVRFi8uQ9f9JuVke0kOJ//iTXuATcn6JqpezqTIPCQgW80C/bhE nCuBtiIsJdvce6LGcZeFZlX4QdZC0P7LYXCtkai8eQCSq+5eZjh3UDY4bFRMgjGicHm4O8 dC6ReM70wk+53dp326hEi0bGeUCGmjLJleikCEFGwXA7CDbXGrMTgqXwkJLnXlmOtt51dF +pVxCgOPeIxuWXB2iNb5PPqCjwHEOPEVrefqSXOrRRURFzs+EDYuHOxZLTMlZapDhzeQnH 9JFTTNvhCHjVJki/1bXNzBmdiIxno0IJ/ZjiZJqEQR3NN/3v6/On0Q0bmgyU1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn0f04VJvzr1n; Wed, 15 Oct 2025 18:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FItaQF072893; Wed, 15 Oct 2025 18:55:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FItanS072890; Wed, 15 Oct 2025 18:55:36 GMT (envelope-from git) Date: Wed, 15 Oct 2025 18:55:36 GMT Message-Id: <202510151855.59FItanS072890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 8596810d02a1 - main - tests/carp: kill routed(8) before destroying interfaces List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8596810d02a1e361e0312d116339aa106aca4b19 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8596810d02a1e361e0312d116339aa106aca4b19 commit 8596810d02a1e361e0312d116339aa106aca4b19 Author: Gleb Smirnoff AuthorDate: 2025-10-15 18:44:54 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 18:55:25 +0000 tests/carp: kill routed(8) before destroying interfaces Otherwise routed logs a warning: "MCAST_LEAVE_GROUP ALLROUTERS: Can't assign requested address" that may be misinterpreted as a problem. --- tests/sys/netinet/carp.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index 2aae2854826e..568d2beaf914 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -215,6 +215,9 @@ unicast_v4_body() unicast_v4_cleanup() { + jexec carp_uni_v4_one killall routed + jexec carp_uni_v4_two killall routed + jexec carp_uni_v4_three killall routed vnet_cleanup } From nobody Wed Oct 15 20:20:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn2WZ1ld8z6CwKn; Wed, 15 Oct 2025 20:20: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 4cn2WZ0wQsz3FgF; Wed, 15 Oct 2025 20:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760559610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5t4HqIcTRoDTu5aeX1MnQYPXabnAWaycPauHZ3mLx8Y=; b=NPTFn5W/oSmPTIMV0T6SudTxOJlQqhQOP3zjI1xPjXrPod8S0PDYbRDzlzeZZSzt2BmjJD TPj0YSTOJKJWM8KgIrlbU5YptQtxNZQiIQoy3w/0q9C9trgVk9qdXLloFk5froB4RmjO5z qNshIVNGX6tlO86R+arnmTDZE09Y+1mdMbpph0FneIT9GHthQsJi1g7SQbyf6QrxRkNlEA z58hSd1q9NknCyYQu/PuDN5IAUyPxW1iT2GB6e7X45uAThp58Y+0ZY7FdAMbPX9hQD6fHr NZJEvQakVSE/+nAGAnz8P+MMc7uD8OrbFASMrtIAd2AYugoms44rf1Hs8pMxyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760559610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5t4HqIcTRoDTu5aeX1MnQYPXabnAWaycPauHZ3mLx8Y=; b=JXEcvTldDaXSWq6CkZk962VTu2SXNdCNkAiozwNnV7GiZH3rF4JQuQyoWnqo4f2c7GEeok zAs7ENnfXCevcLUETP4xn+yosOq74ZnJDoqAtssrJysvT0TutA1Q7I/qdsRQAtBeMhZri/ EY73lCvDpzYCWjJNff7JFKeQtSbrSw5KAhtE0dTfowB02QI9FDcW0uDhV81E63CM6gDsWl S9yD46eKpvnJD6rbHQ9BPLJoW01eLNEzpdh8w4Tw6Ag5d9ReaIjmJhVYjbmGNaTTxJgCmL iHG20MIkExygMKYWHIgOPhE31vBAet5AFxG88nwK15BPyPkf654RPbjcZIyABQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760559610; a=rsa-sha256; cv=none; b=V5ahtFWtN1tuBQibJ+dC3dDx/mX4Rgv64ok7AgGgD89IFgzbne49Te9tFvEGex3iLEvgSb 5NQjf2XsNf8HQAV8HsRK68NlocGYUdawesEbh24ey1QcynAWd1MOhfNAlyxNxpM6iQWUSk OTKkiLE9NhJVEU7k69i2/JGY53cuMSk15nhjFzpHoA487bE7yKYK82CCernH5MZGLHnS9B L+CKGZT/Prz8qA/qA6ZFxq/Vpkj0g2S+6iNRUHHcUIULI0fR6EVbomph4gGMKPOXZv+upt gxXS0GQn5uWW2HLcAAB6Q3BwXrxaF+Lgx+M5/iYfN7zK+PngRt5Uk6TElng8BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn2WZ07nmztXN; Wed, 15 Oct 2025 20:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FKK9Pe031320; Wed, 15 Oct 2025 20:20:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FKK9t2031314; Wed, 15 Oct 2025 20:20:09 GMT (envelope-from git) Date: Wed, 15 Oct 2025 20:20:09 GMT Message-Id: <202510152020.59FKK9t2031314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c86af2cc4cd1 - main - imgact_elf: Check note body sizes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c86af2cc4cd12fb0174843b22d737c3b5b5d55d0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c86af2cc4cd12fb0174843b22d737c3b5b5d55d0 commit c86af2cc4cd12fb0174843b22d737c3b5b5d55d0 Author: Mark Johnston AuthorDate: 2025-10-15 20:14:36 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 20:14:36 +0000 imgact_elf: Check note body sizes In parse_notes we validate that the note name fits within the note buffer, but we do not do the same for the note data, so there is some potential for an OOB read in the note handler. Add a bounds check. Reported by: Ilja Van Sprundel Reviewed by: kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53063 --- sys/kern/imgact_elf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index c53707a1286c..a1fabbc86f27 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2831,7 +2831,7 @@ __elfN(parse_notes)(const struct image_params *imgp, const Elf_Note *checknote, } if ((const char *)note_end - (const char *)note < sizeof(Elf_Note)) { - uprintf("ELF note to short\n"); + uprintf("ELF note too short\n"); goto retf; } if (note->n_namesz != checknote->n_namesz || @@ -2839,9 +2839,9 @@ __elfN(parse_notes)(const struct image_params *imgp, const Elf_Note *checknote, note->n_type != checknote->n_type) goto nextnote; note_name = (const char *)(note + 1); - if (note_name + checknote->n_namesz >= - (const char *)note_end || strncmp(note_vendor, - note_name, checknote->n_namesz) != 0) + if (note_name + roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + + note->n_descsz >= (const char *)note_end || + strncmp(note_vendor, note_name, checknote->n_namesz) != 0) goto nextnote; if (cb(note, cb_arg, &res)) From nobody Wed Oct 15 20:20:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn2Wb1Q6Qz6Cwn9; Wed, 15 Oct 2025 20:20: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 4cn2Wb0vBDz3FRZ; Wed, 15 Oct 2025 20:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760559611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nX6UzVu/J3NIUBW3JEPWaoLfPtqtrpp+NmLX4mXZVnQ=; b=b2h57WUiG8xgQYFOHkPH9QVCMNY4Uk92n56l5SS25jNi4wTy2A0IghCaPa2V483i5uYTs+ qULC6yaxaCdCLFWqgWcx0+h64WVbLBP1wax+rciMh/CCk2WevBxBxSeF/QITl0QirdgeWm VFQH8K1wMMnRLxh14ShaRy0iUTt7WYoF4E9GbxlAB5U/1+OBWDUbDDvnOgWMY/SLRxFlrH mYuhwLxd2UwtWrNutPoYoQxKw9fIuZEuy7gtKj/cc3YXWs/iXHSiG8T6IeBjyYVBipTtC/ csoC9qAyfLvRuv3ecUKxSWzYLzMCxjp6g/uY7e+DnN/l7vL1q/vT53xDJPmXdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760559611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nX6UzVu/J3NIUBW3JEPWaoLfPtqtrpp+NmLX4mXZVnQ=; b=cjYfae2qD/GQL/vTMCei7h9iwNgeNRzzKW7dtH7lhFeIePNcRV34vKCNaptHcGa2Ju+K3G GBNJXJ2c7dDsnm6C52mI5VGr15rbeq0aQ+gJ2mZs87ZNCciyF54rBlmE1uyB5FyTwCwWw4 +H9bEmOpItnqoCLYE1miYX5w4DLFDkS6n0NiMZ1UBb07W24+iSO2+4DEdUqAkaXEVC8dyh 7EPJq4JiCGCeEoFjiAdu2sGkWwA/YFgQTdr63SNyc54OtRhhRVbQnrRU2j1eNd1AHhNQQ4 7SbNezf9CYvsJM1OCD4MisuytI3E7oYaenXkPzl4XCPK45bgziJ/mRHOAA+8tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760559611; a=rsa-sha256; cv=none; b=G/oE5+OK4iYEBZ4LiZis4KcOSyrBOJcrf/r5XPVPIs4+6gsnpgMyLo+MAue+Oju7yYFf05 kWE3/redXamDQVdBJ0J27sDzNrdpAiEZWTq46RROD77qVVGK8ULizy4INXCQ7sQM3LLIxW +3Rz4PpXxyxbpbkz+iigU+F4u96hpd3KAV0WMJPorG/p/7IT3C+KfnZbKXytOBG+svkIxU Vp2lBG5hovfmr87F/XzuneSO22/IzvjeUiCtqMXb0uctUvmmM5S/ANNUvbjGhAB3HkAlrh AejOMY6FvQV2VEKC1SvrNLX9mrGkruVBj8b5p60Z7jTa6nzCmSDdgkj1vdvcag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn2Wb0KYdztV9; Wed, 15 Oct 2025 20:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FKKAJI031952; Wed, 15 Oct 2025 20:20:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FKKAsH031948; Wed, 15 Oct 2025 20:20:10 GMT (envelope-from git) Date: Wed, 15 Oct 2025 20:20:10 GMT Message-Id: <202510152020.59FKKAsH031948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 937693fc9e4f - main - libnv: Fix a length check in nvpair_unpack_string_array() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 937693fc9e4ff4045cc674a14902f0d53e84ec98 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=937693fc9e4ff4045cc674a14902f0d53e84ec98 commit 937693fc9e4ff4045cc674a14902f0d53e84ec98 Author: Mark Johnston AuthorDate: 2025-10-15 20:15:08 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 20:15:08 +0000 libnv: Fix a length check in nvpair_unpack_string_array() A string array is represented by a set of nul-terminated strings concatenated together. For each string, we check to see if there's a nul terminator at the end, taking care to avoid going past the end of the buffer. However, the code fails to handle the possibility that size == 0 at the end of an iteration, leading to underflow. Fix the length check. Reported by: Ilja van Sprundel Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53069 --- sys/contrib/libnv/bsd_nvpair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/libnv/bsd_nvpair.c b/sys/contrib/libnv/bsd_nvpair.c index c73bc2189121..b884dd260b84 100644 --- a/sys/contrib/libnv/bsd_nvpair.c +++ b/sys/contrib/libnv/bsd_nvpair.c @@ -985,13 +985,13 @@ nvpair_unpack_string_array(bool isbe __unused, nvpair_t *nvp, size = nvp->nvp_datasize; tmp = (const char *)ptr; for (ii = 0; ii < nvp->nvp_nitems; ii++) { - len = strnlen(tmp, size - 1) + 1; - size -= len; - if (tmp[len - 1] != '\0') { + if (size <= 0) { ERRNO_SET(EINVAL); return (NULL); } - if (size < 0) { + len = strnlen(tmp, size - 1) + 1; + size -= len; + if (tmp[len - 1] != '\0') { ERRNO_SET(EINVAL); return (NULL); } From nobody Wed Oct 15 20:20:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn2Wc5BMPz6Cwfb; Wed, 15 Oct 2025 20:20: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 4cn2Wc2kMyz3FgQ; Wed, 15 Oct 2025 20:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760559612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wCFwU29kAPAr40kgQJVI1gCQeKqFTDuj8ram20+R1cg=; b=QVAyd5KJNlVIDsnBuzVodx0aiBv7q++Svs7Ele9Ts9FoYspvEsTqwq720cldgWGkvjqWua o9m2fJlYInhInSmz2/a0j0KektHS6cyth4OIh4reQUsR8R/svsxu4p94FaisTYkifhjeCW tHKsklZX+t9YdtdIdHD7VfPh5n+wrRgXHL1t/SYRGK4CNhobYWEGyX9e+4PhdixeEDgM43 UxM4T9PJuygDyNfCIF02LyZvXAY25u63okyGXDJhMUkDJjb/55SA+IGAmW14dQVeBh4hQS KqmSAZMqEUpgInuG/ba4FDcVuZbgR802iuUJ9HfBKNKCoS81/KcnqWXwihjAhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760559612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wCFwU29kAPAr40kgQJVI1gCQeKqFTDuj8ram20+R1cg=; b=vQgWUmAcFldR9OqU7gcd8My58L4fOYaBIPP0Lc5SO0SAVdcuAIp2eLS3odZ2qpU6VavH94 cnjw42wdURm2QpiRtcoqOu/S8imFCrEn+LgfWkZCqryWKbZUl0ucxepzgzWHX6zaqAkkCW Z+5+8AtSNkkNyKjHx39GVuBIsGg++eLcdSArEtaGs+E5NGzr7haAGWVC2SlE3i64VjAno5 tbtrIU2+6Uy2zkp7d8xz1PS1XDDd1e6eXpZWRj2b85H1PjtZHgp5PL45q2jdcGZnJlCGg7 w935d5ZrGlTzc/abc1E9xoYyeOFQKq24ve5H5rzQ0yF34iLfMI/O3oEf7Yl/DA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760559612; a=rsa-sha256; cv=none; b=rKnCSTlU+WFBkSiCQxeGI0iFZ1drCDbRfMFjbxh0NAoxE/51lG9Ifxb2bRUVdGgWTf4wyc uV/AI1du1uih7uZUeknFLwDZNjxlyRX301u83a1PB1dHt32JxKwa6Swq8EMrcXOqsEdQeh P0IYoMyr/1ojh9Kg4sApm5nz3dwX6f7+qYdhZkCCl4sCy+SnGDRFWNPLVFuaXZYzG3pTCH B9LbSstqSA3FMx9VxnaofPX4YcsmWT97jEfcVSBr2oPd8HDHp7CQrM8Jonnd9GiiO6ilGX X72tVRgUpju5E64/SHaO02TP+r6FTMugxDfOMhSq+lPxCdezzIn2rf1IhLeFDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn2Wc0rX8zt0Z; Wed, 15 Oct 2025 20:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FKKCmI032595; Wed, 15 Oct 2025 20:20:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FKKCoa032590; Wed, 15 Oct 2025 20:20:12 GMT (envelope-from git) Date: Wed, 15 Oct 2025 20:20:12 GMT Message-Id: <202510152020.59FKKCoa032590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3509dcd11a98 - main - socket: Annotate sooptcopyin() and sooptcopyout() with __result_use_check List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3509dcd11a982107d957b99f6740704e9c522bd8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3509dcd11a982107d957b99f6740704e9c522bd8 commit 3509dcd11a982107d957b99f6740704e9c522bd8 Author: Mark Johnston AuthorDate: 2025-10-15 20:15:51 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 20:15:51 +0000 socket: Annotate sooptcopyin() and sooptcopyout() with __result_use_check Just like we do with copyin() and copyout(). Reviewed by: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53114 --- sys/sys/sockopt.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/sys/sockopt.h b/sys/sys/sockopt.h index bfe12d8510d7..d2b0ff5ed2c8 100644 --- a/sys/sys/sockopt.h +++ b/sys/sys/sockopt.h @@ -57,8 +57,10 @@ struct sockopt { int sosetopt(struct socket *so, struct sockopt *sopt); int sogetopt(struct socket *so, struct sockopt *sopt); -int sooptcopyin(struct sockopt *sopt, void *buf, size_t len, size_t minlen); -int sooptcopyout(struct sockopt *sopt, const void *buf, size_t len); +int __result_use_check sooptcopyin(struct sockopt *sopt, void *buf, size_t len, + size_t minlen); +int __result_use_check sooptcopyout(struct sockopt *sopt, const void *buf, + size_t len); int soopt_getm(struct sockopt *sopt, struct mbuf **mp); int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m); int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m); From nobody Wed Oct 15 20:47:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn36x6fWkz6CyZ9; Wed, 15 Oct 2025 20:47: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 4cn36x624tz3JYb; Wed, 15 Oct 2025 20:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760561241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y3AGtT3snXw0nZkE1gwmUVhls5U/4yF4tAtLLlgO68Q=; b=gE82HyRrXMDZDUlOdLwGm8HC81SQIa8oGBB2cmbCn4AgVKz4K/w4xQEOn2mKDpwXiX39Md JJ2mzEs2y/iAZCk1uaBQ7N9tPB5jf83Ss9ul3lQluKOO4zH5lhRM2o3ujth9iPiZEeu4mc ILLSAqW5GuJZ9AtXcbESRYTTolhugoMmn2qOuHgFDJ3ejkPj5/Pe10c5PI32d2eBbBmKMm xfruYbWNRGIJDnx8bzTE4z2OVAhsJVUVXDgvdhlszeEhJJc9p4Y/q9XFSLa6+eljVAzHFb nWprSEEeD1LhMPw9gsIPwv0oaBVL/vBFheAoCJb0gmv785hohvKsjzBc3vQOhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760561241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y3AGtT3snXw0nZkE1gwmUVhls5U/4yF4tAtLLlgO68Q=; b=QCBTzKIRGuErDBzTnRhZNN24LgPHlz11eaklyxIucAMTazXst3gSU7em7aupdMW9F7ml7y wm1zpl8n9mb6gnXIrSRQec2Yb+wO5iMiP2U+jTXqHDWTETMxnjFrqq3EEisschKhuER5FN T3RjYBHTSRniloEai7ULm5JSpzw4uqQGe8rEJSgtAYe3KBadcVl4YqBcG+706x1DslDwo/ SpcdTcyIz/D8zuPPiQeLmSAOEaJ70W7sFcKv2tk23Xd4/QJegcJWll1+HUWDH7+x1NqXeh Mnyv0pBqPKtDPBYMl28dSkLY4N1mvTDF6CIKXsBVwlxSxqWpBSZbOAqnHM+MXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760561241; a=rsa-sha256; cv=none; b=tyE50L/iAjqqiJwSgBn7kNvteN9dx1WKxzihzSD3sX4iCws8pBkOy/FH8b+TQkoG9GlpTz ifx+wycELANwasgZCTzf3o4kKGl7dTpmS7+Ln4RZsZblU737U+uzaTanRpiRG8W3Mwqj/v 3VxCew3guCe7dcROfqcI7R6CoEXuQFhwKbwWAOI8JcLPpqd7Nmz856fn7f1lxFL9J4kU7L Ufd/G1zrVPFCqR9a8r9PZDtx9m4VACp75/k4BSRecc/yVnZ0Z6bgGhrfymSPF69G5CaoSw NavyaF/GEy0UoQsqln6vBHpKryEtYZx16PBtAu9njocicL4IW6/aNhfMvaVgOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn36x5VhVzv4M; Wed, 15 Oct 2025 20:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FKlL4h081754; Wed, 15 Oct 2025 20:47:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FKlL5b081751; Wed, 15 Oct 2025 20:47:21 GMT (envelope-from git) Date: Wed, 15 Oct 2025 20:47:21 GMT Message-Id: <202510152047.59FKlL5b081751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 4548b9f3a816 - main - unix/stream: plug a corner case when control externalization failed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4548b9f3a8167a340a5086ed51a76d932c9ab3cc Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=4548b9f3a8167a340a5086ed51a76d932c9ab3cc commit 4548b9f3a8167a340a5086ed51a76d932c9ab3cc Author: Gleb Smirnoff AuthorDate: 2025-10-15 20:01:25 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 20:47:11 +0000 unix/stream: plug a corner case when control externalization failed while peer has closed its end. Reported by: syzbot+ffcc3612ea266e36604e@syzkaller.appspotmail.com --- sys/kern/uipc_usrreq.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index c5fc1e84ce3f..90489e99491a 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1559,15 +1559,19 @@ restart: mc_init_m(&cmc, control); SOCK_RECVBUF_LOCK(so); - MPASS(!(sb->sb_state & SBS_CANTRCVMORE)); - - if (__predict_false(cmc.mc_len + sb->sb_ccc + - sb->sb_ctl > sb->sb_hiwat)) { + if (__predict_false( + (sb->sb_state & SBS_CANTRCVMORE) || + cmc.mc_len + sb->sb_ccc + sb->sb_ctl > + sb->sb_hiwat)) { /* - * Too bad, while unp_externalize() was - * failing, the other side had filled - * the buffer and we can't prepend data - * back. Losing data! + * While the lock was dropped and we + * were failing in unp_externalize(), + * the peer could has a) disconnected, + * b) filled the buffer so that we + * can't prepend data back. + * These are two edge conditions that + * we just can't handle, so lose the + * data and return the error. */ SOCK_RECVBUF_UNLOCK(so); SOCK_IO_RECV_UNLOCK(so); From nobody Wed Oct 15 22:24:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn5Gz2vz4z6D5HP; Wed, 15 Oct 2025 22:24: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 4cn5Gz21GLz3SRW; Wed, 15 Oct 2025 22:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760567067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d+Dnup4J62ygdnCwHs1vHuXb+ZsRUqZSzcsOpBY6o4M=; b=pWCdvA/Wc3mA0sxZb5ktAqlIandSbk5+FD9odffpYk5lkqzSvRqOG/tfgeFd/jVzJGq/fS snlD8t3bzplPt/PqtPN3ZLYfskaX003TpXBWQWkmE79ccgXVYpkijgPLEx5gW6xhyk2pVV lcHtvIKDOg6Ga4ZZn+bsFMiDdQVZEXvF1S//zqOzvAI3WPCUYshX01SBZHmpDOJxQn7mp2 nqhG4ObOUXoJC3gvr020VE9FOt8EEOw5d6NfNhAgAb9ix0tdZGyrKyII4TD+HeWL0yVDer bYVjwbfCbtwH71ftSHBQupD+yDIraf+pRl7BsPFAAwu8InZnh0B+Hyl3JuKetw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760567067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d+Dnup4J62ygdnCwHs1vHuXb+ZsRUqZSzcsOpBY6o4M=; b=yr45gNMj0HcVzxi+/DzoCZL76nFadfESfhF09f5xPrw9wMd6GdfpirGbN/lD2vFVsWmr8x 67rhzD2SbVEiyQPiUakcb7Nh6093JrYdwNxGai59M2bppAtjQjT95CBRc0OPzoFxE8PrEg U/425i9rUiU8VxH3QYI/W1+oBgfhdCNXXI6KrERBmEauFE4J4JGHR5SCoiHop+EkYwyRMn +s/jTieZOdrC0sDdtkUPMQz7ka0vHuLAblLcWc5nhgkMXo/ueLafdKDTIIdvkMoqRFJ5cE crF3G0MMc9mOMzE+FgXO4V8ZWHaWiYG1jWTFzJlNsOASbwZb7hWK+Ev0y+OghQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760567067; a=rsa-sha256; cv=none; b=xP1l9HDu1+EWloD/cYJBLA/5UJg90UHFh3gnrHR0b8h07HuFkdmMvBIvOFMmLi1gUPfI+e EVXO9q3PwrWY33h8n5Ras62HDg3+gGTmuDqUhcQIQ+uXA/bM1GWV9Z2rm7nHg62rR2Odog 3OBjJAURxyuCMAs0mxEHH/bCEzYP9M8sC6Wqxpon6PqBdQlb0434iPaC2gZ18+abKX0O1Z D31o7adxGtHnLUVADtDb7PuS4LRJh+mqvjMqHRpy90nKpjLeU1kpKDR3AMPdkoM7YslVI1 AnqJ/KKTncLO36CKPCvfeKgNGc0/lO2+oST4m5r5BgHI3foCKiggnlltCFGp7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn5Gz1Q8czxf2; Wed, 15 Oct 2025 22:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FMORaE068280; Wed, 15 Oct 2025 22:24:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FMORtf068277; Wed, 15 Oct 2025 22:24:27 GMT (envelope-from git) Date: Wed, 15 Oct 2025 22:24:27 GMT Message-Id: <202510152224.59FMORtf068277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Tetlow Subject: git: 79e57ea662d9 - main - libc: Add "Z" as TZ designator for strptime. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 79e57ea662d92ffcbe7d65854a284aefac6a332d Auto-Submitted: auto-generated The branch main has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=79e57ea662d92ffcbe7d65854a284aefac6a332d commit 79e57ea662d92ffcbe7d65854a284aefac6a332d Author: Gordon Tetlow AuthorDate: 2025-10-15 22:24:06 +0000 Commit: Gordon Tetlow CommitDate: 2025-10-15 22:24:07 +0000 libc: Add "Z" as TZ designator for strptime. ISO 8601 allows use of "Z" as the time zone designator. Update the strptime parser to allow this usage. While we are at it, update the manpage to reflect that both UTC and Z are now valid options. Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53083 --- lib/libc/stdtime/strptime.3 | 2 +- lib/libc/stdtime/strptime.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3 index 7df73d2d080a..9456fa757b85 100644 --- a/lib/libc/stdtime/strptime.3 +++ b/lib/libc/stdtime/strptime.3 @@ -171,7 +171,7 @@ is taken as noon. The .Fa %Z format specifier only accepts time zone abbreviations of the local time zone, -or the value "GMT". +and the values "GMT", "UTC", or "Z". This limitation is because of ambiguity due to of the over loading of time zone abbreviations. One such example is diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index 5f1293c7a267..375e49146639 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -546,7 +546,8 @@ label: zonestr[cp - buf] = '\0'; tzset(); if (0 == strcmp(zonestr, "GMT") || - 0 == strcmp(zonestr, "UTC")) { + 0 == strcmp(zonestr, "UTC") || + 0 == strcmp(zonestr, "Z")) { *GMTp = 1; } else if (0 == strcmp(zonestr, tzname[0])) { tm->tm_isdst = 0; From nobody Thu Oct 16 13:18:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnT751lDfz6CSkt for ; Thu, 16 Oct 2025 13:18:57 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (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 4cnT750S3hz41fW for ; Thu, 16 Oct 2025 13:18:57 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-86302b5a933so86985585a.0 for ; Thu, 16 Oct 2025 06:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760620730; x=1761225530; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=9duhlw8kO4YmZObNm0h9zJvyI28hB1WqBQjw7HJhx10=; b=ch0IDIYp0o2x/5jFX2szqpprK8CQUhkYA3RYkfhKOCFJyKTWrOYeAnVTt4czT/6GBb WJpjVBVegXM4fMBslujhwlBjQQuLJ1LkaUzu6kS0fuT5xeTJIsbafcXTZ8UAdAhtN0tO VDaHnLgb9V83qcmtlBaImX/9kxESlvev817jm1fkecupYMP8iO4cyZN6mw3dcrPFgyo3 EAsElWIxVDeDkC88/fwAbH7NCrf7Tii9ADGcztgSTOWwvCuFhq7O/8asdAt/cFZr2PSs FzaXbc1BzNPAdrcxj6np97DaVuiPG2zcXl9S2DgFc8r7ZjZ8g0iPV2B+gkBJXhxopcR7 Z56w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760620730; x=1761225530; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9duhlw8kO4YmZObNm0h9zJvyI28hB1WqBQjw7HJhx10=; b=G+JTw49ZbCGE4yvAcSgjhRVqeJ5+OSPo6vHSDaLarQYWdNUo+QmePskllpEP21EcX3 IhH3PhElh3F5De3p5wYC+kuwo95WlaGvQ4vlINIP39O2fNWAZeRd6lE0yztwmLlvFerJ n0MT47oN8i0/6qy0VywENEhyagtlmrUNhADFvQ5p/pDRQvAUnHxe5ZrSeNgHBjD9mvK7 8BfZGjrER7X4rO522bFgj5aAwPzKnYyzY4vwjX+cNjoAgAY4NWeRP3SYpgJgURDpN48B SZ8HzSUKh99yMnzjzOZv71dFpRD2GDuYYhuv3ajuZDuq3QkqIqyh+FUDJwOZG9SPp9Di +Pig== X-Forwarded-Encrypted: i=1; AJvYcCVpyULbB/bMmrDJfzLDCHFkpNcXEmyV/ds0NKu8DAF/Bdlv0MHnHBYp5z5i2ihP001JCfRRpwfvUbIGFRuCCbMuDUJ0ig==@freebsd.org X-Gm-Message-State: AOJu0YyyoBbFMJ2pQ94afYnS56rve4Mnttz7cyimKoBZ1yyfqP3VvMeo 9kyQmlHVTczZ60q46bNrmzGVZ2szIbJ/frPWKOi22Iv6vu+nft/Ool75qcPmBoFxGSg= X-Gm-Gg: ASbGncv7EyfOtgTLMGQJOhulexwfom68MHLxuuK2IXRhRC7otDWhj4wbK2/JRRAWBXO jfb2JXWPO+XLJ79V/UFn2PDC2iQbLAhXgTTP4F9o0gOE/jy9Ke+2zq/G8fDHZS9Cbu7kU7euet+ h2tt5AyMRaVhy6icqmUP0xhOWbaUHWz/4irNdF1s9punq9iFkycO2bmr8SmFhbOwzFbCOG0XsHI rUQNtqPPgE61BcqjimzvCvYAWId1BthSXMJ1zJJ+q8GYrzPFwCOXbfb3yQCtivX+PPBmnJb+C/1 CKlBSu5Jt5FUU2av1/ox4Sfew0ZIwPVtrkd9ryOmxnCEV1Ltg2KJP1oMsQaDwr4mcnTph3aMxf0 VGhSF85hWKbTZfcDHtW4Rzf29OWeNCUGsfcu1A0PbqFFXT4u9yWKcHUpN0lOBqUydqopdYGPVW3 a6y7mUw29D4JTtXWElT51eAdLp X-Google-Smtp-Source: AGHT+IFZw5n0IZKOUuifBwb1+SYJHwPZcEMvzdpFvIab6VtQiB2tWZmc+esrcDViAWhxzXUmF7SbIA== X-Received: by 2002:ac8:5910:0:b0:4e8:9596:ee77 with SMTP id d75a77b69052e-4e89d1eca83mr1440151cf.10.1760620730118; Thu, 16 Oct 2025 06:18:50 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-87c012b5de7sm39310066d6.65.2025.10.16.06.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Oct 2025 06:18:49 -0700 (PDT) Date: Thu, 16 Oct 2025 09:18:47 -0400 From: Mark Johnston To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4548b9f3a816 - main - unix/stream: plug a corner case when control externalization failed Message-ID: References: <202510152047.59FKlL5b081751@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202510152047.59FKlL5b081751@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: 4cnT750S3hz41fW On Wed, Oct 15, 2025 at 08:47:21PM +0000, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4548b9f3a8167a340a5086ed51a76d932c9ab3cc > > commit 4548b9f3a8167a340a5086ed51a76d932c9ab3cc > Author: Gleb Smirnoff > AuthorDate: 2025-10-15 20:01:25 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-10-15 20:47:11 +0000 > > unix/stream: plug a corner case when control externalization failed > > while peer has closed its end. > > Reported by: syzbot+ffcc3612ea266e36604e@syzkaller.appspotmail.com Shouldn't this be MFCed? Could you please be sure to add Fixes tags to such commits? It becomes much easier to find missing MFCs with that metadata available. A few of us have discussed using git notes to encode such info after the fact, but this is not available yet. > --- > sys/kern/uipc_usrreq.c | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c > index c5fc1e84ce3f..90489e99491a 100644 > --- a/sys/kern/uipc_usrreq.c > +++ b/sys/kern/uipc_usrreq.c > @@ -1559,15 +1559,19 @@ restart: > mc_init_m(&cmc, control); > > SOCK_RECVBUF_LOCK(so); > - MPASS(!(sb->sb_state & SBS_CANTRCVMORE)); > - > - if (__predict_false(cmc.mc_len + sb->sb_ccc + > - sb->sb_ctl > sb->sb_hiwat)) { > + if (__predict_false( > + (sb->sb_state & SBS_CANTRCVMORE) || > + cmc.mc_len + sb->sb_ccc + sb->sb_ctl > > + sb->sb_hiwat)) { > /* > - * Too bad, while unp_externalize() was > - * failing, the other side had filled > - * the buffer and we can't prepend data > - * back. Losing data! > + * While the lock was dropped and we > + * were failing in unp_externalize(), > + * the peer could has a) disconnected, > + * b) filled the buffer so that we > + * can't prepend data back. > + * These are two edge conditions that > + * we just can't handle, so lose the > + * data and return the error. > */ > SOCK_RECVBUF_UNLOCK(so); > SOCK_IO_RECV_UNLOCK(so); From nobody Thu Oct 16 14:52:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnWBS5Kdyz6CcFg; Thu, 16 Oct 2025 14:52: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 4cnWBS4LfNz3K0Z; Thu, 16 Oct 2025 14:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760626320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4EWm1hmi6ZqZ1F75/1LqqGueHAdsiO5PVkoJ0qixzHU=; b=eFNcUVxpEH1FSOIqDEMMppc4Ex9yLIuDlaqavCJCUqKjWgLiCptCUNFLbl105Y0JnE3tjb Pn2+SwmjLjwNZRI0WK1egVL+fyC8gm402u2+WoApP7CLKD78d+723wKSd+I8CAoCUF0xwe HgIjcB88WmnP43KVLl3UVANzwO5lXXPyQ2I9RVSzsLLIAuH4XLY7WtbKKXpPNlD2p390+f sshwhxh3EIVRVLnoxuNDzY2BplnVq8Uh+qnhu/esNeHTomNVdMtXale9koWVUFjVmv8wWF T00zefRN9GKuk/USFOIBxdgy5oSVICZoOxzqkq4kt+os6EKlgtogvJ2cP949bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760626320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4EWm1hmi6ZqZ1F75/1LqqGueHAdsiO5PVkoJ0qixzHU=; b=FUU7W6AhGYFezAHBfc7HlYoM0u3ileCd3/OBJzCZXHYID0c1ddzuwKksa0KL0XTiGCX/hp KTMYVn77PiVO4FAqVS4kk8SZ1pe5ULrH1iYVM4b/RN0Duk+RL7Fzn0kuP91n0jUUoUKH4g v0ElsSqgwCvy7Ee5V9Cyuq4UwH5HeZHKwgOQc5JYOqihFLw2NZhL+btqxJ3L8spAkLEGJA VENtlcaNRBCXV3rA3IvEAt3fxWkPdx/DdOvyOFFrlPqDUx+8F+tm5Wene3DuqXlU8ECVND yoSyh1XenlCUWXMfDIX+/llegtTBs2qwnyv4jb2ATvJj5GSlTK225pY+3p45fQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760626320; a=rsa-sha256; cv=none; b=O9M6vp+MWxCvLWq/PEGyaRZwGPao1bXk07xwHIlgBI4bHOvHiCWGYJbqCWy6ft0m+Gwmzf v4ldzwFjPvKGHZumT6m/GFg8847mL4tsi1O3hP7u1Qyl0RHNXspytStqe6v9i2XceiyN/A VC23vS3+LgM3H/aHyz+EI90BCXnfiIt2dZAPKefvHrqYeSwvPw/Qq9DkjzXD2RAxjH7qk+ GwiPCQTvYjwGbycrofJyrduk8BRRu8tmFwQaPDWDWEKAS8Hh3TJmH/RvxMWO2v1OYcZ6Nd /9Bn/3CYHOyzCdP7aUXcgD9pO7BJxGFIp6peRqa7jiz708Q3M9AtQcc9jwODVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnWBS3t9vz1RBP; Thu, 16 Oct 2025 14:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GEq0YS027100; Thu, 16 Oct 2025 14:52:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GEq0OR027097; Thu, 16 Oct 2025 14:52:00 GMT (envelope-from git) Date: Thu, 16 Oct 2025 14:52:00 GMT Message-Id: <202510161452.59GEq0OR027097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f19f17b3af67 - main - vmrun.sh: Don't require firmware on amd64 unless -E was specified List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f19f17b3af675fbbc1244b66bbd8fb4a9836cb02 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f19f17b3af675fbbc1244b66bbd8fb4a9836cb02 commit f19f17b3af675fbbc1244b66bbd8fb4a9836cb02 Author: Mark Johnston AuthorDate: 2025-10-16 14:48:39 +0000 Commit: Mark Johnston CommitDate: 2025-10-16 14:50:33 +0000 vmrun.sh: Don't require firmware on amd64 unless -E was specified PR: 290232 Reported by: David Marker Fixes: aa34b1d20e44 ("vmrun.sh: Add arm64 support") MFC after: 3 days --- share/examples/bhyve/vmrun.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index 52935363023a..e0052e781dc0 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -268,8 +268,10 @@ fi if [ -z "$firmware" ]; then case ${platform} in amd64) - firmware="${efi_firmware}" - firmware_pkg="edk2-bhyve" + if [ ${efi_mode} -ne 0 ]; then + firmware="${efi_firmware}" + firmware_pkg="edk2-bhyve" + fi ;; arm64) firmware="${uboot_firmware}" From nobody Thu Oct 16 15:31:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnX403G5pz6Cg7y; Thu, 16 Oct 2025 15:31: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 4cnX402bJYz3PwV; Thu, 16 Oct 2025 15:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760628688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PaaMjcjiTNu0L+DzsSNFUENO8p7Sf7eOicGwl4V+tmQ=; b=uQCgUr5yzevLa1HNzY4RQMGLt5twK6vU58es2BXEEnedQOVcdknAjpVT/mU6t1CjsFNkPF 6FCnu27C+NX9NrNLF7M/oyESjrGqb3Xv4dJzpe7fMw+IBFFDqTTzfrkGMKfm4nRrOP3H1U 3NVEwRMly5WDmrilJOYwAMoVzJfwaztQvxSNgIJvQXiASjzPf977vah5kPRN+wGOXM2Z+Q gpmp8oMSztLZbk91Q+Sh3XAG5f3IPaB4AnxCYlU45hQgJScuP92G/2U1mXl4r/QvdMcNH7 1AOlo1cWLVWYIYjEhUEh3csFZ6QleBhUMefd8kNiz1zFVZ3Nc981QByY1Vbh3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760628688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PaaMjcjiTNu0L+DzsSNFUENO8p7Sf7eOicGwl4V+tmQ=; b=S+WLLTkrnj/CiuoFBobxlhKYO1jYpzf5wH8aVTgId1r5Wfmc0kYW4/8QfaEVHLkhhzS9jX rKXziUz6RlkmLOm6pc5rEsEU3xXqY2bsG/9pAFC9bUoTdbCLHdGAKKD/vcMUxg51apqea6 grZJMI4J+mT1FjcHP/9vYvkAwuRoMNJQN+SnFDz2ulbIu2WKGeCVHJdcd7tU9/kKGmmI87 G/XHNoY2lHhSPRHKg7SnB2XE5mz9nezcTxGsGOXBUtogk/DoJnx4xOjuXae5bTdzaj8oi5 DJzn+Es/gtqNYHWA3Po2eyg6dBqpsk1b+pZUxsStkxuB+UIvXkPThBfu6+Zyng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760628688; a=rsa-sha256; cv=none; b=Ie51/BoRs3O/7ElVibSIXz9nvPqxMDaMpY8F04R00jbqnChzz4TXXhOQne+jzc1vk9M5o2 gh+L3nJJLVm/P1qPfpNbx4CMynqAuHX01CE3vXpreGiYAAzp0ylfb1xePUQ0HzGIvN0BZf +Ru7bvn5MFCv4ZZli8YjQo3kZJIRkmi1vVAzX/2RnrH9U/iwnXvub8OFpZ4DdPpKs+1v9b t8VE108ynWqgD3sABwuIJdHs4dMHMjwBKEa60d+p28VTEbtcaAeXO9WeyVAsaDo/vTyov4 U5QgLaRAZmK7nboGqagAbjHFY+TJ6tthQI8365TXylUzYdUyJrQ5u97ta7YmoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnX4028S0z1SGK; Thu, 16 Oct 2025 15:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GFVSJN000902; Thu, 16 Oct 2025 15:31:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GFVSP2000899; Thu, 16 Oct 2025 15:31:28 GMT (envelope-from git) Date: Thu, 16 Oct 2025 15:31:28 GMT Message-Id: <202510161531.59GFVSP2000899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: a498c5e1a111 - main - unionfs: avoid vdrop()ing a locked but doomed vnode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a498c5e1a111ae8c48b8e7028daff861785c2bf2 Auto-Submitted: auto-generated The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=a498c5e1a111ae8c48b8e7028daff861785c2bf2 commit a498c5e1a111ae8c48b8e7028daff861785c2bf2 Author: Jason A. Harmening AuthorDate: 2025-10-14 19:40:39 +0000 Commit: Jason A. Harmening CommitDate: 2025-10-16 15:30:34 +0000 unionfs: avoid vdrop()ing a locked but doomed vnode unionfs_lock() unconditionally calls vdrop() on the target vnode after locking it, but it's possible this vnode may be doomed. In that case, vdrop() may free the vnode, which in certain cases requires taking the vnode lock. Commit a7aac8c20497d added an assert to this effect, which unionfs_lock() now trips over. Fix this by lightly reworking the flow of unionfs_lock() so that the target vnode is vdrop()ed after being unlocked in the case where the unionfs lock operation needs to be restarted (which will happen if the unionfs vnode has been doomed, which is a prerequisite for the target vnode in the underlying filesystem to have been doomed). While here, get rid of a superfluous vhold/vdrop sequence in unionfs_unlock() that was probably inherited from nullfs and whose nullfs equivalent was recently removed. MFC after: 1 week Reviewed by: kib, markj, olce Tested by: pho Differential Revision: https://reviews.freebsd.org/D53107 --- sys/fs/unionfs/union_vnops.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 26fa14603c85..66fee97a07d5 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -2208,7 +2208,6 @@ unionfs_lock_restart: vholdnz(tvp); VI_UNLOCK(vp); error = VOP_LOCK(tvp, flags); - vdrop(tvp); if (error == 0 && (lvp_locked || VTOUNIONFS(vp) == NULL)) { /* * After dropping the interlock above, there exists a window @@ -2234,6 +2233,7 @@ unionfs_lock_restart: unp = VTOUNIONFS(vp); if (unp == NULL || unp->un_uppervp != NULL) { VOP_UNLOCK(tvp); + vdrop(tvp); /* * If we previously held the lock, the upgrade may * have temporarily dropped the lock, in which case @@ -2249,6 +2249,7 @@ unionfs_lock_restart: goto unionfs_lock_restart; } } + vdrop(tvp); return (error); } @@ -2259,7 +2260,6 @@ unionfs_unlock(struct vop_unlock_args *ap) struct vnode *vp; struct vnode *tvp; struct unionfs_node *unp; - int error; KASSERT_UNIONFS_VNODE(ap->a_vp); @@ -2271,11 +2271,7 @@ unionfs_unlock(struct vop_unlock_args *ap) tvp = (unp->un_uppervp != NULL ? unp->un_uppervp : unp->un_lowervp); - vholdnz(tvp); - error = VOP_UNLOCK(tvp); - vdrop(tvp); - - return (error); + return (VOP_UNLOCK(tvp)); } static int From nobody Thu Oct 16 16:14:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnY1f0p15z6CkDL; Thu, 16 Oct 2025 16:14: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 4cnY1f0Hmjz3W3K; Thu, 16 Oct 2025 16:14:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760631270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DjXpJ2PHqe9bRIyORggybpMK+pDDSO/v6HdTLs8RhuI=; b=FHPfYS+7WcjcUv84EXLyFDRrO5ttNWLvCKS0IuKpZVgCqTB5iUxdw0sLgqSp1068CA1xud G1xq8kGE9S7IKzxs5WJY59aj9G0Vk1Xgs4ZGsT1sEldt2bT/3YDXqqAgD/2HZY7nqmSEOr /NcUtlyFu/SbumYIwx/uYSEQT0QrWI4wg+5lYLK8liPJXQ5rOEfE1dIMuyqPTimHt+XtZN yo/lsWjkiTz4Htq/rPjnbRewcTsKbVDeFS42vq4HjmegMqMrkzlIUbQPjSzk9gKb1Zpar9 BNhAMlPKaYkwXGrUPn1xRfYN8ecV/cxwyFAqQ7RHv0BjkZnsOtMnXxcuredtpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760631270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DjXpJ2PHqe9bRIyORggybpMK+pDDSO/v6HdTLs8RhuI=; b=G8cgaItBPZmOCycBPsg4PhwgkOHAfGZtijkCMuyf3Xq1lNpzWr8P1Rp4nN5EzDhmH7yMHE YDMlJd/qLpPkbG+jlcRAkrbKuYVg4rDFowlHI5XDjYhW6UPlMhpNiONilXNweSZ3xXJ1VW 3HmIrZBOMQ8SWEqMOnwoZk8QqyxGWJefNLBmpInPBNol1h9WamNc6ZOwBerZNwvuWuOnmX 3ADvFvW6fXuHtZqpb+SIiwQq4zJy0l44amF4CpY5PvFYPiIIuAunTeyfnBO5lTayEDws3q 1oIRDfkyu/JNbahq0WHtWMwphZ7Li2uhUL0LQ5x+ho5423aWPyC793jlfi39Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760631270; a=rsa-sha256; cv=none; b=QXh8vt0LEnGEnzmnDyZXKa7B8rDbQbuqd4NTBVu22qFqyroWN1Hux7Fpp4W90rl9eHlqGU 0bmgD07MYh9GGDWeE+t2lfzLcXaUvmGfcwGOpd/ks3AXTXM/G3Vt3bKXIKcS4E9d+boICB 7OpntYi65WTEtoUz53pA00gBm11SQH1+Ztiy425P4N6FuLqNmWaj7aFOiBxhORls4fZkRx bqPgtB5+mLIRJQNHCrnn0iKPXSnxZSwOXJ4ZZIeN8ti7H/VOSmq3h6P70zPVUkOmeteSAS 8V1XhcgYJrwAYTlXDKFaK3bmqDdERQollUd0ztbTn4A0FJ2oWjcKc5GsWJngQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnY1d70wMz11C; Thu, 16 Oct 2025 16:14:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GGETIH079130; Thu, 16 Oct 2025 16:14:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGETWe079127; Thu, 16 Oct 2025 16:14:29 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:14:29 GMT Message-Id: <202510161614.59GGETWe079127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: d970d0246fdd - main - arm64: Move BP hardening and SSBD workaround to CPU_FEAT framework List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d970d0246fdd70f65db7226104071330c83e27bd Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d970d0246fdd70f65db7226104071330c83e27bd commit d970d0246fdd70f65db7226104071330c83e27bd Author: Sarah Walker AuthorDate: 2025-10-16 16:11:51 +0000 Commit: Andrew Turner CommitDate: 2025-10-16 16:11:51 +0000 arm64: Move BP hardening and SSBD workaround to CPU_FEAT framework Port the BP hardening and SSBD workaround from cpu_quirks to the CPU_FEAT framework. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D53112 --- sys/arm64/arm64/cpu_errata.c | 96 ---------------------- sys/arm64/arm64/spec_workaround.c | 166 ++++++++++++++++++++++++++++++++++++++ sys/conf/files.arm64 | 1 + 3 files changed, 167 insertions(+), 96 deletions(-) diff --git a/sys/arm64/arm64/cpu_errata.c b/sys/arm64/arm64/cpu_errata.c index 989924bc0567..b876703a2a15 100644 --- a/sys/arm64/arm64/cpu_errata.c +++ b/sys/arm64/arm64/cpu_errata.c @@ -52,54 +52,9 @@ struct cpu_quirks { u_int flags; }; -static enum { - SSBD_FORCE_ON, - SSBD_FORCE_OFF, - SSBD_KERNEL, -} ssbd_method = SSBD_KERNEL; - -static cpu_quirk_install install_psci_bp_hardening; -static cpu_quirk_install install_ssbd_workaround; static cpu_quirk_install install_thunderx_bcast_tlbi_workaround; static struct cpu_quirks cpu_quirks[] = { - { - .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, - .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A57,0,0), - .quirk_install = install_psci_bp_hardening, - .flags = CPU_QUIRK_POST_DEVICE, - }, - { - .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, - .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A72,0,0), - .quirk_install = install_psci_bp_hardening, - .flags = CPU_QUIRK_POST_DEVICE, - }, - { - .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, - .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A73,0,0), - .quirk_install = install_psci_bp_hardening, - .flags = CPU_QUIRK_POST_DEVICE, - }, - { - .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, - .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A75,0,0), - .quirk_install = install_psci_bp_hardening, - .flags = CPU_QUIRK_POST_DEVICE, - }, - { - .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, - .midr_value = - CPU_ID_RAW(CPU_IMPL_CAVIUM, CPU_PART_THUNDERX2, 0,0), - .quirk_install = install_psci_bp_hardening, - .flags = CPU_QUIRK_POST_DEVICE, - }, - { - .midr_mask = 0, - .midr_value = 0, - .quirk_install = install_ssbd_workaround, - .flags = CPU_QUIRK_POST_DEVICE, - }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = @@ -114,57 +69,6 @@ static struct cpu_quirks cpu_quirks[] = { }, }; -static void -install_psci_bp_hardening(void) -{ - /* SMCCC depends on PSCI. If PSCI is missing so is SMCCC */ - if (!psci_present) - return; - - if (smccc_arch_features(SMCCC_ARCH_WORKAROUND_1) != SMCCC_RET_SUCCESS) - return; - - PCPU_SET(bp_harden, smccc_arch_workaround_1); -} - -static void -install_ssbd_workaround(void) -{ - char *env; - - if (PCPU_GET(cpuid) == 0) { - env = kern_getenv("kern.cfg.ssbd"); - if (env != NULL) { - if (strcmp(env, "force-on") == 0) { - ssbd_method = SSBD_FORCE_ON; - } else if (strcmp(env, "force-off") == 0) { - ssbd_method = SSBD_FORCE_OFF; - } - } - } - - /* SMCCC depends on PSCI. If PSCI is missing so is SMCCC */ - if (!psci_present) - return; - - /* Enable the workaround on this CPU if it's enabled in the firmware */ - if (smccc_arch_features(SMCCC_ARCH_WORKAROUND_2) != SMCCC_RET_SUCCESS) - return; - - switch(ssbd_method) { - case SSBD_FORCE_ON: - smccc_arch_workaround_2(1); - break; - case SSBD_FORCE_OFF: - smccc_arch_workaround_2(0); - break; - case SSBD_KERNEL: - default: - PCPU_SET(ssbd, smccc_arch_workaround_2); - break; - } -} - /* * Workaround Cavium erratum 27456. * diff --git a/sys/arm64/arm64/spec_workaround.c b/sys/arm64/arm64/spec_workaround.c new file mode 100644 index 000000000000..7f4f86cdb48c --- /dev/null +++ b/sys/arm64/arm64/spec_workaround.c @@ -0,0 +1,166 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Arm Ltd + * Copyright (c) 2018 Andrew Turner + * + * 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 +#include +#include +#include + +#include +#include + +#include +#include + +static enum { + SSBD_FORCE_ON, + SSBD_FORCE_OFF, + SSBD_KERNEL, +} ssbd_method = SSBD_KERNEL; + +struct psci_bp_hardening_impl { + u_int midr_mask; + u_int midr_value; +}; + +static struct psci_bp_hardening_impl psci_bp_hardening_impl[] = { + { + .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, + .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A57,0,0), + }, + { + .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, + .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A72,0,0), + }, + { + .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, + .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A73,0,0), + }, + { + .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, + .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A75,0,0), + }, + { + .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, + .midr_value = + CPU_ID_RAW(CPU_IMPL_CAVIUM, CPU_PART_THUNDERX2, 0,0), + } +}; + +static cpu_feat_en +psci_bp_hardening_check(const struct cpu_feat *feat __unused, u_int midr) +{ + size_t i; + + for (i = 0; i < nitems(psci_bp_hardening_impl); i++) { + if ((midr & psci_bp_hardening_impl[i].midr_mask) == + psci_bp_hardening_impl[i].midr_value) { + /* SMCCC depends on PSCI. If PSCI is missing so is SMCCC */ + if (!psci_present) + return (FEAT_ALWAYS_DISABLE); + + if (smccc_arch_features(SMCCC_ARCH_WORKAROUND_1) != + SMCCC_RET_SUCCESS) + return (FEAT_ALWAYS_DISABLE); + + return (FEAT_DEFAULT_ENABLE); + } + } + + return (FEAT_ALWAYS_DISABLE); +} + +static bool +psci_bp_hardening_enable(const struct cpu_feat *feat __unused, + cpu_feat_errata errata_status __unused, u_int *errata_list __unused, + u_int errata_count __unused) +{ + PCPU_SET(bp_harden, smccc_arch_workaround_1); + + return (true); +} + +CPU_FEAT(feat_csv2_missing, "Branch Predictor Hardening", + psci_bp_hardening_check, NULL, psci_bp_hardening_enable, NULL, + CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU); + +static cpu_feat_en +ssbd_workaround_check(const struct cpu_feat *feat __unused, u_int midr __unused) +{ + char *env; + + if (PCPU_GET(cpuid) == 0) { + env = kern_getenv("kern.cfg.ssbd"); + if (env != NULL) { + if (strcmp(env, "force-on") == 0) { + ssbd_method = SSBD_FORCE_ON; + } else if (strcmp(env, "force-off") == 0) { + ssbd_method = SSBD_FORCE_OFF; + } + } + } + + /* SMCCC depends on PSCI. If PSCI is missing so is SMCCC */ + if (!psci_present) + return (FEAT_ALWAYS_DISABLE); + + /* Enable the workaround on this CPU if it's enabled in the firmware */ + if (smccc_arch_features(SMCCC_ARCH_WORKAROUND_2) != SMCCC_RET_SUCCESS) + return (FEAT_ALWAYS_DISABLE); + + return (FEAT_DEFAULT_ENABLE); +} + +static bool +ssbd_workaround_enable(const struct cpu_feat *feat __unused, + cpu_feat_errata errata_status __unused, u_int *errata_list __unused, + u_int errata_count __unused) +{ + switch(ssbd_method) { + case SSBD_FORCE_ON: + smccc_arch_workaround_2(1); + break; + case SSBD_FORCE_OFF: + smccc_arch_workaround_2(0); + break; + case SSBD_KERNEL: + default: + PCPU_SET(ssbd, smccc_arch_workaround_2); + break; + } + + return (true); +} + +CPU_FEAT(feat_ssbs_missing, "Speculator Store Bypass Disable Workaround", + ssbd_workaround_check, NULL, ssbd_workaround_enable, NULL, + CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU); diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 856ea3af1372..2f412fa3cb1b 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -73,6 +73,7 @@ arm64/arm64/pmap.c standard arm64/arm64/ptrace_machdep.c standard arm64/arm64/sdt_machdep.c optional kdtrace_hooks arm64/arm64/sigtramp.S standard +arm64/arm64/spec_workaround.c standard arm64/arm64/stack_machdep.c optional ddb | stack arm64/arm64/strcmp.S standard arm64/arm64/strncmp.S standard From nobody Thu Oct 16 16:34:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnYSd3f3cz6Clv7; Thu, 16 Oct 2025 16:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnYSd1Tqjz3ccQ; Thu, 16 Oct 2025 16:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760632465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ja/d+AmetsQ9wpIax+S02eCbTfHJ5LmgGTTOZQWtkio=; b=p9SgfIJ7y2ozEZFQLXEzwPZsfG4IeYWDIGYdi/utNIW43hjk4EJWgBPYiLM81WBUvq38HZ vpRvRb0RGr3pfad/8uxMv1cG/aQZ+eXr2L9M3WjpgS/ylx/wAjOFvnMFo/xgbHKhzkVAnP s0JzqLN95hxKMN4n4quVUr8HggKbzu3B3EDYuAxeyv/gziXNZfuhUujH3Z+eZ0atB0X7we q0sSY0MKPKZZ+OzMjoGLvVccLgoIuk9l2Dc6xXA3C/rcNk4y/No4pBQsPW9OS+j7TpJnz7 utK6r7A0jRhKD/S3xgEeC18qvt4aY4e3cDflNARfgc5589LZZs9J/3YRQ7XejA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760632465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ja/d+AmetsQ9wpIax+S02eCbTfHJ5LmgGTTOZQWtkio=; b=ygHb48c5te6sXuUbvAv+Big1SLOvTOm2W90MFoJ9Xumcrd4Dc83w0U5BVm2t+Y7xO3tVwj BjmYO6aMML3jjAjgqZb7ir9UOHjyFiuIb5KjAo4GBEqV8SA0u/xKTv2l/YRO6OVaF6AmNF AfY6x9CbG9UHB7J0ERkNp5x5nVsMmtXXVt9jl/lZhWw3rafb8PuuhE+JDXwm9ZZGYuxgKv Sw6G+BD1/dZOPJMxbx9IiIyB9zq7f/ta6MALSoDyuROg4kccA5go77Tn5cfhxae3nEPciy Vte0dEupNk2W4Y0lzDVi8zgdy6VX+OncTfl3ElacjpcftOlhmTUQC6tz+U+eBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760632465; a=rsa-sha256; cv=none; b=Yt0681TUrVfN/MQVhZrUfWykZVt9LUQEpukd2dlqvm1F6MgqdNzW9VGQmfyR1WGinsCmsG XvQL1OccxSSF0LIa6Xl0KeVeg12JJe2lCDXf04EO9/wxmIBMzQ42oMClne5XVDbyyaUVwZ J2zbN2dFiC6dUnAV09RVxO3IpHh3eLLgPmF4W02UZP9McVU5vkhT5Q21jkmMfpGpnL4Dr/ fomx9rPzq/jS9NGaqVaEEQiqv7AxBToFNLvxBZ2L1iudtdxoDG4In/zPk577wGsy/Py9yA j51mMNYncYhjgxFxrkdCBXIElqAKiFK5Zcne5gUmrFZsSH3qllfrmOvwxZNKWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnYSd14dFz1ND; Thu, 16 Oct 2025 16:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GGYODt017159; Thu, 16 Oct 2025 16:34:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGYOr7017156; Thu, 16 Oct 2025 16:34:24 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:34:24 GMT Message-Id: <202510161634.59GGYOr7017156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 654a3aa9a1de - main - zfs: Emit warning upon use of legacy sysctls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 654a3aa9a1de176648eec00b3c201c33b10bd325 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=654a3aa9a1de176648eec00b3c201c33b10bd325 commit 654a3aa9a1de176648eec00b3c201c33b10bd325 Author: Ed Maste AuthorDate: 2025-10-09 15:57:14 +0000 Commit: Ed Maste CommitDate: 2025-10-16 16:34:15 +0000 zfs: Emit warning upon use of legacy sysctls The introduction of OpenZFS moved some sysctls, and legacy compat shims were added. For example: Old (legacy) name: vfs.zfs.min_auto_ashift New name: vfs.zfs.vdev.min_auto_ashift Upstream OpenZFS removed these, but we've temporarily restored them in FreeBSD. Note that l2arc sysctls use generic sysctl functions (e.g. SYSCTL_UQUAD) and thus cannot trivially have warnings added, so they are not handled. PR: 266374 Reviewed by: jlduran Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53033 --- .../openzfs/module/os/freebsd/zfs/sysctl_os.c | 41 +++++++++++++++++----- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c index ace2360c032d..ebc2c0eeb6d2 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c @@ -163,6 +163,13 @@ param_set_arc_int(SYSCTL_HANDLER_ARGS) return (0); } +static void +warn_deprecated_sysctl(const char *old, const char *new) +{ + printf("WARNING: sysctl vfs.zfs.%s is deprecated. Use vfs.zfs.%s instead.\n", + old, new); +} + int param_set_arc_max(SYSCTL_HANDLER_ARGS) { @@ -185,12 +192,15 @@ param_set_arc_max(SYSCTL_HANDLER_ARGS) if (val != 0) zfs_arc_max = arc_c_max; + if (arg2 != 0) + warn_deprecated_sysctl("arc_max", "arc.max"); + return (0); } SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_max, CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - NULL, 0, param_set_arc_max, "LU", + NULL, 1, param_set_arc_max, "LU", "Maximum ARC size in bytes (LEGACY)"); int @@ -214,12 +224,15 @@ param_set_arc_min(SYSCTL_HANDLER_ARGS) if (val != 0) zfs_arc_min = arc_c_min; + if (arg2 != 0) + warn_deprecated_sysctl("arc_min", "arc.min"); + return (0); } SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_min, CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - NULL, 0, param_set_arc_min, "LU", + NULL, 1, param_set_arc_min, "LU", "Minimum ARC size in bytes (LEGACY)"); extern uint_t zfs_arc_free_target; @@ -242,6 +255,9 @@ param_set_arc_free_target(SYSCTL_HANDLER_ARGS) zfs_arc_free_target = val; + if (arg2 != 0) + warn_deprecated_sysctl("arc_free_target", "arc.free_target"); + return (0); } @@ -251,7 +267,7 @@ param_set_arc_free_target(SYSCTL_HANDLER_ARGS) */ SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_free_target, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, - NULL, 0, param_set_arc_free_target, "IU", + NULL, 1, param_set_arc_free_target, "IU", "Desired number of free pages below which ARC triggers reclaim" " (LEGACY)"); @@ -270,12 +286,15 @@ param_set_arc_no_grow_shift(SYSCTL_HANDLER_ARGS) arc_no_grow_shift = val; + if (arg2 != 0) + warn_deprecated_sysctl("arc_no_grow_shift", "arc.no_grow_shift"); + return (0); } SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_no_grow_shift, CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - NULL, 0, param_set_arc_no_grow_shift, "I", + NULL, 1, param_set_arc_no_grow_shift, "I", "log2(fraction of ARC which must be free to allow growing) (LEGACY)"); extern uint64_t l2arc_write_max; @@ -746,12 +765,15 @@ param_set_min_auto_ashift(SYSCTL_HANDLER_ARGS) zfs_vdev_min_auto_ashift = val; + if (arg2 != 0) + warn_deprecated_sysctl("min_auto_ashift", + "vdev.min_auto_ashift"); + return (0); } SYSCTL_PROC(_vfs_zfs, OID_AUTO, min_auto_ashift, - CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - &zfs_vdev_min_auto_ashift, sizeof (zfs_vdev_min_auto_ashift), + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, NULL, 1, param_set_min_auto_ashift, "IU", "Min ashift used when creating new top-level vdev. (LEGACY)"); @@ -771,12 +793,15 @@ param_set_max_auto_ashift(SYSCTL_HANDLER_ARGS) zfs_vdev_max_auto_ashift = val; + if (arg2 != 0) + warn_deprecated_sysctl("max_auto_ashift", + "vdev.max_auto_ashift"); + return (0); } SYSCTL_PROC(_vfs_zfs, OID_AUTO, max_auto_ashift, - CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - &zfs_vdev_max_auto_ashift, sizeof (zfs_vdev_max_auto_ashift), + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, NULL, 1, param_set_max_auto_ashift, "IU", "Max ashift used when optimizing for logical -> physical sector size on" " new top-level vdevs. (LEGACY)"); From nobody Thu Oct 16 16:54:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnYwF2My7z6CnDx; Thu, 16 Oct 2025 16:54: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 4cnYwF1h0rz3gLK; Thu, 16 Oct 2025 16:54:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zie2NdrWICGiWg3ZJb6xY7tqRqF38PfO6see3dHVuy4=; b=PlU2ZjWwqnrhjGAKLXm5ZYA9a3IPxild9qgUf7c4vGg3ZCbeuOy07MFlMe8lRALzq9PJpS d8rOoG35gCPWxSGwQzWvrAES/jEUwyGFYzebA6osP/LCG01lOl2FpHfIS9qexE/A4sn+bH VPtK0WdFSWnqOT7oQeGFA4G/IPZ9yu0SSv5VhE6isS/kQiVUazNaJCGy+oO6S5gxnKi+ug v+iF5Ltnwq9uAZyc9256pIpzXzNpPilKNRIsY2p/qaR8VMarv7lH8e4dD/oDrCVKuxDhmH nHZE/m0zDEArSzv8OCDIpSTDwuldlrWrvEcCV3+NuyMv5hXDAxXNkJwkCXXt8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zie2NdrWICGiWg3ZJb6xY7tqRqF38PfO6see3dHVuy4=; b=qpnaX/y49OqrTwczfzShjLkK7PgiTwYSk2wtrPpm5jIg2Wb/yPu/MrnkmipbC1qHUTi+rv n3hCLzzYIr2KRkBz49oXzaYITYge6kDxXytoo7afUuqyk7ICt1mliySnfw5egRLTaaIcA1 OIirz16Ta5TuwoXB5qd1bBJHT61XNGXvPUSnBb4wDlQtVbZ8wrYxvtdWyQajrZH0Mf8Wp3 VNIdBMl4BtL57NJnOA4LvnILj0mgrGa1amViwdqjPFHB1x7kn5LbuWh1UfUIerOsYeb8Wa xUVtBQ54ZBlQEd3COeWqK1iyQVJIPkdbuD+E2eDLDQpXM953eUGVqGLwz0jFOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633693; a=rsa-sha256; cv=none; b=U/8E1wQCgOuAHUngParO0JGdSHQxi04yx9Qq8Td99ltNFsztmtHNftCNq+lQlUj0d+3bSQ hxCBQaUVBmtDvCLGPXMBFaGb97hptI/+P4IbUs6rGiT9UkmscCMmhGM1JC8SF8dRWjGrK5 C3w/kStQ2K8Uu0X80jUpqXxmYP+sYcBS+egQQYjQ61SGYSplhmnB1f9BE8YqdK+9+N6wMu 4NbUdz1YSvkhaWiWJ8qyoYoFLWY6HsYcMmDL3GnRpcK8s1TfH8t/v6UgsFvfDEvOlrykD/ +OlUBqAmmoMtNEb0d8OTc5chgCX/mhSWo6rzFN0zU+xstpxvcnsEonDr2gdjmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnYwF0z1Dz1Xr; Thu, 16 Oct 2025 16:54:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GGsqvV054327; Thu, 16 Oct 2025 16:54:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGsqbs054324; Thu, 16 Oct 2025 16:54:52 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:54:52 GMT Message-Id: <202510161654.59GGsqbs054324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 1fe6497b48d6 - main - socket: bump socket buffer limit to 8MB List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fe6497b48d6954ac07870d920b2e5d6d206be5e Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1fe6497b48d6954ac07870d920b2e5d6d206be5e commit 1fe6497b48d6954ac07870d920b2e5d6d206be5e Author: Michael Tuexen AuthorDate: 2025-10-15 20:04:00 +0000 Commit: Michael Tuexen CommitDate: 2025-10-15 20:14:53 +0000 socket: bump socket buffer limit to 8MB Bump the socket buffer limit from 2 MB to 8MB. In particular, this allows to use larger values for TCP sockets, which may result in higher throughput values with default settings. In the review I was proposing using 16 MB, but in the transport call today we settled on a more conservative value of 8. Bumping it further will be done in combination with mitigations for mbuf exhaustion attacks. Reviewed by: rscheff, Peter Lei, jtl, thj MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52873 --- sys/sys/sockbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h index b4593f38f592..739723754b7d 100644 --- a/sys/sys/sockbuf.h +++ b/sys/sys/sockbuf.h @@ -62,7 +62,7 @@ #include #include -#define SB_MAX (2*1024*1024) /* default for max chars in sockbuf */ +#define SB_MAX (8*1024*1024) /* default for max chars in sockbuf */ struct ktls_session; struct mbuf; From nobody Thu Oct 16 16:54:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnYwG3yDpz6CnKH; Thu, 16 Oct 2025 16:54: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 4cnYwG1PvJz3gNp; Thu, 16 Oct 2025 16:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LsL5yxLCqg6BmBO9+CAAhBoNMCIw1lQQ/7VOItmyl0k=; b=oinSpWlcaEZQ4PxhebOJUEYxrB/5pVqCTQDIcgqfDgbbXZPCr+PPIXStFBZ4MM3LGekdcp D+j82Ql7iAxtwOtebuhR/x+toTLSAfUDMblZy76QNUMQ3WyT6IE6FBNi050ikPIpTHNIBj MON7EYuZvrMrJ+I2pekcXCB6uWNolLjj/R87lX5xymQ1hch9dM+cCiQa7W1QMYpkk8plqU xrgHevaC6zaTk6anec4/Xn105vaIW44N9ii9bwZWPUxKi/6QwNbBYSORStAz43tt1iJK66 kyEqyamiSPA0M1yAxBov6yTo6/sagBGEEJ9kGmvxTkeesqP3z3ydhKfjmf90DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LsL5yxLCqg6BmBO9+CAAhBoNMCIw1lQQ/7VOItmyl0k=; b=qBQS5coaiqzI//gx2GLFrajjR18dHtulE033IOrSG3i9jElk2AUoLjfT/bOpG9egAUFa2v O0E178jPyoBsuSg+mYvUmuU7jsZB8EUlx7qRBLIUJxZ8ZqleeE8N3SOlGOxPT8y4GW7fLy dcFzOM3Rlgjp0CB9auYNiA5Nq/e6NRiDOPI3bviw7uOdzI4h6Y0geYf5nPHGK73QAawggd AYk3tT7/PkUSb2dnx/OMQLCnJg4d7agsNUH8uzJjgFlNYyw1RACc8Z3Zdnvh2FNWmolVp6 BACHqhw1i1VOiJC3CVzN1Te4q5H2l1FwzO4jdElXdbCM4RRUNeQzUv+r/ZxIvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633694; a=rsa-sha256; cv=none; b=vrmBDQRs16bCXt/huadyn36JKBvWrrAIzfkGoBPycfqBcneRu24ZmzlcONl6U/31cIzwRs 2nKesDTsdjrRmdWlTgqLMpvkvYpbiRpE4NSZhZJFIhelQF+JPn6eAj6hmj9cHAn8d/0qGh G2l62JnciRt2fIrso27t/kq8EpyCgaWFJKpRPWWItNPMId8VN+nQvbX/OC3hGhwVPxBE38 E6Tt2IA5v31vTcA3Aneec+sk67SiLaclefbT2V8vnLmJKa0kBbmtVTZr1X+iYlGB8oPnPq RirEgE96mdo85fFEkuH7NKH5mWxbdtAU0oC2yE4qw8f1kUHLxtkcz9N2Y1K8Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnYwG0vl6z1Xs; Thu, 16 Oct 2025 16:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GGssUO054362; Thu, 16 Oct 2025 16:54:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGssdK054359; Thu, 16 Oct 2025 16:54:54 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:54:54 GMT Message-Id: <202510161654.59GGssdK054359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 9dd4742ee51a - main - tcp: bump max snd buffer size for autoscaling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9dd4742ee51ae80639b087a60ce7d15811c2b1e6 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=9dd4742ee51ae80639b087a60ce7d15811c2b1e6 commit 9dd4742ee51ae80639b087a60ce7d15811c2b1e6 Author: Michael Tuexen AuthorDate: 2025-10-15 20:19:14 +0000 Commit: Michael Tuexen CommitDate: 2025-10-15 20:19:14 +0000 tcp: bump max snd buffer size for autoscaling This allows in higher throughput values with default settings. In the review I was proposing using 16 MB, but in the transport call today we settled on a more conservative value of 8. Bumping it further will be done in combination with mitigations for mbuf exhaustion attacks. Reviewed by: rscheff, cc, glebius, Nick Banks, Peter Lei, jtl, thj, rrs MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52872 --- sys/netinet/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 2dfb7faf56e3..208f72c4661c 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -123,7 +123,7 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, sendbuf_inc, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_autosndbuf_inc), 0, "Incrementor step size of automatic send buffer"); -VNET_DEFINE(int, tcp_autosndbuf_max) = 2*1024*1024; +VNET_DEFINE(int, tcp_autosndbuf_max) = 8*1024*1024; SYSCTL_INT(_net_inet_tcp, OID_AUTO, sendbuf_max, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_autosndbuf_max), 0, "Max size of automatic send buffer"); From nobody Thu Oct 16 16:54:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnYwH4P61z6Cnc7; Thu, 16 Oct 2025 16:54: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 4cnYwH2NNpz3gLX; Thu, 16 Oct 2025 16:54:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GMnxmCnkCUkFgM69o5q7Ieh6My4ME8O4pfcf5t+N04A=; b=epOCzdrIujlto52kYs0fSNDsufiy3SfpqZK43aDmrIf3F2rlIc6bXzCOZom3zkmz0vCNHV l1+pQ0pZxFign2AKUrJMxZNUGp0/hVExvtiviYGSIoiCLSHK2gdYd4LnheEFax+dDVuVea nGqbPv1Y2ORnKZdqjj4KKEH6cHVTQLcGI8wJPynidwtNgV/ntY4sLZ5YaEuKKlsXqubQCf lJFlCZVdaKKxBQ29s8tiL6fWtnL+5x1lBd50n8kdu+1xixfFeCqX7LQq/fW96PbyvvKB+O RyXxXyxmvqu36tBDNHlMPHGcMiWITvDZfxEEWvuKEws69U+KvKREeZQgfSc73A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GMnxmCnkCUkFgM69o5q7Ieh6My4ME8O4pfcf5t+N04A=; b=k1ppHay/iCYIbyQooDdqwubap4Pv/XqDx8R51MR/BShiLRlz2ZEkfhgtKYLRSWtszAeWI1 nfHJ20bXggi2gWYT/kT3jDqox4ROyJoQVL1ohvr2msNqV6qwz4JaZOWAdnRpV9FaDnjLLK iHgmLNCems1C8xZRsSlw/IPi6y9MQOSMCiFWN0kYohRA4ECoCNY7nNcuiFcdiYwxchLNQL YNgxW8nTphXs7Z3j+/RPAurTXXNfg7C/uaeM0KiuNEjZ930xEEnwtMHmrefsXAIPqwg5QM RIPDCs96Hpo7dFl1S2KDv6iPzCLGzzSatJQTA791G/NprdqOE+DQ/cn2mwTq3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633695; a=rsa-sha256; cv=none; b=U3LC+XByt5jC3yXcE22pOScQgTtY7VpcNr83DtLKgKjb9MweRIV38WtUq0HAE5IgR3LEvF UgB7z/ivAi/AEmEvex3Ay9dTaBhVhl+32CeqXeNyiBXY/NlVIuo1EY9m1dqNBRlOx12VAa 16HUfUlg441OrQlRZTCsXvzsp225CTjfVe+mjo40clwQUMSNXVkRQkqMeHddgs/krYqGxn NixBFuiV+goYbpv1LyEcHCuC/i0ueam36gUNv8/hV9K9zkq+xmMwCxNNQhrA2DWvaTCWVE ppnt9g2DPnToY01FePZMNVrvc0hsjHmbwDCrvuhUR4L0fy+Bjr5eKn1kW2opjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnYwH1rdkz25N; Thu, 16 Oct 2025 16:54:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GGstdn054398; Thu, 16 Oct 2025 16:54:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGstiB054395; Thu, 16 Oct 2025 16:54:55 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:54:55 GMT Message-Id: <202510161654.59GGstiB054395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: baeff75122e5 - main - tcp: bump max rcv buffer size for autoscaling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: baeff75122e5cdb669c920414e054224270383d7 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=baeff75122e5cdb669c920414e054224270383d7 commit baeff75122e5cdb669c920414e054224270383d7 Author: Michael Tuexen AuthorDate: 2025-10-15 20:24:51 +0000 Commit: Michael Tuexen CommitDate: 2025-10-15 20:24:51 +0000 tcp: bump max rcv buffer size for autoscaling This allows in higher throughput values with default settings. In the review I was proposing using 16 MB, but in the transport call today we settled on a more conservative value of 8. Bumping it further will be done in combination with mitigations for mbuf exhaustion attacks. Reviewed by: rscheff, Peter Lei, jtl, thj MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52871 --- sys/netinet/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index dd27ec77c1af..2146b0cac48f 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -219,7 +219,7 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, recvbuf_auto, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_autorcvbuf), 0, "Enable automatic receive buffer sizing"); -VNET_DEFINE(int, tcp_autorcvbuf_max) = 2*1024*1024; +VNET_DEFINE(int, tcp_autorcvbuf_max) = 8*1024*1024; SYSCTL_INT(_net_inet_tcp, OID_AUTO, recvbuf_max, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_autorcvbuf_max), 0, "Max size of automatic receive buffer"); From nobody Thu Oct 16 17:18:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZQz6XDWz6CqGv; Thu, 16 Oct 2025 17:18: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 4cnZQz628Tz3rmj; Thu, 16 Oct 2025 17:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760635083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1w068vmWV3cSEBAherc6KeWGOTizD5Tqh61qWPYdsEQ=; b=Jv+geJwI+u33N9Uo5hWGbtd1e3tIBVpQlSxMkWrBiIMJ47d+uvDtz7NuP4EhPMOJtrG295 XTm36HnKGLi13CyFl5GnpMhZ9MRVSPdYOZon2/k6JyhlZ4aK8F90/lrldkcfBcE8Gq67bj DyZ7BT6oThvEJE1EfVbVrltiHHobb8p51ytQQuM/11Jn6Mu8tCkYi4Rx3nB6zgU8u5TmxS I2nO79bfp4VOLnYACAdCfir2bhOoCSd3J4zm/qkFg0vlS0Rm8yKPcwVpEID0DXFzEIzPJP 4ptDMYyhlxqYK2HQyauSRUwnJQuWnmmvfFzNfHet/DuAG78jvAX2SobMtylySA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760635083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1w068vmWV3cSEBAherc6KeWGOTizD5Tqh61qWPYdsEQ=; b=YoPBupzJK25erXS7EeTl9CcJ4iSw4BfJr2OTMdOGiYtFQB8fUmhEHxIbgBeyPt4IeaJhX7 K2NmhL3B3MbtfbpJoCwoJUhEY1TArr229fkQnVxPJ2p8IfJot8K7quAvU32/b94gENhAof LZdCuHCceVBesWnwYpnBJDdejkIfEnI8mV92xzTVkSxBLmB4YdHLsoOCA2F9WQiy44vUHi WG4y561Vp5Byju4MqHQS2/45u9zXHoK/ISlUszAsck/A8THHLIM/QlUZdNgEy1j5ApYBrI HPe4FCWO6S5um04LLo3OaTA6IWCBHBwFNRJddDZeVJGBfxrYnIZlVThu3u9RUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760635083; a=rsa-sha256; cv=none; b=vBcXPZ7rKdu/rPKNkL7Fzeky3Vv34hZiust41/utUdqlZr9yxGDBSJ1VO0GVqDGKzaGVmY joEB6mcfP3xtISMU7YTycw/opi2eRwT+dE8SHcKmT0OJQ5eDnwEkRJY7TFHKQbvMCw+D6N Ig+Her8VdXQ5DAUq0jfyzxwoVJAfDY9LGLVULiwTeiTxxTj2xfx+9GfeyTJW0/3fTpMyL4 UIxg4u59HVNycctvrtvJRW3x18BusqRaR0srUzsxF25TaRQVHN6hz0QNP46xVU9Tst6b+x OpA3s5MlZ4GHilwughr8rZla/X2kydRgwAgVVG+Xp53b7NHiF/LBk0h+HQNEig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZQz5cP4z2Dv; Thu, 16 Oct 2025 17:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GHI3Re094910; Thu, 16 Oct 2025 17:18:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GHI3MH094907; Thu, 16 Oct 2025 17:18:03 GMT (envelope-from git) Date: Thu, 16 Oct 2025 17:18:03 GMT Message-Id: <202510161718.59GHI3MH094907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 7f5267a99895 - main - nvd.4: Add a HARDWARE section for HW Relnotes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f5267a99895a797ea135b67aa58d561ee52b279 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7f5267a99895a797ea135b67aa58d561ee52b279 commit 7f5267a99895a797ea135b67aa58d561ee52b279 Author: Alexander Ziaee AuthorDate: 2025-10-16 17:16:23 +0000 Commit: Colin Percival CommitDate: 2025-10-16 17:17:31 +0000 nvd.4: Add a HARDWARE section for HW Relnotes MFC after: 3 days Reviewed by: dab Differential Revision: https://reviews.freebsd.org/D52867 --- share/man/man4/nvd.4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man4/nvd.4 b/share/man/man4/nvd.4 index d5145939e409..1861fabc91d0 100644 --- a/share/man/man4/nvd.4 +++ b/share/man/man4/nvd.4 @@ -31,7 +31,7 @@ .\" .\" Author: Jim Harris .\" -.Dd May 18, 2019 +.Dd October 2, 2025 .Dt NVD 4 .Os .Sh NAME @@ -72,6 +72,10 @@ Note that device nodes from the driver are not .Xr GEOM 4 disks and cannot be partitioned. +.Sh HARDWARE +The +.Nm +driver supports NVMe storage devices using NVMe namespaces. .Sh CONFIGURATION The .Nm From nobody Thu Oct 16 17:18:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZR10jHDz6CqQ5; Thu, 16 Oct 2025 17:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnZR06pRpz3rMS; Thu, 16 Oct 2025 17:18:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760635085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HL4c+PksOXsnnYnGDLsJQzdOxCNB6lsXtIO+HJzYEOo=; b=O9wczP1TnhEdoEtATwDKUAv9bQNZ4EfVaUd3EHJ9V5AkvBEkUdFnCAPCbl46wBNj+Tx5xM k24uckrRGTCoLZG7hNTT9bt0qUd8HogQIfScY3svtXBh8plWstWpPMbL9Y2Xg9MPOmzPOx 2uWTVaKqGxx3k42MplXo5ca5HPBL9FmF/LIdSu54PN0wR7ptGsZZPbXym2rJ8XXHCqrkbj UgcmWtGBWKDgXxU6T/YCS7m+S/tGZYRciq24C2hFQ212kmVx5Uffdva5FBbi8Dc/pn6l0J krMFLvpPhacMMB8dXDMWycVX5byof0hRffsk868tFLSHbnJwWtapOXHrnGhFcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760635085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HL4c+PksOXsnnYnGDLsJQzdOxCNB6lsXtIO+HJzYEOo=; b=qKbOa4D4gzvF1Wtocxqt/2VIaFCAlxzun9kduQryvoFTTXFJpC0hw2dI4GgiM+SS/LuRo9 jHsQyO5lsQ6J2tr0Z56Ddki3/G1UPyvyP4OCaxhxZRJd1PA1QSMnxvXRBhl2Qv0g9X9em0 kxQIowCR3vlhe0ekP4s5umQ2zbTiw8TtR4BFOXr9qrDGM/xl0zx0e0skL6uwV9s9LCBZaJ 7YTjLcihl8YQcu2lsnciVMOMKw/3PJw57eaRu/hHSiwCiv+WbFnlDYcN3ghvqvdfL9qNbI U9ebVMYwgQclOVBef662VdKKrb36MYe6pkhZYEy0kmCMe9JxQQMPyKXpZaKlww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760635085; a=rsa-sha256; cv=none; b=gczMtY96w3+l8hXsoIIBXsVLNbHmDV2nA+uSqSdrgje5A4zCh9E/q00Msz6c+BIQWwjgvu ppHeZJLYZgNq8dS1YByzvnAjX59STiVu5dikK0tXXhbjlXDv9anplsBaZyIKUMjC2CsLsb Y2qyGVaPyjJSDIFZtKCbNfcHHoF6tdxfPStxIoFf4F40WMMAEuY+ggAdxsAHvNpfGe5zfD odT2yX0uQhbnsfbxnoQkAVts//wDXwdac0qHsDRBy+AbovlyI9pWwLWU3irrpSA8ZOWpyc MlLAXO969SKR5XfwN+czbWXok02SzzbU8FpUvCYqhJeMKKtrZSYxZkoSGwYNpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZR06C7Jz2Wn; Thu, 16 Oct 2025 17:18:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GHI4Io094943; Thu, 16 Oct 2025 17:18:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GHI4bB094940; Thu, 16 Oct 2025 17:18:04 GMT (envelope-from git) Date: Thu, 16 Oct 2025 17:18:04 GMT Message-Id: <202510161718.59GHI4bB094940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 8a9f1a228668 - main - release.7: Update RPI example + CHROOTDIR + SPDX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a9f1a2286689c447e8528dc79ee6c4a47423fdc Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8a9f1a2286689c447e8528dc79ee6c4a47423fdc commit 8a9f1a2286689c447e8528dc79ee6c4a47423fdc Author: Alexander Ziaee AuthorDate: 2025-10-16 17:16:48 +0000 Commit: Colin Percival CommitDate: 2025-10-16 17:17:39 +0000 release.7: Update RPI example + CHROOTDIR + SPDX + arm/RPI-B.conf no longer exists, adjust for arm64/RPI.conf + document default CHROOTDIR, also add to FILES list + tag SPDX MFC after: 3 days Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53078 --- share/man/man7/release.7 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index 05f80374926f..2493a34721bc 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2002 Murray Stokely .\" All rights reserved. .\" @@ -22,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 11, 2025 +.Dd October 13, 2025 .Dt RELEASE 7 .Os .Sh NAME @@ -136,6 +139,8 @@ configuration file supports the following variables: .Bl -tag -width Ev .It Va CHROOTDIR The directory within which the release will be built. +Defaults to +.Pa /scratch . .It Va CHROOT_MAKEENV Additional .Xr make 1 @@ -636,6 +641,7 @@ Typically, one only needs to set .El .Sh FILES .Bl -tag -compact -width Pa +.It Pa /scratch .It Pa /usr/doc/Makefile .It Pa /usr/doc/share/mk/doc.project.mk .It Pa /usr/ports/Mk/bsd.port.mk @@ -688,16 +694,10 @@ the Raspberry Pi, exist in the directory corresponding to the .Va TARGET .Xr make 1 variable. -For example, to build an image for the Raspberry Pi: -.Bd -literal -offset indent -cd /usr/src/release -sh release.sh -c arm/RPI-B.conf -.Ed -.Pp -To build an image for the Raspberry Pi 3: +For example, to build an image for 64-bit Raspberry Pis: .Bd -literal -offset indent cd /usr/src/release -sh release.sh -c arm64/RPI3.conf +sh release.sh -c arm64/RPI.conf .Ed .Pp After running these commands, all prepared release files are available in the From nobody Thu Oct 16 17:26:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZdF3jvMz6Cr4H; Thu, 16 Oct 2025 17:26: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 4cnZdF2wVmz3v8c; Thu, 16 Oct 2025 17:26:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760635617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FhnH0rwhsCyotvNbiXA4KbKhPNvn7aNcqdZys5FywLU=; b=BTXIdU81vF/O+X0WKUZ7hgfWe4B44e0MoifQdLVnE49MmDDhklA/xWrhEPBkbqoUT8rHrh x1EgR97FpqkcjPchpUkUraObmQJpo+ewOiWuycM7UWUeBXgCnpMuThZy3CA4AVx7iYjZLL bmdVWlUCVMXPAYt3q9WORHYMBGl+ZWA+LbJcEvkey6C+YYUpHygivQMAq1wbYRjlcY1Nvz xpP7I5dxRc2jgHnXK8O8zULyMAquhtcDH32jTs9yLISyZMCq1vpcLr+vuc0W/Sskp0xnR0 i4skuU0DjgC9eTEHsuG8wao0mGzCrDNv31zRi+1IQtX62QFyGJMZA6dhu4146g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760635617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FhnH0rwhsCyotvNbiXA4KbKhPNvn7aNcqdZys5FywLU=; b=VaxDNNWhu0xrvYsNevZIRe8MHYhGIRnOPC8Q3xGlb/gU8KikZ4qjyF5fwQTewvna+oAVQu Um7z5sGslOkHHoY6f4emHnU+41DJNq/icxVHdKjR4seGmQQOSfgd3/ZMj9dl0bMfdXFZ6G qjW6zI8sof1+BL5Q0Y7I9hhYgc3wK2VPuc+r7ymg2Kw4g30M6n263C3FNAdEgkaXWyT2b/ p3t6dFzbjW4AdVb+c+2Clm1SmAwViMhifeBXeEh7uOqPANzpBJFSYaw41FZ98DMB+iiSt7 /g53zCTofKzMTOL6axeIKsDjEQfMcyrAcpzm5iIs/9RuwJoXpWTJq/jo3MINeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760635617; a=rsa-sha256; cv=none; b=s2NT/lSttMBLrSZWEdNXYZrIkQzaycxB+J/V2TD+BXVDLMqUp9huzTeLH2HSRPq+CLbvTU cvSltMFdFKts/yEr8YVltC84BjOSpvMxNNKn4yGmuR6NXSw3el+2stkPEnXS4UXLfRLMWO rfjAM5pJsREzH6wr8/jqsQtsty95JVLdGZ28NhhfLyhx/ZOzKm3/gQN4v9U3lcreXWbWkQ VnmCBhlrjdevH0Bka2g7wNYuTS/tuTgd+6YLiHeJTzx6AVv3CGDLfrZdR5c3PZuXg3O9l3 nbPyT62HTgPotZk+OMXJsgh7XiPV6juUZrmFK3+ObWlQBH7VDN8vLoFJkPXBog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZdF2WG2z3H9; Thu, 16 Oct 2025 17:26:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GHQvKC013382; Thu, 16 Oct 2025 17:26:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GHQv56013379; Thu, 16 Oct 2025 17:26:57 GMT (envelope-from git) Date: Thu, 16 Oct 2025 17:26:57 GMT Message-Id: <202510161726.59GHQv56013379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 93ee9bb42461 - main - nanobsd: rescue: Update legacy sysctls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93ee9bb424619f0189b3454380588c955222b89b Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=93ee9bb424619f0189b3454380588c955222b89b commit 93ee9bb424619f0189b3454380588c955222b89b Author: Jose Luis Duran AuthorDate: 2025-10-16 17:13:49 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-16 17:25:40 +0000 nanobsd: rescue: Update legacy sysctls Reviewed by: emaste MFC after: 1 hour Differential Revision: https://reviews.freebsd.org/D34598 --- tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt b/tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt index 1f475c957c0c..ece050bfab55 100644 --- a/tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt +++ b/tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt @@ -25,10 +25,10 @@ zfs_load="YES" vfs.root.mountfrom="zfs:boot/ROOT/root" #ZFS optional vm.kmem_size="8G" -vfs.zfs.arc_min="1G" -vfs.zfs.arc_max="2G" -vfs.zfs.prefetch_disable="1" -vfs.zfs.zil_disable=1 +vfs.zfs.arc.min="1G" +vfs.zfs.arc.max="2G" +vfs.zfs.prefetch.disable="1" +vfs.zfs.zil.replay_disable=1 vfs.zfs.zio.use_uma=0 #Power savings hw.pci.do_power_nodriver=3 From nobody Thu Oct 16 17:26:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZdG5fwmz6Cqdy; Thu, 16 Oct 2025 17:26: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 4cnZdG3PSLz3vFB; Thu, 16 Oct 2025 17:26:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760635618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iRB2pQ+KNFveb8LpHpBDZZc29hETZ89yKlVmJRrrRhI=; b=CL1rvDsaLYFy3hsj2/9FqzZ4k5CuiiFEGfdBAq3iKTGQ0XFChCcmCsdJRqveC+DXBYEd8V 2osQeAoQaq80BLLayD46Cmt6KYjyDXTxD+/qCqGlL7oxKv7/cMo13AzPbOQY6aJAuTDHM/ TXIdwWlccQ+MghipPuHYXyEkkC6pk+oSh3SiQ1Vct5Qi3N55w2Zkau2+5kPR8IDdyQmb7e 0Q/hM4+01mBMfSgxBDMcoQ4/UowdIQaMcTzeKFP3KfYVIK/q+idp1EnD5RenRKKabFFaOs Mg++MTpiWHcIB5VMvQBjf0xK7XnTsQyOjxX8lqm2Ond71hYWHp8dLKpUXFgIpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760635618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iRB2pQ+KNFveb8LpHpBDZZc29hETZ89yKlVmJRrrRhI=; b=E+trk+yKNQ4vZFIji6NG9aFi6cmRHAwJwKtiLW5qyXdWvg0QLio99r7CH7nd2E+FCuDnjH lWQW8yiuZy7BOGITfHL9Bt2K4zOvyFIzfllM31NBgrYC+NUe9B6IYcpBnMojVGmNom/eBw 2WLLSv0VJxkvz4VbjlqAMjN2rYXUobo+gSnhl6lFW4olVCeAbDMzwf16oyAKgky+yctLyZ mpWBstPgFJvk8aTq2ptDHQkOba+en7Z27YyjmhWyyc8CcieZpjw0fWw6J1CstxjqCNUKOw cjeAXu5y1cXnv5gtdKNhqpQraQ70UABbm0wYoSpDm0MpY6StGS/1mzBr/whC8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760635618; a=rsa-sha256; cv=none; b=S6fcv0dyqzpn9lEgBzeh1NMQijbeNLHKzq/Zqm/L8mMoCWDkFaJqLkBilJXcwOHCLQxVpx 7WFDyTbb19klaMn4L8Yrd7UHXvT9vf/bgopFk3l3YZlxb4NLgjfzBXUTZBBy0w6385nVhQ zuGRgr3kDo0nizkrmDBRMbXnYK4IiPI4Vc4eWi3Wkjn3b62kTxDsEWs06FJHd9y3UuvidR emB3ZwRIHOUZV0I36P3a6MnY4bz5Si00AcIgcakkMOC0IbxP1u+iL3Ski7OSIFeCYws5IG vuwPMQBrBt2KiMgCXxao2u3d2GeFvwqf0rX/rya1fw0h7VSsVl2QjnL+piApgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZdG30jzz2ZN; Thu, 16 Oct 2025 17:26:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GHQwHB013419; Thu, 16 Oct 2025 17:26:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GHQwpN013416; Thu, 16 Oct 2025 17:26:58 GMT (envelope-from git) Date: Thu, 16 Oct 2025 17:26:58 GMT Message-Id: <202510161726.59GHQwpN013416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 84333aada464 - main - tools: Update sysctl to its new name List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84333aada464296c1e28126b5c91ae2fb3f79eef Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=84333aada464296c1e28126b5c91ae2fb3f79eef commit 84333aada464296c1e28126b5c91ae2fb3f79eef Author: Jose Luis Duran AuthorDate: 2025-10-16 17:18:51 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-16 17:26:06 +0000 tools: Update sysctl to its new name The kern.ipc.somaxconn sysctl has been replaced with kern.ipc.soacceptqueue since FreeBSD 10.0. Reviewed by: emaste MFC after: 1 hour Differential Revision: https://reviews.freebsd.org/D34598 --- tools/tools/netrate/tcpp/README | 2 +- tools/tools/sysdoc/tunables.mdoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/netrate/tcpp/README b/tools/tools/netrate/tcpp/README index 6817bdf8ca25..ec0313a62eb8 100644 --- a/tools/tools/netrate/tcpp/README +++ b/tools/tools/netrate/tcpp/README @@ -84,7 +84,7 @@ In my testing, I use loader.conf entries of: kern.ipc.maxsockets=1000000 net.inet.tcp.maxtcptw=3000000 -kern.ipc.somaxconn=49152 +kern.ipc.soacceptqueue=49152 kern.ipc.nmbjumbo16=262144 kern.ipc.nmbjumbo9=262144 kern.ipc.nmbjumbop=262144 diff --git a/tools/tools/sysdoc/tunables.mdoc b/tools/tools/sysdoc/tunables.mdoc index 20b59f450cf2..397fe632322d 100644 --- a/tools/tools/sysdoc/tunables.mdoc +++ b/tools/tools/sysdoc/tunables.mdoc @@ -806,7 +806,7 @@ kern.ipc.nsfbufs kern.ipc.numopensockets --- -kern.ipc.somaxconn +kern.ipc.soacceptqueue int The maximum pending socket connection queue size. From nobody Thu Oct 16 18:04:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnbSG43N8z6Ctms; Thu, 16 Oct 2025 18:04:14 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnbSG3b5Pz42pS; Thu, 16 Oct 2025 18:04:14 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760637854; h=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=yjq5JXNblFH/oGy3SbZKb1deTB9wzzZ4JUtpb3ggwFk=; b=v3B8Vr9njh9McepFI90sv0rQ7Min/J+jakFQ5SZO9lJJGS/5grqGwXZ6bOp6Ni5uyVDoCR evqDzadL+TaIFLxgLKasOR/T4J6r7OCOjXTAEMFTZrJHuNhqMa7qMX7/Rm0lWyQ1MQrLsY UYTtG/Kf4ReMQk5skz8F+cxal2GHVdQjsLOoqe5d62J75c93slk9ugn4x0CONxAxP0Sv6U eDSUCeeISH5MGOces3milaFJsXsoArOhl3NrGtF92lNQDC8WoYPzjvHCnzhNEqOIGDbfU4 JjljfWKRw6IfORpp1BbH3TD4f5EBXnFEUwHYZ8ktlrZPeoGDCbohICOIJ4X6+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760637854; h=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=yjq5JXNblFH/oGy3SbZKb1deTB9wzzZ4JUtpb3ggwFk=; b=uXYtMcZxOh/D1w8j1S7yMMLaC+VDDltPdMsg5SuWCHYQ7LtEo0VrJriT1ApwTO5wp3f0s6 8jLOLzqAWDWru17cBEO1VcDtsOt4wksh3oRC6i5Udh+Z4z/+TKfpzGBMyZByDQ2R+UfHL/ 3tJJzO29iR4+b72Binyajkqam2vIdwYybmi54U5tZutjyhLinfvj+E/Ad9pOkeeMDk965R hSw0PLzMatK2jrJney3iaOBa1h12iQiXSQVoBxpEAK9UNzK+/JQP5PMbnHvejZ/b+kCKWR T6zZFm3qAkm0OVScrg3Cq+fs90aK4buoZMzjxzeX5Ai2jfDKyTqxvOQBKscgBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760637854; a=rsa-sha256; cv=none; b=P+r73zEhY7HZ2uaROR3RI629g/+dDGOtfgNvGTyuImiDMLBnL8nnwFqZZY29XRtHgSr0nR +6NNDcMlIPA1opasMiBfVhU4+Tt42OnHAGuJSgbmijh4Vin1b/rby03gQX4J7duSC0ZD3X Yu5aAvk5TIReDCdP3FQ9vzwJ94Dx7DYYBPRDH54gTvoTc7Np+EGF0fTmhTjS9QMEYdUEoJ DdRFTM5OBgEAM2u+J3/CuOqZgUo5ORin8E5bxvFhtfO4XBHw2WU2YUg6odjD17JlmhsMMS 9PfTjc2V3IIsx2DmC+zFx7ovJOTuOFnV9ecj5G4j18JHrHdmo1q/WrJ1dEPzrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cnbSF6djsz13QX; Thu, 16 Oct 2025 18:04:13 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Thu, 16 Oct 2025 11:04:11 -0700 From: Gleb Smirnoff To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4548b9f3a816 - main - unix/stream: plug a corner case when control externalization failed Message-ID: References: <202510152047.59FKlL5b081751@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Oct 16, 2025 at 09:18:47AM -0400, Mark Johnston wrote: M> On Wed, Oct 15, 2025 at 08:47:21PM +0000, Gleb Smirnoff wrote: M> > The branch main has been updated by glebius: M> > M> > URL: https://cgit.FreeBSD.org/src/commit/?id=4548b9f3a8167a340a5086ed51a76d932c9ab3cc M> > M> > commit 4548b9f3a8167a340a5086ed51a76d932c9ab3cc M> > Author: Gleb Smirnoff M> > AuthorDate: 2025-10-15 20:01:25 +0000 M> > Commit: Gleb Smirnoff M> > CommitDate: 2025-10-15 20:47:11 +0000 M> > M> > unix/stream: plug a corner case when control externalization failed M> > M> > while peer has closed its end. M> > M> > Reported by: syzbot+ffcc3612ea266e36604e@syzkaller.appspotmail.com M> M> Shouldn't this be MFCed? Yes, will be MFCed, of course. -- Gleb Smirnoff From nobody Thu Oct 16 18:43:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncKT0jbHz6CxMZ; Thu, 16 Oct 2025 18:43: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 4cncKT03Yfz3CgR; Thu, 16 Oct 2025 18:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NV/LZxRGUhMR+C/x7CsGg2i4y5123FV9QvksuAznTMA=; b=QNUhi4SgQyRtNLSceKkhZ+n9S44wfqTd0/lKeXukVQfQ0qXW4TJ+EKemydUqVxK36Wvvf1 acOiC9/3xY1hfU5EQTG9SAf4QFnc5PxQJZGkxFJNGLcFxD4aXG9pSepAS9r0Sx55MSSgRC PX5Rp9tKmbohgUqcfFG7wl3Qv/agmgscrXICKOm6TcAUA4iiL5vMn+3QNg3dF3144HG2Hr dhOhjSQSeLcdOhTN5Fz8yUHa9pfga2FXuEwA3/rGiuUE9TTb0QhTT9ov0JNaZBsCyonMQ8 DjZr4+wxXm3osxpIt0bPMURxFNgBtSLld93UtvKyiK8/54HpJ6DBZkORj4VzPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NV/LZxRGUhMR+C/x7CsGg2i4y5123FV9QvksuAznTMA=; b=us2xeZwKhhbok6CzSQdzTxSZLJ80jZdTKHZD/vpZf6nVlT+Ew927+ZOoFfV1JzuR0QJkPI 8iSPq+xYGfrv5X3Fjdaa2P/Rh9YcXpbwlSrI693SgWsdXn9uOmyrUB2wYv2yt/4+khHBJp N1vxkmxW4dmmZGEfnH5I4BX6FsQUCShF9bneXVLCYNl4QxgejXDTNZ2dwAq8GMqYFDZ8VJ c2o5LUSGrw5iqC4OrrK9ky8Md9t6dWEIdVkSjq89N9QGVU8QpfbaUgcAtAKZbBvWQFJdP3 gR+UTmba+BTIyLuK05aXPdl4MJlvvPr6wxbsrknviuQ2qM5FMeXa1uAlDWAPFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640205; a=rsa-sha256; cv=none; b=tb3MIv8FRX3JgwaMIf34lukYDAFO7hhUuvBUooUzob3V+ZpDl+MmnWnTeIXnr1n5nbYQKX Lgh+vazz4Rb37PZ717AbRe3DdTMraF0J0edMK7zBRLbvD6wZB8414KTNYiBBZbUbJTf5zq QjvlzRkzq4f96xSHW4LidWRSYy44Hu+EewPDmxa+7K5C5JUXI6dvHEBJUd5lHMNh0WoVhA goNr3FCOMZnlkScFbRU/PmwzE8ZoY8IwGzH8tJelTmhnXlrg81PB+Hg77U90pBPgxBupyK VF1CgGMOEu2Pu4VRwRhrJlMM7V9eLOK4H5fUr7L1cqmUhgMJS27MSGmBHyoAbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncKS6Vttz4sQ; Thu, 16 Oct 2025 18:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GIhOTf063720; Thu, 16 Oct 2025 18:43:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIhOMh063717; Thu, 16 Oct 2025 18:43:24 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:43:24 GMT Message-Id: <202510161843.59GIhOMh063717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 9f85cf09d48b - main - UPDATING: Belatedly note OpenZFS sysctls moving List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f85cf09d48bb1bebeddab0913fc9ab2735cb810 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9f85cf09d48bb1bebeddab0913fc9ab2735cb810 commit 9f85cf09d48bb1bebeddab0913fc9ab2735cb810 Author: Ed Maste AuthorDate: 2025-10-16 16:47:08 +0000 Commit: Ed Maste CommitDate: 2025-10-16 18:43:01 +0000 UPDATING: Belatedly note OpenZFS sysctls moving Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52665 --- UPDATING | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/UPDATING b/UPDATING index ed49bd76e917..02541eb4b41c 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,18 @@ 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".) +20251016: + With the migration to OpenZFS in FreeBSD 13.x a number of ZFS sysctls + moved to new locations, but backwards compatibility aliases were + provided. These aliases will be removed in the near future. Please + update /etc/sysctl.conf to reference the new OIDs. For example, + + vfs.zfs.min_auto_ashift=12 + + needs to be changed to + + vfs.zfs.vdev.min_auto_ashift=12 + 20251015: The "FreeBSD-unbound" package is renamed to "FreeBSD-local-unbound". If you have set-optional or set-base installed, the new package will From nobody Thu Oct 16 20:08:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnfCm3njlz6D4f3; Thu, 16 Oct 2025 20:08: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 4cnfCl1hTlz3VNf; Thu, 16 Oct 2025 20:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760645315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jDB/y7YMnuuBW8UYJpqAcr8Caa0OSq1dykFfJYYGAiY=; b=w1ew1e3MwyRDy0ugdcnIFUaSW5HVF7y651s1/Sy58eNT2MrOeken6mAix/o6ovHTADSDyl aoEF5ZGVoFVgQuJ3BLVomGEbXIaP0SAQcAXIpq9Q4A8+3hoZy92ePJWECKQn1SqQpUuoPw ktwBVE8rzPpD8zXYk1UiVxYx+CWBAKHwebxNuoSk/jgjHb1phVsIBPwZGWaTwX8wThL6GZ 3QCDobc46ts/qaFgs149H0/j+jJJAKT+VQnMQPDG7+z0km7/hWe+15SFLZPU/4fLss3bzd sRM5sYF2bCiGon2nXyBD/7VeOY4SofVbMDvveD8JM+sA8i9LM3Z6BSPi68hLlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760645315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jDB/y7YMnuuBW8UYJpqAcr8Caa0OSq1dykFfJYYGAiY=; b=oLtghXqSrxnZ3788KywF6IpKD3lZ5paDJjJRXzsfLMtyc914xGWp6XSSxPwL0Fd5F0itf3 osxpgEb2Hmv070eKRhdt2UTmptHTUSytjbsp0ZwTNslYjio9MrZNZozpnobJvbOncyElOT naWYcSQHqePeW1IfxdHc0HJJp88SIp/ZJhxdd5vNjZmS3muJB1iU2OiiUxxVUWilz3veFa sWJVWCfrrsh5Fck8lJeCjl63canqUyVc46sWi9gbj7sILk4NgFmFjVsMOM7woK2/C01f0R KFXd6V7xcwVh6Wq0hL+SZqkk2QtAUfrXd5gWLiVaAY8WOfY8od+g21tzvz6Scw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760645315; a=rsa-sha256; cv=none; b=wxeHXcrcl4z/jUZJJtMN0/Z6S6CmOmcDz6Q/E4OXroLTWWPYUyDCe2RbATxuKrgRVgi59K 5qgR/4KO04t7LT5LZTgX9zyzPAnwBAgTp3XuH+2g1NVP/4oSu5S6PI12shZttxj8jg1hOH dxoucj8oxVUGhF8OyTb/9aHssaZcG3JLO82IAGpKXqR49NWQiuE29k4Aoh2OrXNvg9NcT0 WvwdnsDQ4kZlAauoCaF++K5u9PVvN75IjCHU6YZOeBsxl8SHouUaONl6tbbwhsswUmTsii HM9Ysv2kMyM/slyaWbcdHU/Llssr+sXskVlnGsrARiPaV0tvbqB22VCwGcT+gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnfCl0nktz7bW; Thu, 16 Oct 2025 20:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GK8YbB018541; Thu, 16 Oct 2025 20:08:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GK8YaT018537; Thu, 16 Oct 2025 20:08:34 GMT (envelope-from git) Date: Thu, 16 Oct 2025 20:08:34 GMT Message-Id: <202510162008.59GK8YaT018537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Krzysztof Galazka Subject: git: 46a8a1f08f88 - main - ixl(4): fix multicast promiscuous mode state tracking and filter management List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46a8a1f08f88c278e60ebb6daa7a551eb641c67b Auto-Submitted: auto-generated The branch main has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=46a8a1f08f88c278e60ebb6daa7a551eb641c67b commit 46a8a1f08f88c278e60ebb6daa7a551eb641c67b Author: Bhosale, Yogesh AuthorDate: 2025-10-16 20:02:45 +0000 Commit: Krzysztof Galazka CommitDate: 2025-10-16 20:04:01 +0000 ixl(4): fix multicast promiscuous mode state tracking and filter management This change reapplies the improvements from commit 89e7335 and adds additional fixes and code optimizations on top of it. The ixl driver supports up to 128 multicast filters in hardware. When this limit is exceeded, the driver should enable multicast promiscuous mode. When the count drops below 128, it should disable promiscuous mode and restore individual filters. The driver previously had problems that could corrupt multicast filters list. The main issue was that ixl_dis_multi_promisc() would attempt to disable promiscuous mode without checking if it was actually enabled, potentially corrupting existing filters. There was also no state tracking across driver functions, leading to redundant operations. This change adds an IXL_FLAGS_MC_PROMISC flag to track the multicast promiscuous mode state. The flag is set when enabling promiscuous mode and cleared when disabling it. Early return checks prevent redundant operations when the mode is already in the desired state, avoiding filter corruption and unnecessary hardware calls. Signed-off-by: Yogesh Bhosale yogesh.bhosale@intel.com PR: 283820 Approved by: kbowling (mentor) Tested by: gowtham.kumar.ks_intel.com MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D52549 --- sys/dev/ixl/if_ixl.c | 27 +++++++++++- sys/dev/ixl/ixl.h | 1 + sys/dev/ixl/ixl_pf_main.c | 110 +++++++++++++++++++++++++++++++++++++++------- 3 files changed, 120 insertions(+), 18 deletions(-) diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index 261f76055901..bfaf6cd69e58 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -1480,17 +1480,33 @@ ixl_if_multi_set(if_ctx_t ctx) struct ixl_pf *pf = iflib_get_softc(ctx); struct ixl_vsi *vsi = &pf->vsi; struct i40e_hw *hw = vsi->hw; + enum i40e_status_code status; int mcnt; + if_t ifp = iflib_get_ifp(ctx); IOCTL_DEBUGOUT("ixl_if_multi_set: begin"); /* Delete filters for removed multicast addresses */ ixl_del_multi(vsi, false); - mcnt = min(if_llmaddr_count(iflib_get_ifp(ctx)), MAX_MULTICAST_ADDR); + mcnt = min(if_llmaddr_count(ifp), MAX_MULTICAST_ADDR); if (__predict_false(mcnt == MAX_MULTICAST_ADDR)) { - i40e_aq_set_vsi_multicast_promiscuous(hw, + /* Check if promisc mode is already enabled, if yes return */ + if (vsi->flags & IXL_FLAGS_MC_PROMISC) + return; + + status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, TRUE, NULL); + if (status != I40E_SUCCESS) + if_printf(ifp, "Failed to enable multicast promiscuous " + "mode, status: %s\n", i40e_stat_str(hw, status)); + else { + if_printf(ifp, "Enabled multicast promiscuous mode\n"); + + /* Set the flag to track promiscuous mode */ + vsi->flags |= IXL_FLAGS_MC_PROMISC; + } + /* Delete all existing MC filters */ ixl_del_multi(vsi, true); return; } @@ -1693,6 +1709,13 @@ ixl_if_promisc_set(if_ctx_t ctx, int flags) return (err); err = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, multi, NULL); + + /* Update the multicast promiscuous flag based on the new state */ + if (multi) + vsi->flags |= IXL_FLAGS_MC_PROMISC; + else + vsi->flags &= ~IXL_FLAGS_MC_PROMISC; + return (err); } diff --git a/sys/dev/ixl/ixl.h b/sys/dev/ixl/ixl.h index 95379448b570..ab0f38307d90 100644 --- a/sys/dev/ixl/ixl.h +++ b/sys/dev/ixl/ixl.h @@ -202,6 +202,7 @@ #define IXL_FLAGS_KEEP_TSO6 (1 << 1) #define IXL_FLAGS_USES_MSIX (1 << 2) #define IXL_FLAGS_IS_VF (1 << 3) +#define IXL_FLAGS_MC_PROMISC (1 << 4) #define IXL_VSI_IS_PF(v) ((v->flags & IXL_FLAGS_IS_VF) == 0) #define IXL_VSI_IS_VF(v) ((v->flags & IXL_FLAGS_IS_VF) != 0) diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index 1752efc02fff..b62619ced5cb 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -593,24 +593,29 @@ ixl_add_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt) * Routines for multicast and vlan filter management. * *********************************************************************/ + +/** + * ixl_add_multi - Add multicast filters to the hardware + * @vsi: The VSI structure + * + * In case number of multicast filters in the IFP exceeds 127 entries, + * multicast promiscuous mode will be enabled and the filters will be removed + * from the hardware + */ void ixl_add_multi(struct ixl_vsi *vsi) { if_t ifp = vsi->ifp; - struct i40e_hw *hw = vsi->hw; int mcnt = 0; struct ixl_add_maddr_arg cb_arg; IOCTL_DEBUGOUT("ixl_add_multi: begin"); - mcnt = if_llmaddr_count(ifp); - if (__predict_false(mcnt >= MAX_MULTICAST_ADDR)) { - i40e_aq_set_vsi_multicast_promiscuous(hw, - vsi->seid, TRUE, NULL); - /* delete all existing MC filters */ - ixl_del_multi(vsi, true); - return; - } + /* + * There is no need to check if the number of multicast addresses + * exceeds the MAX_MULTICAST_ADDR threshold and set promiscuous mode + * here, as all callers already handle this case. + */ cb_arg.vsi = vsi; LIST_INIT(&cb_arg.to_add); @@ -633,30 +638,103 @@ ixl_match_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt) return (0); } +/** + * ixl_dis_multi_promisc - Disable multicast promiscuous mode + * @vsi: The VSI structure + * @vsi_mcnt: Number of multicast filters in the VSI + * + * Disable multicast promiscuous mode based on number of entries in the IFP + * and the VSI, then re-add multicast filters. + * + */ +static void +ixl_dis_multi_promisc(struct ixl_vsi *vsi, int vsi_mcnt) +{ + struct ifnet *ifp = vsi->ifp; + struct i40e_hw *hw = vsi->hw; + int ifp_mcnt = 0; + enum i40e_status_code status; + + /* + * Check if multicast promiscuous mode was actually enabled. + * If promiscuous mode was not enabled, don't attempt to disable it. + * Also, don't disable if IFF_PROMISC or IFF_ALLMULTI is set. + */ + if (!(vsi->flags & IXL_FLAGS_MC_PROMISC) || + (if_getflags(ifp) & (IFF_PROMISC | IFF_ALLMULTI))) + return; + + ifp_mcnt = if_llmaddr_count(ifp); + /* + * Equal lists or empty ifp list mean the list has not been changed + * and in such case avoid disabling multicast promiscuous mode as it + * was not previously enabled. Case where multicast promiscuous mode has + * been enabled is when vsi_mcnt == 0 && ifp_mcnt > 0. + */ + if (ifp_mcnt == vsi_mcnt || ifp_mcnt == 0 || + ifp_mcnt >= MAX_MULTICAST_ADDR) + return; + + status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, + FALSE, NULL); + if (status != I40E_SUCCESS) { + if_printf(ifp, "Failed to disable multicast promiscuous " + "mode, status: %s\n", i40e_stat_str(hw, status)); + + return; + } + + /* Clear the flag since promiscuous mode is now disabled */ + vsi->flags &= ~IXL_FLAGS_MC_PROMISC; + if_printf(ifp, "Disabled multicast promiscuous mode\n"); + + ixl_add_multi(vsi); +} + +/** + * ixl_del_multi - Delete multicast filters from the hardware + * @vsi: The VSI structure + * @all: Bool to determine if all the multicast filters should be removed + * + * In case number of multicast filters in the IFP drops to 127 entries, + * multicast promiscuous mode will be disabled and the filters will be reapplied + * to the hardware. + */ void ixl_del_multi(struct ixl_vsi *vsi, bool all) { - struct ixl_ftl_head to_del; + int to_del_cnt = 0, vsi_mcnt = 0; if_t ifp = vsi->ifp; struct ixl_mac_filter *f, *fn; - int mcnt = 0; + struct ixl_ftl_head to_del; IOCTL_DEBUGOUT("ixl_del_multi: begin"); LIST_INIT(&to_del); /* Search for removed multicast addresses */ LIST_FOREACH_SAFE(f, &vsi->ftl, ftle, fn) { - if ((f->flags & IXL_FILTER_MC) == 0 || - (!all && (if_foreach_llmaddr(ifp, ixl_match_maddr, f) == 0))) + if ((f->flags & IXL_FILTER_MC) == 0) + continue; + + /* Count all the multicast filters in the VSI for comparison */ + vsi_mcnt++; + + if (!all && if_foreach_llmaddr(ifp, ixl_match_maddr, f) != 0) continue; LIST_REMOVE(f, ftle); LIST_INSERT_HEAD(&to_del, f, ftle); - mcnt++; + to_del_cnt++; } - if (mcnt > 0) - ixl_del_hw_filters(vsi, &to_del, mcnt); + if (to_del_cnt > 0) { + ixl_del_hw_filters(vsi, &to_del, to_del_cnt); + return; + } + + ixl_dis_multi_promisc(vsi, vsi_mcnt); + + IOCTL_DEBUGOUT("ixl_del_multi: end"); } void From nobody Thu Oct 16 20:29:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnfgW5xmSz6D67S; Thu, 16 Oct 2025 20:29: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 4cnfgW5NG2z3Y5L; Thu, 16 Oct 2025 20:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760646551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hHgUw/7RAISgCulG3kXhvkxvQntFevhJvv383Z4XECA=; b=rLeRig0y/yyB3FSjbAw2PjWhFi/1B+O7EHYIeY+0FeMq5K0kVSm2pvQ4YJxRjlWQBm4vx0 YfSd35FJw86SsAXED3Tul9rDIjfU1n9YNZymUpckQUwQU24XH55C3K1ZktfU0tP0YsyvV6 4Rk1qYsJyaI7c5gdHDnSsm7lOZp9IwRlTat5JrPeUD4wOPEY02QDsLSH9t54bZVYq9UpxA XYgjyOJMBDVetaqiFY5kRntZgCFczvbTWM+qBHAu6VOMxohHhkjFZ4M0FE1ovwbD+0nUPp OijHE02xyUXYV/Fig7tkeA5N1tXjimQ9TUgbVAtNOfX2HOpbOvLS24Iv7ped9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760646551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hHgUw/7RAISgCulG3kXhvkxvQntFevhJvv383Z4XECA=; b=RnU/DCq7qmQSjvZFUkfKTa+iEczwF27y3BYrHvrwWZ+gUFFDuE3pQ1zK5hDD6bi3x/hIXo 7Oizzc/nf79Q3C05kaYz6VuoU9uR2E/DtG1cmyhDQM1qBGdUScKtrkNN07C6z/ON7IczgO lsv5MJTMakDF1n3wdI/Wzz3kNpvInDlmR8VCDZmRCiXRtiH/XycWyO8lFN/G8zRGYrMQDl ku3Vz3KhTUMooCTA81CjW7C6LaqhqiQT3CUTOdBYtvrojsAR/GAvOOH7+/vckE+8TQMikY K3csFs9eRjx67Rmv7SeLd19Bv8RySmrmVxOEKDsaxdgaistA7vcfHV350uUFJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760646551; a=rsa-sha256; cv=none; b=UewuV07k1x8b6vfhwJfmkIDsnYSntKs4rdOPdbo7gdy5sqGlUI6DQF41IvU+BprWMeR79z 2DjgNC8z1Ouvgf8rrsaqUbvP3T9myZXUxIjMCszPtRR7gWOyGMCg7yKlMC/05DLPydCChB PG14I3ybT1m2GELO74+Emack7L8Udok9r5GXVOv8LSjIgKT2xNmEhUacmgWEciwsu5uqE/ hUIX7c513BQSHiXWovT+IhobS6q2ZrdVEymQHInJzpdyGDDrJ5H7kTKUkaHidAhq4geJSp RhJvqKEeCLcogdcTbXiz01w3v0VNnMGVbn7VRu15xEBZWkVgy8j+/NdUwSNiTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnfgW4nY1z84P; Thu, 16 Oct 2025 20:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GKTBMQ055125; Thu, 16 Oct 2025 20:29:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GKTBID055122; Thu, 16 Oct 2025 20:29:11 GMT (envelope-from git) Date: Thu, 16 Oct 2025 20:29:11 GMT Message-Id: <202510162029.59GKTBID055122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 2168e15ee89b - main - Update commit 0d4642a to fix failed tests. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2168e15ee89b4206d8e65a4ea04e4721f60f4060 Auto-Submitted: auto-generated The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=2168e15ee89b4206d8e65a4ea04e4721f60f4060 commit 2168e15ee89b4206d8e65a4ea04e4721f60f4060 Author: Kirk McKusick AuthorDate: 2025-10-16 20:27:40 +0000 Commit: Kirk McKusick CommitDate: 2025-10-16 20:29:00 +0000 Update commit 0d4642a to fix failed tests. Tests that fail are in /root/.kyua/store/results.usr_tests_sys_geom_class_multipath.20251015-085403-959737.db Submitted-by: Johan Söllvander MFC-after: 1 week Differential Revision: https://reviews.freebsd.org/D53110 --- sbin/geom/core/geom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index 496123f08274..1a4f7e1f061a 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -968,7 +968,7 @@ list_one_geom(struct ggeom *gp) xo_emit("{Tc:Providers}\n"); n = 1; LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { - xo_emit("{T:/%u} ", n++); + xo_emit("{T:/%u}. ", n++); xo_open_instance("provider"); list_one_provider(pp, " "); xo_close_instance("provider"); @@ -980,7 +980,7 @@ list_one_geom(struct ggeom *gp) xo_emit("{Tc:Consumers}\n"); n = 1; LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { - xo_emit("{T:/%u} ", n++); + xo_emit("{T:/%u}. ", n++); xo_open_instance("consumer"); list_one_consumer(cp, " "); xo_close_instance("consumer"); From nobody Thu Oct 16 22:05:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnhpl6nVtz6DDhJ; Thu, 16 Oct 2025 22:05: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 4cnhpl6Jj7z3mnr; Thu, 16 Oct 2025 22:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760652335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xKtDF90ZMA2KRm+nnj5HBYrR/bKoTF5qlWpZcMeAFWg=; b=IIcIWP9cokL7AnNYe89FP+PBHNAb12m0g5RjXw3Q99a/kEEimjMPi8OvyhIAstootBEuwi VRxtnmnLL36hDS7pgRnEai59NrzqrqpheOhvZZvL0z57lLC+ilemtPfQrPWveIlP2iStzP 8KZustcSg+NYDWk9w2a+JwpOrRS1GG00iHh/OrXTHoB730QbwguKD3utxSTpxiKaMFsQbf Srkj2NVxxj6/RwqW99HXBg9780yh9t55aPLjnHqRZrbdUG2DPv9bPYp0ut5oPbJYnUO6hQ Xd7L0Nbds/tE9nPs0Exz/buP40pwbXuzJsQchep+aRQYvOxjBWXBfW6Hd4LUag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760652335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xKtDF90ZMA2KRm+nnj5HBYrR/bKoTF5qlWpZcMeAFWg=; b=Y5SoSUdDGYyBsqGSCxp6Qv4x3XG60CWjMwsTL3GoAwTnJRU0PTzMdWrcH2L+wi/KLQ01sm 7O+nW6gqhPe+VsNexhirUAhUGUKrXcMSCtPt5lqC+Cd+SLudQ1yvuQXjM1a4QAo6oQSiE3 jM3zjuVarxf5pzEDtc4/sV3jYP87hLuIX381m9cBuEe+caK4Zwhu4SeGwftghDV1qCQ+BJ W3AXYm2MVpbv1KNIXfZn0Vpac0bLFwcJS5PHl0RFL8j75pgaRN3KQg7w4X8NZV6McGm6Nz v5xnoFIKqLbLMdYc0hNDSpznYYc25SU6LZ846merQj7+e9JpAI11Co6aJmW6zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760652335; a=rsa-sha256; cv=none; b=amPn65dvfNJMtos3nBwxlfFiWvAT6Lc2rSbjsI+kAQ9YT+kcECbTiQcHtOEbnhaR6jjKeC UWNm/VUkrFzML2UpZiddECm/fUTAP5YhgvezK+WBhpD9gBz2j8vxa1wQkCDHmJr1cD6pwV oEZqT5EpJMgA9OSKXB2DwkAq4UwzJHRgAsWTvcthyTCznX6oRZi/+wdgKQfQ1FhNKlzVTL 3mtJBRwEdkwOzoMtyM3zFaZTsCRNVOBbfrUcHREtoUFqqSo8Zky4sC1a6Ql7qSKdEL/fmh JeoR1MUO92wRb9rSBlkYpFr/pCiG6ROdVgUCySjke0Frpm3UL5s8EMHGckDuqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnhpl5btCzBG7; Thu, 16 Oct 2025 22:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GM5ZgL042945; Thu, 16 Oct 2025 22:05:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GM5ZvD042942; Thu, 16 Oct 2025 22:05:35 GMT (envelope-from git) Date: Thu, 16 Oct 2025 22:05:35 GMT Message-Id: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: 0050289464fa - main - style(9): white space after ; and around binary operators List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0050289464fa56ec79e060b8d8378b9ff7145a0e Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=0050289464fa56ec79e060b8d8378b9ff7145a0e commit 0050289464fa56ec79e060b8d8378b9ff7145a0e Author: David E. O'Brien AuthorDate: 2025-10-15 05:22:00 +0000 Commit: David E. O'Brien CommitDate: 2025-10-16 22:02:50 +0000 style(9): white space after ; and around binary operators in for() loops. Also, use 'while', where only the conditional test of 'for' was used. Reviewed by: sjg --- sys/arm/allwinner/aw_sid.c | 2 +- sys/cam/scsi/scsi_all.c | 2 +- sys/cam/scsi/scsi_enc_ses.c | 6 +++--- sys/crypto/chacha20/chacha.c | 6 +++--- sys/crypto/openssl/ossl_sha256.c | 4 ++-- sys/dev/aic7xxx/aic79xx.c | 4 ++-- sys/dev/aic7xxx/aic7xxx.c | 4 ++-- sys/dev/enetc/if_enetc.c | 6 +++--- sys/dev/hptmv/entry.c | 33 ++++++++++++++++----------------- sys/dev/hptmv/gui_lib.c | 12 +++++------- sys/dev/hptmv/hptproc.c | 2 +- sys/dev/mps/mps_sas.c | 4 ++-- sys/dev/mpt/mpt_raid.c | 4 ++-- sys/dev/nfe/if_nfe.c | 4 ++-- sys/dev/ocs_fc/ocs_mgmt.c | 14 +++++++------- sys/dev/ppc/ppc.c | 2 +- sys/dev/smartpqi/smartpqi_event.c | 6 +++--- sys/dev/smartpqi/smartpqi_queue.c | 4 ++-- sys/dev/sym/sym_hipd.c | 12 ++++++------ sys/dev/tws/tws.c | 13 ++++++------- sys/dev/tws/tws_services.c | 2 +- sys/fs/devfs/devfs_dir.c | 2 +- sys/fs/udf/osta.c | 4 ++-- sys/i386/i386/in_cksum_machdep.c | 2 +- sys/kern/kern_exit.c | 2 +- sys/kern/kern_malloc.c | 2 +- sys/kern/subr_devstat.c | 2 +- sys/kern/subr_prf.c | 2 +- sys/netinet/siftr.c | 2 +- sys/netpfil/ipfw/ip_dummynet.c | 4 ++-- 30 files changed, 82 insertions(+), 86 deletions(-) diff --git a/sys/arm/allwinner/aw_sid.c b/sys/arm/allwinner/aw_sid.c index ba5faca33c5e..932c2f189e51 100644 --- a/sys/arm/allwinner/aw_sid.c +++ b/sys/arm/allwinner/aw_sid.c @@ -297,7 +297,7 @@ aw_sid_attach(device_t dev) /* Register ourself so device can resolve who we are */ OF_device_register_xref(OF_xref_from_node(node), dev); - for (i = 0; i < sc->sid_conf->nfuses ;i++) {\ + for (i = 0; i < sc->sid_conf->nfuses; i++) { SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, sc->sid_conf->efuses[i].name, diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 9c097f52d136..fd128e69f1f1 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -686,7 +686,7 @@ scsi_op_desc(uint16_t opcode, struct scsi_inquiry_data *inq_data) opmask = 1 << pd_type; for (j = 0; j < num_tables; j++) { - for (i = 0;i < num_ops[j] && table[j][i].opcode <= opcode; i++){ + for (i = 0; i < num_ops[j] && table[j][i].opcode <= opcode; i++) { if ((table[j][i].opcode == opcode) && ((table[j][i].opmask & opmask) != 0)) return(table[j][i].desc); diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c index 435874a9874a..3a362eaf11a4 100644 --- a/sys/cam/scsi/scsi_enc_ses.c +++ b/sys/cam/scsi/scsi_enc_ses.c @@ -2302,7 +2302,7 @@ ses_print_addl_data_sas_type0(char *sesname, struct sbuf *sbp, sbuf_putc(sbp, '\n'); if (addl->proto_data.sasdev_phys == NULL) return; - for (i = 0;i < addl->proto_hdr.sas->base_hdr.num_phys;i++) { + for (i = 0; i < addl->proto_hdr.sas->base_hdr.num_phys; i++) { phy = &addl->proto_data.sasdev_phys[i]; sbuf_printf(sbp, "%s: phy %d:", sesname, i); if (ses_elm_sas_dev_phy_sata_dev(phy)) @@ -2349,7 +2349,7 @@ ses_print_addl_data_sas_type1(char *sesname, struct sbuf *sbp, sbuf_printf(sbp, "Expander: %d phys", num_phys); if (addl->proto_data.sasexp_phys == NULL) return; - for (i = 0;i < num_phys;i++) { + for (i = 0; i < num_phys; i++) { exp_phy = &addl->proto_data.sasexp_phys[i]; sbuf_printf(sbp, "%s: phy %d: connector %d other %d\n", sesname, i, exp_phy->connector_index, @@ -2360,7 +2360,7 @@ ses_print_addl_data_sas_type1(char *sesname, struct sbuf *sbp, sbuf_printf(sbp, "Port: %d phys", num_phys); if (addl->proto_data.sasport_phys == NULL) return; - for (i = 0;i < num_phys;i++) { + for (i = 0; i < num_phys; i++) { port_phy = &addl->proto_data.sasport_phys[i]; sbuf_printf(sbp, "%s: phy %d: id %d connector %d other %d\n", diff --git a/sys/crypto/chacha20/chacha.c b/sys/crypto/chacha20/chacha.c index 52f7e18c651c..cb06003b0ecf 100644 --- a/sys/crypto/chacha20/chacha.c +++ b/sys/crypto/chacha20/chacha.c @@ -138,7 +138,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes) for (;;) { if (bytes < 64) { #ifndef KEYSTREAM_ONLY - for (i = 0;i < bytes;++i) tmp[i] = m[i]; + for (i = 0; i < bytes; ++i) tmp[i] = m[i]; m = tmp; #endif ctarget = c; @@ -160,7 +160,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes) x13 = j13; x14 = j14; x15 = j15; - for (i = 20;i > 0;i -= 2) { + for (i = 20; i > 0; i -= 2) { QUARTERROUND( x0, x4, x8,x12) QUARTERROUND( x1, x5, x9,x13) QUARTERROUND( x2, x6,x10,x14) @@ -240,7 +240,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes) if (bytes <= 64) { if (bytes < 64) { - for (i = 0;i < bytes;++i) ctarget[i] = c[i]; + for (i = 0; i < bytes; ++i) ctarget[i] = c[i]; } x->input[12] = j12; x->input[13] = j13; diff --git a/sys/crypto/openssl/ossl_sha256.c b/sys/crypto/openssl/ossl_sha256.c index 4613a9409b44..50cb9739d114 100644 --- a/sys/crypto/openssl/ossl_sha256.c +++ b/sys/crypto/openssl/ossl_sha256.c @@ -74,11 +74,11 @@ ossl_sha256_init(void *c_) unsigned int nn; \ switch ((c)->md_len) \ { case SHA224_DIGEST_LENGTH: \ - for (nn=0;nnh[nn]; (void)HOST_l2c(ll,(s)); } \ break; \ case SHA256_DIGEST_LENGTH: \ - for (nn=0;nnh[nn]; (void)HOST_l2c(ll,(s)); } \ break; \ default: \ diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 2b5015b20e41..cee45fa5cc8a 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -7788,8 +7788,8 @@ ahd_abort_scbs(struct ahd_softc *ahd, int target, char channel, } if (role != ROLE_TARGET) { - for (;i < maxtarget; i++) { - for (j = minlun;j < maxlun; j++) { + for (; i < maxtarget; i++) { + for (j = minlun; j < maxlun; j++) { u_int scbid; u_int tcl; diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index c09876e9f589..18f68b806948 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -5903,8 +5903,8 @@ ahc_abort_scbs(struct ahc_softc *ahc, int target, char channel, } if (role != ROLE_TARGET) { - for (;i < maxtarget; i++) { - for (j = minlun;j < maxlun; j++) { + for (; i < maxtarget; i++) { + for (j = minlun; j < maxlun; j++) { u_int scbid; u_int tcl; diff --git a/sys/dev/enetc/if_enetc.c b/sys/dev/enetc/if_enetc.c index 808397b229a7..53002f9d73ce 100644 --- a/sys/dev/enetc/if_enetc.c +++ b/sys/dev/enetc/if_enetc.c @@ -848,7 +848,7 @@ enetc_hash_vid(uint16_t vid) bool bit; int i; - for (i = 0;i < 6;i++) { + for (i = 0; i < 6; i++) { bit = vid & BIT(i); bit ^= !!(vid & BIT(i + 6)); hash |= bit << i; @@ -1020,7 +1020,7 @@ enetc_msix_intr_assign(if_ctx_t ctx, int msix) ENETC_RBICR0_ICEN | ENETC_RBICR0_SET_ICPT(ENETC_RX_INTR_PKT_THR)); } vector = 0; - for (i = 0;i < sc->tx_num_queues; i++, vector++) { + for (i = 0; i < sc->tx_num_queues; i++, vector++) { tx_queue = &sc->tx_queues[i]; snprintf(irq_name, sizeof(irq_name), "txq%d", i); iflib_softirq_alloc_generic(ctx, &tx_queue->irq, @@ -1130,7 +1130,7 @@ enetc_isc_txd_encap(void *data, if_pkt_info_t ipi) } /* Now add remaining descriptors. */ - for (;i < ipi->ipi_nsegs; i++) { + for (; i < ipi->ipi_nsegs; i++) { desc = &queue->ring[pidx]; bzero(desc, sizeof(*desc)); desc->addr = segs[i].ds_addr; diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c index 5c4718bf582f..f3d58f285b39 100644 --- a/sys/dev/hptmv/entry.c +++ b/sys/dev/hptmv/entry.c @@ -430,7 +430,7 @@ static void device_change(IAL_ADAPTER_T *pAdapter , MV_U8 channelIndex, int plug if(pVDev->pParent) { int iMember; - for(iMember = 0; iMember < pVDev->pParent->u.array.bArnMember; iMember++) + for (iMember = 0; iMember < pVDev->pParent->u.array.bArnMember; iMember++) if((PVDevice)pVDev->pParent->u.array.pMember[iMember] == pVDev) pVDev->pParent->u.array.pMember[iMember] = NULL; pVDev->pParent = NULL; @@ -984,7 +984,7 @@ fRegisterVdevice(IAL_ADAPTER_T *pAdapter) PVBus pVBus; int i,j; - for(i=0;iVDevices[i]); pLogical = pPhysical; while (pLogical->pParent) pLogical = pLogical->pParent; @@ -1027,8 +1027,7 @@ GetSpareDisk(_VBUS_ARG PVDevice pArray) PVDevice pVDevice, pFind = NULL; int i; - for(i=0;iVDevices[i]; if(!pVDevice) continue; @@ -1356,7 +1355,7 @@ unregister: goto unregister; } - for (i=0; ipCommandBlocks[i])); } @@ -1370,7 +1369,7 @@ unregister: memset((void *)pAdapter->pbus_dmamap, 0, sizeof(struct _BUS_DMAMAP) * MAX_QUEUE_COMM); pAdapter->pbus_dmamap_list = 0; - for (i=0; i < MAX_QUEUE_COMM; i++) { + for (i = 0; i < MAX_QUEUE_COMM; i++) { PBUS_DMAMAP pmap = &(pAdapter->pbus_dmamap[i]); pmap->pAdapter = pAdapter; dmamap_put(pmap); @@ -1398,7 +1397,7 @@ unregister: pAdapter->prdTableAlignedAddr = (PUCHAR)(((ULONG_PTR)pAdapter->prdTableAddr + 0x1f) & ~(ULONG_PTR)0x1fL); { PUCHAR PRDTable = pAdapter->prdTableAlignedAddr; - for (i=0; ipFreePRDLink=%p\n",i,pAdapter->pFreePRDLink)); */ FreePRDTable(pAdapter, PRDTable); @@ -1447,7 +1446,7 @@ unregister: } #ifdef SUPPORT_ARRAY - for(i = MAX_ARRAY_DEVICE - 1; i >= 0; i--) { + for (i = MAX_ARRAY_DEVICE - 1; i >= 0; i--) { pVDev = ArrayTables(i); mArFreeArrayTable(pVDev); } @@ -1467,7 +1466,7 @@ unregister: _vbus_p->nInstances = 1; fRegisterVdevice(pAdapter); - for (channel=0;channelpVDevice[channel]; if (pVDev && pVDev->vf_online) fCheckBootable(pVDev); @@ -1567,7 +1566,7 @@ fResetActiveCommands(PVBus _vbus_p) { MV_SATA_ADAPTER *pMvSataAdapter = &((IAL_ADAPTER_T *)_vbus_p->OsExt)->mvSataAdapter; MV_U8 channel; - for (channel=0;channel< MV_SATA_CHANNELS_NUM;channel++) { + for (channel = 0; channel < MV_SATA_CHANNELS_NUM; channel++) { if (pMvSataAdapter->sataChannel[channel] && pMvSataAdapter->sataChannel[channel]->outstandingCommands) MvSataResetChannel(pMvSataAdapter,channel); } @@ -1590,7 +1589,7 @@ check_cmds: dataxfer_poll(); xor_poll(); #endif - for (channel=0;channel< MV_SATA_CHANNELS_NUM;channel++) { + for (channel = 0; channel < MV_SATA_CHANNELS_NUM; channel++) { pMvSataChannel = pMvSataAdapter->sataChannel[channel]; if (pMvSataChannel && pMvSataChannel->outstandingCommands) { @@ -1716,7 +1715,7 @@ fDeviceSendCommand(_VBUS_ARG PCommand pCmd) MV_BOOLEAN is48bit; MV_U8 channel; - int i=0; + int i = 0; DECLARE_BUFFER(FPSCAT_GATH, tmpSg); @@ -2141,7 +2140,7 @@ FlushAdapter(IAL_ADAPTER_T *pAdapter) hpt_printk(("flush all devices\n")); /* flush all devices */ - for (i=0; iVBus.pVDevice[i]; if(pVDev) fFlushVDev(pVDev); } @@ -2174,7 +2173,7 @@ Check_Idle_Call(IAL_ADAPTER_T *pAdapter) { int i; PVDevice pArray; - for(i = 0; i < MAX_ARRAY_PER_VBUS; i++){ + for (i = 0; i < MAX_ARRAY_PER_VBUS; i++) { if ((pArray=ArrayTables(i))->u.array.dArStamp==0) continue; else if (pArray->u.array.rf_auto_rebuild) { @@ -2378,7 +2377,7 @@ hpt_free_ccb(union ccb **ccb_Q, union ccb *ccb) static void hpt_worker_thread(void) { - for(;;) { + for (;;) { mtx_lock(&DpcQueue_Lock); while (DpcQueue_First!=DpcQueue_Last) { ST_HPT_DPC p; @@ -2418,7 +2417,7 @@ static void hpt_worker_thread(void) mtx_lock(&pAdapter->lock); _vbus_p = &pAdapter->VBus; - for (i=0;iu.array.dArStamp==0) continue; @@ -2472,7 +2471,7 @@ launch_worker_thread(void) int i; PVDevice pVDev; - for(i = 0; i < MAX_ARRAY_PER_VBUS; i++) + for (i = 0; i < MAX_ARRAY_PER_VBUS; i++) if ((pVDev=ArrayTables(i))->u.array.dArStamp==0) continue; else{ diff --git a/sys/dev/hptmv/gui_lib.c b/sys/dev/hptmv/gui_lib.c index d78fdcca69d2..f11044db733a 100644 --- a/sys/dev/hptmv/gui_lib.c +++ b/sys/dev/hptmv/gui_lib.c @@ -86,8 +86,7 @@ check_VDevice_valid(PVDevice p) while(pAdapter != NULL) { _vbus_p = &pAdapter->VBus; - for (i=0;iu.array.dArStamp != 0) && (pVDevice == p)) return 0; @@ -244,9 +243,9 @@ static void get_array_info(PVDevice pVDevice, PHPT_ARRAY_INFO pArrayInfo) if(pVDevice->u.array.pMember[i] != NULL) pArrayInfo->Members[pArrayInfo->nDisk++] = VDEV_TO_ID(pVDevice->u.array.pMember[i]); - for(i=pArrayInfo->nDisk; inDisk; i < MAX_ARRAY_MEMBERS; i++) pArrayInfo->Members[i] = INVALID_DEVICEID; - } +} static void get_array_info_v2(PVDevice pVDevice, PHPT_ARRAY_INFO_V2 pArrayInfo) { @@ -266,7 +265,7 @@ static void get_array_info_v2(PVDevice pVDevice, PHPT_ARRAY_INFO_V2 pArrayInfo) if(pVDevice->u.array.pMember[i] != NULL) pArrayInfo->Members[pArrayInfo->nDisk++] = VDEV_TO_ID(pVDevice->u.array.pMember[i]); - for(i=pArrayInfo->nDisk; inDisk; i < MAX_ARRAY_MEMBERS_V2; i++) pArrayInfo->Members[i] = INVALID_DEVICEID; } #endif @@ -461,8 +460,7 @@ found: pInfo->IoPort = 0; pInfo->ControlPort = 0; - for (i=0; i<2 ;i++) - { + for (i = 0; i < 2; i++) { pInfo->Devices[i] = (DEVICEID)INVALID_DEVICEID; } diff --git a/sys/dev/hptmv/hptproc.c b/sys/dev/hptmv/hptproc.c index 38fe61ee7e04..328750d9034c 100644 --- a/sys/dev/hptmv/hptproc.c +++ b/sys/dev/hptmv/hptproc.c @@ -107,7 +107,7 @@ hpt_set_asc_info(IAL_ADAPTER_T *pAdapter, char *buffer,int length) return -EINVAL; } - for (i=0;idevq != NULL) cam_simq_free(sassc->devq); - for(i=0; i< sassc->maxtargets ;i++) { + for (i = 0; i < sassc->maxtargets; i++) { targ = &sassc->targets[i]; SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, lun_tmp) { free(lun, M_MPT2); @@ -3396,7 +3396,7 @@ mpssas_realloc_targets(struct mps_softc *sc, int maxtargets) * the allocated LUNs for each target and then the target buffer * itself. */ - for (i=0; i< maxtargets; i++) { + for (i = 0; i < maxtargets; i++) { targ = &sassc->targets[i]; SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, lun_tmp) { free(lun, M_MPT2); diff --git a/sys/dev/mpt/mpt_raid.c b/sys/dev/mpt/mpt_raid.c index 5ff08ffcf2b3..2b868f6ef070 100644 --- a/sys/dev/mpt/mpt_raid.c +++ b/sys/dev/mpt/mpt_raid.c @@ -830,7 +830,7 @@ mpt_is_raid_volume(struct mpt_softc *mpt, target_id_t tgt) } ioc_vol = mpt->ioc_page2->RaidVolume; ioc_last_vol = ioc_vol + mpt->ioc_page2->NumActiveVolumes; - for (;ioc_vol != ioc_last_vol; ioc_vol++) { + for (; ioc_vol != ioc_last_vol; ioc_vol++) { if (ioc_vol->VolumeID == tgt) { return (1); } @@ -1406,7 +1406,7 @@ mpt_refresh_raid_data(struct mpt_softc *mpt) ioc_vol = mpt->ioc_page2->RaidVolume; ioc_last_vol = ioc_vol + mpt->ioc_page2->NumActiveVolumes; - for (;ioc_vol != ioc_last_vol; ioc_vol++) { + for (; ioc_vol != ioc_last_vol; ioc_vol++) { struct mpt_raid_volume *mpt_vol; mpt_vol = mpt->raid_volumes + ioc_vol->VolumePageNumber; diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c index 4625c2616562..265181ef7ad0 100644 --- a/sys/dev/nfe/if_nfe.c +++ b/sys/dev/nfe/if_nfe.c @@ -2078,7 +2078,7 @@ nfe_rxeof(struct nfe_softc *sc, int count, int *rx_npktsp) bus_dmamap_sync(sc->rxq.rx_desc_tag, sc->rxq.rx_desc_map, BUS_DMASYNC_POSTREAD); - for (prog = 0;;NFE_INC(sc->rxq.cur, NFE_RX_RING_COUNT), vtag = 0) { + for (prog = 0; ; NFE_INC(sc->rxq.cur, NFE_RX_RING_COUNT), vtag = 0) { if (count <= 0) break; count--; @@ -2192,7 +2192,7 @@ nfe_jrxeof(struct nfe_softc *sc, int count, int *rx_npktsp) bus_dmamap_sync(sc->jrxq.jrx_desc_tag, sc->jrxq.jrx_desc_map, BUS_DMASYNC_POSTREAD); - for (prog = 0;;NFE_INC(sc->jrxq.jcur, NFE_JUMBO_RX_RING_COUNT), + for (prog = 0; ; NFE_INC(sc->jrxq.jcur, NFE_JUMBO_RX_RING_COUNT), vtag = 0) { if (count <= 0) break; diff --git a/sys/dev/ocs_fc/ocs_mgmt.c b/sys/dev/ocs_fc/ocs_mgmt.c index 726b499f28ba..5b7f6557c017 100644 --- a/sys/dev/ocs_fc/ocs_mgmt.c +++ b/sys/dev/ocs_fc/ocs_mgmt.c @@ -226,7 +226,7 @@ ocs_mgmt_get_list(ocs_t *ocs, ocs_textbuf_t *textbuf) ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); - for (i=0;inum_descriptors; i++) { + for (i = 0; i < result.list->num_descriptors; i++) { sprintf(result_line, "0x%02x:%s\n", result.list->descriptors[i].profile_id, result.list->descriptors[i].profile_description); if (strlen(result_line) < bytes_left) { diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index 9870379e2eba..de75f4747709 100644 --- a/sys/dev/ppc/ppc.c +++ b/sys/dev/ppc/ppc.c @@ -1389,7 +1389,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq) /* let's suppose the next instr. is the same */ prefetch: - for (;mi->opcode == MS_OP_RASSERT; INCR_PC) + for (; mi->opcode == MS_OP_RASSERT; INCR_PC) w_reg(mi->arg[0].i, ppc, (char)mi->arg[1].i); if (mi->opcode == MS_OP_DELAY) { diff --git a/sys/dev/smartpqi/smartpqi_event.c b/sys/dev/smartpqi/smartpqi_event.c index f000d9ce9db3..88dcf45dd08a 100644 --- a/sys/dev/smartpqi/smartpqi_event.c +++ b/sys/dev/smartpqi/smartpqi_event.c @@ -115,7 +115,7 @@ pqisrc_ack_all_events(void *arg1) pending_event = &softs->pending_events[0]; - for (i=0; i < PQI_NUM_SUPPORTED_EVENTS; i++) { + for (i = 0; i < PQI_NUM_SUPPORTED_EVENTS; i++) { if (pending_event->pending == true) { pending_event->pending = false; pqisrc_acknowledge_event(softs, pending_event); @@ -417,7 +417,7 @@ pqisrc_report_event_config(pqisrc_softstate_t *softs) softs->event_config.num_event_descriptors = MIN(event_config_p->num_event_descriptors, PQI_MAX_EVENT_DESCRIPTORS) ; - for (i=0; i < softs->event_config.num_event_descriptors ;i++){ + for (i = 0; i < softs->event_config.num_event_descriptors; i++) { softs->event_config.descriptors[i].event_type = event_config_p->descriptors[i].event_type; } @@ -477,7 +477,7 @@ pqisrc_set_event_config(pqisrc_softstate_t *softs) event_config_p->num_event_descriptors = softs->event_config.num_event_descriptors; - for (i=0; i < softs->event_config.num_event_descriptors ; i++){ + for (i = 0; i < softs->event_config.num_event_descriptors; i++) { event_config_p->descriptors[i].event_type = softs->event_config.descriptors[i].event_type; if( pqisrc_event_type_to_event_index(event_config_p->descriptors[i].event_type) != -1) diff --git a/sys/dev/smartpqi/smartpqi_queue.c b/sys/dev/smartpqi/smartpqi_queue.c index 2e80b01b5436..f05c951cd4f9 100644 --- a/sys/dev/smartpqi/smartpqi_queue.c +++ b/sys/dev/smartpqi/smartpqi_queue.c @@ -700,7 +700,7 @@ pqisrc_create_op_obq(pqisrc_softstate_t *softs, } else { int i = 0; DBG_WARN("Error Status Descriptors\n"); - for(i = 0; i < 4;i++) + for (i = 0; i < 4; i++) DBG_WARN(" %x ",admin_resp.resp_type.create_op_oq.status_desc[i]); } @@ -743,7 +743,7 @@ pqisrc_create_op_ibq(pqisrc_softstate_t *softs, } else { int i = 0; DBG_WARN("Error Status Decsriptors\n"); - for(i = 0; i < 4;i++) + for (i = 0; i < 4; i++) DBG_WARN(" %x ",admin_resp.resp_type.create_op_iq.status_desc[i]); } diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index fa65d544e17d..b4e5c1075fb4 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -3266,7 +3266,7 @@ static void sym_init (hcb_p np, int reason) * Reinitialize usrwide. * Prepare sync negotiation according to actual SCSI bus mode. */ - for (i=0;itarget[i]; tp->to_reset = 0; @@ -3715,7 +3715,7 @@ static void sym_log_hard_error(hcb_p np, u_short sist, u_char dstat) } printf ("%s: regdump:", sym_name(np)); - for (i=0; i<24;i++) + for (i = 0; i < 24; i++) printf (" %02x", (unsigned)INB_OFF(i)); printf (".\n"); @@ -5527,8 +5527,8 @@ static int sym_show_msg (u_char * msg) u_char i; printf ("%x",*msg); if (*msg==M_EXTENDED) { - for (i=1;i<8;i++) { - if (i-1>msg[1]) break; + for (i = 1; i < 8; i++) { + if (i - 1 > msg[1]) break; printf ("-%x",msg[i]); } return (i+1); @@ -6744,10 +6744,10 @@ restart_test: /* * Wait 'til done (with timeout) */ - for (i=0; i=SYM_SNOOP_TIMEOUT) { + if (i >= SYM_SNOOP_TIMEOUT) { printf ("CACHE TEST FAILED: timeout.\n"); return (0x20); } diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c index af151c8c4f06..fccd6689a6aa 100644 --- a/sys/dev/tws/tws.c +++ b/sys/dev/tws/tws.c @@ -311,7 +311,7 @@ attach_fail_4: if (sc->cmd_tag) bus_dma_tag_destroy(sc->cmd_tag); attach_fail_3: - for(i=0;iirqs;i++) { + for (i = 0; i < sc->irqs; i++) { if ( sc->irq_res[i] ){ if (bus_release_resource(sc->tws_dev, SYS_RES_IRQ, sc->irq_res_id[i], sc->irq_res[i])) @@ -369,7 +369,7 @@ tws_detach(device_t dev) tws_teardown_intr(sc); /* Release irq resource */ - for(i=0;iirqs;i++) { + for (i = 0; i < sc->irqs; i++) { if ( sc->irq_res[i] ){ if (bus_release_resource(sc->tws_dev, SYS_RES_IRQ, sc->irq_res_id[i], sc->irq_res[i])) @@ -402,7 +402,7 @@ tws_detach(device_t dev) TWS_TRACE(sc, "bus release mem resource", 0, sc->reg_res_id); } - for ( i=0; i< tws_queue_depth; i++) { + for (i = 0; i < tws_queue_depth; i++) { if (sc->reqs[i].dma_map) bus_dmamap_destroy(sc->data_tag, sc->reqs[i].dma_map); callout_drain(&sc->reqs[i].timeout); @@ -432,7 +432,7 @@ tws_setup_intr(struct tws_softc *sc, int irqs) { int i, error; - for(i=0;iintr_handle[i])) { if ((error = bus_setup_intr(sc->tws_dev, sc->irq_res[i], INTR_TYPE_CAM | INTR_MPSAFE, @@ -452,7 +452,7 @@ tws_teardown_intr(struct tws_softc *sc) { int i; - for(i=0;iirqs;i++) { + for (i = 0; i < sc->irqs; i++) { if (sc->intr_handle[i]) { bus_teardown_intr(sc->tws_dev, sc->irq_res[i], sc->intr_handle[i]); @@ -669,8 +669,7 @@ tws_init_reqs(struct tws_softc *sc, u_int32_t dma_mem_size) bzero(cmd_buf, dma_mem_size); TWS_TRACE_DEBUG(sc, "phy cmd", sc->dma_mem_phys, 0); mtx_lock(&sc->q_lock); - for ( i=0; i< tws_queue_depth; i++) - { + for (i = 0; i < tws_queue_depth; i++) { if (bus_dmamap_create(sc->data_tag, 0, &sc->reqs[i].dma_map)) { /* log a ENOMEM failure msg here */ mtx_unlock(&sc->q_lock); diff --git a/sys/dev/tws/tws_services.c b/sys/dev/tws/tws_services.c index da8bbacc39f7..e5c3d45c533f 100644 --- a/sys/dev/tws/tws_services.c +++ b/sys/dev/tws/tws_services.c @@ -200,7 +200,7 @@ tws_init_qs(struct tws_softc *sc) { mtx_lock(&sc->q_lock); - for(int i=0;iq_head[i] = NULL; sc->q_tail[i] = NULL; } diff --git a/sys/fs/devfs/devfs_dir.c b/sys/fs/devfs/devfs_dir.c index 3dc87538017d..aad87606e738 100644 --- a/sys/fs/devfs/devfs_dir.c +++ b/sys/fs/devfs/devfs_dir.c @@ -162,7 +162,7 @@ int devfs_pathpath(const char *p1, const char *p2) { - for (;;p1++, p2++) { + for (;; p1++, p2++) { if (*p1 != *p2) { if (*p1 == '/' && *p2 == '\0') return (1); diff --git a/sys/fs/udf/osta.c b/sys/fs/udf/osta.c index f79b86993367..1a083d8c26b1 100644 --- a/sys/fs/udf/osta.c +++ b/sys/fs/udf/osta.c @@ -383,7 +383,7 @@ int UDFTransName( int maxFilenameLen; /* Translate extension, and store it in ext. */ for(index = 0; indexm_next) { + for (; m && len; m = m->m_next) { if (m->m_len == 0) continue; w = mtod(m, u_short *); diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index ab8ed32ad189..c4b1c8201ff2 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -807,7 +807,7 @@ kern_abort2(struct thread *td, const char *why, int nargs, void **uargs) } if (nargs > 0) { sbuf_putc(sb, '('); - for (i = 0;i < nargs; i++) + for (i = 0; i < nargs; i++) sbuf_printf(sb, "%s%p", i == 0 ? "" : ", ", uargs[i]); sbuf_putc(sb, ')'); } diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index e919b15543b2..fcbfbe64f854 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1302,7 +1302,7 @@ mallocinit(void *dummy) #endif align, UMA_ZONE_MALLOC); } - for (;i <= size; i+= KMEM_ZBASE) + for (; i <= size; i+= KMEM_ZBASE) kmemsize[i >> KMEM_ZSHIFT] = indx; } } diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c index 07a9cc0f57be..c4d0223d484f 100644 --- a/sys/kern/subr_devstat.c +++ b/sys/kern/subr_devstat.c @@ -415,7 +415,7 @@ sysctl_devstat(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); - for (;nds != NULL;) { + while (nds != NULL) { error = SYSCTL_OUT(req, nds, sizeof(struct devstat)); if (error != 0) return (error); diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index db0ceb17b9f0..e2070ae3f865 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -766,7 +766,7 @@ reswitch: switch (ch = (u_char)*fmt++) { PCHAR(hex2ascii(*up & 0x0f)); up++; if (width) - for (q=p;*q;q++) + for (q = p; *q; q++) PCHAR(*q); } break; diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index 374b5595fcbc..5b89ca026e85 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -519,7 +519,7 @@ siftr_pkt_manager_thread(void *arg) if (log_buf != NULL) { alq_post_flags(siftr_alq, log_buf, 0); } - for (;cnt > 0; cnt--) { + for (; cnt > 0; cnt--) { pkt_node = STAILQ_FIRST(&tmp_pkt_queue); STAILQ_REMOVE_HEAD(&tmp_pkt_queue, nodes); free(pkt_node, M_SIFTR_PKTNODE); diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c index b3f52322425f..d522f9da0fbe 100644 --- a/sys/netpfil/ipfw/ip_dummynet.c +++ b/sys/netpfil/ipfw/ip_dummynet.c @@ -1150,7 +1150,7 @@ copy_data_helper(void *_o, void *_arg) return 0; /* not a pipe */ /* see if the object is within one of our ranges */ - for (;r < lim; r += 2) { + for (; r < lim; r += 2) { if (n < r[0] || n > r[1]) continue; /* Found a valid entry, copy and we are done */ @@ -1183,7 +1183,7 @@ copy_data_helper(void *_o, void *_arg) if (n >= DN_MAX_ID) return 0; /* see if the object is within one of our ranges */ - for (;r < lim; r += 2) { + for (; r < lim; r += 2) { if (n < r[0] || n > r[1]) continue; if (copy_flowset(a, fs, 0)) From nobody Thu Oct 16 23:16:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnkNH60Czz6DJyB; Thu, 16 Oct 2025 23:16: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 4cnkNH5SVQz3x7Z; Thu, 16 Oct 2025 23:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760656575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1cl4WYBxhpKohU74WS5uO0Qut9ZHKitjgcqxAtqhD0I=; b=eEOOrZgxmg0mcASPIKnUTgBvTi4lET6DHgZJsRnp4naegGFDezjgEqRh8e4XqZD78dVmU4 X6t1Bm1Q6RRaA/mPRlh2hmRYxNN0cMm3iGiAMcvfZBVt7lgdwgPww3Fa0yS+TPsnwxiGNz Aw15ENT5VtADOQEOVWVgFHwjAy1HvfDD7arbHWsHXJ2zeiwSxguNiBMaafu2iX9qI23xvE qusSjgZiBZXJk5bET3yKtyonC4jVPkw4K6i4eiB5o6v/5q5ql1ffcvO1nkVWIGQGQXW1G9 J3gJTf8nA2oz/lN6qBDQT68pwQ3Vh5vTSz/xLdEFAM3GWKCFSYn8+o+MSIJu9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760656575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1cl4WYBxhpKohU74WS5uO0Qut9ZHKitjgcqxAtqhD0I=; b=t99BZvqVvZk6Advza3BPJPSldIxwxcP/WUYejEYrf29zo7SZnsd/Me71Vy+P6S3Eie4Fdo EiS1JpLC/X5gw+A9KDQ2XgZn5tGbH8Tm05B2P999+fX/61BDXA14CaGBLMieN+9vqEYD6p qsX5/vh3j/QPn4SIPo+XExvt/wCLyiNg3hNQxm0dX+fh87XaSUbQ28+yJQvniyafDUZQYz t8INAxP1orJZ+qfAdbN97lr5aMi8hMEfwbhueGjZQ7o4cwnG/3AA0fWTc/NFwfzpFuPigI JY3e0Qpse9eZM6/r+JiYumxwW/0UhK/1eBVvOYGiVbAbgrO+SpNt8WEO0mIGaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760656575; a=rsa-sha256; cv=none; b=LF3HvG+bdypV5i2MNW9id+LbGfg/26IX62Q/bRPROJT0VrOCx9iqmJYkcD7DWtf3zcga0+ 1lOWgpnAxJ9WmrL7K9mgaYPtM+Oi990kiQvSHDcxaV8zoqeZQxtkXofQVHzXdyUk89MsdQ 1Kvun3aJCTOfNfcmvTmLyt4b6VkNDLip6txzni8FV0y1id9wqHKF23sCdecTC7yAp/LR7G dEoAYmimsm7f0xgGOu6G4iesY2KlxMpuTT3fbHNxUOTCeKeM2GGZeCdfGZDKhEpUhAqwmh fmY5hWlIAyaLq23Tog89ZmU/fT2QXdWp9YtC1zxlwzT4J4t6f11p+80ZLCbRuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnkNH4zsYzDJ3; Thu, 16 Oct 2025 23:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GNGFpd075058; Thu, 16 Oct 2025 23:16:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GNGFfj075055; Thu, 16 Oct 2025 23:16:15 GMT (envelope-from git) Date: Thu, 16 Oct 2025 23:16:15 GMT Message-Id: <202510162316.59GNGFfj075055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3b9b64457676 - main - vm: Fix iterator usage in vm_thread_stack_create() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b9b64457676561b8de2bec7c94c561bbd807b0c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3b9b64457676561b8de2bec7c94c561bbd807b0c commit 3b9b64457676561b8de2bec7c94c561bbd807b0c Author: Mark Johnston AuthorDate: 2025-10-16 23:12:54 +0000 Commit: Mark Johnston CommitDate: 2025-10-16 23:13:34 +0000 vm: Fix iterator usage in vm_thread_stack_create() After commit 7a79d0669761 we no longer hold the VM object lock when initializing or advancing the domainset iterator in vm_thread_stack_create(). We could lift the lock out of vm_thread_stack_back() but that poses complications since we cannot allocate KVA with a VM object lock held. Instead of overridding the object's iterator, just borrow that of the current thread. Kernel stacks are basically always allocated with a DOMAINSET_POLICY_PREFER policy, so it's not very important to maintain a global iterator for round-robin allocation. As a part of this, fix up flag handling: make sure we handle M_NOWAIT/M_WAITOK from the caller. Delete a comment in vm_thread_new() which refers to a non-existent consideration (stack swapping has been removed). I suspect vm_thread_new() can use M_WAITOK but opted not to make that change here. Reported by: olce Reviewed by: olce, alc, kib Fixes: 7a79d0669761 ("vm: improve kstack_object pindex calculation to avoid pindex holes") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52982 --- sys/vm/vm_glue.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index e0f1807a1b32..18d789c59281 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -441,19 +441,16 @@ vm_thread_kstack_arena_release(void *arena, vmem_addr_t addr, vmem_size_t size) * Create the kernel stack for a new thread. */ static vm_offset_t -vm_thread_stack_create(struct domainset *ds, int pages) +vm_thread_stack_create(struct domainset *ds, int pages, int flags) { vm_page_t ma[KSTACK_MAX_PAGES]; struct vm_domainset_iter di; - int req = VM_ALLOC_NORMAL; - vm_object_t obj; + int req; vm_offset_t ks; int domain, i; - obj = vm_thread_kstack_size_to_obj(pages); - if (vm_ndomains > 1) - obj->domain.dr_policy = ds; - vm_domainset_iter_page_init(&di, obj, 0, &domain, &req); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); + req = malloc2vm_flags(flags); do { /* * Get a kernel virtual address for this thread's kstack. @@ -480,7 +477,7 @@ vm_thread_stack_create(struct domainset *ds, int pages) vm_page_valid(ma[i]); pmap_qenter(ks, ma, pages); return (ks); - } while (vm_domainset_iter_page(&di, obj, &domain, NULL) == 0); + } while (vm_domainset_iter_policy(&di, &domain) == 0); return (0); } @@ -532,15 +529,9 @@ vm_thread_new(struct thread *td, int pages) ks = 0; if (pages == kstack_pages && kstack_cache != NULL) ks = (vm_offset_t)uma_zalloc(kstack_cache, M_NOWAIT); - - /* - * Ensure that kstack objects can draw pages from any memory - * domain. Otherwise a local memory shortage can block a process - * swap-in. - */ if (ks == 0) ks = vm_thread_stack_create(DOMAINSET_PREF(PCPU_GET(domain)), - pages); + pages, M_NOWAIT); if (ks == 0) return (0); @@ -660,7 +651,8 @@ kstack_import(void *arg, void **store, int cnt, int domain, int flags) ds = DOMAINSET_PREF(domain); for (i = 0; i < cnt; i++) { - store[i] = (void *)vm_thread_stack_create(ds, kstack_pages); + store[i] = (void *)vm_thread_stack_create(ds, kstack_pages, + flags); if (store[i] == NULL) break; } From nobody Thu Oct 16 23:21:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnkW02k6vz6DKNL for ; Thu, 16 Oct 2025 23:22:04 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 4cnkVz6zXbz3xjy for ; Thu, 16 Oct 2025 23:22:03 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-63bfbbbdd0bso2542825a12.3 for ; Thu, 16 Oct 2025 16:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760656918; x=1761261718; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=5IKvpSL7fGA1xh8SY55b0oZ1H6uYna8RtscdZUlMERI=; b=WAec+drmtRq7k0njmCQ2IiGMVf3tap+nGKwNdruFxmFPRgBEj6JQV4sXAveQo99RJA 2hTL+/DCDIzCcxcol4TwS7T32E+PaUhp/qQOQJfbO7j88dZ+X5Yu/HrCsTkr5gpl1zje Z0WqLTKNAOeWRfMeMO8iMtbbZCJbZi6Yv0SHj92XRYERu+p2mVaYqtVoM+s7Z5cr6VkD TlG63+uyw11iNXYPtDChkaDwUaA513M/VMdSx0jRgGEIeXfG4OvhaxJUKK7rnMuRSsMx s84z12TtUyvgHxrIVIMkop5n7rkDgxbt/t4q0Mx5bqXewlvRJpX8JH51INW1tk2aaqC9 G9Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760656918; x=1761261718; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5IKvpSL7fGA1xh8SY55b0oZ1H6uYna8RtscdZUlMERI=; b=k6S2UMkiLaAPUTyuxysfbAMSKQbVvHFzSAvT+Z4MP7RsBlD5ZxcZaD3nmxS2gQo7lR 2c3ABTHMu6ioAUc64vzo75Y92Fe179m3oEVuBQXRPG+KBWyCmTZeakL0wdaU9JnDsKsk tz/sm0tnyBDRuYfMSNXE7eQO4hrwHcDWtro2t14BlL6Kv4ktG37lM+wC0gFhN18P+hnN MNmOeeZe9FM6zrntQWyAsiDJD3/xROQQBkW/GXwXFrZgAUH98I+45LOA2tWhD4nMkGAX uk1z99FnitrCTrcczhbyn6AkfuKH9ZnW7W9s1hcLh2ekP1VYgoJhTIGBbrsDq87F9S5u evow== X-Forwarded-Encrypted: i=1; AJvYcCX1lFFcBz7Uv5HaJZqUmOPzAGOqzTYsAXL+XqjcynWkiAhBbiz8SZF4P3ORQrCc34uJYbgTAv4Pl9xsPdDZggpWKaO6sA==@freebsd.org X-Gm-Message-State: AOJu0Yyc8VWoGnyEBVPf5LAX+rqgdQp2awll4DQnBzJzcMZzcaDTyIBw I6SK8ZsF+GBFZsh+RcB+CmyHRWOgnu62rlsLZ9Cwqtm2uh8jOTGfj+mBsspFokA7aM/Iwzgugan g3L2Z+l/Q775MrL1O3J3utAdeilGnwg== X-Gm-Gg: ASbGncv+z43Z7CySGfL9ccuLGXiVeiaT/Mssr11zPmHHfDKE4O8j8hDfIIgdzZcmz8M 25SpobCtKmrttoi4SW6zm0hbS352gQZlLjsyBXqytcnx/mi71P0oPtGDhyp57d9JL7fTicGLpJj 9mTiaebsyIk7aRVMIo2wUmhXIrpjNBkeFP6LVWfsCc40/BPcEotNakntd4VYAJwhj+zlKkprsCX 1p/HWb3wo0I0mX6s9livpNVxeQ/9AI7WDtONBnZFQI0WchT6i6mwa99mYGM1ryON5Zm X-Google-Smtp-Source: AGHT+IG9K4j/raZoFdDhN4WOm9GrzXUxw+UjFLhcGteyxpwU4pEpXyMOMo9RN0DciMkrwAhRIA/Q4wNfbSNlhcMjlvI= X-Received: by 2002:a05:6402:51d3:b0:637:e490:4609 with SMTP id 4fb4d7f45d1cf-63c1f6d04aemr1461793a12.31.1760656917802; Thu, 16 Oct 2025 16:21:57 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> In-Reply-To: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> From: Rick Macklem Date: Thu, 16 Oct 2025 16:21:45 -0700 X-Gm-Features: AS18NWBKITHbLUh3RsuKltFuy9jG6GFK7XKnqKg6KorGnDySNFAqS3DCm5V-KDg Message-ID: Subject: Re: git: 0050289464fa - main - style(9): white space after ; and around binary operators To: "David E. O'Brien" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cnkVz6zXbz3xjy Please be aware of the following snippets from "man 9 style": In general code can be considered "new code" when it makes up about 50% or more of the file(s) involved. This is enough to break precedents in the existing code and use the current style guidelines. Stylistic changes (including whitespace changes) are hard on the source repository and are to be avoided without good reason. rick On Thu, Oct 16, 2025 at 3:05=E2=80=AFPM David E. O'Brien wrote: > > CAUTION: This email originated from outside of the University of Guelph. = Do not click links or open attachments unless you recognize the sender and = know the content is safe. If in doubt, forward suspicious emails to IThelp@= uoguelph.ca. > > The branch main has been updated by obrien: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D0050289464fa56ec79e060b8d8= 378b9ff7145a0e > > commit 0050289464fa56ec79e060b8d8378b9ff7145a0e > Author: David E. O'Brien > AuthorDate: 2025-10-15 05:22:00 +0000 > Commit: David E. O'Brien > CommitDate: 2025-10-16 22:02:50 +0000 > > style(9): white space after ; and around binary operators > > in for() loops. Also, use 'while', where only the > conditional test of 'for' was used. > > Reviewed by: sjg > --- > sys/arm/allwinner/aw_sid.c | 2 +- > sys/cam/scsi/scsi_all.c | 2 +- > sys/cam/scsi/scsi_enc_ses.c | 6 +++--- > sys/crypto/chacha20/chacha.c | 6 +++--- > sys/crypto/openssl/ossl_sha256.c | 4 ++-- > sys/dev/aic7xxx/aic79xx.c | 4 ++-- > sys/dev/aic7xxx/aic7xxx.c | 4 ++-- > sys/dev/enetc/if_enetc.c | 6 +++--- > sys/dev/hptmv/entry.c | 33 ++++++++++++++++----------------- > sys/dev/hptmv/gui_lib.c | 12 +++++------- > sys/dev/hptmv/hptproc.c | 2 +- > sys/dev/mps/mps_sas.c | 4 ++-- > sys/dev/mpt/mpt_raid.c | 4 ++-- > sys/dev/nfe/if_nfe.c | 4 ++-- > sys/dev/ocs_fc/ocs_mgmt.c | 14 +++++++------- > sys/dev/ppc/ppc.c | 2 +- > sys/dev/smartpqi/smartpqi_event.c | 6 +++--- > sys/dev/smartpqi/smartpqi_queue.c | 4 ++-- > sys/dev/sym/sym_hipd.c | 12 ++++++------ > sys/dev/tws/tws.c | 13 ++++++------- > sys/dev/tws/tws_services.c | 2 +- > sys/fs/devfs/devfs_dir.c | 2 +- > sys/fs/udf/osta.c | 4 ++-- > sys/i386/i386/in_cksum_machdep.c | 2 +- > sys/kern/kern_exit.c | 2 +- > sys/kern/kern_malloc.c | 2 +- > sys/kern/subr_devstat.c | 2 +- > sys/kern/subr_prf.c | 2 +- > sys/netinet/siftr.c | 2 +- > sys/netpfil/ipfw/ip_dummynet.c | 4 ++-- > 30 files changed, 82 insertions(+), 86 deletions(-) > > diff --git a/sys/arm/allwinner/aw_sid.c b/sys/arm/allwinner/aw_sid.c > index ba5faca33c5e..932c2f189e51 100644 > --- a/sys/arm/allwinner/aw_sid.c > +++ b/sys/arm/allwinner/aw_sid.c > @@ -297,7 +297,7 @@ aw_sid_attach(device_t dev) > /* Register ourself so device can resolve who we are */ > OF_device_register_xref(OF_xref_from_node(node), dev); > > - for (i =3D 0; i < sc->sid_conf->nfuses ;i++) {\ > + for (i =3D 0; i < sc->sid_conf->nfuses; i++) { > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > OID_AUTO, sc->sid_conf->efuses[i].name, > diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c > index 9c097f52d136..fd128e69f1f1 100644 > --- a/sys/cam/scsi/scsi_all.c > +++ b/sys/cam/scsi/scsi_all.c > @@ -686,7 +686,7 @@ scsi_op_desc(uint16_t opcode, struct scsi_inquiry_dat= a *inq_data) > opmask =3D 1 << pd_type; > > for (j =3D 0; j < num_tables; j++) { > - for (i =3D 0;i < num_ops[j] && table[j][i].opcode <=3D op= code; i++){ > + for (i =3D 0; i < num_ops[j] && table[j][i].opcode <=3D o= pcode; i++) { > if ((table[j][i].opcode =3D=3D opcode) > && ((table[j][i].opmask & opmask) !=3D 0)) > return(table[j][i].desc); > diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c > index 435874a9874a..3a362eaf11a4 100644 > --- a/sys/cam/scsi/scsi_enc_ses.c > +++ b/sys/cam/scsi/scsi_enc_ses.c > @@ -2302,7 +2302,7 @@ ses_print_addl_data_sas_type0(char *sesname, struct= sbuf *sbp, > sbuf_putc(sbp, '\n'); > if (addl->proto_data.sasdev_phys =3D=3D NULL) > return; > - for (i =3D 0;i < addl->proto_hdr.sas->base_hdr.num_phys;i++) { > + for (i =3D 0; i < addl->proto_hdr.sas->base_hdr.num_phys; i++) { > phy =3D &addl->proto_data.sasdev_phys[i]; > sbuf_printf(sbp, "%s: phy %d:", sesname, i); > if (ses_elm_sas_dev_phy_sata_dev(phy)) > @@ -2349,7 +2349,7 @@ ses_print_addl_data_sas_type1(char *sesname, struct= sbuf *sbp, > sbuf_printf(sbp, "Expander: %d phys", num_phys); > if (addl->proto_data.sasexp_phys =3D=3D NULL) > return; > - for (i =3D 0;i < num_phys;i++) { > + for (i =3D 0; i < num_phys; i++) { > exp_phy =3D &addl->proto_data.sasexp_phys[i]; > sbuf_printf(sbp, "%s: phy %d: connector %d other= %d\n", > sesname, i, exp_phy->connector_index, > @@ -2360,7 +2360,7 @@ ses_print_addl_data_sas_type1(char *sesname, struct= sbuf *sbp, > sbuf_printf(sbp, "Port: %d phys", num_phys); > if (addl->proto_data.sasport_phys =3D=3D NULL) > return; > - for (i =3D 0;i < num_phys;i++) { > + for (i =3D 0; i < num_phys; i++) { > port_phy =3D &addl->proto_data.sasport_phys[i]; > sbuf_printf(sbp, > "%s: phy %d: id %d connector %d other %d\n", > diff --git a/sys/crypto/chacha20/chacha.c b/sys/crypto/chacha20/chacha.c > index 52f7e18c651c..cb06003b0ecf 100644 > --- a/sys/crypto/chacha20/chacha.c > +++ b/sys/crypto/chacha20/chacha.c > @@ -138,7 +138,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,= u32 bytes) > for (;;) { > if (bytes < 64) { > #ifndef KEYSTREAM_ONLY > - for (i =3D 0;i < bytes;++i) tmp[i] =3D m[i]; > + for (i =3D 0; i < bytes; ++i) tmp[i] =3D m[i]; > m =3D tmp; > #endif > ctarget =3D c; > @@ -160,7 +160,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,= u32 bytes) > x13 =3D j13; > x14 =3D j14; > x15 =3D j15; > - for (i =3D 20;i > 0;i -=3D 2) { > + for (i =3D 20; i > 0; i -=3D 2) { > QUARTERROUND( x0, x4, x8,x12) > QUARTERROUND( x1, x5, x9,x13) > QUARTERROUND( x2, x6,x10,x14) > @@ -240,7 +240,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,= u32 bytes) > > if (bytes <=3D 64) { > if (bytes < 64) { > - for (i =3D 0;i < bytes;++i) ctarget[i] =3D c[i]; > + for (i =3D 0; i < bytes; ++i) ctarget[i] =3D c[i]; > } > x->input[12] =3D j12; > x->input[13] =3D j13; > diff --git a/sys/crypto/openssl/ossl_sha256.c b/sys/crypto/openssl/ossl_s= ha256.c > index 4613a9409b44..50cb9739d114 100644 > --- a/sys/crypto/openssl/ossl_sha256.c > +++ b/sys/crypto/openssl/ossl_sha256.c > @@ -74,11 +74,11 @@ ossl_sha256_init(void *c_) > unsigned int nn; \ > switch ((c)->md_len) \ > { case SHA224_DIGEST_LENGTH: \ > - for (nn=3D0;nn + for (nn=3D0; nn < SHA224_DIGEST_LENGTH / 4; nn++) = \ > { ll=3D(c)->h[nn]; (void)HOST_l2c(ll,(s)); } \ > break; \ > case SHA256_DIGEST_LENGTH: \ > - for (nn=3D0;nn + for (nn=3D0; nn < SHA256_DIGEST_LENGTH / 4; nn++) = \ > { ll=3D(c)->h[nn]; (void)HOST_l2c(ll,(s)); } \ > break; \ > default: \ > diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c > index 2b5015b20e41..cee45fa5cc8a 100644 > --- a/sys/dev/aic7xxx/aic79xx.c > +++ b/sys/dev/aic7xxx/aic79xx.c > @@ -7788,8 +7788,8 @@ ahd_abort_scbs(struct ahd_softc *ahd, int target, c= har channel, > } > > if (role !=3D ROLE_TARGET) { > - for (;i < maxtarget; i++) { > - for (j =3D minlun;j < maxlun; j++) { > + for (; i < maxtarget; i++) { > + for (j =3D minlun; j < maxlun; j++) { > u_int scbid; > u_int tcl; > > diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c > index c09876e9f589..18f68b806948 100644 > --- a/sys/dev/aic7xxx/aic7xxx.c > +++ b/sys/dev/aic7xxx/aic7xxx.c > @@ -5903,8 +5903,8 @@ ahc_abort_scbs(struct ahc_softc *ahc, int target, c= har channel, > } > > if (role !=3D ROLE_TARGET) { > - for (;i < maxtarget; i++) { > - for (j =3D minlun;j < maxlun; j++) { > + for (; i < maxtarget; i++) { > + for (j =3D minlun; j < maxlun; j++) { > u_int scbid; > u_int tcl; > > diff --git a/sys/dev/enetc/if_enetc.c b/sys/dev/enetc/if_enetc.c > index 808397b229a7..53002f9d73ce 100644 > --- a/sys/dev/enetc/if_enetc.c > +++ b/sys/dev/enetc/if_enetc.c > @@ -848,7 +848,7 @@ enetc_hash_vid(uint16_t vid) > bool bit; > int i; > > - for (i =3D 0;i < 6;i++) { > + for (i =3D 0; i < 6; i++) { > bit =3D vid & BIT(i); > bit ^=3D !!(vid & BIT(i + 6)); > hash |=3D bit << i; > @@ -1020,7 +1020,7 @@ enetc_msix_intr_assign(if_ctx_t ctx, int msix) > ENETC_RBICR0_ICEN | ENETC_RBICR0_SET_ICPT(ENETC_RX_IN= TR_PKT_THR)); > } > vector =3D 0; > - for (i =3D 0;i < sc->tx_num_queues; i++, vector++) { > + for (i =3D 0; i < sc->tx_num_queues; i++, vector++) { > tx_queue =3D &sc->tx_queues[i]; > snprintf(irq_name, sizeof(irq_name), "txq%d", i); > iflib_softirq_alloc_generic(ctx, &tx_queue->irq, > @@ -1130,7 +1130,7 @@ enetc_isc_txd_encap(void *data, if_pkt_info_t ipi) > } > > /* Now add remaining descriptors. */ > - for (;i < ipi->ipi_nsegs; i++) { > + for (; i < ipi->ipi_nsegs; i++) { > desc =3D &queue->ring[pidx]; > bzero(desc, sizeof(*desc)); > desc->addr =3D segs[i].ds_addr; > diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c > index 5c4718bf582f..f3d58f285b39 100644 > --- a/sys/dev/hptmv/entry.c > +++ b/sys/dev/hptmv/entry.c > @@ -430,7 +430,7 @@ static void device_change(IAL_ADAPTER_T *pAdapter , M= V_U8 channelIndex, int plug > if(pVDev->pParent) > { > int iMember; > - for(iMember =3D 0; iMember < pVDev->pParent-= >u.array.bArnMember; iMember++) > + for (iMember =3D 0; iMember < pVDev->pParent->u.a= rray.bArnMember; iMember++) > if((PVDevice)pVDev->pParent->u.array.pMem= ber[iMember] =3D=3D pVDev) > pVDev->pParent->u.array.pMember[i= Member] =3D NULL; > pVDev->pParent =3D NULL; > @@ -984,7 +984,7 @@ fRegisterVdevice(IAL_ADAPTER_T *pAdapter) > PVBus pVBus; > int i,j; > > - for(i=3D0;i + for (i =3D 0; i < MV_SATA_CHANNELS_NUM; i++) { > pPhysical =3D &(pAdapter->VDevices[i]); > pLogical =3D pPhysical; > while (pLogical->pParent) pLogical =3D pLogical->pParent; > @@ -1027,8 +1027,7 @@ GetSpareDisk(_VBUS_ARG PVDevice pArray) > PVDevice pVDevice, pFind =3D NULL; > int i; > > - for(i=3D0;i - { > + for (i=3D0; i < MV_SATA_CHANNELS_NUM; i++) { > pVDevice =3D &pAdapter->VDevices[i]; > if(!pVDevice) > continue; > @@ -1356,7 +1355,7 @@ unregister: > goto unregister; > } > > - for (i=3D0; i + for (i =3D 0; i < MAX_COMMAND_BLOCKS_FOR_EACH_VBUS; i++) { > FreeCommand(_VBUS_P &(pAdapter->pCommandBlocks[i])); > } > > @@ -1370,7 +1369,7 @@ unregister: > > memset((void *)pAdapter->pbus_dmamap, 0, sizeof(struct _BUS_DMAMA= P) * MAX_QUEUE_COMM); > pAdapter->pbus_dmamap_list =3D 0; > - for (i=3D0; i < MAX_QUEUE_COMM; i++) { > + for (i =3D 0; i < MAX_QUEUE_COMM; i++) { > PBUS_DMAMAP pmap =3D &(pAdapter->pbus_dmamap[i]); > pmap->pAdapter =3D pAdapter; > dmamap_put(pmap); > @@ -1398,7 +1397,7 @@ unregister: > pAdapter->prdTableAlignedAddr =3D (PUCHAR)(((ULONG_PTR)pAdapter->= prdTableAddr + 0x1f) & ~(ULONG_PTR)0x1fL); > { > PUCHAR PRDTable =3D pAdapter->prdTableAlignedAddr; > - for (i=3D0; i + for (i =3D 0; i < PRD_TABLES_FOR_VBUS; i++) > { > /* KdPrint(("i=3D%d,pAdapter->pFreePRDLink=3D%p\n",i= ,pAdapter->pFreePRDLink)); */ > FreePRDTable(pAdapter, PRDTable); > @@ -1447,7 +1446,7 @@ unregister: > } > > #ifdef SUPPORT_ARRAY > - for(i =3D MAX_ARRAY_DEVICE - 1; i >=3D 0; i--) { > + for (i =3D MAX_ARRAY_DEVICE - 1; i >=3D 0; i--) { > pVDev =3D ArrayTables(i); > mArFreeArrayTable(pVDev); > } > @@ -1467,7 +1466,7 @@ unregister: > _vbus_p->nInstances =3D 1; > fRegisterVdevice(pAdapter); > > - for (channel=3D0;channel + for (channel =3D 0; channel < MV_SATA_CHANNELS_NUM; channel++) { > pVDev =3D _vbus_p->pVDevice[channel]; > if (pVDev && pVDev->vf_online) > fCheckBootable(pVDev); > @@ -1567,7 +1566,7 @@ fResetActiveCommands(PVBus _vbus_p) > { > MV_SATA_ADAPTER *pMvSataAdapter =3D &((IAL_ADAPTER_T *)_vbus_p->O= sExt)->mvSataAdapter; > MV_U8 channel; > - for (channel=3D0;channel< MV_SATA_CHANNELS_NUM;channel++) { > + for (channel =3D 0; channel < MV_SATA_CHANNELS_NUM; channel++) { > if (pMvSataAdapter->sataChannel[channel] && pMvSataAdapte= r->sataChannel[channel]->outstandingCommands) > MvSataResetChannel(pMvSataAdapter,channel); > } > @@ -1590,7 +1589,7 @@ check_cmds: > dataxfer_poll(); > xor_poll(); > #endif > - for (channel=3D0;channel< MV_SATA_CHANNELS_NUM;channel++)= { > + for (channel =3D 0; channel < MV_SATA_CHANNELS_NUM; chann= el++) { > pMvSataChannel =3D pMvSataAdapter->sataChannel[ch= annel]; > if (pMvSataChannel && pMvSataChannel->outstanding= Commands) > { > @@ -1716,7 +1715,7 @@ fDeviceSendCommand(_VBUS_ARG PCommand pCmd) > > MV_BOOLEAN is48bit; > MV_U8 channel; > - int i=3D0; > + int i =3D 0; > > DECLARE_BUFFER(FPSCAT_GATH, tmpSg); > > @@ -2141,7 +2140,7 @@ FlushAdapter(IAL_ADAPTER_T *pAdapter) > hpt_printk(("flush all devices\n")); > > /* flush all devices */ > - for (i=3D0; i + for (i =3D 0; i < MAX_VDEVICE_PER_VBUS; i++) { > PVDevice pVDev =3D pAdapter->VBus.pVDevice[i]; > if(pVDev) fFlushVDev(pVDev); > } > @@ -2174,7 +2173,7 @@ Check_Idle_Call(IAL_ADAPTER_T *pAdapter) > { > int i; > PVDevice pArray; > - for(i =3D 0; i < MAX_ARRAY_PER_VBUS; i++){ > + for (i =3D 0; i < MAX_ARRAY_PER_VBUS; i++) { > if ((pArray=3DArrayTables(i))->u.array.dA= rStamp=3D=3D0) > continue; > else if (pArray->u.array.rf_auto_rebuild)= { > @@ -2378,7 +2377,7 @@ hpt_free_ccb(union ccb **ccb_Q, union ccb *ccb) > static void hpt_worker_thread(void) > { > > - for(;;) { > + for (;;) { > mtx_lock(&DpcQueue_Lock); > while (DpcQueue_First!=3DDpcQueue_Last) { > ST_HPT_DPC p; > @@ -2418,7 +2417,7 @@ static void hpt_worker_thread(void) > mtx_lock(&pAdapter->lock); > _vbus_p =3D &pAdapter->VBus; > > - for (i=3D0;i + for (i =3D 0; i < MAX_ARRAY_PER_V= BUS; i++) > { > if ((pArray=3DArrayTables= (i))->u.array.dArStamp=3D=3D0) > continue; > @@ -2472,7 +2471,7 @@ launch_worker_thread(void) > int i; > PVDevice pVDev; > > - for(i =3D 0; i < MAX_ARRAY_PER_VBUS; i++) > + for (i =3D 0; i < MAX_ARRAY_PER_VBUS; i++) > if ((pVDev=3DArrayTables(i))->u.array.dArStamp=3D= =3D0) > continue; > else{ > diff --git a/sys/dev/hptmv/gui_lib.c b/sys/dev/hptmv/gui_lib.c > index d78fdcca69d2..f11044db733a 100644 > --- a/sys/dev/hptmv/gui_lib.c > +++ b/sys/dev/hptmv/gui_lib.c > @@ -86,8 +86,7 @@ check_VDevice_valid(PVDevice p) > while(pAdapter !=3D NULL) > { > _vbus_p =3D &pAdapter->VBus; > - for (i=3D0;i - { > + for (i =3D 0; i pVDevice=3DArrayTables(i); > if ((pVDevice->u.array.dArStamp !=3D 0) && (pVDev= ice =3D=3D p)) > return 0; > @@ -244,9 +243,9 @@ static void get_array_info(PVDevice pVDevice, PHPT_AR= RAY_INFO pArrayInfo) > if(pVDevice->u.array.pMember[i] !=3D NULL) > pArrayInfo->Members[pArrayInfo->nDisk++] =3D VDEV= _TO_ID(pVDevice->u.array.pMember[i]); > > - for(i=3DpArrayInfo->nDisk; i + for (i =3D pArrayInfo->nDisk; i < MAX_ARRAY_MEMBERS; i++) > pArrayInfo->Members[i] =3D INVALID_DEVICEID; > - } > +} > > static void get_array_info_v2(PVDevice pVDevice, PHPT_ARRAY_INFO_V2 pArr= ayInfo) > { > @@ -266,7 +265,7 @@ static void get_array_info_v2(PVDevice pVDevice, PHPT= _ARRAY_INFO_V2 pArrayInfo) > if(pVDevice->u.array.pMember[i] !=3D NULL) > pArrayInfo->Members[pArrayInfo->nDisk++] =3D VDEV= _TO_ID(pVDevice->u.array.pMember[i]); > > - for(i=3DpArrayInfo->nDisk; i + for (i =3D pArrayInfo->nDisk; i < MAX_ARRAY_MEMBERS_V2; i++) > pArrayInfo->Members[i] =3D INVALID_DEVICEID; > } > #endif > @@ -461,8 +460,7 @@ found: > pInfo->IoPort =3D 0; > pInfo->ControlPort =3D 0; > > - for (i=3D0; i<2 ;i++) > - { > + for (i =3D 0; i < 2; i++) { > pInfo->Devices[i] =3D (DEVICEID)INVALID_DEVICEID; > } > > diff --git a/sys/dev/hptmv/hptproc.c b/sys/dev/hptmv/hptproc.c > index 38fe61ee7e04..328750d9034c 100644 > --- a/sys/dev/hptmv/hptproc.c > +++ b/sys/dev/hptmv/hptproc.c > @@ -107,7 +107,7 @@ hpt_set_asc_info(IAL_ADAPTER_T *pAdapter, char *buffe= r,int length) > return -EINVAL; > } > > - for (i=3D0;i + for (i =3D 0; i < MV_SATA_CHANNELS_NUM; i++) > if(i =3D=3D ichan) > goto rebuild; > > diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c > index d69c8ea5fded..fa0f817ed67b 100644 > --- a/sys/dev/mps/mps_sas.c > +++ b/sys/dev/mps/mps_sas.c > @@ -858,7 +858,7 @@ mps_detach_sas(struct mps_softc *sc) > if (sassc->devq !=3D NULL) > cam_simq_free(sassc->devq); > > - for(i=3D0; i< sassc->maxtargets ;i++) { > + for (i =3D 0; i < sassc->maxtargets; i++) { > targ =3D &sassc->targets[i]; > SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, lun_tmp) { > free(lun, M_MPT2); > @@ -3396,7 +3396,7 @@ mpssas_realloc_targets(struct mps_softc *sc, int ma= xtargets) > * the allocated LUNs for each target and then the target buffer > * itself. > */ > - for (i=3D0; i< maxtargets; i++) { > + for (i =3D 0; i < maxtargets; i++) { > targ =3D &sassc->targets[i]; > SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, lun_tmp) { > free(lun, M_MPT2); > diff --git a/sys/dev/mpt/mpt_raid.c b/sys/dev/mpt/mpt_raid.c > index 5ff08ffcf2b3..2b868f6ef070 100644 > --- a/sys/dev/mpt/mpt_raid.c > +++ b/sys/dev/mpt/mpt_raid.c > @@ -830,7 +830,7 @@ mpt_is_raid_volume(struct mpt_softc *mpt, target_id_t= tgt) > } > ioc_vol =3D mpt->ioc_page2->RaidVolume; > ioc_last_vol =3D ioc_vol + mpt->ioc_page2->NumActiveVolumes; > - for (;ioc_vol !=3D ioc_last_vol; ioc_vol++) { > + for (; ioc_vol !=3D ioc_last_vol; ioc_vol++) { > if (ioc_vol->VolumeID =3D=3D tgt) { > return (1); > } > @@ -1406,7 +1406,7 @@ mpt_refresh_raid_data(struct mpt_softc *mpt) > > ioc_vol =3D mpt->ioc_page2->RaidVolume; > ioc_last_vol =3D ioc_vol + mpt->ioc_page2->NumActiveVolumes; > - for (;ioc_vol !=3D ioc_last_vol; ioc_vol++) { > + for (; ioc_vol !=3D ioc_last_vol; ioc_vol++) { > struct mpt_raid_volume *mpt_vol; > > mpt_vol =3D mpt->raid_volumes + ioc_vol->VolumePageNumber= ; > diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c > index 4625c2616562..265181ef7ad0 100644 > --- a/sys/dev/nfe/if_nfe.c > +++ b/sys/dev/nfe/if_nfe.c > @@ -2078,7 +2078,7 @@ nfe_rxeof(struct nfe_softc *sc, int count, int *rx_= npktsp) > bus_dmamap_sync(sc->rxq.rx_desc_tag, sc->rxq.rx_desc_map, > BUS_DMASYNC_POSTREAD); > > - for (prog =3D 0;;NFE_INC(sc->rxq.cur, NFE_RX_RING_COUNT), vtag = =3D 0) { > + for (prog =3D 0; ; NFE_INC(sc->rxq.cur, NFE_RX_RING_COUNT), vtag = =3D 0) { > if (count <=3D 0) > break; > count--; > @@ -2192,7 +2192,7 @@ nfe_jrxeof(struct nfe_softc *sc, int count, int *rx= _npktsp) > bus_dmamap_sync(sc->jrxq.jrx_desc_tag, sc->jrxq.jrx_desc_map, > BUS_DMASYNC_POSTREAD); > > - for (prog =3D 0;;NFE_INC(sc->jrxq.jcur, NFE_JUMBO_RX_RING_COUNT), > + for (prog =3D 0; ; NFE_INC(sc->jrxq.jcur, NFE_JUMBO_RX_RING_COUNT= ), > vtag =3D 0) { > if (count <=3D 0) > break; > diff --git a/sys/dev/ocs_fc/ocs_mgmt.c b/sys/dev/ocs_fc/ocs_mgmt.c > index 726b499f28ba..5b7f6557c017 100644 > --- a/sys/dev/ocs_fc/ocs_mgmt.c > +++ b/sys/dev/ocs_fc/ocs_mgmt.c > @@ -226,7 +226,7 @@ ocs_mgmt_get_list(ocs_t *ocs, ocs_textbuf_t *textbuf) > > ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); > > - for (i=3D0;i + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > access =3D 0; > if (mgmt_table[i].get_handler) { > access |=3D MGMT_MODE_RD; > @@ -305,7 +305,7 @@ ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t *t= extbuf) > if (ocs_strncmp(name, qualifier, strlen(qualifier)) =3D=3D 0) { > char *unqualified_name =3D name + strlen(qualifier) + 1; > > - for (i=3D0;i + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > if (ocs_strcmp(unqualified_name, mgmt_table[i].na= me) =3D=3D 0) { > if (mgmt_table[i].get_handler) { > mgmt_table[i].get_handler(ocs, na= me, textbuf); > @@ -387,7 +387,7 @@ ocs_mgmt_set(ocs_t *ocs, char *name, char *value) > char *unqualified_name =3D name + strlen(qualifier) +1; > > /* See if it's a value I can set */ > - for (i=3D0;i + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > if (ocs_strcmp(unqualified_name, mgmt_table[i].na= me) =3D=3D 0) { > if (mgmt_table[i].set_handler) { > return mgmt_table[i].set_handler(= ocs, name, value); > @@ -469,7 +469,7 @@ ocs_mgmt_exec(ocs_t *ocs, char *action, void *arg_in, > char *unqualified_name =3D action + strlen(qualifier) +1; > > /* See if it's an action I can perform */ > - for (i=3D0;i + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > if (ocs_strcmp(unqualified_name, mgmt_table[i].na= me) =3D=3D 0) { > if (mgmt_table[i].action_handler) { > return mgmt_table[i].action_handl= er(ocs, action, arg_in, arg_in_length, > @@ -527,7 +527,7 @@ ocs_mgmt_get_all(ocs_t *ocs, ocs_textbuf_t *textbuf) > > ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); > > - for (i=3D0;i + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > if (mgmt_table[i].get_handler) { > mgmt_table[i].get_handler(ocs, mgmt_table[i].name= , textbuf); > } else if (mgmt_table[i].action_handler) { > @@ -1212,7 +1212,7 @@ get_sfp_a2(ocs_t *ocs, char *name, ocs_textbuf_t *t= extbuf) > int buffer_remaining =3D (SFP_PAGE_SIZE * 3) + 1; > int bytes_added; > > - for (i=3D0; i < bytes_read; i++) { > + for (i =3D 0; i < bytes_read; i++) { > bytes_added =3D ocs_snprintf(d, buffer_remaining,= "%02x ", *s); > ++s; > d +=3D bytes_added; > @@ -2040,7 +2040,7 @@ get_profile_list(ocs_t *ocs, char *name, ocs_textbu= f_t *textbuf) > result_buf =3D ocs_malloc(ocs, BUFFER_SIZE, OCS_M= _ZERO); > bytes_left =3D BUFFER_SIZE; > > - for (i=3D0; inum_descriptors; i++) = { > + for (i =3D 0; i < result.list->num_descriptors; i= ++) { > sprintf(result_line, "0x%02x:%s\n", resul= t.list->descriptors[i].profile_id, > result.list->descriptors[i].profi= le_description); > if (strlen(result_line) < bytes_left) { > diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c > index 9870379e2eba..de75f4747709 100644 > --- a/sys/dev/ppc/ppc.c > +++ b/sys/dev/ppc/ppc.c > @@ -1389,7 +1389,7 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq= **p_msq) > > /* let's suppose the next instr. is the same */ > prefetch: > - for (;mi->opcode =3D=3D MS_OP_RASSERT; INCR_PC) > + for (; mi->opcode =3D=3D MS_OP_RASSERT; INCR_PC) > w_reg(mi->arg[0].i, ppc, (char)mi->arg[1]= .i); > > if (mi->opcode =3D=3D MS_OP_DELAY) { > diff --git a/sys/dev/smartpqi/smartpqi_event.c b/sys/dev/smartpqi/smartpq= i_event.c > index f000d9ce9db3..88dcf45dd08a 100644 > --- a/sys/dev/smartpqi/smartpqi_event.c > +++ b/sys/dev/smartpqi/smartpqi_event.c > @@ -115,7 +115,7 @@ pqisrc_ack_all_events(void *arg1) > > > pending_event =3D &softs->pending_events[0]; > - for (i=3D0; i < PQI_NUM_SUPPORTED_EVENTS; i++) { > + for (i =3D 0; i < PQI_NUM_SUPPORTED_EVENTS; i++) { > if (pending_event->pending =3D=3D true) { > pending_event->pending =3D false; > pqisrc_acknowledge_event(softs, pending_event); > @@ -417,7 +417,7 @@ pqisrc_report_event_config(pqisrc_softstate_t *softs) > softs->event_config.num_event_descriptors =3D MIN(event_config_p-= >num_event_descriptors, > PQI_MAX_EVENT= _DESCRIPTORS) ; > > - for (i=3D0; i < softs->event_config.num_event_descriptors ;i++){ > + for (i =3D 0; i < softs->event_config.num_event_descriptors; i++= ) { > softs->event_config.descriptors[i].event_type =3D > event_config_p->descriptors[i].ev= ent_type; > } > @@ -477,7 +477,7 @@ pqisrc_set_event_config(pqisrc_softstate_t *softs) > event_config_p->num_event_descriptors =3D softs->event_config.num= _event_descriptors; > > > - for (i=3D0; i < softs->event_config.num_event_descriptors ; i++){ > + for (i =3D 0; i < softs->event_config.num_event_descriptors; i++)= { > event_config_p->descriptors[i].event_type =3D > softs->event_config.descriptors[i= ].event_type; > if( pqisrc_event_type_to_event_index(event_config_p->desc= riptors[i].event_type) !=3D -1) > diff --git a/sys/dev/smartpqi/smartpqi_queue.c b/sys/dev/smartpqi/smartpq= i_queue.c > index 2e80b01b5436..f05c951cd4f9 100644 > --- a/sys/dev/smartpqi/smartpqi_queue.c > +++ b/sys/dev/smartpqi/smartpqi_queue.c > @@ -700,7 +700,7 @@ pqisrc_create_op_obq(pqisrc_softstate_t *softs, > } else { > int i =3D 0; > DBG_WARN("Error Status Descriptors\n"); > - for(i =3D 0; i < 4;i++) > + for (i =3D 0; i < 4; i++) > DBG_WARN(" %x ",admin_resp.resp_type.create_op_oq= .status_desc[i]); > } > > @@ -743,7 +743,7 @@ pqisrc_create_op_ibq(pqisrc_softstate_t *softs, > } else { > int i =3D 0; > DBG_WARN("Error Status Decsriptors\n"); > - for(i =3D 0; i < 4;i++) > + for (i =3D 0; i < 4; i++) > DBG_WARN(" %x ",admin_resp.resp_type.create_op_iq= .status_desc[i]); > } > > diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c > index fa65d544e17d..b4e5c1075fb4 100644 > --- a/sys/dev/sym/sym_hipd.c > +++ b/sys/dev/sym/sym_hipd.c > @@ -3266,7 +3266,7 @@ static void sym_init (hcb_p np, int reason) > * Reinitialize usrwide. > * Prepare sync negotiation according to actual SCSI bus mode. > */ > - for (i=3D0;i + for (i =3D 0; i < SYM_CONF_MAX_TARGET; i++) { > tcb_p tp =3D &np->target[i]; > > tp->to_reset =3D 0; > @@ -3715,7 +3715,7 @@ static void sym_log_hard_error(hcb_p np, u_short si= st, u_char dstat) > } > > printf ("%s: regdump:", sym_name(np)); > - for (i=3D0; i<24;i++) > + for (i =3D 0; i < 24; i++) > printf (" %02x", (unsigned)INB_OFF(i)); > printf (".\n"); > > @@ -5527,8 +5527,8 @@ static int sym_show_msg (u_char * msg) > u_char i; > printf ("%x",*msg); > if (*msg=3D=3DM_EXTENDED) { > - for (i=3D1;i<8;i++) { > - if (i-1>msg[1]) break; > + for (i =3D 1; i < 8; i++) { > + if (i - 1 > msg[1]) break; > printf ("-%x",msg[i]); > } > return (i+1); > @@ -6744,10 +6744,10 @@ restart_test: > /* > * Wait 'til done (with timeout) > */ > - for (i=3D0; i + for (i =3D 0; i < SYM_SNOOP_TIMEOUT; i++) > if (INB(nc_istat) & (INTF|SIP|DIP)) > break; > - if (i>=3DSYM_SNOOP_TIMEOUT) { > + if (i >=3D SYM_SNOOP_TIMEOUT) { > printf ("CACHE TEST FAILED: timeout.\n"); > return (0x20); > } > diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c > index af151c8c4f06..fccd6689a6aa 100644 > --- a/sys/dev/tws/tws.c > +++ b/sys/dev/tws/tws.c > @@ -311,7 +311,7 @@ attach_fail_4: > if (sc->cmd_tag) > bus_dma_tag_destroy(sc->cmd_tag); > attach_fail_3: > - for(i=3D0;iirqs;i++) { > + for (i =3D 0; i < sc->irqs; i++) { > if ( sc->irq_res[i] ){ > if (bus_release_resource(sc->tws_dev, > SYS_RES_IRQ, sc->irq_res_id[i], sc->irq_res[i])) > @@ -369,7 +369,7 @@ tws_detach(device_t dev) > tws_teardown_intr(sc); > > /* Release irq resource */ > - for(i=3D0;iirqs;i++) { > + for (i =3D 0; i < sc->irqs; i++) { > if ( sc->irq_res[i] ){ > if (bus_release_resource(sc->tws_dev, > SYS_RES_IRQ, sc->irq_res_id[i], sc->irq_res[i])) > @@ -402,7 +402,7 @@ tws_detach(device_t dev) > TWS_TRACE(sc, "bus release mem resource", 0, sc->reg_res_id)= ; > } > > - for ( i=3D0; i< tws_queue_depth; i++) { > + for (i =3D 0; i < tws_queue_depth; i++) { > if (sc->reqs[i].dma_map) > bus_dmamap_destroy(sc->data_tag, sc->reqs[i].dma_map)= ; > callout_drain(&sc->reqs[i].timeout); > @@ -432,7 +432,7 @@ tws_setup_intr(struct tws_softc *sc, int irqs) > { > int i, error; > > - for(i=3D0;i + for (i =3D 0; i < irqs; i++) { > if (!(sc->intr_handle[i])) { > if ((error =3D bus_setup_intr(sc->tws_dev, sc->irq_res[i], > INTR_TYPE_CAM | INTR_MPSAFE, > @@ -452,7 +452,7 @@ tws_teardown_intr(struct tws_softc *sc) > { > int i; > > - for(i=3D0;iirqs;i++) { > + for (i =3D 0; i < sc->irqs; i++) { > if (sc->intr_handle[i]) { > bus_teardown_intr(sc->tws_dev, > sc->irq_res[i], sc->intr_handle[i]= ); > @@ -669,8 +669,7 @@ tws_init_reqs(struct tws_softc *sc, u_int32_t dma_mem= _size) > bzero(cmd_buf, dma_mem_size); > TWS_TRACE_DEBUG(sc, "phy cmd", sc->dma_mem_phys, 0); > mtx_lock(&sc->q_lock); > - for ( i=3D0; i< tws_queue_depth; i++) > - { > + for (i =3D 0; i < tws_queue_depth; i++) { > if (bus_dmamap_create(sc->data_tag, 0, &sc->reqs[i].dma_map)) { > /* log a ENOMEM failure msg here */ > mtx_unlock(&sc->q_lock); > diff --git a/sys/dev/tws/tws_services.c b/sys/dev/tws/tws_services.c > index da8bbacc39f7..e5c3d45c533f 100644 > --- a/sys/dev/tws/tws_services.c > +++ b/sys/dev/tws/tws_services.c > @@ -200,7 +200,7 @@ tws_init_qs(struct tws_softc *sc) > { > > mtx_lock(&sc->q_lock); > - for(int i=3D0;i + for (int i =3D 0; i < TWS_MAX_QS; i++) { > sc->q_head[i] =3D NULL; > sc->q_tail[i] =3D NULL; > } > diff --git a/sys/fs/devfs/devfs_dir.c b/sys/fs/devfs/devfs_dir.c > index 3dc87538017d..aad87606e738 100644 > --- a/sys/fs/devfs/devfs_dir.c > +++ b/sys/fs/devfs/devfs_dir.c > @@ -162,7 +162,7 @@ int > devfs_pathpath(const char *p1, const char *p2) > { > > - for (;;p1++, p2++) { > + for (;; p1++, p2++) { > if (*p1 !=3D *p2) { > if (*p1 =3D=3D '/' && *p2 =3D=3D '\0') > return (1); > diff --git a/sys/fs/udf/osta.c b/sys/fs/udf/osta.c > index f79b86993367..1a083d8c26b1 100644 > --- a/sys/fs/udf/osta.c > +++ b/sys/fs/udf/osta.c > @@ -383,7 +383,7 @@ int UDFTransName( > int maxFilenameLen; > /* Translate extension, and store it in ext. */ > for(index =3D 0; index - extIndex + index +1 < udfLen; index++ ) { > + extIndex + index +1 < udfLen; index++) { > current =3D udfName[extIndex + index + 1]= ; > if (IsIllegal(current) || > !UnicodeIsPrint(current)) { > @@ -432,7 +432,7 @@ int UDFTransName( > /* Place a translated extension at end, if found. */ > if (hasExt) { > newName[newIndex++] =3D PERIOD; > - for (index =3D 0;index < localExtIndex ;index++ )= { > + for (index =3D 0; index < localExtIndex; index++)= { > newName[newIndex++] =3D ext[index]; > } > } > diff --git a/sys/i386/i386/in_cksum_machdep.c b/sys/i386/i386/in_cksum_ma= chdep.c > index 27ab09d82da0..b658d85bc892 100644 > --- a/sys/i386/i386/in_cksum_machdep.c > +++ b/sys/i386/i386/in_cksum_machdep.c > @@ -84,7 +84,7 @@ in_cksum_skip(struct mbuf *m, int len, int skip) > } > } > > - for (;m && len; m =3D m->m_next) { > + for (; m && len; m =3D m->m_next) { > if (m->m_len =3D=3D 0) > continue; > w =3D mtod(m, u_short *); > diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c > index ab8ed32ad189..c4b1c8201ff2 100644 > --- a/sys/kern/kern_exit.c > +++ b/sys/kern/kern_exit.c > @@ -807,7 +807,7 @@ kern_abort2(struct thread *td, const char *why, int n= args, void **uargs) > } > if (nargs > 0) { > sbuf_putc(sb, '('); > - for (i =3D 0;i < nargs; i++) > + for (i =3D 0; i < nargs; i++) > sbuf_printf(sb, "%s%p", i =3D=3D 0 ? "" : ", ", u= args[i]); > sbuf_putc(sb, ')'); > } > diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c > index e919b15543b2..fcbfbe64f854 100644 > --- a/sys/kern/kern_malloc.c > +++ b/sys/kern/kern_malloc.c > @@ -1302,7 +1302,7 @@ mallocinit(void *dummy) > #endif > align, UMA_ZONE_MALLOC); > } > - for (;i <=3D size; i+=3D KMEM_ZBASE) > + for (; i <=3D size; i+=3D KMEM_ZBASE) > kmemsize[i >> KMEM_ZSHIFT] =3D indx; > } > } > diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c > index 07a9cc0f57be..c4d0223d484f 100644 > --- a/sys/kern/subr_devstat.c > +++ b/sys/kern/subr_devstat.c > @@ -415,7 +415,7 @@ sysctl_devstat(SYSCTL_HANDLER_ARGS) > if (error !=3D 0) > return (error); > > - for (;nds !=3D NULL;) { > + while (nds !=3D NULL) { > error =3D SYSCTL_OUT(req, nds, sizeof(struct devstat)); > if (error !=3D 0) > return (error); > diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c > index db0ceb17b9f0..e2070ae3f865 100644 > --- a/sys/kern/subr_prf.c > +++ b/sys/kern/subr_prf.c > @@ -766,7 +766,7 @@ reswitch: switch (ch =3D (u_char)*fmt++) { > PCHAR(hex2ascii(*up & 0x0f)); > up++; > if (width) > - for (q=3Dp;*q;q++) > + for (q =3D p; *q; q++) > PCHAR(*q); > } > break; > diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c > index 374b5595fcbc..5b89ca026e85 100644 > --- a/sys/netinet/siftr.c > +++ b/sys/netinet/siftr.c > @@ -519,7 +519,7 @@ siftr_pkt_manager_thread(void *arg) > if (log_buf !=3D NULL) { > alq_post_flags(siftr_alq, log_buf, 0); > } > - for (;cnt > 0; cnt--) { > + for (; cnt > 0; cnt--) { > pkt_node =3D STAILQ_FIRST(&tmp_pkt_queue)= ; > STAILQ_REMOVE_HEAD(&tmp_pkt_queue, nodes)= ; > free(pkt_node, M_SIFTR_PKTNODE); > diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummyne= t.c > index b3f52322425f..d522f9da0fbe 100644 > --- a/sys/netpfil/ipfw/ip_dummynet.c > +++ b/sys/netpfil/ipfw/ip_dummynet.c > @@ -1150,7 +1150,7 @@ copy_data_helper(void *_o, void *_arg) > return 0; /* not a pipe */ > > /* see if the object is within one of our ranges */ > - for (;r < lim; r +=3D 2) { > + for (; r < lim; r +=3D 2) { > if (n < r[0] || n > r[1]) > continue; > /* Found a valid entry, copy and we are done */ > @@ -1183,7 +1183,7 @@ copy_data_helper(void *_o, void *_arg) > if (n >=3D DN_MAX_ID) > return 0; > /* see if the object is within one of our ranges */ > - for (;r < lim; r +=3D 2) { > + for (; r < lim; r +=3D 2) { > if (n < r[0] || n > r[1]) > continue; > if (copy_flowset(a, fs, 0)) From nobody Thu Oct 16 23:29:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnkhQ0M4Wz6DKyR for ; Thu, 16 Oct 2025 23:30:14 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 4cnkhN62RVz40NV for ; Thu, 16 Oct 2025 23:30:12 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=WMPQPqT7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2a00:1450:4864:20::52a as permitted sender) smtp.mailfrom=rick.macklem@gmail.com Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-637e74e9104so1760288a12.1 for ; Thu, 16 Oct 2025 16:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760657410; x=1761262210; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=klLBMmt2huFkCQUtsvS+lTaFZeHGz8j/uDWLRWGlUJc=; b=WMPQPqT7lzg7QF8vwKlTsTlcGfrSCsp5TqF1r5UDQKUmbyh3tXILo8sku6EQ1QmbN6 Hb5fcjXBSoYkcaGHzcuKzj65lNXjRFa8PyEvT8GPBXC94+Pn9zcmXhkXQEdrxMgxLIIR q/q5PHq8YbrZNN4E2oGX1pUjouxehXYEt1nmk592P6darHOKaygcaaxOGiUtlh7043/G xnujWGPusqvv9ZO503Nbvi5x05dkY8YO7+wWE93wiS6NIw/qD/HsSVWBTURCAu4FjrPM nME5zU4i1w5bAsA4AF8oHlNh9WbWTC/5WfSgqdkdc9LathLxExk+hDHen2544PKnEjRx AYSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760657410; x=1761262210; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=klLBMmt2huFkCQUtsvS+lTaFZeHGz8j/uDWLRWGlUJc=; b=Yxxa76DfLVJ5urRS6BuARCYgVx3v8h0dP9errzNaieNRQeiGipl6zEIfAfHM3xkywg 2/bbz8IWyUD7pOy5YGiWohnSiUY5VuYHWAB5njbQxIKSSq/s+vKwcRs+OZddCtHWnTbh l2IkmhtB+dKGQUqGLRcHyTqUxiSD5Boc03FOSho5O8RprAPGXrRt3K+Ne3rMphCj/IM7 u9lqHbXmaSn81fZmEe3hVcbE/RXaMStnR4znT0krwI+Yum9sYpixbDy3k+fi0rcsOB01 8P6UArbwhABfXtobZW7wl/fHD8KF0XfVBxWAQpiqGbWOasT1A99bz2mwv2H3TR9/4byp c/VQ== X-Forwarded-Encrypted: i=1; AJvYcCWyf0lIXOpi//0iKw0gAF5r3+gvFTEFPOY5FLvFe/R8K15D0XzqIK4rfdbvGEdCisdQLgoBoYXBYQ3IR5fB5Tli8BFy7A==@freebsd.org X-Gm-Message-State: AOJu0YzLqGqXJ/bx5jz3OkocAjVTyrYLtgq2jpH28tdKhRYAEq0tHswC 0ZMgo9eobQ0hh0gfMe+ZYd5xaWbby7paCqFNNnR5givwmurKy7pScCY/2JsqWdMngKtDanESyvQ +4scRonSZAqIwFDdw7L1SuTuvi7WA5w== X-Gm-Gg: ASbGnctPrlmhD7oaK9hELkC839yt3TEr0iuRu55FZbJko625QBuTAdLAija18ZlwHcg K1122Q21/IE0JdI+Y2bZEnAtqj1DCiIhork8P4rgT+uZUpeyr+QPKL4PZ/ai4U0EUC79KyBLqMO xGHF46D4nYi30DTC2euZwS54PlS8ZhDhkLlu7nCZUQzCkAIYDl/p5QPe3FRA/uktfJY8kPrnr3A zN3AhOb6GwaMIfofoYQ9QTdY132+aywt/pSCfFsFc0xkydeMiWQv9IBcD9p54L2hLEG X-Google-Smtp-Source: AGHT+IGuaL33QJnjZY4HTpirCeS2xoGSbeyQi/+uQCjOqrc4szetS/ijRHS5XJVv8oVVJwM59xkdZgI0qutepX5evrY= X-Received: by 2002:a17:907:6d25:b0:b41:abc9:6135 with SMTP id a640c23a62f3a-b647493fa65mr180564866b.41.1760657409389; Thu, 16 Oct 2025 16:30:09 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> In-Reply-To: From: Rick Macklem Date: Thu, 16 Oct 2025 16:29:57 -0700 X-Gm-Features: AS18NWDT_h5TIa0rRRMTPpVPArSfzDoSnsRslzu4TKdJQNF0TCwkJUxvDUP7XtU Message-ID: Subject: Re: git: 0050289464fa - main - style(9): white space after ; and around binary operators To: "David E. O'Brien" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52a:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4cnkhN62RVz40NV On Thu, Oct 16, 2025 at 4:21=E2=80=AFPM Rick Macklem wrote: > > Please be aware of the following snippets from "man 9 style": > > In general code can be considered "new code" when it makes up about 50% > or more of the file(s) involved. This is enough to break precedents in > the existing code and use the current style guidelines. > > Stylistic changes (including whitespace changes) are hard on the source > repository and are to be avoided without good reason. > > rick Just to be clear, I am not asking that this commit be reverted. I am just suggesting that you be aware that style(9) changes to extant code is not, in general, encouraged, afaik unless you are re-writing a large portion of the code (over 50%). rick > > On Thu, Oct 16, 2025 at 3:05=E2=80=AFPM David E. O'Brien wrote: > > > > CAUTION: This email originated from outside of the University of Guelph= . Do not click links or open attachments unless you recognize the sender an= d know the content is safe. If in doubt, forward suspicious emails to IThel= p@uoguelph.ca. > > > > The branch main has been updated by obrien: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D0050289464fa56ec79e060b8= d8378b9ff7145a0e > > > > commit 0050289464fa56ec79e060b8d8378b9ff7145a0e > > Author: David E. O'Brien > > AuthorDate: 2025-10-15 05:22:00 +0000 > > Commit: David E. O'Brien > > CommitDate: 2025-10-16 22:02:50 +0000 > > > > style(9): white space after ; and around binary operators > > > > in for() loops. Also, use 'while', where only the > > conditional test of 'for' was used. > > > > Reviewed by: sjg > > --- > > sys/arm/allwinner/aw_sid.c | 2 +- > > sys/cam/scsi/scsi_all.c | 2 +- > > sys/cam/scsi/scsi_enc_ses.c | 6 +++--- > > sys/crypto/chacha20/chacha.c | 6 +++--- > > sys/crypto/openssl/ossl_sha256.c | 4 ++-- > > sys/dev/aic7xxx/aic79xx.c | 4 ++-- > > sys/dev/aic7xxx/aic7xxx.c | 4 ++-- > > sys/dev/enetc/if_enetc.c | 6 +++--- > > sys/dev/hptmv/entry.c | 33 ++++++++++++++++---------------= -- > > sys/dev/hptmv/gui_lib.c | 12 +++++------- > > sys/dev/hptmv/hptproc.c | 2 +- > > sys/dev/mps/mps_sas.c | 4 ++-- > > sys/dev/mpt/mpt_raid.c | 4 ++-- > > sys/dev/nfe/if_nfe.c | 4 ++-- > > sys/dev/ocs_fc/ocs_mgmt.c | 14 +++++++------- > > sys/dev/ppc/ppc.c | 2 +- > > sys/dev/smartpqi/smartpqi_event.c | 6 +++--- > > sys/dev/smartpqi/smartpqi_queue.c | 4 ++-- > > sys/dev/sym/sym_hipd.c | 12 ++++++------ > > sys/dev/tws/tws.c | 13 ++++++------- > > sys/dev/tws/tws_services.c | 2 +- > > sys/fs/devfs/devfs_dir.c | 2 +- > > sys/fs/udf/osta.c | 4 ++-- > > sys/i386/i386/in_cksum_machdep.c | 2 +- > > sys/kern/kern_exit.c | 2 +- > > sys/kern/kern_malloc.c | 2 +- > > sys/kern/subr_devstat.c | 2 +- > > sys/kern/subr_prf.c | 2 +- > > sys/netinet/siftr.c | 2 +- > > sys/netpfil/ipfw/ip_dummynet.c | 4 ++-- > > 30 files changed, 82 insertions(+), 86 deletions(-) > > > > diff --git a/sys/arm/allwinner/aw_sid.c b/sys/arm/allwinner/aw_sid.c > > index ba5faca33c5e..932c2f189e51 100644 > > --- a/sys/arm/allwinner/aw_sid.c > > +++ b/sys/arm/allwinner/aw_sid.c > > @@ -297,7 +297,7 @@ aw_sid_attach(device_t dev) > > /* Register ourself so device can resolve who we are */ > > OF_device_register_xref(OF_xref_from_node(node), dev); > > > > - for (i =3D 0; i < sc->sid_conf->nfuses ;i++) {\ > > + for (i =3D 0; i < sc->sid_conf->nfuses; i++) { > > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > > OID_AUTO, sc->sid_conf->efuses[i].name, > > diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c > > index 9c097f52d136..fd128e69f1f1 100644 > > --- a/sys/cam/scsi/scsi_all.c > > +++ b/sys/cam/scsi/scsi_all.c > > @@ -686,7 +686,7 @@ scsi_op_desc(uint16_t opcode, struct scsi_inquiry_d= ata *inq_data) > > opmask =3D 1 << pd_type; > > > > for (j =3D 0; j < num_tables; j++) { > > - for (i =3D 0;i < num_ops[j] && table[j][i].opcode <=3D = opcode; i++){ > > + for (i =3D 0; i < num_ops[j] && table[j][i].opcode <=3D= opcode; i++) { > > if ((table[j][i].opcode =3D=3D opcode) > > && ((table[j][i].opmask & opmask) !=3D 0)) > > return(table[j][i].desc); > > diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c > > index 435874a9874a..3a362eaf11a4 100644 > > --- a/sys/cam/scsi/scsi_enc_ses.c > > +++ b/sys/cam/scsi/scsi_enc_ses.c > > @@ -2302,7 +2302,7 @@ ses_print_addl_data_sas_type0(char *sesname, stru= ct sbuf *sbp, > > sbuf_putc(sbp, '\n'); > > if (addl->proto_data.sasdev_phys =3D=3D NULL) > > return; > > - for (i =3D 0;i < addl->proto_hdr.sas->base_hdr.num_phys;i++) { > > + for (i =3D 0; i < addl->proto_hdr.sas->base_hdr.num_phys; i++) = { > > phy =3D &addl->proto_data.sasdev_phys[i]; > > sbuf_printf(sbp, "%s: phy %d:", sesname, i); > > if (ses_elm_sas_dev_phy_sata_dev(phy)) > > @@ -2349,7 +2349,7 @@ ses_print_addl_data_sas_type1(char *sesname, stru= ct sbuf *sbp, > > sbuf_printf(sbp, "Expander: %d phys", num_phys); > > if (addl->proto_data.sasexp_phys =3D=3D NULL) > > return; > > - for (i =3D 0;i < num_phys;i++) { > > + for (i =3D 0; i < num_phys; i++) { > > exp_phy =3D &addl->proto_data.sasexp_phys[i]; > > sbuf_printf(sbp, "%s: phy %d: connector %d oth= er %d\n", > > sesname, i, exp_phy->connector_index, > > @@ -2360,7 +2360,7 @@ ses_print_addl_data_sas_type1(char *sesname, stru= ct sbuf *sbp, > > sbuf_printf(sbp, "Port: %d phys", num_phys); > > if (addl->proto_data.sasport_phys =3D=3D NULL) > > return; > > - for (i =3D 0;i < num_phys;i++) { > > + for (i =3D 0; i < num_phys; i++) { > > port_phy =3D &addl->proto_data.sasport_phys[i]; > > sbuf_printf(sbp, > > "%s: phy %d: id %d connector %d other %d\n= ", > > diff --git a/sys/crypto/chacha20/chacha.c b/sys/crypto/chacha20/chacha.= c > > index 52f7e18c651c..cb06003b0ecf 100644 > > --- a/sys/crypto/chacha20/chacha.c > > +++ b/sys/crypto/chacha20/chacha.c > > @@ -138,7 +138,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *= c,u32 bytes) > > for (;;) { > > if (bytes < 64) { > > #ifndef KEYSTREAM_ONLY > > - for (i =3D 0;i < bytes;++i) tmp[i] =3D m[i]; > > + for (i =3D 0; i < bytes; ++i) tmp[i] =3D m[i]; > > m =3D tmp; > > #endif > > ctarget =3D c; > > @@ -160,7 +160,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *= c,u32 bytes) > > x13 =3D j13; > > x14 =3D j14; > > x15 =3D j15; > > - for (i =3D 20;i > 0;i -=3D 2) { > > + for (i =3D 20; i > 0; i -=3D 2) { > > QUARTERROUND( x0, x4, x8,x12) > > QUARTERROUND( x1, x5, x9,x13) > > QUARTERROUND( x2, x6,x10,x14) > > @@ -240,7 +240,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *= c,u32 bytes) > > > > if (bytes <=3D 64) { > > if (bytes < 64) { > > - for (i =3D 0;i < bytes;++i) ctarget[i] =3D c[i]; > > + for (i =3D 0; i < bytes; ++i) ctarget[i] =3D c[i]; > > } > > x->input[12] =3D j12; > > x->input[13] =3D j13; > > diff --git a/sys/crypto/openssl/ossl_sha256.c b/sys/crypto/openssl/ossl= _sha256.c > > index 4613a9409b44..50cb9739d114 100644 > > --- a/sys/crypto/openssl/ossl_sha256.c > > +++ b/sys/crypto/openssl/ossl_sha256.c > > @@ -74,11 +74,11 @@ ossl_sha256_init(void *c_) > > unsigned int nn; \ > > switch ((c)->md_len) \ > > { case SHA224_DIGEST_LENGTH: \ > > - for (nn=3D0;nn > + for (nn=3D0; nn < SHA224_DIGEST_LENGTH / 4; nn++) = \ > > { ll=3D(c)->h[nn]; (void)HOST_l2c(ll,(s)); } \ > > break; \ > > case SHA256_DIGEST_LENGTH: \ > > - for (nn=3D0;nn > + for (nn=3D0; nn < SHA256_DIGEST_LENGTH / 4; nn++) = \ > > { ll=3D(c)->h[nn]; (void)HOST_l2c(ll,(s)); } \ > > break; \ > > default: \ > > diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c > > index 2b5015b20e41..cee45fa5cc8a 100644 > > --- a/sys/dev/aic7xxx/aic79xx.c > > +++ b/sys/dev/aic7xxx/aic79xx.c > > @@ -7788,8 +7788,8 @@ ahd_abort_scbs(struct ahd_softc *ahd, int target,= char channel, > > } > > > > if (role !=3D ROLE_TARGET) { > > - for (;i < maxtarget; i++) { > > - for (j =3D minlun;j < maxlun; j++) { > > + for (; i < maxtarget; i++) { > > + for (j =3D minlun; j < maxlun; j++) { > > u_int scbid; > > u_int tcl; > > > > diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c > > index c09876e9f589..18f68b806948 100644 > > --- a/sys/dev/aic7xxx/aic7xxx.c > > +++ b/sys/dev/aic7xxx/aic7xxx.c > > @@ -5903,8 +5903,8 @@ ahc_abort_scbs(struct ahc_softc *ahc, int target,= char channel, > > } > > > > if (role !=3D ROLE_TARGET) { > > - for (;i < maxtarget; i++) { > > - for (j =3D minlun;j < maxlun; j++) { > > + for (; i < maxtarget; i++) { > > + for (j =3D minlun; j < maxlun; j++) { > > u_int scbid; > > u_int tcl; > > > > diff --git a/sys/dev/enetc/if_enetc.c b/sys/dev/enetc/if_enetc.c > > index 808397b229a7..53002f9d73ce 100644 > > --- a/sys/dev/enetc/if_enetc.c > > +++ b/sys/dev/enetc/if_enetc.c > > @@ -848,7 +848,7 @@ enetc_hash_vid(uint16_t vid) > > bool bit; > > int i; > > > > - for (i =3D 0;i < 6;i++) { > > + for (i =3D 0; i < 6; i++) { > > bit =3D vid & BIT(i); > > bit ^=3D !!(vid & BIT(i + 6)); > > hash |=3D bit << i; > > @@ -1020,7 +1020,7 @@ enetc_msix_intr_assign(if_ctx_t ctx, int msix) > > ENETC_RBICR0_ICEN | ENETC_RBICR0_SET_ICPT(ENETC_RX_= INTR_PKT_THR)); > > } > > vector =3D 0; > > - for (i =3D 0;i < sc->tx_num_queues; i++, vector++) { > > + for (i =3D 0; i < sc->tx_num_queues; i++, vector++) { > > tx_queue =3D &sc->tx_queues[i]; > > snprintf(irq_name, sizeof(irq_name), "txq%d", i); > > iflib_softirq_alloc_generic(ctx, &tx_queue->irq, > > @@ -1130,7 +1130,7 @@ enetc_isc_txd_encap(void *data, if_pkt_info_t ipi= ) > > } > > > > /* Now add remaining descriptors. */ > > - for (;i < ipi->ipi_nsegs; i++) { > > + for (; i < ipi->ipi_nsegs; i++) { > > desc =3D &queue->ring[pidx]; > > bzero(desc, sizeof(*desc)); > > desc->addr =3D segs[i].ds_addr; > > diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c > > index 5c4718bf582f..f3d58f285b39 100644 > > --- a/sys/dev/hptmv/entry.c > > +++ b/sys/dev/hptmv/entry.c > > @@ -430,7 +430,7 @@ static void device_change(IAL_ADAPTER_T *pAdapter ,= MV_U8 channelIndex, int plug > > if(pVDev->pParent) > > { > > int iMember; > > - for(iMember =3D 0; iMember < pVDev->pParen= t->u.array.bArnMember; iMember++) > > + for (iMember =3D 0; iMember < pVDev->pParent->u= .array.bArnMember; iMember++) > > if((PVDevice)pVDev->pParent->u.array.pM= ember[iMember] =3D=3D pVDev) > > pVDev->pParent->u.array.pMember= [iMember] =3D NULL; > > pVDev->pParent =3D NULL; > > @@ -984,7 +984,7 @@ fRegisterVdevice(IAL_ADAPTER_T *pAdapter) > > PVBus pVBus; > > int i,j; > > > > - for(i=3D0;i > + for (i =3D 0; i < MV_SATA_CHANNELS_NUM; i++) { > > pPhysical =3D &(pAdapter->VDevices[i]); > > pLogical =3D pPhysical; > > while (pLogical->pParent) pLogical =3D pLogical->pParen= t; > > @@ -1027,8 +1027,7 @@ GetSpareDisk(_VBUS_ARG PVDevice pArray) > > PVDevice pVDevice, pFind =3D NULL; > > int i; > > > > - for(i=3D0;i > - { > > + for (i=3D0; i < MV_SATA_CHANNELS_NUM; i++) { > > pVDevice =3D &pAdapter->VDevices[i]; > > if(!pVDevice) > > continue; > > @@ -1356,7 +1355,7 @@ unregister: > > goto unregister; > > } > > > > - for (i=3D0; i > + for (i =3D 0; i < MAX_COMMAND_BLOCKS_FOR_EACH_VBUS; i++) { > > FreeCommand(_VBUS_P &(pAdapter->pCommandBlocks[i])); > > } > > > > @@ -1370,7 +1369,7 @@ unregister: > > > > memset((void *)pAdapter->pbus_dmamap, 0, sizeof(struct _BUS_DMA= MAP) * MAX_QUEUE_COMM); > > pAdapter->pbus_dmamap_list =3D 0; > > - for (i=3D0; i < MAX_QUEUE_COMM; i++) { > > + for (i =3D 0; i < MAX_QUEUE_COMM; i++) { > > PBUS_DMAMAP pmap =3D &(pAdapter->pbus_dmamap[i]); > > pmap->pAdapter =3D pAdapter; > > dmamap_put(pmap); > > @@ -1398,7 +1397,7 @@ unregister: > > pAdapter->prdTableAlignedAddr =3D (PUCHAR)(((ULONG_PTR)pAdapter= ->prdTableAddr + 0x1f) & ~(ULONG_PTR)0x1fL); > > { > > PUCHAR PRDTable =3D pAdapter->prdTableAlignedAddr; > > - for (i=3D0; i > + for (i =3D 0; i < PRD_TABLES_FOR_VBUS; i++) > > { > > /* KdPrint(("i=3D%d,pAdapter->pFreePRDLink=3D%p\n"= ,i,pAdapter->pFreePRDLink)); */ > > FreePRDTable(pAdapter, PRDTable); > > @@ -1447,7 +1446,7 @@ unregister: > > } > > > > #ifdef SUPPORT_ARRAY > > - for(i =3D MAX_ARRAY_DEVICE - 1; i >=3D 0; i--) { > > + for (i =3D MAX_ARRAY_DEVICE - 1; i >=3D 0; i--) { > > pVDev =3D ArrayTables(i); > > mArFreeArrayTable(pVDev); > > } > > @@ -1467,7 +1466,7 @@ unregister: > > _vbus_p->nInstances =3D 1; > > fRegisterVdevice(pAdapter); > > > > - for (channel=3D0;channel > + for (channel =3D 0; channel < MV_SATA_CHANNELS_NUM; channel++) = { > > pVDev =3D _vbus_p->pVDevice[channel]; > > if (pVDev && pVDev->vf_online) > > fCheckBootable(pVDev); > > @@ -1567,7 +1566,7 @@ fResetActiveCommands(PVBus _vbus_p) > > { > > MV_SATA_ADAPTER *pMvSataAdapter =3D &((IAL_ADAPTER_T *)_vbus_p-= >OsExt)->mvSataAdapter; > > MV_U8 channel; > > - for (channel=3D0;channel< MV_SATA_CHANNELS_NUM;channel++) { > > + for (channel =3D 0; channel < MV_SATA_CHANNELS_NUM; channel++) = { > > if (pMvSataAdapter->sataChannel[channel] && pMvSataAdap= ter->sataChannel[channel]->outstandingCommands) > > MvSataResetChannel(pMvSataAdapter,channel); > > } > > @@ -1590,7 +1589,7 @@ check_cmds: > > dataxfer_poll(); > > xor_poll(); > > #endif > > - for (channel=3D0;channel< MV_SATA_CHANNELS_NUM;channel+= +) { > > + for (channel =3D 0; channel < MV_SATA_CHANNELS_NUM; cha= nnel++) { > > pMvSataChannel =3D pMvSataAdapter->sataChannel[= channel]; > > if (pMvSataChannel && pMvSataChannel->outstandi= ngCommands) > > { > > @@ -1716,7 +1715,7 @@ fDeviceSendCommand(_VBUS_ARG PCommand pCmd) > > > > MV_BOOLEAN is48bit; > > MV_U8 channel; > > - int i=3D0; > > + int i =3D 0; > > > > DECLARE_BUFFER(FPSCAT_GATH, tmpSg); > > > > @@ -2141,7 +2140,7 @@ FlushAdapter(IAL_ADAPTER_T *pAdapter) > > hpt_printk(("flush all devices\n")); > > > > /* flush all devices */ > > - for (i=3D0; i > + for (i =3D 0; i < MAX_VDEVICE_PER_VBUS; i++) { > > PVDevice pVDev =3D pAdapter->VBus.pVDevice[i]; > > if(pVDev) fFlushVDev(pVDev); > > } > > @@ -2174,7 +2173,7 @@ Check_Idle_Call(IAL_ADAPTER_T *pAdapter) > > { > > int i; > > PVDevice pArray; > > - for(i =3D 0; i < MAX_ARRAY_PER_VBUS; i++){ > > + for (i =3D 0; i < MAX_ARRAY_PER_VBUS; i++) { > > if ((pArray=3DArrayTables(i))->u.array.= dArStamp=3D=3D0) > > continue; > > else if (pArray->u.array.rf_auto_rebuil= d) { > > @@ -2378,7 +2377,7 @@ hpt_free_ccb(union ccb **ccb_Q, union ccb *ccb) > > static void hpt_worker_thread(void) > > { > > > > - for(;;) { > > + for (;;) { > > mtx_lock(&DpcQueue_Lock); > > while (DpcQueue_First!=3DDpcQueue_Last) { > > ST_HPT_DPC p; > > @@ -2418,7 +2417,7 @@ static void hpt_worker_thread(void) > > mtx_lock(&pAdapter->lock); > > _vbus_p =3D &pAdapter->VBus; > > > > - for (i=3D0;i > + for (i =3D 0; i < MAX_ARRAY_PER= _VBUS; i++) > > { > > if ((pArray=3DArrayTabl= es(i))->u.array.dArStamp=3D=3D0) > > continue; > > @@ -2472,7 +2471,7 @@ launch_worker_thread(void) > > int i; > > PVDevice pVDev; > > > > - for(i =3D 0; i < MAX_ARRAY_PER_VBUS; i++) > > + for (i =3D 0; i < MAX_ARRAY_PER_VBUS; i++) > > if ((pVDev=3DArrayTables(i))->u.array.dArStamp= =3D=3D0) > > continue; > > else{ > > diff --git a/sys/dev/hptmv/gui_lib.c b/sys/dev/hptmv/gui_lib.c > > index d78fdcca69d2..f11044db733a 100644 > > --- a/sys/dev/hptmv/gui_lib.c > > +++ b/sys/dev/hptmv/gui_lib.c > > @@ -86,8 +86,7 @@ check_VDevice_valid(PVDevice p) > > while(pAdapter !=3D NULL) > > { > > _vbus_p =3D &pAdapter->VBus; > > - for (i=3D0;i > - { > > + for (i =3D 0; i > pVDevice=3DArrayTables(i); > > if ((pVDevice->u.array.dArStamp !=3D 0) && (pVD= evice =3D=3D p)) > > return 0; > > @@ -244,9 +243,9 @@ static void get_array_info(PVDevice pVDevice, PHPT_= ARRAY_INFO pArrayInfo) > > if(pVDevice->u.array.pMember[i] !=3D NULL) > > pArrayInfo->Members[pArrayInfo->nDisk++] =3D VD= EV_TO_ID(pVDevice->u.array.pMember[i]); > > > > - for(i=3DpArrayInfo->nDisk; i > + for (i =3D pArrayInfo->nDisk; i < MAX_ARRAY_MEMBERS; i++) > > pArrayInfo->Members[i] =3D INVALID_DEVICEID; > > - } > > +} > > > > static void get_array_info_v2(PVDevice pVDevice, PHPT_ARRAY_INFO_V2 pA= rrayInfo) > > { > > @@ -266,7 +265,7 @@ static void get_array_info_v2(PVDevice pVDevice, PH= PT_ARRAY_INFO_V2 pArrayInfo) > > if(pVDevice->u.array.pMember[i] !=3D NULL) > > pArrayInfo->Members[pArrayInfo->nDisk++] =3D VD= EV_TO_ID(pVDevice->u.array.pMember[i]); > > > > - for(i=3DpArrayInfo->nDisk; i > + for (i =3D pArrayInfo->nDisk; i < MAX_ARRAY_MEMBERS_V2; i++) > > pArrayInfo->Members[i] =3D INVALID_DEVICEID; > > } > > #endif > > @@ -461,8 +460,7 @@ found: > > pInfo->IoPort =3D 0; > > pInfo->ControlPort =3D 0; > > > > - for (i=3D0; i<2 ;i++) > > - { > > + for (i =3D 0; i < 2; i++) { > > pInfo->Devices[i] =3D (DEVICEID)INVALID_DEVICEID; > > } > > > > diff --git a/sys/dev/hptmv/hptproc.c b/sys/dev/hptmv/hptproc.c > > index 38fe61ee7e04..328750d9034c 100644 > > --- a/sys/dev/hptmv/hptproc.c > > +++ b/sys/dev/hptmv/hptproc.c > > @@ -107,7 +107,7 @@ hpt_set_asc_info(IAL_ADAPTER_T *pAdapter, char *buf= fer,int length) > > return -EINVAL; > > } > > > > - for (i=3D0;i > + for (i =3D 0; i < MV_SATA_CHANNELS_NUM; i++) > > if(i =3D=3D ichan) > > goto rebuild; > > > > diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c > > index d69c8ea5fded..fa0f817ed67b 100644 > > --- a/sys/dev/mps/mps_sas.c > > +++ b/sys/dev/mps/mps_sas.c > > @@ -858,7 +858,7 @@ mps_detach_sas(struct mps_softc *sc) > > if (sassc->devq !=3D NULL) > > cam_simq_free(sassc->devq); > > > > - for(i=3D0; i< sassc->maxtargets ;i++) { > > + for (i =3D 0; i < sassc->maxtargets; i++) { > > targ =3D &sassc->targets[i]; > > SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, lun_tmp)= { > > free(lun, M_MPT2); > > @@ -3396,7 +3396,7 @@ mpssas_realloc_targets(struct mps_softc *sc, int = maxtargets) > > * the allocated LUNs for each target and then the target buffe= r > > * itself. > > */ > > - for (i=3D0; i< maxtargets; i++) { > > + for (i =3D 0; i < maxtargets; i++) { > > targ =3D &sassc->targets[i]; > > SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, lun_tmp)= { > > free(lun, M_MPT2); > > diff --git a/sys/dev/mpt/mpt_raid.c b/sys/dev/mpt/mpt_raid.c > > index 5ff08ffcf2b3..2b868f6ef070 100644 > > --- a/sys/dev/mpt/mpt_raid.c > > +++ b/sys/dev/mpt/mpt_raid.c > > @@ -830,7 +830,7 @@ mpt_is_raid_volume(struct mpt_softc *mpt, target_id= _t tgt) > > } > > ioc_vol =3D mpt->ioc_page2->RaidVolume; > > ioc_last_vol =3D ioc_vol + mpt->ioc_page2->NumActiveVolumes; > > - for (;ioc_vol !=3D ioc_last_vol; ioc_vol++) { > > + for (; ioc_vol !=3D ioc_last_vol; ioc_vol++) { > > if (ioc_vol->VolumeID =3D=3D tgt) { > > return (1); > > } > > @@ -1406,7 +1406,7 @@ mpt_refresh_raid_data(struct mpt_softc *mpt) > > > > ioc_vol =3D mpt->ioc_page2->RaidVolume; > > ioc_last_vol =3D ioc_vol + mpt->ioc_page2->NumActiveVolumes; > > - for (;ioc_vol !=3D ioc_last_vol; ioc_vol++) { > > + for (; ioc_vol !=3D ioc_last_vol; ioc_vol++) { > > struct mpt_raid_volume *mpt_vol; > > > > mpt_vol =3D mpt->raid_volumes + ioc_vol->VolumePageNumb= er; > > diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c > > index 4625c2616562..265181ef7ad0 100644 > > --- a/sys/dev/nfe/if_nfe.c > > +++ b/sys/dev/nfe/if_nfe.c > > @@ -2078,7 +2078,7 @@ nfe_rxeof(struct nfe_softc *sc, int count, int *r= x_npktsp) > > bus_dmamap_sync(sc->rxq.rx_desc_tag, sc->rxq.rx_desc_map, > > BUS_DMASYNC_POSTREAD); > > > > - for (prog =3D 0;;NFE_INC(sc->rxq.cur, NFE_RX_RING_COUNT), vtag = =3D 0) { > > + for (prog =3D 0; ; NFE_INC(sc->rxq.cur, NFE_RX_RING_COUNT), vta= g =3D 0) { > > if (count <=3D 0) > > break; > > count--; > > @@ -2192,7 +2192,7 @@ nfe_jrxeof(struct nfe_softc *sc, int count, int *= rx_npktsp) > > bus_dmamap_sync(sc->jrxq.jrx_desc_tag, sc->jrxq.jrx_desc_map, > > BUS_DMASYNC_POSTREAD); > > > > - for (prog =3D 0;;NFE_INC(sc->jrxq.jcur, NFE_JUMBO_RX_RING_COUNT= ), > > + for (prog =3D 0; ; NFE_INC(sc->jrxq.jcur, NFE_JUMBO_RX_RING_COU= NT), > > vtag =3D 0) { > > if (count <=3D 0) > > break; > > diff --git a/sys/dev/ocs_fc/ocs_mgmt.c b/sys/dev/ocs_fc/ocs_mgmt.c > > index 726b499f28ba..5b7f6557c017 100644 > > --- a/sys/dev/ocs_fc/ocs_mgmt.c > > +++ b/sys/dev/ocs_fc/ocs_mgmt.c > > @@ -226,7 +226,7 @@ ocs_mgmt_get_list(ocs_t *ocs, ocs_textbuf_t *textbu= f) > > > > ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); > > > > - for (i=3D0;i > + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > > access =3D 0; > > if (mgmt_table[i].get_handler) { > > access |=3D MGMT_MODE_RD; > > @@ -305,7 +305,7 @@ ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t = *textbuf) > > if (ocs_strncmp(name, qualifier, strlen(qualifier)) =3D=3D 0) { > > char *unqualified_name =3D name + strlen(qualifier) + 1= ; > > > > - for (i=3D0;i > + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > > if (ocs_strcmp(unqualified_name, mgmt_table[i].= name) =3D=3D 0) { > > if (mgmt_table[i].get_handler) { > > mgmt_table[i].get_handler(ocs, = name, textbuf); > > @@ -387,7 +387,7 @@ ocs_mgmt_set(ocs_t *ocs, char *name, char *value) > > char *unqualified_name =3D name + strlen(qualifier) +1; > > > > /* See if it's a value I can set */ > > - for (i=3D0;i > + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > > if (ocs_strcmp(unqualified_name, mgmt_table[i].= name) =3D=3D 0) { > > if (mgmt_table[i].set_handler) { > > return mgmt_table[i].set_handle= r(ocs, name, value); > > @@ -469,7 +469,7 @@ ocs_mgmt_exec(ocs_t *ocs, char *action, void *arg_i= n, > > char *unqualified_name =3D action + strlen(qualifier) += 1; > > > > /* See if it's an action I can perform */ > > - for (i=3D0;i > + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > > if (ocs_strcmp(unqualified_name, mgmt_table[i].= name) =3D=3D 0) { > > if (mgmt_table[i].action_handler) { > > return mgmt_table[i].action_han= dler(ocs, action, arg_in, arg_in_length, > > @@ -527,7 +527,7 @@ ocs_mgmt_get_all(ocs_t *ocs, ocs_textbuf_t *textbuf= ) > > > > ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); > > > > - for (i=3D0;i > + for (i =3D 0; i < ARRAY_SIZE(mgmt_table); i++) { > > if (mgmt_table[i].get_handler) { > > mgmt_table[i].get_handler(ocs, mgmt_table[i].na= me, textbuf); > > } else if (mgmt_table[i].action_handler) { > > @@ -1212,7 +1212,7 @@ get_sfp_a2(ocs_t *ocs, char *name, ocs_textbuf_t = *textbuf) > > int buffer_remaining =3D (SFP_PAGE_SIZE * 3) + 1; > > int bytes_added; > > > > - for (i=3D0; i < bytes_read; i++) { > > + for (i =3D 0; i < bytes_read; i++) { > > bytes_added =3D ocs_snprintf(d, buffer_remainin= g, "%02x ", *s); > > ++s; > > d +=3D bytes_added; > > @@ -2040,7 +2040,7 @@ get_profile_list(ocs_t *ocs, char *name, ocs_text= buf_t *textbuf) > > result_buf =3D ocs_malloc(ocs, BUFFER_SIZE, OCS= _M_ZERO); > > bytes_left =3D BUFFER_SIZE; > > > > - for (i=3D0; inum_descriptors; i++= ) { > > + for (i =3D 0; i < result.list->num_descriptors;= i++) { > > sprintf(result_line, "0x%02x:%s\n", res= ult.list->descriptors[i].profile_id, > > result.list->descriptors[i].pro= file_description); > > if (strlen(result_line) < bytes_left) { > > diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c > > index 9870379e2eba..de75f4747709 100644 > > --- a/sys/dev/ppc/ppc.c > > +++ b/sys/dev/ppc/ppc.c > > @@ -1389,7 +1389,7 @@ ppc_exec_microseq(device_t dev, struct ppb_micros= eq **p_msq) > > > > /* let's suppose the next instr. is the same */ > > prefetch: > > - for (;mi->opcode =3D=3D MS_OP_RASSERT; INCR_PC) > > + for (; mi->opcode =3D=3D MS_OP_RASSERT; INCR_PC= ) > > w_reg(mi->arg[0].i, ppc, (char)mi->arg[= 1].i); > > > > if (mi->opcode =3D=3D MS_OP_DELAY) { > > diff --git a/sys/dev/smartpqi/smartpqi_event.c b/sys/dev/smartpqi/smart= pqi_event.c > > index f000d9ce9db3..88dcf45dd08a 100644 > > --- a/sys/dev/smartpqi/smartpqi_event.c > > +++ b/sys/dev/smartpqi/smartpqi_event.c > > @@ -115,7 +115,7 @@ pqisrc_ack_all_events(void *arg1) > > > > > > pending_event =3D &softs->pending_events[0]; > > - for (i=3D0; i < PQI_NUM_SUPPORTED_EVENTS; i++) { > > + for (i =3D 0; i < PQI_NUM_SUPPORTED_EVENTS; i++) { > > if (pending_event->pending =3D=3D true) { > > pending_event->pending =3D false; > > pqisrc_acknowledge_event(softs, pending_event); > > @@ -417,7 +417,7 @@ pqisrc_report_event_config(pqisrc_softstate_t *soft= s) > > softs->event_config.num_event_descriptors =3D MIN(event_config_= p->num_event_descriptors, > > PQI_MAX_EVE= NT_DESCRIPTORS) ; > > > > - for (i=3D0; i < softs->event_config.num_event_descriptors ;i++= ){ > > + for (i =3D 0; i < softs->event_config.num_event_descriptors; i= ++) { > > softs->event_config.descriptors[i].event_type =3D > > event_config_p->descriptors[i].= event_type; > > } > > @@ -477,7 +477,7 @@ pqisrc_set_event_config(pqisrc_softstate_t *softs) > > event_config_p->num_event_descriptors =3D softs->event_config.n= um_event_descriptors; > > > > > > - for (i=3D0; i < softs->event_config.num_event_descriptors ; i++= ){ > > + for (i =3D 0; i < softs->event_config.num_event_descriptors; i+= +) { > > event_config_p->descriptors[i].event_type =3D > > softs->event_config.descriptors= [i].event_type; > > if( pqisrc_event_type_to_event_index(event_config_p->de= scriptors[i].event_type) !=3D -1) > > diff --git a/sys/dev/smartpqi/smartpqi_queue.c b/sys/dev/smartpqi/smart= pqi_queue.c > > index 2e80b01b5436..f05c951cd4f9 100644 > > --- a/sys/dev/smartpqi/smartpqi_queue.c > > +++ b/sys/dev/smartpqi/smartpqi_queue.c > > @@ -700,7 +700,7 @@ pqisrc_create_op_obq(pqisrc_softstate_t *softs, > > } else { > > int i =3D 0; > > DBG_WARN("Error Status Descriptors\n"); > > - for(i =3D 0; i < 4;i++) > > + for (i =3D 0; i < 4; i++) > > DBG_WARN(" %x ",admin_resp.resp_type.create_op_= oq.status_desc[i]); > > } > > > > @@ -743,7 +743,7 @@ pqisrc_create_op_ibq(pqisrc_softstate_t *softs, > > } else { > > int i =3D 0; > > DBG_WARN("Error Status Decsriptors\n"); > > - for(i =3D 0; i < 4;i++) > > + for (i =3D 0; i < 4; i++) > > DBG_WARN(" %x ",admin_resp.resp_type.create_op_= iq.status_desc[i]); > > } > > > > diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c > > index fa65d544e17d..b4e5c1075fb4 100644 > > --- a/sys/dev/sym/sym_hipd.c > > +++ b/sys/dev/sym/sym_hipd.c > > @@ -3266,7 +3266,7 @@ static void sym_init (hcb_p np, int reason) > > * Reinitialize usrwide. > > * Prepare sync negotiation according to actual SCSI bus mode. > > */ > > - for (i=3D0;i > + for (i =3D 0; i < SYM_CONF_MAX_TARGET; i++) { > > tcb_p tp =3D &np->target[i]; > > > > tp->to_reset =3D 0; > > @@ -3715,7 +3715,7 @@ static void sym_log_hard_error(hcb_p np, u_short = sist, u_char dstat) > > } > > > > printf ("%s: regdump:", sym_name(np)); > > - for (i=3D0; i<24;i++) > > + for (i =3D 0; i < 24; i++) > > printf (" %02x", (unsigned)INB_OFF(i)); > > printf (".\n"); > > > > @@ -5527,8 +5527,8 @@ static int sym_show_msg (u_char * msg) > > u_char i; > > printf ("%x",*msg); > > if (*msg=3D=3DM_EXTENDED) { > > - for (i=3D1;i<8;i++) { > > - if (i-1>msg[1]) break; > > + for (i =3D 1; i < 8; i++) { > > + if (i - 1 > msg[1]) break; > > printf ("-%x",msg[i]); > > } > > return (i+1); > > @@ -6744,10 +6744,10 @@ restart_test: > > /* > > * Wait 'til done (with timeout) > > */ > > - for (i=3D0; i > + for (i =3D 0; i < SYM_SNOOP_TIMEOUT; i++) > > if (INB(nc_istat) & (INTF|SIP|DIP)) > > break; > > - if (i>=3DSYM_SNOOP_TIMEOUT) { > > + if (i >=3D SYM_SNOOP_TIMEOUT) { > > printf ("CACHE TEST FAILED: timeout.\n"); > > return (0x20); > > } > > diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c > > index af151c8c4f06..fccd6689a6aa 100644 > > --- a/sys/dev/tws/tws.c > > +++ b/sys/dev/tws/tws.c > > @@ -311,7 +311,7 @@ attach_fail_4: > > if (sc->cmd_tag) > > bus_dma_tag_destroy(sc->cmd_tag); > > attach_fail_3: > > - for(i=3D0;iirqs;i++) { > > + for (i =3D 0; i < sc->irqs; i++) { > > if ( sc->irq_res[i] ){ > > if (bus_release_resource(sc->tws_dev, > > SYS_RES_IRQ, sc->irq_res_id[i], sc->irq_res[i])) > > @@ -369,7 +369,7 @@ tws_detach(device_t dev) > > tws_teardown_intr(sc); > > > > /* Release irq resource */ > > - for(i=3D0;iirqs;i++) { > > + for (i =3D 0; i < sc->irqs; i++) { > > if ( sc->irq_res[i] ){ > > if (bus_release_resource(sc->tws_dev, > > SYS_RES_IRQ, sc->irq_res_id[i], sc->irq_res[i])) > > @@ -402,7 +402,7 @@ tws_detach(device_t dev) > > TWS_TRACE(sc, "bus release mem resource", 0, sc->reg_res_i= d); > > } > > > > - for ( i=3D0; i< tws_queue_depth; i++) { > > + for (i =3D 0; i < tws_queue_depth; i++) { > > if (sc->reqs[i].dma_map) > > bus_dmamap_destroy(sc->data_tag, sc->reqs[i].dma_ma= p); > > callout_drain(&sc->reqs[i].timeout); > > @@ -432,7 +432,7 @@ tws_setup_intr(struct tws_softc *sc, int irqs) > > { > > int i, error; > > > > - for(i=3D0;i > + for (i =3D 0; i < irqs; i++) { > > if (!(sc->intr_handle[i])) { > > if ((error =3D bus_setup_intr(sc->tws_dev, sc->irq_res[i], > > INTR_TYPE_CAM | INTR_MPSAFE, > > @@ -452,7 +452,7 @@ tws_teardown_intr(struct tws_softc *sc) > > { > > int i; > > > > - for(i=3D0;iirqs;i++) { > > + for (i =3D 0; i < sc->irqs; i++) { > > if (sc->intr_handle[i]) { > > bus_teardown_intr(sc->tws_dev, > > sc->irq_res[i], sc->intr_handle[= i]); > > @@ -669,8 +669,7 @@ tws_init_reqs(struct tws_softc *sc, u_int32_t dma_m= em_size) > > bzero(cmd_buf, dma_mem_size); > > TWS_TRACE_DEBUG(sc, "phy cmd", sc->dma_mem_phys, 0); > > mtx_lock(&sc->q_lock); > > - for ( i=3D0; i< tws_queue_depth; i++) > > - { > > + for (i =3D 0; i < tws_queue_depth; i++) { > > if (bus_dmamap_create(sc->data_tag, 0, &sc->reqs[i].dma_map)) = { > > /* log a ENOMEM failure msg here */ > > mtx_unlock(&sc->q_lock); > > diff --git a/sys/dev/tws/tws_services.c b/sys/dev/tws/tws_services.c > > index da8bbacc39f7..e5c3d45c533f 100644 > > --- a/sys/dev/tws/tws_services.c > > +++ b/sys/dev/tws/tws_services.c > > @@ -200,7 +200,7 @@ tws_init_qs(struct tws_softc *sc) > > { > > > > mtx_lock(&sc->q_lock); > > - for(int i=3D0;i > + for (int i =3D 0; i < TWS_MAX_QS; i++) { > > sc->q_head[i] =3D NULL; > > sc->q_tail[i] =3D NULL; > > } > > diff --git a/sys/fs/devfs/devfs_dir.c b/sys/fs/devfs/devfs_dir.c > > index 3dc87538017d..aad87606e738 100644 > > --- a/sys/fs/devfs/devfs_dir.c > > +++ b/sys/fs/devfs/devfs_dir.c > > @@ -162,7 +162,7 @@ int > > devfs_pathpath(const char *p1, const char *p2) > > { > > > > - for (;;p1++, p2++) { > > + for (;; p1++, p2++) { > > if (*p1 !=3D *p2) { > > if (*p1 =3D=3D '/' && *p2 =3D=3D '\0') > > return (1); > > diff --git a/sys/fs/udf/osta.c b/sys/fs/udf/osta.c > > index f79b86993367..1a083d8c26b1 100644 > > --- a/sys/fs/udf/osta.c > > +++ b/sys/fs/udf/osta.c > > @@ -383,7 +383,7 @@ int UDFTransName( > > int maxFilenameLen; > > /* Translate extension, and store it in ext. */ > > for(index =3D 0; index > - extIndex + index +1 < udfLen; index++ ) { > > + extIndex + index +1 < udfLen; index++) { > > current =3D udfName[extIndex + index + = 1]; > > if (IsIllegal(current) || > > !UnicodeIsPrint(current)) { > > @@ -432,7 +432,7 @@ int UDFTransName( > > /* Place a translated extension at end, if found. */ > > if (hasExt) { > > newName[newIndex++] =3D PERIOD; > > - for (index =3D 0;index < localExtIndex ;index++= ) { > > + for (index =3D 0; index < localExtIndex; index+= +) { > > newName[newIndex++] =3D ext[index]; > > } > > } > > diff --git a/sys/i386/i386/in_cksum_machdep.c b/sys/i386/i386/in_cksum_= machdep.c > > index 27ab09d82da0..b658d85bc892 100644 > > --- a/sys/i386/i386/in_cksum_machdep.c > > +++ b/sys/i386/i386/in_cksum_machdep.c > > @@ -84,7 +84,7 @@ in_cksum_skip(struct mbuf *m, int len, int skip) > > } > > } > > > > - for (;m && len; m =3D m->m_next) { > > + for (; m && len; m =3D m->m_next) { > > if (m->m_len =3D=3D 0) > > continue; > > w =3D mtod(m, u_short *); > > diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c > > index ab8ed32ad189..c4b1c8201ff2 100644 > > --- a/sys/kern/kern_exit.c > > +++ b/sys/kern/kern_exit.c > > @@ -807,7 +807,7 @@ kern_abort2(struct thread *td, const char *why, int= nargs, void **uargs) > > } > > if (nargs > 0) { > > sbuf_putc(sb, '('); > > - for (i =3D 0;i < nargs; i++) > > + for (i =3D 0; i < nargs; i++) > > sbuf_printf(sb, "%s%p", i =3D=3D 0 ? "" : ", ",= uargs[i]); > > sbuf_putc(sb, ')'); > > } > > diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c > > index e919b15543b2..fcbfbe64f854 100644 > > --- a/sys/kern/kern_malloc.c > > +++ b/sys/kern/kern_malloc.c > > @@ -1302,7 +1302,7 @@ mallocinit(void *dummy) > > #endif > > align, UMA_ZONE_MALLOC); > > } > > - for (;i <=3D size; i+=3D KMEM_ZBASE) > > + for (; i <=3D size; i+=3D KMEM_ZBASE) > > kmemsize[i >> KMEM_ZSHIFT] =3D indx; > > } > > } > > diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c > > index 07a9cc0f57be..c4d0223d484f 100644 > > --- a/sys/kern/subr_devstat.c > > +++ b/sys/kern/subr_devstat.c > > @@ -415,7 +415,7 @@ sysctl_devstat(SYSCTL_HANDLER_ARGS) > > if (error !=3D 0) > > return (error); > > > > - for (;nds !=3D NULL;) { > > + while (nds !=3D NULL) { > > error =3D SYSCTL_OUT(req, nds, sizeof(struct devstat)); > > if (error !=3D 0) > > return (error); > > diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c > > index db0ceb17b9f0..e2070ae3f865 100644 > > --- a/sys/kern/subr_prf.c > > +++ b/sys/kern/subr_prf.c > > @@ -766,7 +766,7 @@ reswitch: switch (ch =3D (u_char)*fmt++) { > > PCHAR(hex2ascii(*up & 0x0f)); > > up++; > > if (width) > > - for (q=3Dp;*q;q++) > > + for (q =3D p; *q; q++) > > PCHAR(*q); > > } > > break; > > diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c > > index 374b5595fcbc..5b89ca026e85 100644 > > --- a/sys/netinet/siftr.c > > +++ b/sys/netinet/siftr.c > > @@ -519,7 +519,7 @@ siftr_pkt_manager_thread(void *arg) > > if (log_buf !=3D NULL) { > > alq_post_flags(siftr_alq, log_buf, 0); > > } > > - for (;cnt > 0; cnt--) { > > + for (; cnt > 0; cnt--) { > > pkt_node =3D STAILQ_FIRST(&tmp_pkt_queu= e); > > STAILQ_REMOVE_HEAD(&tmp_pkt_queue, node= s); > > free(pkt_node, M_SIFTR_PKTNODE); > > diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummy= net.c > > index b3f52322425f..d522f9da0fbe 100644 > > --- a/sys/netpfil/ipfw/ip_dummynet.c > > +++ b/sys/netpfil/ipfw/ip_dummynet.c > > @@ -1150,7 +1150,7 @@ copy_data_helper(void *_o, void *_arg) > > return 0; /* not a pipe */ > > > > /* see if the object is within one of our ranges */ > > - for (;r < lim; r +=3D 2) { > > + for (; r < lim; r +=3D 2) { > > if (n < r[0] || n > r[1]) > > continue; > > /* Found a valid entry, copy and we are done */ > > @@ -1183,7 +1183,7 @@ copy_data_helper(void *_o, void *_arg) > > if (n >=3D DN_MAX_ID) > > return 0; > > /* see if the object is within one of our ranges */ > > - for (;r < lim; r +=3D 2) { > > + for (; r < lim; r +=3D 2) { > > if (n < r[0] || n > r[1]) > > continue; > > if (copy_flowset(a, fs, 0)) From nobody Thu Oct 16 23:58:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnlKK0sFTz6DMl3 for ; Thu, 16 Oct 2025 23:58:45 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) (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 4cnlKJ1dYVz42KT for ; Thu, 16 Oct 2025 23:58:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=kQKbX7Fh; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::f29 as permitted sender) smtp.mailfrom=markjdb@gmail.com Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-7946137e7a2so23899526d6.0 for ; Thu, 16 Oct 2025 16:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760659118; x=1761263918; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=AtFUnrIphlSL3+NBEE01nPgMsf47kqWuBeDI6YL4JlI=; b=kQKbX7FhcwWgr94xsm44JOK03/Cad317cil5dbqpMXfOSmRsmVFBcjyCS6U+II1sHt qIPh4pSbbOYHIKNQu6xyg/eXQcodgMjy5DAZ31Wwv1YEM11ZcYeoLVK3qrxHxkxv4bsW cCZLAEpIc7TATeO0Gm9j9z7HHk0LsaWrcxhrqgDRKSrroBK7Oy3s78VQvQ0uxQzrsYvo OS8PjJNPqJaFOMqznl5GV6V+uldoFNvjmNvmYA45V2UH7h2oHr8fDJJi3rvqdj0A9G9h 5cQJBWo7Ck88OWEaEcGRlG3ussnUWw9Fz30aPc0xOpfd8L+w5tq9yBwihUUHixxdGxVA BOaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760659118; x=1761263918; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AtFUnrIphlSL3+NBEE01nPgMsf47kqWuBeDI6YL4JlI=; b=kQ8gNXckdhKGrH94Ri+7rlXQd1Byq2UF5u2EZfFcEht9xcu9KnDkhV+t8HMvKKRM1Z uBO0qvJ6ylwLHROro6lIhXf5YiQYTZbdrcjQudXEnXmjkAq2HXOqkvvKNywo4wzPr7yJ 3+yRLLe0AFxkoZhHe61K9iQw5eZC79CWPTrdBrmv6bsLFuirj085KLUaO7Ul4RsA2sv9 Yv3xUAkbtEGOV4KTba18B64EKHWJd0v1KnxftO+ih/Uj7dezq3SgNAWITA8o3cPxeB6e I9E/9dlueAtzJLFKP6/v+FDLorQmbcMyKRct5r0KiypzJ0GbDJpNq0og+xrk/zxnhUNJ YHeg== X-Forwarded-Encrypted: i=1; AJvYcCXlfYp/mopuGK1pZLH++c1ZuvXuWktDpfJnbBbAKFiQ3gO09Xc5RuXrQk6EZxcq0DyQeHjCwiocEXySDGDRC/sEWwQCEw==@freebsd.org X-Gm-Message-State: AOJu0Yyn8FG6xpzJLGLV51LO+/00VuJVQoG+3yhuhsiwObVWCep0VrQM OJoiPHYIQh8FuOX/k8p34E9QMfFvFI5cFxMM8gqmUSTwGpWzcUfhKVtv X-Gm-Gg: ASbGncv0hDRj1Vl0VCa5dScN2A/d6u1QfRBK8C5CoTC4csFFMBndFSiq0Xs9uE1PofW R/sxzSmKoM6ZJQV+pa/iH87lKiwbIMl8ZHwqOerxU2ZWwry29AUsh8vBw34ryhBAwLPWGe/XBxj Y9fEyuaMc82PwxVWYyYCDa7O93J5et9mCfsD3PuSP05LSibR5r8Hic0A3XXa9Z8kbpn6M3YZlg2 4kBpnfjKzstG0zeEqqkhLZiCZNG3EnQovoW35nr9oN8KaVhLrL0b65SP6ry5irel4JE+kUrHsh7 Pm8VnRa/SoEdq/jGLZFEjTquVTWeBwFAaDDAam3f0UIg6Qa4nPatV9adGF8ySMQlQpHUf/3XaFj NaDNdhTs3EW9DGn5A39jcnJFljvHztKPcgm0ZLY/X8uqnAhieYeI95D9Cz5+rpL3tTnwudrIGZe PrKJHO6yoBa8DRVA== X-Google-Smtp-Source: AGHT+IENY/+yB6O4YlD/m62H6Hfc1agBNCS8ZbT94wa7JH9GaWGlU1xV/mrppFuPJRDaPQFLbnooTw== X-Received: by 2002:a05:622a:1113:b0:4e8:91a4:241a with SMTP id d75a77b69052e-4e89d2c9aeamr24049421cf.37.1760659118413; Thu, 16 Oct 2025 16:58:38 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4e881b10bbesm54210561cf.0.2025.10.16.16.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Oct 2025 16:58:37 -0700 (PDT) Date: Thu, 16 Oct 2025 19:58:34 -0400 From: Mark Johnston To: Rick Macklem Cc: "David E. O'Brien" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0050289464fa - main - style(9): white space after ; and around binary operators Message-ID: References: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.60 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), DKIM not aligned (relaxed),none]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f29:from]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4cnlKJ1dYVz42KT On Thu, Oct 16, 2025 at 04:21:45PM -0700, Rick Macklem wrote: > Please be aware of the following snippets from "man 9 style": > > In general code can be considered "new code" when it makes up about 50% > or more of the file(s) involved. This is enough to break precedents in > the existing code and use the current style guidelines. > > Stylistic changes (including whitespace changes) are hard on the source > repository and are to be avoided without good reason. +1 This kind of change accomplishes nothing except to be a source of merge conflicts for others to deal with. > rick > > On Thu, Oct 16, 2025 at 3:05 PM David E. O'Brien wrote: > > > > CAUTION: This email originated from outside of the University of Guelph. Do not click links or open attachments unless you recognize the sender and know the content is safe. If in doubt, forward suspicious emails to IThelp@uoguelph.ca. > > > > The branch main has been updated by obrien: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=0050289464fa56ec79e060b8d8378b9ff7145a0e > > > > commit 0050289464fa56ec79e060b8d8378b9ff7145a0e > > Author: David E. O'Brien > > AuthorDate: 2025-10-15 05:22:00 +0000 > > Commit: David E. O'Brien > > CommitDate: 2025-10-16 22:02:50 +0000 > > > > style(9): white space after ; and around binary operators > > > > in for() loops. Also, use 'while', where only the > > conditional test of 'for' was used. > > > > Reviewed by: sjg From nobody Fri Oct 17 01:30:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnnMk09Gzz6CG00; Fri, 17 Oct 2025 01:30: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 4cnnMj6r9cz4DSw; Fri, 17 Oct 2025 01:30:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760664658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wIJdRWBzti0iX7RVeF/XcpuHkBTYlXNlqaERcGMvxeU=; b=LO5VBZ9Q6+8pCV3eT9Aw5EmizH08Lne8bpH9BJ3Lx//J6Kp38lbJ+nVvC7hXdW/u30ADcw VRSu+MXqKrUQpcWoNHFkKSmaGFu1mjRtqHnQbKa5BtA6iIQq8gpUqotx/AVSjuwc4S2oBb hROjmxPY1dPJQjQXcnb2LlMnxq+ZPyGtr1gJzuE2dVbtkSBnroh6SUFpM1QBAvLQdenCDu gTGy+Yponll0yFJuHyRY4p8oEyzwdP006UKxDZOdkUu+rmj5vk3oyKtZeYamiPB1LBWGRY AD+Q2JgDF1f43zGJufXnMDrO4aIplh1aHiDCGfghKIsxVlRcxF/jU2tJq/NGIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760664658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wIJdRWBzti0iX7RVeF/XcpuHkBTYlXNlqaERcGMvxeU=; b=qBHNzSmBr5kAnP1eT3xekUaeVaffQ3Z+WY5JlWbPYN3Xhdss7s+7nA+JDQt04UFCfiWwuf OpmhbYko6R8jtfB7Ld7hLLLp1IOtywfO7qUa4LtKabFtuVULLKfNXw3IMnjilzdPIKo++N Eqk5TUfUz1srZFIgElZVC0V0+PEjPqaoRKbZTgHij5ePa6C1ozBJrzz9zvCXAIsk7mn5Fz VTrUmHcqZR4jG7ASplwsxDJ2NRArHo7kTEoPhX6w0uDJZsUPCXxQzN0VarRE8gwjKPROwh GiZmax/0M5VJKjChPua7Sl4SlkQi2Tk871yWrj4EDFR0rEs0aBTaaBKujsuXfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760664658; a=rsa-sha256; cv=none; b=isFkQ41JA8NMKG8qH2QkFUWZI0j2Db2qGE0m/1yguYuqelqjPoAXaW2w3ofq/iur1eNBrJ wpUfvC+Nf5uKtcqBMeG5pIs1VZZwdiaa0m3MNv9s3RZvAyAGQ6pYj63rjF9E00MfLgwT0N zc4dju7oefyqCGGdBsPNP57TAjasRKNFnAAt2ySNcqfIn+j+OCDJnrq3gEvQuswkFZy2li h0Yw/yo9sIHSm4OYGDg14fNb4tBp1LcE4mBOVRWkfT7ez0WXJvnDs0eFpel9We3lQz6yD/ 8qJ3ZdWkRCi7ieuDBDEd0GVW8+JzimRdr1Q1/lOzdKHwk0Ixxv9lGS03YPSAPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnnMj6KyPzZRr; Fri, 17 Oct 2025 01:30:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59H1UvGc029205; Fri, 17 Oct 2025 01:30:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H1Uv8f029202; Fri, 17 Oct 2025 01:30:57 GMT (envelope-from git) Date: Fri, 17 Oct 2025 01:30:57 GMT Message-Id: <202510170130.59H1Uv8f029202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2db11dda840c - main - pkg-stage: Correct /packages permissions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2db11dda840c4889aeb719761cdafa62730083a2 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2db11dda840c4889aeb719761cdafa62730083a2 commit 2db11dda840c4889aeb719761cdafa62730083a2 Author: Ed Maste AuthorDate: 2025-10-15 13:04:58 +0000 Commit: Ed Maste CommitDate: 2025-10-17 01:23:15 +0000 pkg-stage: Correct /packages permissions Include /packages in the METALOG used to create dvd1.iso. Previously we used an expression ^./packages/ (with a trailing /) which did not match /packages itself, and then with no METALOG entry /packages on dvd1.iso ended up with mode d---------. PR: 290222 Reviewed by: cperciva MFC after: 1 minute Sponsored by: The FreeBSD Foundation --- 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 f9216b52b088..6d460a83e1da 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -110,7 +110,7 @@ ${PKGCMD} repo ${PKG_REPODIR} if [ $NO_ROOT ]; then mtree -c -p $ROOTDIR | mtree -C -k type,mode,link,size | \ - grep '^./packages/' >> $ROOTDIR/METALOG + grep '^./packages[/ ]' >> $ROOTDIR/METALOG fi # Always exit '0', even if pkg(8) complains about conflicts. From nobody Fri Oct 17 02:46:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnq322HPQz6CPMH; Fri, 17 Oct 2025 02:46: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 4cnq320ZGTz4MWL; Fri, 17 Oct 2025 02:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760669198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ad0kAQS8g8mlmGx09T47nP+l+rQXy7vV6PjUxN/TwN4=; b=FSy51ocHl6mHQU23mKgIOflDHUiwv+XbootmNnAon1Ea8DuBcptJHPIyxniHNffYwvAIxa PJQ0jYrJErIOuTVXuhepdJhgDgrBTnxZNezYQSj28DS9GDBkn6H9odXHw1gpt0Q/wPHWaC /uJTzZN/PLfWmgmhJxn+ZM7CZslwDvCgft4A98vfXEUhk3EWM7GXTZvoSzN1fS81NZTwyd 8DifPK4a5aXFuOQAnZiBntkCFhzfwnyWT2sguHBTw1VZXrzqQJbfrxbcP4iGoOFc4ODTih dCeQZsKGuBPlT8HbwIkHLuwWgQIlqLe1YqyuZ/FLsxDraoGFYT1lwindqPFsOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760669198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ad0kAQS8g8mlmGx09T47nP+l+rQXy7vV6PjUxN/TwN4=; b=DJEHzymlJCWMhXaSCM6kmFkIbXyXLDckHLGJGOVCRPtTKnWml+Lh529//qjkv13RPccxSX gW9wr5KmGAQKM75OlSNQ25GfrNnHnPwDWd0MeNM9qQVm3KY0SHjPm3KhV3FitUO6fsnn0Y PwZqmVb3TJ/0V6F/gZwbI3eEysYY9poTyr1U7jTOHr1suOODBzwab53UdDc9XQ9QCDSiAn IfCe27LjVHxht9vQphsy9A5R8N7zREWn5jI0Pn6PPVZ1DdCYMARwHR8SrJjpwKOOquholS VbMoeaDtKwTisBJXNsyWYNupoGD5u7osY9o+nQ/q9q/T4sW1WTOD/TDZVSZULQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760669198; a=rsa-sha256; cv=none; b=uk5NmF6bM9aV4/3JfMku9d22X/kvLTSrVwBEJz3GpCapoGdseDp+f43nR9+iG4kAfjnXmW urWjOojhRO0B+tF1QRyWsyu4JAKUE4Ecp+XyZ2/GgUzKg1aMRsPfCvUd9YyXHk+nojZd8u IwbCLpEzphOger9/87tHlonc09ktK5I8vr2cttxvLYJxTV1ySfPHJ/4rcH0AlG2eG6OBbK MUuhzuljaMlJibatlHFc54CL8bwTYUJuo0jxUyW0w7HJD+J9GU/DCc9ZkFP9/eUe13TL18 HbK8o8wwIIgcFcGduCx1PuAKQySZKOONN8828L/h7HKrUg3cJ194cNiGAZBYlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnq3209sFzcS4; Fri, 17 Oct 2025 02:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59H2kbBp069232; Fri, 17 Oct 2025 02:46:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H2kbPU069229; Fri, 17 Oct 2025 02:46:37 GMT (envelope-from git) Date: Fri, 17 Oct 2025 02:46:37 GMT Message-Id: <202510170246.59H2kbPU069229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: c1e7e8f5cb0f - main - Add FENESTRASX to LINT to avoid breakage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1e7e8f5cb0f948abc4679dab295f1447363604d Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=c1e7e8f5cb0f948abc4679dab295f1447363604d commit c1e7e8f5cb0f948abc4679dab295f1447363604d Author: David E. O'Brien AuthorDate: 2025-10-17 01:01:34 +0000 Commit: David E. O'Brien CommitDate: 2025-10-17 02:46:21 +0000 Add FENESTRASX to LINT to avoid breakage --- sys/conf/NOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index a25ee8f6e1af..9944375c3615 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2801,7 +2801,7 @@ options MAXFILES=999 # Random number generator # Alternative algorithm. -#options RANDOM_FENESTRASX +options RANDOM_FENESTRASX # Allow the CSPRNG algorithm to be loaded as a module. #options RANDOM_LOADABLE # Select this to allow high-rate but potentially expensive From nobody Fri Oct 17 05:29:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnths5M69z6CdX0; Fri, 17 Oct 2025 05:31:09 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mailgate.Leidinger.net (bastille.leidinger.net [89.238.82.207]) (using TLSv1.3 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 "mailgate.leidinger.net", Issuer "E8" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnthq6qVmz3PP2; Fri, 17 Oct 2025 05:31:07 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=leidinger.net header.s=outgoing-alex header.b="NelI/r/T"; dmarc=pass (policy=quarantine) header.from=leidinger.net; spf=pass (mx1.freebsd.org: domain of Alexander@Leidinger.net designates 89.238.82.207 as permitted sender) smtp.mailfrom=Alexander@Leidinger.net List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1760679030; h=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=EjOZivJnUaqJz1ODb9NBlEwfAh0a7A46vMJ6dyWPCzA=; b=NelI/r/T3snZlzJE8ynokAH+RaUrarilz2T6HUMnDDtxSQ5q4c9bYv2qm0MP59KT3L/P8p tNUnd+2+s4G8WT6yubI0GsHhgLomeW+5JAtC8xjB4SlmG2bS8OFTeqFtP81u/UaxHFY9ug 7LU1G+2lucw80GtYUr+ZZAvHvxJAS0vvW+U7W1L8z1MIfdfTEFokIKw99TgCFk/A/yVKUa lt2VsPhFNL5Ic8qjDH28pvDQllI9S23MUma+biUuqzWfozWQ2Az3koHJND1N/qsSiG8/1Q lxRdQP0luf+3f0cd2Bf0uhGc5Ds7Fktm5lcs+5w1wvnXXj9w7vq24I/h6wT5Cw== Date: Fri, 17 Oct 2025 07:29:38 +0200 From: Alexander Leidinger To: Rick Macklem Cc: "David E. O'Brien" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0050289464fa - main - style(9): white space after ; and around binary operators In-Reply-To: References: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> Message-ID: <16835444882475995d82a23078996276@Leidinger.net> Organization: No organization, this is a private message. Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_0ecf25361336a504c9cea98fa843239a"; micalg=pgp-sha256 X-Spamd-Bar: ----- X-Spamd-Result: default: False [-6.00 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[leidinger.net,quarantine]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_DKIM_ALLOW(-0.20)[leidinger.net:s=outgoing-alex]; ONCE_RECEIVED(0.10)[]; MISSING_XM_UA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; HAS_ORG_HEADER(0.00)[]; DKIM_TRACE(0.00)[leidinger.net:+]; TAGGED_RCPT(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FREEMAIL_TO(0.00)[gmail.com]; HAS_ATTACHMENT(0.00)[] X-Rspamd-Queue-Id: 4cnthq6qVmz3PP2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_0ecf25361336a504c9cea98fa843239a Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Am 2025-10-17 01:29, schrieb Rick Macklem: > On Thu, Oct 16, 2025 at 4:21 PM Rick Macklem > wrote: >> >> Please be aware of the following snippets from "man 9 style": >> >> In general code can be considered "new code" when it makes up about >> 50% >> or more of the file(s) involved. This is enough to break precedents in >> the existing code and use the current style guidelines. >> >> Stylistic changes (including whitespace changes) are hard on the >> source >> repository and are to be avoided without good reason. >> >> rick > Just to be clear, I am not asking that this commit be reverted. > I am just suggesting that you be aware that style(9) changes to > extant code is not, in general, encouraged, afaik unless you are > re-writing a large portion of the code (over 50%). Does someone remember why? We have now the possibility to exclude commits from the VCS attribution of lines to commits (git blame), as such, does the reason of not doing it still hold? Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_0ecf25361336a504c9cea98fa843239a Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc; size=833 Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmjx1FEACgkQEg2wmwP4 2IYNUA/9H8ENxveDq507XF8WH95IElosCa6Sw4NPLT6Bic/zyMq1zfMVpVcT9v17 iUq/euXpOvCmy/3NZGpXxHi1nHOHbgVaq4rBJJO9CjKxsZDd5i3tyT1i34d/rzbA m8FCdEP2Fw/vqB9g9u9mXqhqKqcgeMsHwpKJ2iKLL+I2YOfCYATT/WDBZzz1BTO6 8BkZgIPIfp1cNBUg7K+OFEPPG9xozQRxAEp7d2n2gifrmh0Z0Ng3wg9y4ntMq/DG a18vkbrDKMaT3AszOheWfYWZELvbmPLj43Zkl5DmoxOX14coSGv7irJE9N3+TDXa +kwWfvat8csMPP2BVfHMynhBQfZfSzoNXkIwgyn0TWlQyr1DHfYdkHNxu6xyhHPp egv55XtBult+1hxoiUZfEgvDlxox3DaAz86oD/dBuH2EedJXFIVsTy0EhSKsNGCN Df7/1qVxu/KyT+Gr76v2OwqDR0YRdksL6i01QZIfAOa0+dTb1jfk3fAqfVzlvvCm 59aIY9GnzRv7ZO0XeJ/90H12FQ+v7OVI02xbtMem2gmv4a3PRQYwoyRygKFfZ6Vw alAdfjRaZV6nGnGktkSzal/zsnn5jhA2CiGkrBDKck58bnpblGjY/hB7NOmAh8Hk FoMsu5ScLQDAZbXUG8PgnJ402r4a5vaAYTE7wK6qDwsSinCP3+I= =ucXA -----END PGP SIGNATURE----- --=_0ecf25361336a504c9cea98fa843239a-- From nobody Fri Oct 17 05:45:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnv1252xlz6Cfvp; Fri, 17 Oct 2025 05:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnv124WFvz3SGD; Fri, 17 Oct 2025 05:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760679910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c5Hkys2H632TokEjVnl9AEn8ZEw9sR34+WEks+RZN7Q=; b=OEDZLCzpLzvXT+UvkzIoCjWOJ3uXk6Fg/1qMAb7MwKLl+z7xYdDBdUqlqqgK2MKP7bwaGW T2CtH+Xv4IKrDp1zYyJ1+NkIpQVes7sbqVj5hKmxvL/eVXSSxSqSMOlx53YgXK7kZsZuaD iDwslImi5INWmL6rr/MMVlgS3X9EX9Kcjbiwa/kqlt6koZCTTcbmH67C365YN0O50sZcpL ti1YlguweDZvSuieip5yExbVjiLbUjmjFG0ENiguaNEBS39AZHF+9MBOxRS44e4O8myl1P DyjYiuKHGacq8VmLvW2G6a1JpImY0qUcGt39jNehcu+buvypXgmDRwuFb/jHLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760679910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c5Hkys2H632TokEjVnl9AEn8ZEw9sR34+WEks+RZN7Q=; b=jMTzKsFwlBqR0eZlBN98CvIC2itJy+jMJMT3cQWAl3WHVK6Me0PjPgRPMkun/GdCULYqI9 QgdLfpDR8FWjoy0VlvE8niGu7nKbPMGnyGNKrOyWgIbgJOw3EcT+41TjuTx1/4DgHd0DQL 0pF4fFPrAOTmozDgEi4vw5EhRYR7L9BGC96Q7eQJ/ejKKhrBcADdprp1IX5h75OCRQPz5F sdW9rq8XLDw1CCyp08YGvKPafGMhxVbQ82wTx7tps0/LtmSczSpeYjWrdNtEmyTRoU6KBj 1EQhCJKaaIgDKu+fySPzvzRL31T3RQWG6LMCGjG9WPW72L0j5HJTRf3yiplRVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760679910; a=rsa-sha256; cv=none; b=doLG4E75FpKWTwQsBCJRkxc7AXHnpqbxcS+oNKtpDUOdZKEO5we11Ycpbdd+E3McRlbcx5 nziSVNgKWD8jW9KH2kbBzBKRLGSmhxhGGaXBHgCc0bOZO46pB8Nz/Iu5FYwa+zCvGn+XtZ cYSiWT9pxXkc5ciWOeqq1uCVP39ZzQh/XUARpghh6IDOUNegAmnJ0iLAgQmYuauMO22iRQ Yz3wcUwmy9CLRb6zD9nyubxevaY1/qt8obKeDA6NJfA/PjKvpOKbh7TpTYedvadwfiy7t/ hMfZ1ZimJCStfT6X7EaDz8q5xOWj4++jLBiFyrQ074oIz9bh0X+vCDXkWYP/zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnv123t2Bzj61; Fri, 17 Oct 2025 05:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59H5jAh5009503; Fri, 17 Oct 2025 05:45:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H5jA4b009500; Fri, 17 Oct 2025 05:45:10 GMT (envelope-from git) Date: Fri, 17 Oct 2025 05:45:10 GMT Message-Id: <202510170545.59H5jA4b009500@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: aafdbf83b926 - main - tcp: cleanup of syncache_expand() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aafdbf83b926519cb47de8f16a1a40c1ef3c84b5 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=aafdbf83b926519cb47de8f16a1a40c1ef3c84b5 commit aafdbf83b926519cb47de8f16a1a40c1ef3c84b5 Author: Michael Tuexen AuthorDate: 2025-10-17 05:40:02 +0000 Commit: Michael Tuexen CommitDate: 2025-10-17 05:40:02 +0000 tcp: cleanup of syncache_expand() * Consistently free the string after unlocking the sch, if possible. * Remove the failure handling in case of sc != NULL, since this is not possible anymore. * Remove the use of goto and instead return 0 in the three cases. The only change in behavior is that in three out of the four cases, where 0 is returned, *lsop is not set to NULL anymore. So the behavior is now consistent and also documented in a comment. The current in tree callers only look at *lsop, if and only if syncache_expand() returns 1. Reviewed by: Peter Lei MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52948 --- sys/netinet/tcp_syncache.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index f842a5678fa1..be20fb44a820 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1046,6 +1046,8 @@ abort: * * On syncache_socket() success the newly created socket * has its underlying inp locked. + * + * *lsop is updated, if and only if 1 is returned. */ int syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, @@ -1094,12 +1096,14 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, */ SCH_UNLOCK(sch); TCPSTAT_INC(tcps_sc_spurcookie); - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: Spurious ACK, " "segment rejected " "(syncookies disabled)\n", s, __func__); - goto failed; + free(s, M_TCPLOG); + } + return (0); } if (sch->sch_last_overflow < time_uptime - SYNCOOKIE_LIFETIME) { @@ -1109,12 +1113,14 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, */ SCH_UNLOCK(sch); TCPSTAT_INC(tcps_sc_spurcookie); - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: Spurious ACK, " "segment rejected " "(no syncache entry)\n", s, __func__); - goto failed; + free(s, M_TCPLOG); + } + return (0); } SCH_UNLOCK(sch); } @@ -1128,11 +1134,13 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, TCPSTAT_INC(tcps_sc_recvcookie); } else { TCPSTAT_INC(tcps_sc_failcookie); - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: Segment failed " "SYNCOOKIE authentication, segment rejected " "(probably spoofed)\n", s, __func__); - goto failed; + free(s, M_TCPLOG); + } + return (0); } #if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) /* If received ACK has MD5 signature, check it. */ @@ -1206,9 +1214,9 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, "%s; %s: SEG.TSval %u < TS.Recent %u, " "segment dropped\n", s, __func__, to->to_tsval, sc->sc_tsreflect); - free(s, M_TCPLOG); } SCH_UNLOCK(sch); + free(s, M_TCPLOG); return (-1); /* Do not send RST */ } @@ -1225,7 +1233,6 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, "expected, segment processed normally\n", s, __func__); free(s, M_TCPLOG); - s = NULL; } } @@ -1312,16 +1319,6 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, if (sc != &scs) syncache_free(sc); return (1); -failed: - if (sc != NULL) { - TCPSTATES_DEC(TCPS_SYN_RECEIVED); - if (sc != &scs) - syncache_free(sc); - } - if (s != NULL) - free(s, M_TCPLOG); - *lsop = NULL; - return (0); } static struct socket * From nobody Fri Oct 17 06:37:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnw9Q6zc2z6CkTK; Fri, 17 Oct 2025 06:37: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 4cnw9Q6PMTz3ZGB; Fri, 17 Oct 2025 06:37:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760683050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3j4aqomPWgYcPRe5inR6LIN+O2nM88wIfU8ztGJsPsA=; b=KpfIwTzek0nvWvHcAH3ANKjIfgx8QM9dct/F9buDZnPCy/qDMS3UnhjOGBkRwz3G6kVY+a fiVh7Ra0Wcjc5P89/CUGZ6P4etpZdsy7idIWk9IMyueK9aHah6JR8CDPTkTbnveMu4SL8+ da7I4sF/sVwlrij4UZYfjjH6RopHWXc6ZQ6h4aep/QKFoTbIMTfIS1LqmoKHlKnEYfTGOv yAqlWXP8KmRBHu+5DvJS8XlB/MKnxHUZ7Clc0fdRuaNIDPjdwMZLkBd4+aClVkcbqpRhdc tU1Fh99aFmTsokQTb1zlusrgEVoN4IbWPJD21WCHIt9rpeP/OVBmttQv1MgdQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760683050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3j4aqomPWgYcPRe5inR6LIN+O2nM88wIfU8ztGJsPsA=; b=mXJ7DpVbGju5KMR5kI3SJVfIDVOsabuR2gmYwAQ6tu3y0tniVjM6KNevkMbbr5Q5BxY3DC s+o+NY3ciQe8lCJ3DnH9V4Y41mOZEVi+FqSfDhpKf76kL804nNXq3UGYaPJDY7lkPQtXtP Blv2jVT2DgY2k5LTv+mDt/rCDuWPbNziK5Lx7T/bExChpXbalBkDydiXie6Tx4t9k6wnb+ 0iMgxMP/yMEkOv8STDSKx0HtF3Hzl8qSSx6F1i+0SSJX1vhiVhg188xeA3+Tzi3aTGXRxa XDA+Zp6FjUo4hDQwPdBQ9aYFnwnrtnv4ASz4wVh1uAV4fuGFsVZaJlNvFb2e/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760683050; a=rsa-sha256; cv=none; b=fLE/kgwVA6HIPMJcJuGEEC5T3Qfx2Fdszsz9JY48KtVVi0fucZCHNu+F4W6ADN4NvvblAv BjUHoPaQwCrDpZW3yjAvxSpEhRWGaUvNfytnecrsA1vQO5fYtX7X6jb/se/T0SDBcfboHw E7x1PBo+L5tp/2j3sebK2rNgPW4AwtSCt6BxgOSZEvBNHMTzM8cB0/nyBAD1RRkqJIYrgK bn52n8l7N1rbKylXwokxuJ0Qi3Y5uJracYyrNyVKVnkJBZnWGMfe5ge5FgB6Ps4Dv/8hGB I7xjGG1qZ/FiSwwbFwapW3nHZJEeaKF13AYaeBXJ+zmpKT/D5tlrVVizDcw/Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnw9Q5mplzkJ6; Fri, 17 Oct 2025 06:37:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59H6bUgv004395; Fri, 17 Oct 2025 06:37:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H6bUwq004392; Fri, 17 Oct 2025 06:37:30 GMT (envelope-from git) Date: Fri, 17 Oct 2025 06:37:30 GMT Message-Id: <202510170637.59H6bUwq004392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 3b6442370a17 - main - openssl: add a simple smoke test for the legacy provider List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b6442370a17c57c4c290b9a8e1e8328da820705 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=3b6442370a17c57c4c290b9a8e1e8328da820705 commit 3b6442370a17c57c4c290b9a8e1e8328da820705 Author: Enji Cooper AuthorDate: 2025-10-11 20:45:20 +0000 Commit: Enji Cooper CommitDate: 2025-10-17 06:36:15 +0000 openssl: add a simple smoke test for the legacy provider This change adds a simple smoke test for the legacy provider to ensure that the provider doesn't break in the future when performing updates. This is not a functional or system test; the OpenSSL test suite does a much better job at doing this than we can. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53045 --- etc/mtree/BSD.tests.dist | 2 ++ secure/lib/libcrypto/Makefile | 3 +++ secure/lib/libcrypto/tests/Makefile | 5 ++++ secure/lib/libcrypto/tests/libcrypto_test.sh | 40 ++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index e6a013f010de..8a752925d0a5 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -520,6 +520,8 @@ .. secure lib + libcrypto + .. .. libexec .. diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 5cb3f5a7c3fe..738de3479987 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -682,6 +682,9 @@ buildasm cleanasm: ${.TARGET:S/build/all/:S/asm$//} .endfor +HAS_TESTS= yes +SUBDIR.${MK_TESTS}= tests + .include .if ${MACHINE} == "powerpc" diff --git a/secure/lib/libcrypto/tests/Makefile b/secure/lib/libcrypto/tests/Makefile new file mode 100644 index 000000000000..d309a1b1100c --- /dev/null +++ b/secure/lib/libcrypto/tests/Makefile @@ -0,0 +1,5 @@ +PACKAGE= tests + +ATF_TESTS_SH+= libcrypto_test + +.include diff --git a/secure/lib/libcrypto/tests/libcrypto_test.sh b/secure/lib/libcrypto/tests/libcrypto_test.sh new file mode 100755 index 000000000000..83ef1686089d --- /dev/null +++ b/secure/lib/libcrypto/tests/libcrypto_test.sh @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 Enji Cooper + +atf_test_case legacy_provider +legacy_provider_head() { + atf_set "descr" "daemon should drop privileges" +} +legacy_provider_body() { + local passphrase="test" + local plaintext="test" + + export OPENSSL_CONF="$PWD/openssl.conf" + cat > "$OPENSSL_CONF" < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: d271d2ce1524 - main - crypto/openssl: remove autogenerated files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d271d2ce152435b14e309bd8b25f47a0f4a2040f Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d271d2ce152435b14e309bd8b25f47a0f4a2040f commit d271d2ce152435b14e309bd8b25f47a0f4a2040f Author: Enji Cooper AuthorDate: 2025-10-11 16:48:10 +0000 Commit: Enji Cooper CommitDate: 2025-10-17 06:38:33 +0000 crypto/openssl: remove autogenerated files These files contain build host paths and other configuration details that can be regenerated via the standard vendor import process. Don't clutter up the FreeBSD tree with these files. Add the paths to .gitignore to prevent them from accidentally being added in a future update. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53044 --- crypto/.gitignore | 78 + crypto/openssl/configdata.pm | 36871 ----------------------------------------- crypto/openssl/libcrypto.pc | 13 - crypto/openssl/libssl.pc | 11 - crypto/openssl/openssl.pc | 9 - crypto/openssl/util/wrap.pl | 133 - 6 files changed, 78 insertions(+), 37037 deletions(-) diff --git a/crypto/.gitignore b/crypto/.gitignore new file mode 100644 index 000000000000..4c6e1f0fe03f --- /dev/null +++ b/crypto/.gitignore @@ -0,0 +1,78 @@ +# OpenSSL: the following are generated paths that generally should not be committed to FreeBSD. +openssl/apps/tsget.pl +openssl/crypto/buildinf.h +openssl/doc/html +openssl/doc/man +openssl/test/buildtest_*.c +openssl/util/wrap.pl +openssl/**/*.cmake +openssl/**/*.ld +openssl/**/*.s +openssl/*.pc +openssl/Makefile +openssl/Makefile.in +openssl/builddata.pm +openssl/configdata.pm +openssl/installdata.pm +openssl/pod2htmd.tmp + +# .pod files generated from .pod.in files. +# +# List can be easily updated via this command: +# +# % find openssl/doc -name \*.pod.in | sed -e 's,\.in,,g' +openssl/doc/man1/openssl-asn1parse.pod +openssl/doc/man1/openssl-ca.pod +openssl/doc/man1/openssl-ciphers.pod +openssl/doc/man1/openssl-cmds.pod +openssl/doc/man1/openssl-cmp.pod +openssl/doc/man1/openssl-cms.pod +openssl/doc/man1/openssl-crl.pod +openssl/doc/man1/openssl-crl2pkcs7.pod +openssl/doc/man1/openssl-dgst.pod +openssl/doc/man1/openssl-dhparam.pod +openssl/doc/man1/openssl-dsa.pod +openssl/doc/man1/openssl-dsaparam.pod +openssl/doc/man1/openssl-ec.pod +openssl/doc/man1/openssl-ecparam.pod +openssl/doc/man1/openssl-enc.pod +openssl/doc/man1/openssl-engine.pod +openssl/doc/man1/openssl-errstr.pod +openssl/doc/man1/openssl-fipsinstall.pod +openssl/doc/man1/openssl-gendsa.pod +openssl/doc/man1/openssl-genpkey.pod +openssl/doc/man1/openssl-genrsa.pod +openssl/doc/man1/openssl-info.pod +openssl/doc/man1/openssl-kdf.pod +openssl/doc/man1/openssl-list.pod +openssl/doc/man1/openssl-mac.pod +openssl/doc/man1/openssl-nseq.pod +openssl/doc/man1/openssl-ocsp.pod +openssl/doc/man1/openssl-passwd.pod +openssl/doc/man1/openssl-pkcs12.pod +openssl/doc/man1/openssl-pkcs7.pod +openssl/doc/man1/openssl-pkcs8.pod +openssl/doc/man1/openssl-pkey.pod +openssl/doc/man1/openssl-pkeyparam.pod +openssl/doc/man1/openssl-pkeyutl.pod +openssl/doc/man1/openssl-prime.pod +openssl/doc/man1/openssl-rand.pod +openssl/doc/man1/openssl-rehash.pod +openssl/doc/man1/openssl-req.pod +openssl/doc/man1/openssl-rsa.pod +openssl/doc/man1/openssl-rsautl.pod +openssl/doc/man1/openssl-s_client.pod +openssl/doc/man1/openssl-s_server.pod +openssl/doc/man1/openssl-s_time.pod +openssl/doc/man1/openssl-sess_id.pod +openssl/doc/man1/openssl-skeyutl.pod +openssl/doc/man1/openssl-smime.pod +openssl/doc/man1/openssl-speed.pod +openssl/doc/man1/openssl-spkac.pod +openssl/doc/man1/openssl-srp.pod +openssl/doc/man1/openssl-storeutl.pod +openssl/doc/man1/openssl-ts.pod +openssl/doc/man1/openssl-verify.pod +openssl/doc/man1/openssl-version.pod +openssl/doc/man1/openssl-x509.pod +openssl/doc/man7/openssl_user_macros.pod diff --git a/crypto/openssl/configdata.pm b/crypto/openssl/configdata.pm deleted file mode 100755 index 4a2c9307aa86..000000000000 --- a/crypto/openssl/configdata.pm +++ /dev/null @@ -1,36871 +0,0 @@ -#! /usr/bin/env perl -# -*- mode: perl -*- - -package configdata; - -use strict; -use warnings; - -use Exporter; -our @ISA = qw(Exporter); -our @EXPORT = qw( - %config %target %disabled %withargs %unified_info - @disablables @disablables_int -); - -our %config = ( - "AR" => "ar", - "ARFLAGS" => [ - "qc" - ], - "ASFLAGS" => [], - "CC" => "cc", - "CFLAGS" => [ - "-Wall -O3" - ], - "CPPDEFINES" => [], - "CPPFLAGS" => [], - "CPPINCLUDES" => [], - "CXXFLAGS" => [], - "FIPSKEY" => "f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813", - "FIPS_VENDOR" => "OpenSSL non-compliant FIPS Provider", - "HASHBANGPERL" => "/usr/bin/env perl", - "LD" => "ld", - "LDFLAGS" => [], - "LDLIBS" => [], - "OBJCOPY" => "objcopy", - "PERL" => "/usr/local/bin/perl", - "RANLIB" => "ranlib", - "RC" => "windres", - "RCFLAGS" => [], - "afalgeng" => "", - "api" => "30500", - "b32" => "0", - "b64" => "0", - "b64l" => "1", - "bn_ll" => "0", - "build_file" => "Makefile", - "build_file_templates" => [ - "Configurations/common0.tmpl", - "Configurations/unix-Makefile.tmpl" - ], - "build_infos" => [ - "./build.info", - "crypto/build.info", - "ssl/build.info", - "apps/build.info", - "util/build.info", - "tools/build.info", - "fuzz/build.info", - "providers/build.info", - "doc/build.info", - "test/build.info", - "engines/build.info", - "exporters/build.info", - "crypto/objects/build.info", - "crypto/buffer/build.info", - "crypto/bio/build.info", - "crypto/stack/build.info", - "crypto/lhash/build.info", - "crypto/hashtable/build.info", - "crypto/rand/build.info", - "crypto/evp/build.info", - "crypto/asn1/build.info", - "crypto/pem/build.info", - "crypto/x509/build.info", - "crypto/conf/build.info", - "crypto/txt_db/build.info", - "crypto/pkcs7/build.info", - "crypto/pkcs12/build.info", - "crypto/ui/build.info", - "crypto/kdf/build.info", - "crypto/store/build.info", - "crypto/property/build.info", - "crypto/md4/build.info", - "crypto/md5/build.info", - "crypto/sha/build.info", - "crypto/ml_kem/build.info", - "crypto/hmac/build.info", - "crypto/ripemd/build.info", - "crypto/whrlpool/build.info", - "crypto/poly1305/build.info", - "crypto/siphash/build.info", - "crypto/des/build.info", - "crypto/aes/build.info", - "crypto/rc2/build.info", - "crypto/rc4/build.info", - "crypto/bf/build.info", - "crypto/cast/build.info", - "crypto/camellia/build.info", - "crypto/seed/build.info", - "crypto/chacha/build.info", - "crypto/modes/build.info", - "crypto/bn/build.info", - "crypto/ec/build.info", - "crypto/rsa/build.info", - "crypto/dsa/build.info", - "crypto/dh/build.info", - "crypto/dso/build.info", - "crypto/engine/build.info", - "crypto/err/build.info", - "crypto/comp/build.info", - "crypto/http/build.info", - "crypto/ocsp/build.info", - "crypto/cms/build.info", - "crypto/ts/build.info", - "crypto/srp/build.info", - "crypto/cmac/build.info", - "crypto/ct/build.info", - "crypto/async/build.info", - "crypto/ess/build.info", - "crypto/crmf/build.info", - "crypto/cmp/build.info", - "crypto/encode_decode/build.info", - "crypto/ffc/build.info", - "crypto/hpke/build.info", - "crypto/thread/build.info", - "crypto/ml_dsa/build.info", - "crypto/slh_dsa/build.info", - "ssl/record/build.info", - "ssl/rio/build.info", - "ssl/quic/build.info", - "apps/lib/build.info", - "providers/common/build.info", - "providers/implementations/build.info", - "doc/man1/build.info", - "ssl/record/methods/build.info", - "providers/common/der/build.info", - "providers/implementations/digests/build.info", - "providers/implementations/ciphers/build.info", - "providers/implementations/rands/build.info", - "providers/implementations/macs/build.info", - "providers/implementations/kdfs/build.info", - "providers/implementations/exchange/build.info", - "providers/implementations/keymgmt/build.info", - "providers/implementations/signature/build.info", - "providers/implementations/asymciphers/build.info", - "providers/implementations/encode_decode/build.info", - "providers/implementations/storemgmt/build.info", - "providers/implementations/kem/build.info", - "providers/implementations/skeymgmt/build.info", - "providers/implementations/rands/seeding/build.info" - ], - "build_metadata" => "", - "build_type" => "release", - "builddir" => ".", - "cflags" => [ - "-Wa,--noexecstack", - "-Qunused-arguments" - ], - "conf_files" => [ - "Configurations/00-base-templates.conf", - "Configurations/10-main.conf" - ], - "cppflags" => [], - "cxxflags" => [], - "defines" => [ - "NDEBUG" - ], - "dynamic_engines" => "1", - "ex_libs" => [], - "full_version" => "3.5.4", - "includes" => [], - "ktls" => "", - "lflags" => [], - "lib_defines" => [ - "OPENSSL_PIC" - ], - "libdir" => "", - "major" => "3", - "makedep_scheme" => "gcc", - "minor" => "5", - "openssl_api_defines" => [ - "OPENSSL_CONFIGURED_API=30500" - ], - "openssl_feature_defines" => [ - "OPENSSL_RAND_SEED_OS", - "OPENSSL_THREADS", - "OPENSSL_NO_ACVP_TESTS", - "OPENSSL_NO_AFALGENG", - "OPENSSL_NO_ARIA", - "OPENSSL_NO_ASAN", - "OPENSSL_NO_BROTLI", - "OPENSSL_NO_BROTLI_DYNAMIC", - "OPENSSL_NO_CRYPTO_MDEBUG", - "OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE", - "OPENSSL_NO_DEMOS", - "OPENSSL_NO_EGD", - "OPENSSL_NO_EXTERNAL_TESTS", - "OPENSSL_NO_FIPS_JITTER", - "OPENSSL_NO_FIPS_POST", - "OPENSSL_NO_FIPS_SECURITYCHECKS", - "OPENSSL_NO_FUZZ_AFL", - "OPENSSL_NO_FUZZ_LIBFUZZER", - "OPENSSL_NO_H3DEMO", - "OPENSSL_NO_HQINTEROP", - "OPENSSL_NO_IDEA", - "OPENSSL_NO_JITTER", - "OPENSSL_NO_MD2", - "OPENSSL_NO_MDC2", - "OPENSSL_NO_MSAN", - "OPENSSL_NO_PIE", - "OPENSSL_NO_RC5", - "OPENSSL_NO_SM2", - "OPENSSL_NO_SM3", - "OPENSSL_NO_SM4", - "OPENSSL_NO_SSL3", - "OPENSSL_NO_SSL3_METHOD", - "OPENSSL_NO_SSLKEYLOG", - "OPENSSL_NO_TFO", - "OPENSSL_NO_TRACE", - "OPENSSL_NO_UBSAN", - "OPENSSL_NO_UNIT_TEST", - "OPENSSL_NO_UPLINK", - "OPENSSL_NO_WEAK_SSL_CIPHERS", - "OPENSSL_NO_WINSTORE", - "OPENSSL_NO_ZLIB", - "OPENSSL_NO_ZLIB_DYNAMIC", - "OPENSSL_NO_ZSTD", - "OPENSSL_NO_ZSTD_DYNAMIC", - "OPENSSL_NO_STATIC_ENGINE" - ], - "openssl_sys_defines" => [], - "openssldir" => "etc", - "options" => "enable-ec_nistp_64_gcc_128 enable-ktls enable-sctp --openssldir=etc --prefix=/usr no-acvp-tests no-afalgeng no-aria no-asan no-brotli no-brotli-dynamic no-buildtest-c++ no-crypto-mdebug no-crypto-mdebug-backtrace no-demos no-egd no-external-tests no-fips no-fips-jitter no-fips-post no-fips-securitychecks no-fuzz-afl no-fuzz-libfuzzer no-h3demo no-hqinterop no-idea no-jitter no-md2 no-mdc2 no-msan no-pie no-rc5 no-sm2 no-sm3 no-sm4 no-ssl3 no-ssl3-method no-sslkeylog no-tfo no-trace no-ubsan no-unit-test no-uplink no-weak-ssl-ciphers no-winstore no-zlib no-zlib-dynamic no-zstd no-zstd-dynamic", - "patch" => "4", - "perl_archname" => "amd64-freebsd-thread-multi", - "perl_cmd" => "/usr/local/bin/perl", - "perl_version" => "5.40.3", - "perlargv" => [ - "disable-aria", - "disable-egd", - "disable-idea", - "disable-mdc2", - "disable-sm2", - "disable-sm3", - "disable-sm4", - "enable-ec_nistp_64_gcc_128", - "enable-ktls", - "enable-sctp", - "--openssldir=etc", - "--prefix=/usr" - ], - "perlenv" => { - "AR" => undef, - "ARFLAGS" => undef, - "AS" => undef, - "ASFLAGS" => undef, - "BUILDFILE" => undef, - "CC" => "cc", - "CFLAGS" => undef, - "CPP" => undef, - "CPPDEFINES" => undef, - "CPPFLAGS" => undef, - "CPPINCLUDES" => undef, - "CROSS_COMPILE" => undef, - "CXX" => undef, - "CXXFLAGS" => undef, - "HASHBANGPERL" => undef, - "LD" => "ld", - "LDFLAGS" => undef, - "LDLIBS" => undef, - "MT" => undef, - "MTFLAGS" => undef, - "OBJCOPY" => undef, - "OPENSSL_LOCAL_CONFIG_DIR" => undef, - "PERL" => undef, - "RANLIB" => undef, - "RC" => undef, - "RCFLAGS" => undef, - "RM" => undef, - "WINDRES" => undef, - "__CNF_CFLAGS" => undef, - "__CNF_CPPDEFINES" => undef, - "__CNF_CPPFLAGS" => undef, - "__CNF_CPPINCLUDES" => undef, - "__CNF_CXXFLAGS" => undef, - "__CNF_LDFLAGS" => undef, - "__CNF_LDLIBS" => undef - }, - "prefix" => "/usr", - "prerelease" => "", - "processor" => "", - "rc4_int" => "unsigned int", - "release_date" => "30 Sep 2025", - "shlib_version" => "3", - "sourcedir" => ".", - "target" => "BSD-x86_64", - "version" => "3.5.4" -); -our %target = ( - "AR" => "ar", - "ARFLAGS" => "qc", - "CC" => "cc", - "CFLAGS" => "-Wall -O3", - "HASHBANGPERL" => "/usr/bin/env perl", - "OBJCOPY" => "objcopy", - "RANLIB" => "ranlib", - "RC" => "windres", - "_conf_fname_int" => [ - "Configurations/00-base-templates.conf", - "Configurations/00-base-templates.conf", - "Configurations/10-main.conf", - "Configurations/10-main.conf", - "Configurations/10-main.conf", - "Configurations/shared-info.pl" - ], - "asm_arch" => "x86_64", - "bin_cflags" => "", - "bin_lflags" => "", - "bn_ops" => "SIXTY_FOUR_BIT_LONG", - "build_file" => "Makefile", - "build_scheme" => [ - "unified", - "unix" - ], - "cflags" => "-pthread", - "cppflags" => "-D_THREAD_SAFE -D_REENTRANT", - "defines" => [ - "OPENSSL_BUILDING_OPENSSL" - ], - "disable" => [], - "dso_ldflags" => "-Wl,-z,defs", - "dso_scheme" => "dlfcn", - "enable" => [ - "devcryptoeng" - ], - "ex_libs" => "-pthread", - "includes" => [], - "lflags" => "", - "lib_cflags" => "", - "lib_cppflags" => "-DL_ENDIAN", - "lib_defines" => [], - "module_cflags" => "-fPIC", - "module_cxxflags" => undef, - "module_ldflags" => "-shared -Wl,-Bsymbolic", - "perl_platform" => "Unix", - "perlasm_scheme" => "elf", - "shared_cflag" => "-fPIC", - "shared_defflag" => "-Wl,--version-script=", - "shared_defines" => [], - "shared_ldflag" => "-shared -Wl,-Bsymbolic", - "shared_rcflag" => "", - "shared_sonameflag" => "-Wl,-soname=", - "shared_target" => "bsd-gcc-shared", - "template" => "1", - "thread_defines" => [], - "thread_scheme" => "pthreads", - "unistd" => "" -); -our @disablables = ( - "acvp-tests", - "afalgeng", - "apps", - "argon2", - "aria", - "asan", - "asm", - "async", - "atexit", - "autoalginit", - "autoerrinit", - "autoload-config", - "bf", - "blake2", - "brotli", - "brotli-dynamic", - "buildtest-c++", - "bulk", - "cached-fetch", - "camellia", - "capieng", - "winstore", - "cast", - "chacha", - "cmac", - "cmp", - "cms", - "comp", - "crypto-mdebug", - "ct", - "default-thread-pool", - "demos", - "h3demo", - "hqinterop", - "deprecated", - "des", - "devcryptoeng", - "dgram", - "dh", - "docs", - "dsa", - "dso", - "dtls", - "dynamic-engine", - "ec", - "ec2m", - "ec_nistp_64_gcc_128", - "ecdh", - "ecdsa", - "ecx", - "egd", - "engine", - "err", - "external-tests", - "filenames", - "fips", - "fips-securitychecks", - "fips-post", - "fips-jitter", - "fuzz-afl", - "fuzz-libfuzzer", - "gost", - "http", - "idea", - "integrity-only-ciphers", - "jitter", - "ktls", - "legacy", - "loadereng", - "makedepend", - "md2", - "md4", - "mdc2", - "ml-dsa", - "ml-kem", - "module", - "msan", - "multiblock", - "nextprotoneg", - "ocb", - "ocsp", - "padlockeng", - "pic", - "pie", - "pinshared", - "poly1305", - "posix-io", - "psk", - "quic", - "unstable-qlog", - "rc2", - "rc4", - "rc5", - "rdrand", - "rfc3779", - "rmd160", - "scrypt", - "sctp", - "secure-memory", - "seed", - "shared", - "siphash", - "siv", - "slh-dsa", - "sm2", - "sm2-precomp", - "sm3", - "sm4", - "sock", - "srp", - "srtp", - "sse2", - "ssl", - "ssl-trace", - "static-engine", - "stdio", - "sslkeylog", - "tests", - "tfo", - "thread-pool", - "threads", - "tls", - "tls-deprecated-ec", - "trace", - "ts", - "ubsan", - "ui-console", - "unit-test", - "uplink", - "weak-ssl-ciphers", - "whirlpool", - "zlib", - "zlib-dynamic", - "zstd", - "zstd-dynamic", - "ssl3", - "ssl3-method", - "tls1", - "tls1-method", - "tls1_1", - "tls1_1-method", - "tls1_2", - "tls1_2-method", - "tls1_3", - "dtls1", - "dtls1-method", - "dtls1_2", - "dtls1_2-method" -); -our @disablables_int = ( - "crmf" -); -our %disabled = ( - "acvp-tests" => "cascade", - "afalgeng" => "not-linux", - "aria" => "option", - "asan" => "default", - "brotli" => "default", - "brotli-dynamic" => "default", - "buildtest-c++" => "default", - "crypto-mdebug" => "default", - "crypto-mdebug-backtrace" => "default", - "demos" => "default", - "egd" => "option", - "external-tests" => "default", - "fips" => "default", - "fips-jitter" => "default", - "fips-post" => "cascade", - "fips-securitychecks" => "cascade", - "fuzz-afl" => "default", - "fuzz-libfuzzer" => "default", - "h3demo" => "default", - "hqinterop" => "default", - "idea" => "option", - "jitter" => "default", - "md2" => "default", - "mdc2" => "option", - "msan" => "default", - "pie" => "default", - "rc5" => "default", - "sm2" => "option", - "sm3" => "option", - "sm4" => "option", - "ssl3" => "default", - "ssl3-method" => "default", - "sslkeylog" => "default", - "tfo" => "default", - "trace" => "default", - "ubsan" => "default", - "unit-test" => "default", - "uplink" => "no uplink_arch", - "weak-ssl-ciphers" => "default", - "winstore" => "not-windows", - "zlib" => "default", - "zlib-dynamic" => "default", - "zstd" => "default", - "zstd-dynamic" => "default" -); -our %withargs = (); -our %unified_info = ( - "attributes" => { - "depends" => { - "doc/man1/openssl-asn1parse.pod" => { - "doc/man1/openssl-asn1parse.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-ca.pod" => { - "doc/man1/openssl-ca.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-ciphers.pod" => { - "doc/man1/openssl-ciphers.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-cmds.pod" => { - "doc/man1/openssl-cmds.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-cmp.pod" => { - "doc/man1/openssl-cmp.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-cms.pod" => { - "doc/man1/openssl-cms.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-crl.pod" => { - "doc/man1/openssl-crl.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-crl2pkcs7.pod" => { - "doc/man1/openssl-crl2pkcs7.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-dgst.pod" => { - "doc/man1/openssl-dgst.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-dhparam.pod" => { - "doc/man1/openssl-dhparam.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-dsa.pod" => { - "doc/man1/openssl-dsa.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-dsaparam.pod" => { - "doc/man1/openssl-dsaparam.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-ec.pod" => { - "doc/man1/openssl-ec.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-ecparam.pod" => { - "doc/man1/openssl-ecparam.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-enc.pod" => { - "doc/man1/openssl-enc.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-engine.pod" => { - "doc/man1/openssl-engine.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-errstr.pod" => { - "doc/man1/openssl-errstr.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-fipsinstall.pod" => { - "doc/man1/openssl-fipsinstall.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-gendsa.pod" => { - "doc/man1/openssl-gendsa.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-genpkey.pod" => { - "doc/man1/openssl-genpkey.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-genrsa.pod" => { - "doc/man1/openssl-genrsa.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-info.pod" => { - "doc/man1/openssl-info.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-kdf.pod" => { - "doc/man1/openssl-kdf.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-list.pod" => { - "doc/man1/openssl-list.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-mac.pod" => { - "doc/man1/openssl-mac.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-nseq.pod" => { - "doc/man1/openssl-nseq.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-ocsp.pod" => { - "doc/man1/openssl-ocsp.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-passwd.pod" => { - "doc/man1/openssl-passwd.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-pkcs12.pod" => { - "doc/man1/openssl-pkcs12.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-pkcs7.pod" => { - "doc/man1/openssl-pkcs7.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-pkcs8.pod" => { - "doc/man1/openssl-pkcs8.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-pkey.pod" => { - "doc/man1/openssl-pkey.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-pkeyparam.pod" => { - "doc/man1/openssl-pkeyparam.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-pkeyutl.pod" => { - "doc/man1/openssl-pkeyutl.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-prime.pod" => { - "doc/man1/openssl-prime.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-rand.pod" => { - "doc/man1/openssl-rand.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-rehash.pod" => { - "doc/man1/openssl-rehash.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-req.pod" => { - "doc/man1/openssl-req.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-rsa.pod" => { - "doc/man1/openssl-rsa.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-rsautl.pod" => { - "doc/man1/openssl-rsautl.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-s_client.pod" => { - "doc/man1/openssl-s_client.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-s_server.pod" => { - "doc/man1/openssl-s_server.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-s_time.pod" => { - "doc/man1/openssl-s_time.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-sess_id.pod" => { - "doc/man1/openssl-sess_id.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-skeyutl.pod" => { - "doc/man1/openssl-skeyutl.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-smime.pod" => { - "doc/man1/openssl-smime.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-speed.pod" => { - "doc/man1/openssl-speed.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-spkac.pod" => { - "doc/man1/openssl-spkac.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-srp.pod" => { - "doc/man1/openssl-srp.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-storeutl.pod" => { - "doc/man1/openssl-storeutl.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-ts.pod" => { - "doc/man1/openssl-ts.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-verify.pod" => { - "doc/man1/openssl-verify.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-version.pod" => { - "doc/man1/openssl-version.pod.in" => { - "pod" => "1" - } - }, - "doc/man1/openssl-x509.pod" => { - "doc/man1/openssl-x509.pod.in" => { - "pod" => "1" - } - }, - "doc/man7/openssl_user_macros.pod" => { - "doc/man7/openssl_user_macros.pod.in" => { - "pod" => "1" - } - }, - "providers/libcommon.a" => { - "libcrypto" => { - "weak" => "1" - } - } - }, - "generate" => { - "exporters/OpenSSLConfig.cmake" => { - "exporter" => "cmake" - }, - "exporters/OpenSSLConfigVersion.cmake" => { - "exporter" => "cmake" - }, - "exporters/libcrypto.pc" => { - "exporter" => "pkg-config" - }, - "exporters/libssl.pc" => { - "exporter" => "pkg-config" - }, - "exporters/openssl.pc" => { - "exporter" => "pkg-config" - }, - "include/openssl/configuration.h" => { - "skip" => "1" - } - }, - "libraries" => { - "apps/libapps.a" => { - "noinst" => "1" *** 36195 LINES SKIPPED *** From nobody Fri Oct 17 06:46:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnwMX2zvjz6ClLH; Fri, 17 Oct 2025 06:46: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 4cnwMX2F4Gz3bs9; Fri, 17 Oct 2025 06:46:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760683576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x+4+w6bWxWJ1OSvGcHREkhYRa5HqawCIX+fwgWqrVRI=; b=QBFjf8GhaLrWR28tg2f2dC7yY9GDoA5PyhfKcGAnBDDX7gEaxAlyQn19u4XAxJRJDDZNOG 2RNlYNZcDuCx6hHbfryaps4TWXlhgQSeHBBNJkAgYPAKUSsPdN8A8xA+eGmVP+tYATc5Hx /5A8hfVQ0hB7xIUsBMLlom5l1RvzaYOxgRPwjym2sCQGIFFzpJOJGhbrGEWlFSwQGzT96S IPGZIY+sO9+/skJLCJD+/XcWCSLlvLk0FdQ+a0YtHwFwpY3+5Ti72kD/7aZ2Uje9jKgTdj VvwA/JXd8Ja6xUcbw1uMBGOTCApg4DgpVJfm5TAs6xV+z1jtusUhs7LFHRVMGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760683576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x+4+w6bWxWJ1OSvGcHREkhYRa5HqawCIX+fwgWqrVRI=; b=NiSczLmj5IGa5OVv1uExNLZx491HLGCHUyq/VM/ZJ456I1/+bcATXHGC4Nl0Sf1rMyj53/ X5uTjo+Ewkx6VCd1+w23GvpL+8Y6UfuF197woQYDa/iEL+ksdaU6LBuIN19fVrB3HJpsoy YqJQw5hLvfm+8HFwNhpFmK2fpqrmNbTyJkZ40C0HVIRkzzXrL+lxrhpVdkfsWeoprQyB0p Bi78FYg9+sEzqyTGBQxvelvOFZhF30TBwff8IOfQV7aJ/SKOELna9bkMhHPGitmuNdHijJ WEU2ZpndlOD6Tcc9tGlobEdMKWqu/0pc1eWvlzXcFc6ykJyoDctlzZhd7GkVOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760683576; a=rsa-sha256; cv=none; b=lm29PsD/Z+YVouUQVU4hKjMfBdQKH7W53nagVQbx/1FMukrns0vVR/CLbZDTniQeJn4H/Y SioZIHe9R3Y9wDBTatooVqXJhMQ+IwptvYfnq8MuD9guqw3D+xB8jw0Vigopoz4fTVvf/m yJYgXQOJsZl1BaQmEvtMBjfzu7a/3EMYPVBXSU2AH0KkLnhbU/o6H82/8ckfV8NWkCr98R SAHd5XHWXZ0JKCznOEJ4QGy+wuOGugSWeeCJL3PWRShq0/4jtzXcrQ+y0BO03jTwIpmTwn cKjKDJUBDpYYA5XV/f+tRlUoDMZcumKfr2jHC1AKqY3XIONayDDb73Bq08/csg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnwMX1rQZzkZr; Fri, 17 Oct 2025 06:46:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59H6kGCc022965; Fri, 17 Oct 2025 06:46:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H6kG0S022962; Fri, 17 Oct 2025 06:46:16 GMT (envelope-from git) Date: Fri, 17 Oct 2025 06:46:16 GMT Message-Id: <202510170646.59H6kG0S022962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 97388e7215e0 - main - OpenSSL: install .pc files from the exporters subdir List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97388e7215e080f2cb9fd446f4be4e46a9aeb114 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=97388e7215e080f2cb9fd446f4be4e46a9aeb114 commit 97388e7215e080f2cb9fd446f4be4e46a9aeb114 Author: Enji Cooper AuthorDate: 2025-10-11 20:47:20 +0000 Commit: Enji Cooper CommitDate: 2025-10-17 06:42:13 +0000 OpenSSL: install .pc files from the exporters subdir The .pc files generated in the root directory are used as part of the build; they should never be installed. Use the versions from the exporters subdirectory--which should be installed--as the .pc files which are distributed with FreeBSD. This avoids the need for "fixing up" these files after the fact (see `crypto/openssl/BSDmakefile` for more details as part of this change). Garbage collect `secure/lib/libcrypto/Makefile.version`, et al, as they're orphaned files. They were technically unused prior to this change as the vendor process properly embeds the version numbers in various files, but this commit formalizes the removal. This correction/clarification on the .pc files will be made in an upcoming release of OpenSSL [1]. References: 1. https://github.com/openssl/openssl/issues/28803 Suggested by: Richard Levitte (OpenSSL project) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53043 --- crypto/openssl/BSDmakefile | 20 -------------------- .../openssl/freebsd/dump_version_from_configdata.pl | 21 --------------------- secure/lib/libcrypto/Makefile.inc | 12 +++--------- secure/lib/libcrypto/Makefile.version | 2 -- 4 files changed, 3 insertions(+), 52 deletions(-) diff --git a/crypto/openssl/BSDmakefile b/crypto/openssl/BSDmakefile index d260808ffac3..a45dc2b532f3 100644 --- a/crypto/openssl/BSDmakefile +++ b/crypto/openssl/BSDmakefile @@ -48,32 +48,12 @@ configure: enable-sctp \ --openssldir=etc \ --prefix=/usr) - @echo "Building configdata.pm for later use." - @(cd ${.CURDIR} && \ - ${SETENVI} ${WRK_ENV} ${GMAKE} -j ${.MAKE.JOBS} configdata.pm) - - @echo "Populating Makefile.version with release information" - @(cd ${LCRYPTO_SRC} && ${SETENVI} ${WRK_ENV} ${PERL} \ - ${LCRYPTO_SRC}/freebsd/dump_version_from_configdata.pl > \ - ${SRCTOP}/secure/lib/libcrypto/Makefile.version) all: patch @echo "==> Building generated files (headers, manpages, etc)" @(cd ${.CURDIR} && \ ${SETENVI} ${WRK_ENV} ${GMAKE} -j ${.MAKE.JOBS} build_all_generated) - # 1. Fix --prefix. - # a. Not sure why --prefix isn't honored properly, even though it's - # passed to Configure; the files might be getting rebuilt - # post-Configure, somehow. - # 2. Remove duplicate path in CFLAGS. - # 3. Remove duplicate path in includedir(s). - @echo "==> Fixing pkgconfig files" - @find . -name \*.pc -print -exec sed -i '' -E \ - -e 's,^prefix=.+,prefix=/usr,' \ - -e 's,[[:space:]]+(\-I)?\$\{prefix\}/\./include[[:space:]]*,,g' \ - {} + - @echo "==> Cleaning / rebuilding ASM" @(cd ${SRCTOP}/secure/lib/libcrypto && \ ${SETENVI} ${WRK_ENV} ${MAKE} cleanasm && \ diff --git a/crypto/openssl/freebsd/dump_version_from_configdata.pl b/crypto/openssl/freebsd/dump_version_from_configdata.pl deleted file mode 100644 index b6137718ba54..000000000000 --- a/crypto/openssl/freebsd/dump_version_from_configdata.pl +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env perl -# -# This dumps out the values needed to generate manpages and other artifacts -# which include the release version/date. -# -# See also: `secure/lib/libcrypto/Makefile.version`. - -use Cwd qw(realpath); -use File::Basename qw(dirname); -use Time::Piece; - -use lib dirname(dirname(realpath($0))); - -use configdata qw(%config); - -$OPENSSL_DATE = Time::Piece->strptime($config{"release_date"}, "%d %b %Y")->strftime("%Y-%m-%d"); - -$OPENSSL_VER = "$config{'major'}.$config{'minor'}.$config{'patch'}"; - -print("OPENSSL_VER=\t${OPENSSL_VER}\n"); -print("OPENSSL_DATE=\t${OPENSSL_DATE}\n"); diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 4d5e9c68a1fe..5b281166df61 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -3,9 +3,6 @@ PACKAGE= openssl LIB_PACKAGE= -# OpenSSL version used for manual page generation -.include "Makefile.version" - LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc @@ -15,10 +12,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/fips/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include -.include "Makefile.common" +.SUFFIXES: .pc +.PATH.pc: ${LCRYPTO_SRC}/exporters -.for pcfile in ${PCFILES} -${pcfile}: ${pcfile}.in - sed -e 's,@openssl_ver@,${OPENSSL_VER},g' ${.ALLSRC} > ${.TARGET} -.endfor -CLEANFILES+= ${PCFILES} +.include "Makefile.common" diff --git a/secure/lib/libcrypto/Makefile.version b/secure/lib/libcrypto/Makefile.version deleted file mode 100644 index 81636b8adfe8..000000000000 --- a/secure/lib/libcrypto/Makefile.version +++ /dev/null @@ -1,2 +0,0 @@ -OPENSSL_VER= 3.5.4 -OPENSSL_DATE= 2025-09-30 From nobody Fri Oct 17 06:50:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnwSz08M0z6ClRp; Fri, 17 Oct 2025 06:50: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 4cnwSy6Y12z3cfH; Fri, 17 Oct 2025 06:50:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760683859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1m/sJ7BlrV4/sAyCVQpVjBvOiEB8/1cJMkJ9EEGjacw=; b=dCxpqszGY7Agl8EkIZ8lp+inx5S88W9Pht7f73JDIucxUlbddM0JzDfRfNX6p45ct5X9dc wyUAZ1lUUxoogy8VFixn2ebwO5T//CRwWMcVMemoqXpV7fBW7vY39w9HcqEbRbm7UKUyZ4 Cs5phdQ1XruqGtYVqIok//O2yBYtrzshJ8SfrZwIV9xO1R1gZ3M8DfVZ0PEE3Z/WhvxD1c ld0GCEW24J852QQJa9VlwQiTsncA85KwwTs58AM90C0CvWQ2ralJIr/fQEUtSSIx7kD1+j WWr5JaFfLHUuZ6PrQI5boe+/MCrHG9bhZ9snQXG0AbKk1NrRgp+KG+VSo6TMPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760683859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1m/sJ7BlrV4/sAyCVQpVjBvOiEB8/1cJMkJ9EEGjacw=; b=PZBGTWL94BGlgPfpD+YMY/34BkHbJ4Jeg7InB9Fg2lJEozcJozEVrA3zJc3DNtex6hs+2Q LO9wsJ/vRQGLXYWJ87TbtY4JEUqRaFZyevAjPCSq1DGZoSTm28Ks1BB8GybVgGNW9i9ONq qPCcD+GLkzLEB3aKwXvlqLqeBaGw4gsWfIOLtSfX2FJr+pONuC/U5ccj1PtlbvNlY6O5cm j24vLaswndzNPuTqh5Bs66/X51hT5T9GoAF+YurxmWU5GSe/e6gviSPD8M2LuYPakxg8kA 7VkdSXgIlK7l6dbmXbkWJaGYQ4g78DJUhGDluG5xeZFVotTkC5uAGhMOUg9MGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760683859; a=rsa-sha256; cv=none; b=J79ktaJz8vT31578fvN5vx4JkrMP/n40/RhfP46sCvE/DdFFaZtvgfzAJnRYQGl4mKDUAX uyVG40v5PhGN5LeDg+NLkQX92dlEfvmg3lrCbdddPmHjMlACaDw64qSoWXOfXgd8G8jq85 /rpBW7IUL668EkiYzLk8nrUyXb/0i1/NeCrZtDDfs2i1VtIu+LcyyyezPIN/Tjzkj4Q2Js GBjydjo5xaPFdz/AyCJB+emclcNeV6U/2g7VHRoqPeLBP0HHGstnnPf0Bd9ABUI1CvZ9uF /ciLmzdiC/zh/zlBSBpk7EDz3Nz63Rf2eixjkR+JczG5F6y/FsgEIKfunsK3ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnwSy5yMmzkpR; Fri, 17 Oct 2025 06:50:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59H6owg8035092; Fri, 17 Oct 2025 06:50:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H6owhB035089; Fri, 17 Oct 2025 06:50:58 GMT (envelope-from git) Date: Fri, 17 Oct 2025 06:50:58 GMT Message-Id: <202510170650.59H6owhB035089@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: c2fa94ad0868 - main - stand/i386: quiet gcc -Warray-bounds List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2fa94ad0868378c420237d842308156d9133519 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=c2fa94ad0868378c420237d842308156d9133519 commit c2fa94ad0868378c420237d842308156d9133519 Author: Ryan Libby AuthorDate: 2025-10-17 06:49:22 +0000 Commit: Ryan Libby CommitDate: 2025-10-17 06:49:22 +0000 stand/i386: quiet gcc -Warray-bounds GCC has started to warn about memory accesses under address 0x1000. Tweak it to 0x400 for stand/i386 to avoid warnings for access to BIOS data area memory and above but still retain most of the warning value. Reviewed by: dab, imp Differential Revision: https://reviews.freebsd.org/D53036 --- stand/i386/boot2/Makefile | 3 ++- stand/i386/gptboot/Makefile | 3 ++- stand/i386/gptzfsboot/Makefile | 3 ++- stand/i386/isoboot/Makefile | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/stand/i386/boot2/Makefile b/stand/i386/boot2/Makefile index 313bb8030f3e..94dbd7af29d6 100644 --- a/stand/i386/boot2/Makefile +++ b/stand/i386/boot2/Makefile @@ -33,7 +33,8 @@ CFLAGS+=-fomit-frame-pointer \ CFLAGS.gcc+= -Os \ -fno-asynchronous-unwind-tables \ - --param max-inline-insns-single=100 + --param max-inline-insns-single=100 \ + --param min-pagesize=1024 CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL} diff --git a/stand/i386/gptboot/Makefile b/stand/i386/gptboot/Makefile index a829be6c745d..366d82497819 100644 --- a/stand/i386/gptboot/Makefile +++ b/stand/i386/gptboot/Makefile @@ -34,7 +34,8 @@ CFLAGS+=-DBOOTPROG=\"gptboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Wno-pointer-sign -CFLAGS.gcc+= --param max-inline-insns-single=100 +CFLAGS.gcc+= --param max-inline-insns-single=100 \ + --param min-pagesize=1024 LD_FLAGS+=${LD_FLAGS_BIN} diff --git a/stand/i386/gptzfsboot/Makefile b/stand/i386/gptzfsboot/Makefile index 0b67ff8cdaf4..ebdd4958c5f2 100644 --- a/stand/i386/gptzfsboot/Makefile +++ b/stand/i386/gptzfsboot/Makefile @@ -46,7 +46,8 @@ CFLAGS.clang+= -Wno-tentative-definition-incomplete-type NO_WCAST_ALIGN= -CFLAGS.gcc+= --param max-inline-insns-single=100 +CFLAGS.gcc+= --param max-inline-insns-single=100 \ + --param min-pagesize=1024 LD_FLAGS+=${LD_FLAGS_BIN} diff --git a/stand/i386/isoboot/Makefile b/stand/i386/isoboot/Makefile index 0049e7fd3e0a..bf22e0f21d59 100644 --- a/stand/i386/isoboot/Makefile +++ b/stand/i386/isoboot/Makefile @@ -29,7 +29,8 @@ CFLAGS+=-DBOOTPROG=\"isoboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Wno-pointer-sign -CFLAGS.gcc+= --param max-inline-insns-single=100 +CFLAGS.gcc+= --param max-inline-insns-single=100 \ + --param min-pagesize=1024 CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL} LD_FLAGS+=${LD_FLAGS_BIN} From nobody Fri Oct 17 07:38:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnxWz1Kpfz6Cpcb for ; Fri, 17 Oct 2025 07:38:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) (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 4cnxWy6bNpz3jll for ; Fri, 17 Oct 2025 07:38:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-26a0a694ea8so12368365ad.3 for ; Fri, 17 Oct 2025 00:38:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760686713; x=1761291513; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qhHgTocTP3MFWBmYA8XIGDyUKfO5iG4DtCFi9KzGL7k=; b=hDEEWXmQ0oqyUO8WabCbW7v1lgsOGmGsd5yrTjWf5l+iwGs1ap4QewpwsbQipapjOI 4woTk+9FoGgNYfj3wV96bnZaRdjiKkWEzQ5wwNgz/ufv0nNSrSPOUL3HkR7/b6MuoXIi irYAmxmIVkHY6nKO4vg0FbgIUsZesXX46vccbnNcNAjUS8IxgqymmWQpu2pikxgaVNS2 qgXNoK2x+RwitdfSkRJtYxCHhyRRpunT6iFCVmosxihbRPpUdKOA5Sq6cZpZzUfVw/6+ YQ6Z8gDQS2ca/HtKHLPiKXJ62suxBBMjvPTS4Mp6S8NXcgWlNZF7AUSfrYFXzNgOc4zY TiTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760686713; x=1761291513; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qhHgTocTP3MFWBmYA8XIGDyUKfO5iG4DtCFi9KzGL7k=; b=Kse2PmRfnwKI5WLjS640MgLJsEOzNY2lG5Y/qb9iJ90gqYr8gllPz1UNLvhMGHNetw EQnmGTYwKS5lvmdJJ7vfa09Tt6BRZWtmYQzfryvMYcRlJhoSuaOBPPFu3/KpX9COuwW1 V5Kz6U3fjTlm4b1r79qi0EkVwtcDLRdBN2WMWUYn19H3U2PqEPBAE+bPrkL16hgkm46i 3GKYDjzW2vCtnQqxFuKlHtZk64M3ECVuOlIq8phjyA4wh5PL2GgyOoWeboU/Wj7wknU3 VO6bqdluVs8MXMwWNfpxsbdcH/Ib7f20khbBaQuDc4yi2eh92Yhv7R9m7J6QvINnlHwT cAdg== X-Forwarded-Encrypted: i=1; AJvYcCXstU1V7zFV1l3fmn8z1im39Pgri7YZQwf7CYrV6tSMVYGlGi1hkUone8dIDGALRV63C7m/obgDPhQH2JMalHSSS2FK5w==@freebsd.org X-Gm-Message-State: AOJu0Yy2gVn2GiNXf7KMsz896jyVaS2tFY/26st/JRU6ax3aO/qAsjRC dub5pTedpAcBRvu9RLxuHNTrruC0GRyHfgLZbxfXb7PRX1Wjl1od9n0j X-Gm-Gg: ASbGnctGtxL70Uyq/ECGEA+nSxjwBpASDaYaOeE2CBJ9oqEk3VjPmW+KzCy7P36hK1F YWM3vd3cF5Ii9Wdr8/6Zv7SccmssrnqVxJbX0wKZEH5YV6KsOBMsJIyzkoQBQeSc17+tRQHaSD5 mA+oa63/d+lhJx/8HsAy9ijOIXt+NxFpYX0CezR+X6efAX6Hl1VCuoZa9C9z7GEx8vFiHvwHolB gtrEPdqB/9tNZVZnQsGDTuy39fE7rxLSnqxNn2/E7Ipaz072E5IGU/KRm7SqkbLIsnOVvmf4qHP n35Tyy3WZFhs5wMLe9yyO8bo4EOC5Z3Vk/YfcRlUqaJ/VDCXw1WX/PwqcKsWEgJpUH2ucmIvb1F qQbpKvoS4rugzBYiM4z6ofcW+PU5hrUExXnOrsjJz2Zz+8lz3Nhkxs1qAdJUCAtGnWgHZj3qRBN f53N+nAMW3qm1mf+MwR/Ny90967yydu3s= X-Google-Smtp-Source: AGHT+IE8bvHu4jYGJ6YMe7ZGQbcThX3jhYlqkxQZ1IjbnRKhVFfZaI3KiaHSQ4MXwKnC4Mg+N4TdSg== X-Received: by 2002:a17:902:f542:b0:24c:b2a4:7089 with SMTP id d9443c01a7336-290ca121a5amr34547535ad.31.1760686712626; Fri, 17 Oct 2025 00:38:32 -0700 (PDT) Received: from smtpclient.apple ([185.219.141.221]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2909934a052sm54667395ad.36.2025.10.17.00.38.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Oct 2025 00:38:31 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_793319AF-3625-4CB7-987D-C49A7E0E8610"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 0050289464fa - main - style(9): white space after ; and around binary operators From: "Enji Cooper (yaneurabeya)" In-Reply-To: <16835444882475995d82a23078996276@Leidinger.net> Date: Fri, 17 Oct 2025 00:38:20 -0700 Cc: Rick Macklem , "David E. O'Brien" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-Id: References: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> <16835444882475995d82a23078996276@Leidinger.net> To: Alexander Leidinger X-Mailer: Apple Mail (2.3826.700.81) 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]; TAGGED_RCPT(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cnxWy6bNpz3jll --Apple-Mail=_793319AF-3625-4CB7-987D-C49A7E0E8610 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 16, 2025, at 10:29=E2=80=AFPM, Alexander Leidinger = wrote: >=20 > Am 2025-10-17 01:29, schrieb Rick Macklem: >> On Thu, Oct 16, 2025 at 4:21=E2=80=AFPM Rick Macklem = wrote: >>> Please be aware of the following snippets from "man 9 style": >>> In general code can be considered "new code" when it makes up about = 50% >>> or more of the file(s) involved. This is enough to break precedents = in >>> the existing code and use the current style guidelines. >>> Stylistic changes (including whitespace changes) are hard on the = source >>> repository and are to be avoided without good reason. >>> rick >> Just to be clear, I am not asking that this commit be reverted. >> I am just suggesting that you be aware that style(9) changes to >> extant code is not, in general, encouraged, afaik unless you are >> re-writing a large portion of the code (over 50%). >=20 > Does someone remember why? We have now the possibility to exclude = commits from the VCS attribution of lines to commits (git blame), as = such, does the reason of not doing it still hold? Hi Alexander, I=E2=80=99m not sure about the percentage Rick mentioned, but I = think Mark=E2=80=99s comment about avoiding merge conflicts is a key = point (for FreeBSD as well as downstream consumers of FreeBSD. Unnecessary churn can also make reconciling changes with other = sources, e.g., NetBSD, OpenBSD, more difficult for little to no gain. Cheers, -Enji PS Has anyone tried running `clang-format -i` on these files to see how = in compliance they are with style(9) *ducks to avoid flying fruit*?= --Apple-Mail=_793319AF-3625-4CB7-987D-C49A7E0E8610 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmjx8mwACgkQGpE5DjPs NJgPNxAAiHOrHvdLe3+SPeNz2kwegiCsJAc8upxKEtXjdfxiTVePizzd1o7ofcjU dQTXGU7T+r5W2PsdWz6NZG+ZksMBcZwJUxZPeBTkPqC2hYEtx9LWJBQRsim+ccU7 btvcDl/R7k53O8nw0DDc5jxKLY48ewHaDnPJ7juUiPkqcXCQnlUj678lLJ5Xehm6 24gSvqHjYKvxDTOXq4bSjBrfW2waz7m3b4RyyngvZnHYR1s9Llce1Z5VoR8v8g/f 49a1Wl+mAJl2vrFhGZvLnDBS5DKCNujW8MklofxIZjaVqTT6S40uRFVIG/Z/8B7C CdmPZjk9Y18L43TK5lSrkZpfaMcFkfF8eOxzXIcVI3eHJ0POs+ogSwr70aG8ohxH 3fPMeRS7WOpyt+rfSGcpFkbzKSPEDw/tmAZ7fWWwb+82EJSG65BmqgnUTp4urnsU x0MHbBcysigOFRTiqADmwWLHZzJk0bH3VrxIXf3SKuJu+iTe6YptUVVGJ18qmdxQ NmuTTVKNLaljSCTiKOD7J+aEFQhFOQTA3khD5xNkpftYIGHcRHlbgHXR/24/JQN5 54xcHWtOFhdwsXtQplCcc1GiOcve42x0zJ/f1ALuf41J/uQsDqaIzYfDs2XhixjI SBP4eiJdL3rAFuOQnT7kljg+HyFlsaCbNVIqii5LAXueqZB/ouU= =kw5l -----END PGP SIGNATURE----- --Apple-Mail=_793319AF-3625-4CB7-987D-C49A7E0E8610-- From nobody Fri Oct 17 07:39:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnxXv1cgmz6CqGP for ; Fri, 17 Oct 2025 07:39:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (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 4cnxXt5dpYz3kHl for ; Fri, 17 Oct 2025 07:39:26 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-33292adb180so1615088a91.3 for ; Fri, 17 Oct 2025 00:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760686764; x=1761291564; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=78uPI2N4nmnMKotgnlcrAKXL0DHpLbzpMjTfHTZltJM=; b=RbUFd6iBQQAK96ACZJmXrwzF31e964AuOfQC+XUIuRYahP4CfjIKzsa7xQwTEal6yB 7Mz5B7bau5e7+SyCRjCkltomwX4JJc8lX8xrSG896mx5KCFnWNg7FYnJVSFH6AD1kfc2 qYbJMBIW1g9HIEXrD19dwFtrgEjuzKkCinxp03rGXWIH1HYD7C1+CmCgGs19UKFXl2Gz R7aX5Y+3M8gqqWgAeczaAmUmpu0DQTV4PWPi1nEsf/34+lzLq4ymZIjEH8hGgqPPPBEa mSbFYQEtFOzMwJh4GwjtK7qru0yc5oSCzA2eWQmC/i2aES+Ef4HMtZBcIy1cKNFKGNlg p9bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760686764; x=1761291564; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=78uPI2N4nmnMKotgnlcrAKXL0DHpLbzpMjTfHTZltJM=; b=Md2bU1CZXcx9tAuB5Jtk5yGtWR6QCzWdNH3ehATQotsKFZ3uqCZJfk6p7xC/ii8QUd UZb4nBU3ZOo8Z3CvleygYMzfLGz7vuYUdkn7mnX2scj0CaTjK0phK68wCudD7W1LOlr5 Pm2s6sqga0Ckx+3k5XT4KvsMyx/6r5LCGJ8OFvEEU3N+fAqNMaWraxNIINfUoi2dTmbx rvEueWaiZOIqAsHCsMy9tl22kVTljkfqFCIpSbE2kBw9IL01CFLNJxAEM9B7CLPC4TWl FnqG2G1Bft5auycxJR5Ko444CQs7N1l/B0siF3nTm6imyDVizT6pyF6Ov65Ff8Qb+b+j YDjQ== X-Forwarded-Encrypted: i=1; AJvYcCUGdFAhWKwiP2x0naTpVz1M9l4U0oU/7jzh7GAzIrJNARYQmxlvrnMbfgcuhQFCmduW2S/AxMmKmBsXW2jkRwiNcM6v/Q==@freebsd.org X-Gm-Message-State: AOJu0Yz2rCbsCsLJzrJ57LTWRX9cvn7xw80HM45bOWGqL8J6wnhAAt8i SyOySX4Ewd8VY9cvYcYiv5xf8pha+xBqFZYbK/C7D7hiMGg60zaF+oXG X-Gm-Gg: ASbGncvatQKffgF2zwX0q24VdKJWKBj70WyXXPJjooxvSK84CC16hwV872Bs+seJvdU BF36+tr9GOSoyZJTZf8h0Gqg2fLexTFWg9oUo3oIYkiX0CSQW0JnbIJQBbimq9FXNJe/LeRLrA0 ygKuhbZW/9jbWgnct9AzP+aggL0kWc0EFkiXgigp7hSNDOT6KDqM/nNBSgV1SjS1gK7x3kYIN0L 7RHtSaCmWEnVliiyjB40rP8fJoafIXbozLG1ie6aqsBOxtAJoZ5rEkF/5uXeAt7H6ewKhr0g9Ti gtxwaI/86mX/5RexQClU8VWNnuEr5BdHrlND6WkJfv09tbKwXxpof8dAOGB0w1DFLedqYJT1eyR wBVDRfTJzok3pVxRHfctgPCDM4YZY3fQ9cs4dgPIa8uNX+W5hR0VyPcvFjAvrX4gQdGT70sNlH1 snIp85Y8RKQ0frbxUmZVr5 X-Google-Smtp-Source: AGHT+IE8AQLB0FWZw1wJTFegjFh6AFzHQ2P+LczVowHQ+p20cdL0J3vhgZjN3Ie8JShCdrq0aFekxw== X-Received: by 2002:a17:902:cf0b:b0:24c:cb60:f6f0 with SMTP id d9443c01a7336-290cb66025amr33776485ad.58.1760686764274; Fri, 17 Oct 2025 00:39:24 -0700 (PDT) Received: from smtpclient.apple ([185.219.141.221]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2909934a052sm54667395ad.36.2025.10.17.00.39.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Oct 2025 00:39:23 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_61568B45-258A-468B-BE2D-80CEAB3F3E33"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: c1e7e8f5cb0f - main - Add FENESTRASX to LINT to avoid breakage From: "Enji Cooper (yaneurabeya)" In-Reply-To: <202510170246.59H2kbPU069229@gitrepo.freebsd.org> Date: Fri, 17 Oct 2025 00:39:13 -0700 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: <0F9EF9F0-B353-426F-BE5C-04FB8EAAFAC8@gmail.com> References: <202510170246.59H2kbPU069229@gitrepo.freebsd.org> To: "David E. O'Brien" X-Mailer: Apple Mail (2.3826.700.81) X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cnxXt5dpYz3kHl --Apple-Mail=_61568B45-258A-468B-BE2D-80CEAB3F3E33 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 16, 2025, at 7:46=E2=80=AFPM, David E. O'Brien = wrote: >=20 > The branch main has been updated by obrien: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc1e7e8f5cb0f948abc4679dab295f144= 7363604d >=20 > commit c1e7e8f5cb0f948abc4679dab295f1447363604d > Author: David E. O'Brien > AuthorDate: 2025-10-17 01:01:34 +0000 > Commit: David E. O'Brien > CommitDate: 2025-10-17 02:46:21 +0000 >=20 > Add FENESTRASX to LINT to avoid breakage > --- > sys/conf/NOTES | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/sys/conf/NOTES b/sys/conf/NOTES > index a25ee8f6e1af..9944375c3615 100644 > --- a/sys/conf/NOTES > +++ b/sys/conf/NOTES > @@ -2801,7 +2801,7 @@ options MAXFILES=3D999 >=20 > # Random number generator > # Alternative algorithm. > -#options RANDOM_FENESTRASX > +options RANDOM_FENESTRASX > # Allow the CSPRNG algorithm to be loaded as a module. > #options RANDOM_LOADABLE > # Select this to allow high-rate but potentially expensive Hi David, Do you know why it was commented out previously? Should other = RANDOM_ options be enabled as well? Cheers, -Enji= --Apple-Mail=_61568B45-258A-468B-BE2D-80CEAB3F3E33 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmjx8qEACgkQGpE5DjPs NJiseRAAjqPYhrBOV7n4U9ef2kWiLfMR9iR5qf4s5HE0oh9KBvQUbTf2BzR8WYKX 66qWUHP/3P7ExFEuOLfFWxguHj+taVh/9kuQbxuKi19WGPQf3lNieGPoyid3W8H7 A6mgFBpmJgp0hZ3icXuCGIQ0UfY5sffkyfPJyqoacxsb7rZp5n7PAPtgG2toMA7K jLIYbWC4L2m0kJuLTOtEXe5CknqT5ez+ZF17Hc7AEu8p5VBz8kJO9+bapCryRnAA m6FOv+JKk65yPQ68QSDup1EN4nMSmhKzMGC+VnNqInxSsIV51hLdJKps51V/VqDp wgJjihic7LHMCesjnV/RJwGs5ac+Wht+sSpJ66u6pd2mTLoF96OUt0vNUOiZoN79 ykKMFgXtfWY8EeMPUeuUy2Gghkq9M3nfYnJPwsA+s6GLdHtyeKfkr4DRiiafmYM/ 1xkttvwePDUeXElkfOtzLzHzLPyZXI9kjwgI7t3FtpQRfAOAmhYEdS6+Qk8mjbv0 m9qVav0SoiWKIIhfKFF2vrVW4zZyaBFYqb9ItXyjC2RLGMAFIkWRkp1QgfmehuNP DsooD6/rh4yVUb2CaofYL9PditXOauoCMj+b7G1KJw5D4+RvdONhJ+am4HLZDepl mdjhdPfyBHVEjj4qooJutam9j7cIVln3q+VbucoGen4BWLeXors= =Id6e -----END PGP SIGNATURE----- --Apple-Mail=_61568B45-258A-468B-BE2D-80CEAB3F3E33-- From nobody Fri Oct 17 07:46:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnxjh019sz6Cr5c; Fri, 17 Oct 2025 07:47:04 +0000 (UTC) (envelope-from olce@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 4cnxjg6NWmz3m0J; Fri, 17 Oct 2025 07:47:03 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760687223; h=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=TMaAhRWnrFU2st26IW1whvuln3OiTpoY6dB0gp+eK2k=; b=l23ciseq2HT7X9pXsaaj2agslH9RTeOoQ1EyJ0xuUHX9DZfRfM4qIkW89lKrgYQ9c0glRs Rw6xH9IezwfW3/YFfV+gbt/RxneMwY5J+PqDzRSaWAR6k+OoJSVcCzKDcr1DCWlhwoZ/FR O5MeSpZIdkavoHLwMOrCSI7ksTXWNxEc/AB7bPnTfFFBiBRYrVc6hlGOar8X0VJXwzQ7Ib J+1cs8v/AnuNl7Ys9Kv6eXSvYNtBf6db6hREhuBu76C+aFAnz/kltCmX3Urul4Z6eY8inA 8aByRG64L5HTlq+ZhzjczwnaqrWdRdDbu/AfpthDD0+FXRq8nLjjTb4Xm3Eh/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760687223; h=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=TMaAhRWnrFU2st26IW1whvuln3OiTpoY6dB0gp+eK2k=; b=SQNrh1g0drukH2BDE6eFW/d8Q/7wwg/1BBslkcSURbLAqwbGR3v6D7B9f11Pcd122qdy05 IDCyxP8O0d2n+yUsMEoMrvLSjmP2aEOctkX7gwfCkX1DOo/OkbPuK7MpTMC+MA3A8WRYvC +jVkauStVpO07w6SYRXk1MHpOxJYWYRVgWMWzSGAyzOHZMdwesG/37IpePt/BGTUjFXN1A ZxdnhGj99yPdpGiMIZdfAz70D77P2ZMEk9J+OAenua2ejKM/MeRdwaCSGck2a8JiZuPpiW vdITXWmqgjQZPkm3pyx6oJz0lrZSPT1QTwbQ3X0xgNadyoPybPSINLFYX7fi7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760687223; a=rsa-sha256; cv=none; b=GV3fExpMjApIHwLcCcz6PPVcXOFssTkkm7wGvJ5+CG+rlO6Vs0YgbbcNlFay57SKast26r OsAC7JEN4zyNWWE4/BVjyU2FLSFafW1fopZTeN1ipfhuUQLMMQW+6WiazoUhlmp23DSQfC xikDIC6DI9lJE+NSca9fQNVRAIQRImavtIXWzaRuQcYoNU3/HRGLRAa13VF3nOu82wHR/E MJaIIbjhWp5iafKZwcffugDCr9MiRXKeBMYWovzatqSqOKvjF9MYGSaioY29XzQDdBkAQU i89dnPTKUVFnuvrE63pi7G5mNpp4S1j4Bzw22Cmm6cY5anMhnfUQZSHVhoBekQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (using TLSv1.3 with cipher TLS_AES_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: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cnxjf6RrWz76R; Fri, 17 Oct 2025 07:47:02 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org Cc: Alexander Leidinger , "Enji Cooper (yaneurabeya)" , Rick Macklem , "David E. O'Brien" , dev-commits-src-main@freebsd.org Subject: Re: git: 0050289464fa - main - style(9): white space after ; and around binary operators Date: Fri, 17 Oct 2025 09:46:53 +0200 Message-ID: <8379882.bYQgcRI8ro@ravel> In-Reply-To: References: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> <16835444882475995d82a23078996276@Leidinger.net> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2641353.0dHE6SNnxz"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart2641353.0dHE6SNnxz Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Olivier Certner To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org Date: Fri, 17 Oct 2025 09:46:53 +0200 Message-ID: <8379882.bYQgcRI8ro@ravel> In-Reply-To: MIME-Version: 1.0 Hi, Please see also https://reviews.freebsd.org/D52885. Thanks and regards. -- Olivier Certner --nextPart2641353.0dHE6SNnxz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmjx9G0ACgkQjKEwQJce JifF9xAAr1wb1tQmTkbgNuW60TBfgrRPd+ojJcHImTb240B/Zn0/5CfFjl65zLiu xY359dhYN5LI6hyAHniQZPePYskZ1f+JCiix/+32OO7QHr+faTCXpI8dlfwlcugT +7+qUY0vYOawzF+fCg/Pj5wWAetJDE0pZkrhCuR35Akvljo3BIPukB1cHZ1d8pFZ 1xSVhFdPyRJbbYJs7dSZM604dcwuaRrIgtojxlmgu9q/BMiYxTehkihyT5FePLUU APhY/cXrl9ltU7CKocSj1sxTziwd4n5OmSrkzn7bMCTn8B0TQInbC/S/NchxusZ8 FBqY6BZM46x/0QSjz6Kn5CdOXpaVKfSZha/UiEh1+EbZHgo1cx7fExOSy1BDB0Bq HH4hniY++qn435AeP01/Z7UxKCDKT4nGC3vz8AX9/hfAWSrppdkgzqWKwU+e0EDw GUEmsJjxfPj9u/9qEzTXPtwKd8T7b+rxYRWC8rdvTna5vpJzC+3xS9RRdH++z2SZ fKijpYuvjxuMTMgh+1RSskaGOA+gTel+GL2HFDA35o2qqk3oOpF/MuRpe8M+iFTR lkkhle8nTJiVFt6YXawmpkerKreO8bLF0fm8MG6Zc3bBQeND0OWb2wnkT2GVO64S LBaTS1KgR2PaGzRTuj8aIcyQF/Q0RTfA0izTnnfhn9Qxvm4bw1M= =PbH9 -----END PGP SIGNATURE----- --nextPart2641353.0dHE6SNnxz-- From nobody Fri Oct 17 08:05:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cny6Z4p6Qz6CsgQ; Fri, 17 Oct 2025 08:05: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 4cny6Z46Kjz3q7L; Fri, 17 Oct 2025 08:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760688310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fORlloHZRkHa9NXD7uEMwG+27DOCbVzpe6/YjKBXtDs=; b=kqx26bNswVybe7CGj25asPTqXp2Se3DSgq+n2+eKCf1pxLaNNfMsVJNQwxnpH9dX9WG6QR 9e+aSpSOIoD9Afa9gjZ3PcnXPy8nAOZP9JilS44AxetvglzFOfQsMvYRuAQhe2BIzj0glo sRvv0N0eD/aQnm6aixggVSyO5CKf8eSD2H1wrDfPaBD55xbgYjWtKjgHrmLNkzcz6KLdlL 2401CQqePMdDxXXTJavWGhEkSRAglo8hcN95XWefHHX1ZbB+7ml0cKD0HqGnC/FWUssbzE yoRaZUnkVg62a7unZHZc58PEZTpNOq53DaLmlQYAgu/hURaMXOQw8wPXRcpH7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760688310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fORlloHZRkHa9NXD7uEMwG+27DOCbVzpe6/YjKBXtDs=; b=MV+Do6JBmEW1qaTILKwEV+/6q+VbRTpuYhD9jevOlI3yT2rElHS5OSF6goHkjnkzR3WQ3s /sY9FzOQeh5XOW+F+zSf76i4uAoBvK7VC+GjBkZcrDNiH+klxbnG6/CVRD2fvmWepM9HIw UtQZ9nBTIZsqKkAQlbTRhfN/0za+rC5A2OwANCZ3SiYguTaC2mF69fpjlWmXiYN0V7Yj/y fg7mCKQFUtDirnajzjCcAeq+bPwcnVWF9Lb2NFcF4TuI3YmSTEjtVPthsJAFYvsGdVH7dT XWKeBmukdaYMswxYNHiy3NkwKVaDMzyEe589IvwftfV7N1aMb0Wn+xGq5RsvXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760688310; a=rsa-sha256; cv=none; b=NbJZYOeIEUjmU7cpUdSaNg4waylJV1i4f2X9p245tkkuUkKFj07KEvrWsvtsuHFn6Z/p4j 5hyhX5hPpxM5EGsL4rjXImyBL61RvUsksOrAps1Iyt+WTd90X/RHDYDNnXYBgTvH9H2hqd 17DymlTkG0piFLTjfXz/GJe+U87OiKi5TYU2o54+frpdhB5hkJ+Ypz/ESSM3tc20dqA0/O uzJFhjm4powKBHkn3yNBY350mO/jdB/vvXDTpF853QjlZYZ5tOqhUv8kLGg284lHUBkbAJ nEmNVxLL0hO/ibzTvJgLJOtuU6O5En8sEnIFqxmgYe1OworhEqZrHRD+97c+TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cny6Z3drVzm9q; Fri, 17 Oct 2025 08:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59H85Ai3073758; Fri, 17 Oct 2025 08:05:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H85Ar5073755; Fri, 17 Oct 2025 08:05:10 GMT (envelope-from git) Date: Fri, 17 Oct 2025 08:05:10 GMT Message-Id: <202510170805.59H85Ar5073755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 86db3c735dd9 - main - stress2: Added a regression test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86db3c735dd999f75eab54d848fb8402e6689c80 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=86db3c735dd999f75eab54d848fb8402e6689c80 commit 86db3c735dd999f75eab54d848fb8402e6689c80 Author: Peter Holm AuthorDate: 2025-10-17 08:04:48 +0000 Commit: Peter Holm CommitDate: 2025-10-17 08:04:48 +0000 stress2: Added a regression test --- tools/test/stress2/misc/unionfs20.sh | 206 +++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) diff --git a/tools/test/stress2/misc/unionfs20.sh b/tools/test/stress2/misc/unionfs20.sh new file mode 100755 index 000000000000..0c87bc0d80aa --- /dev/null +++ b/tools/test/stress2/misc/unionfs20.sh @@ -0,0 +1,206 @@ +#!/bin/sh + +# +# Copyright (c) 2025 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# Bug 289700 - unionfs: page fault in unionfs_find_node_status when closing a file within a socket's receive buffer + +# "Fatal trap 12: page fault while in kernel mode" seen: +# https://people.freebsd.org/~pho/stress/log/log0618.txt + +. ../default.cfg + +prog=$(basename "$0" .sh) +here=`pwd` +log=/tmp/$prog.log +md1=$mdstart +md2=$((md1 + 1)) +mp1=/mnt$md1 +mp2=/mnt$md2 + +set -eu +mdconfig -l | grep -q md$md1 && mdconfig -d -u $md1 +mdconfig -l | grep -q md$md2 && mdconfig -d -u $md2 + +mdconfig -s 2g -u $md1 +newfs $newfs_flags /dev/md$md1 > /dev/null +mdconfig -s 2g -u $md2 +newfs $newfs_flags /dev/md$md2 > /dev/null + +mkdir -p $mp1 $mp2 +mount /dev/md$md1 $mp1 +mount /dev/md$md2 $mp2 +mount -t unionfs -o noatime $mp1 $mp2 +set +e + +cd /tmp +sed '1,/^EOF/d' < $here/$0 > $prog.c +mycc -o $prog -Wall -Wextra -O2 $prog.c +rm -f $prog.c +[ -d $RUNDIR ] || mkdir -p $RUNDIR +cd $RUNDIR + +n=3 +for i in `jot $n`; do + mkdir $mp2/d$i +done +(cd $here/../testcases/swap; ./swap -t 3m -i 20 -l 100 -h > /dev/null) & +sleep 2 +for i in `jot $n`; do + (cd $mp2/d$i; /tmp/$prog) & +done +while pgrep -q $prog; do sleep .5; done +while pkill swap; do :; done +wait + +cd $here +umount $mp2 # The unionfs mount +umount $mp2 +umount $mp1 + +mdconfig -d -u $md1 +mdconfig -d -u $md2 +rm -f /tmp/$prog +exit 0 +EOF +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PARALLEL 2 +#define SYNC 0 + +static int debug; +static _Atomic(int) *share; + +int +send_fd(int socket, int fd_to_send) +{ + struct cmsghdr *cmsg; + struct msghdr msg = {0}; + struct iovec iov; + char buf[1] = {0}; // dummy data + char cmsgbuf[CMSG_SPACE(sizeof(fd_to_send))]; + + memset(cmsgbuf, 0, sizeof(cmsgbuf)); + + iov.iov_base = buf; + iov.iov_len = sizeof(buf); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + + msg.msg_control = cmsgbuf; + msg.msg_controllen = sizeof(cmsgbuf); + + cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd_to_send)); + + memcpy(CMSG_DATA(cmsg), &fd_to_send, sizeof(fd_to_send)); + + return (sendmsg(socket, &msg, 0)); +} + +int +recv_fd(int socket) +{ + struct cmsghdr *cmsg; + struct msghdr msg = {0}; + struct iovec iov; + char buf[1]; + int received_fd; + char cmsgbuf[CMSG_SPACE(sizeof(received_fd))]; + + memset(cmsgbuf, 0, sizeof(cmsgbuf)); + + iov.iov_base = buf; + iov.iov_len = sizeof(buf); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + + msg.msg_control = cmsgbuf; + msg.msg_controllen = sizeof(cmsgbuf); + + if (recvmsg(socket, &msg, 0) < 0) + err(1, "recvmsg()"); + + cmsg = CMSG_FIRSTHDR(&msg); + if (cmsg == NULL || cmsg->cmsg_len != CMSG_LEN(sizeof(received_fd))) { + fprintf(stderr, "No passed fd\n"); + return (-1); + } + + if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) { + fprintf(stderr, "Invalid cmsg_level or cmsg_type\n"); + return (-1); + } + + memcpy(&received_fd, CMSG_DATA(cmsg), sizeof(received_fd)); + return (received_fd); +} + +int +main(void) +{ + pid_t pid; + time_t start; + size_t len; + int fd, pair[2], status; + + fd = -1; + len = PAGE_SIZE; + if ((share = mmap(NULL, len, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED) + err(1, "mmap"); + + if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, pair) == -1) + err(1, "socketpair"); + + start = time(NULL); + while (time(NULL) - start < 180) { + share[SYNC] = 0; + if ((pid = fork()) == -1) + err(1, "fork"); + if (pid == 0) { + close(pair[0]); + atomic_fetch_add(&share[SYNC], 1); + while (share[SYNC] != PARALLEL) + usleep(1000); + // Not calling recv_fd() triggers the issue +// fd = recv_fd(pair[1]); + if (debug) + fprintf(stderr, "Received fd=%d\n", fd); + _exit(0); + } + fd = open("foo", O_RDWR|O_CREAT|O_TRUNC, 0666); + if (fd == -1) + err(1, "open"); + if (debug) + fprintf(stderr, "Sending fd=%d\n", fd); + atomic_fetch_add(&share[SYNC], 1); + while (share[SYNC] != PARALLEL) + usleep(1000); + send_fd(pair[0], fd); + usleep(arc4random() % 1000); + wait(&status); + close(fd); + unlink("foo"); + } +} From nobody Fri Oct 17 08:23:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnyWB6PDPz6Cv0C; Fri, 17 Oct 2025 08:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnyWB5szHz3rgf; Fri, 17 Oct 2025 08:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760689382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vw8xACOfNItWi7591C9s44Z1N8jKadjdpNJXHsTKBzs=; b=nFoMqq7oXFf5X5nhLSfSvsO2Riow7drIiTxyP3bF7vZBKjK8m3eKGLlJb15u3iM2tcPA6o jJ24eMkan/TAOWuwY9c5AEwmxuY087eRA42M8+097dvUL12XmKtE1oPTDpk808py0MfWaV 8RwS9roonQAHP99pF+s/+wRpSRvvnHtm8pFf4+CuywjV50e4T8X5dFddnd/QK+tbiaTIBq 5Jb/WAejwTDekVVjizxbHaL9hLah3TP9qYOqeoEsF4iuzNamlXmk90RLcuavLcas1ScBnB gWWmY7bi2e0SHDDg9cr+QPP8b0L9+NvZxcOzIu1uB8P//WAi76jQku7lMPEEVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760689382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vw8xACOfNItWi7591C9s44Z1N8jKadjdpNJXHsTKBzs=; b=u2haj0VBFVMnjKL56lGy7IWu0MBpYUjCBxzHa7ku/sPiYaQjPF5WMXB+o/wJvRr4m1xefI UWbuUPWD8PjQLTXWwJE0DRQZ+/y6YgO6K2jUjNyxb7lTeTzBPhaNWBNRei3dCPzXwjx371 7UG/ekiNekmn7u8z08yrHyhvVwyz73QWxROWwprzNEyyx/p/BDNl6/OtG6nsvhBwa2ROZR CXYw4pegW9908uz1KdtuckTzHMtJlgKa2yd5qetPuAqpK1jT5lKEV5lUsvpnyr1hgjMF7p BIBWnfNACl9PeiGkxtLtpSyWIJGn63TFRF16kMKA2M8aVE8LaMcMIY5bt5OgNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760689382; a=rsa-sha256; cv=none; b=Lq4jLnapb0DV+BKReesPOLh8KbLRWsKExDSwyw6SXUkOsKsHIZna7+TEfRXGFkkXrtg2h/ CAwRf5OWz6huA/ghxzDyIYxH2ihjj2iz5RmzpQ7aVWqH0CJGZShxmA04Exw6e109WZArQj qMg9BwWWjl5N+ieIr8kVkY0ujWkxUlz7VBn7wTUyUsbdZl3yXL/V6lilLuqTKm/fDWsWjy Ugj3gr7yIGIaDn6I0nMZC9TVpS0UHiSqyNc9BJVWmR5NDiBI0GBzskuw3ZzUayu2gMn92b QiXa9SidrUsMmFk7nUw7v+p7sqzmQQ5XOmXOBliXBuYvhKiHqkrH2jYftdpKuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnyWB5CGKzn5b; Fri, 17 Oct 2025 08:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59H8N2u7010223; Fri, 17 Oct 2025 08:23:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H8N23I010220; Fri, 17 Oct 2025 08:23:02 GMT (envelope-from git) Date: Fri, 17 Oct 2025 08:23:02 GMT Message-Id: <202510170823.59H8N23I010220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: c26d6bf9da01 - main - arp: fix adding proxy entries for P2P interfaces List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c26d6bf9da013e839d9a696746ea1741569e619e Auto-Submitted: auto-generated The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=c26d6bf9da013e839d9a696746ea1741569e619e commit c26d6bf9da013e839d9a696746ea1741569e619e Author: Andrey V. Elsukov AuthorDate: 2025-10-17 07:53:35 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-10-17 08:22:36 +0000 arp: fix adding proxy entries for P2P interfaces The old rtsock implementation used in-kernel workaround to do so. When route to specified destination address used P2P interface, the kernel did the search with ifa_ifwithnet() for most suitable network and then add proxy entry to this interface. Use similar approach with netlink implementation. We already have get_ether_addr() function that does almost the same thing as ifa_ifwithnet(). Use it when we find that destination route uses P2P interface and then try to guess suitable interface. This should fix the use of netlink-based arp(8) in mpd5. Rename get_ether_addr() to get_ifinfo(), since now it is used to find only ifindex in case when hwaddr is specified by user. Also make set_nl() and delete_nl() prototype similar to rtsock. And allow '-i' to be used with '-S', since we already allow the same for '-s'. PR: 290221 Reported by: eugen Reviewed by: eugen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53113 --- usr.sbin/arp/arp.c | 32 ++++++++++++++++++++------------ usr.sbin/arp/arp.h | 9 ++++----- usr.sbin/arp/arp_netlink.c | 20 ++++++++++++++++---- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index ee4236b5299b..055ef2ffe225 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -81,7 +81,6 @@ static int get(char *host); static int file(char *name); static struct rt_msghdr *rtmsg(int cmd, struct sockaddr_in *dst, struct sockaddr_dl *sdl); -static int get_ether_addr(in_addr_t ipaddr, struct ether_addr *hwaddr); static int set_rtsock(struct sockaddr_in *dst, struct sockaddr_dl *sdl_m, char *host); @@ -143,7 +142,8 @@ main(int argc, char *argv[]) if (!func) func = F_GET; if (opts.rifname) { - if (func != F_GET && func != F_SET && !(func == F_DELETE && opts.aflag)) + if (func != F_GET && func != F_SET && func != F_REPLACE && + !(func == F_DELETE && opts.aflag)) xo_errx(1, "-i not applicable to this operation"); if ((opts.rifindex = if_nametoindex(opts.rifname)) == 0) { if (errno == ENXIO) @@ -273,7 +273,6 @@ getaddr(char *host) return (&reply); } -int valid_type(int type); /* * Returns true if the type is a valid one for ARP. */ @@ -357,11 +356,14 @@ set(int argc, char **argv) } ea = (struct ether_addr *)LLADDR(&sdl_m); if ((opts.flags & RTF_ANNOUNCE) && !strcmp(eaddr, "auto")) { - if (!get_ether_addr(dst->sin_addr.s_addr, ea)) { + uint32_t ifindex; + if (!get_ifinfo(dst->sin_addr.s_addr, ea, &ifindex)) { xo_warnx("no interface found for %s", - inet_ntoa(dst->sin_addr)); + inet_ntoa(dst->sin_addr)); return (1); } + if (opts.rifindex == 0) + opts.rifindex = ifindex; sdl_m.sdl_alen = ETHER_ADDR_LEN; } else { struct ether_addr *ea1 = ether_aton(eaddr); @@ -375,7 +377,7 @@ set(int argc, char **argv) } } #ifndef WITHOUT_NETLINK - return (set_nl(opts.rifindex, dst, &sdl_m, host)); + return (set_nl(dst, &sdl_m, host)); #else return (set_rtsock(dst, &sdl_m, host)); #endif @@ -522,7 +524,7 @@ delete(char *host) #ifdef WITHOUT_NETLINK return (delete_rtsock(host)); #else - return (delete_nl(0, host)); + return (delete_nl(host)); #endif } @@ -819,11 +821,11 @@ doit: } /* - * get_ether_addr - get the hardware address of an interface on the - * same subnet as ipaddr. + * get_ifinfo - get the hardware address and if_index of an interface + * on the same subnet as ipaddr. */ -static int -get_ether_addr(in_addr_t ipaddr, struct ether_addr *hwaddr) +int +get_ifinfo(in_addr_t ipaddr, struct ether_addr *hwaddr, uint32_t *pifindex) { struct ifaddrs *ifa, *ifd, *ifas = NULL; in_addr_t ina, mask; @@ -862,7 +864,13 @@ get_ether_addr(in_addr_t ipaddr, struct ether_addr *hwaddr) } if (ifa == NULL) goto done; - + if (pifindex != NULL) + *pifindex = if_nametoindex(ifa->ifa_name); + if (hwaddr == NULL) { + /* ether addr is not required */ + retval = ETHER_ADDR_LEN; + goto done; + } /* * Now scan through again looking for a link-level address * for this interface. diff --git a/usr.sbin/arp/arp.h b/usr.sbin/arp/arp.h index 487863be43e7..512a238df425 100644 --- a/usr.sbin/arp/arp.h +++ b/usr.sbin/arp/arp.h @@ -2,8 +2,8 @@ #define _USR_SBIN_ARP_ARP_H_ int valid_type(int type); +int get_ifinfo(in_addr_t ipaddr, struct ether_addr *hwaddr, uint32_t *pifindex); struct sockaddr_in *getaddr(char *host); -int print_entries_nl(uint32_t ifindex, struct in_addr addr); struct arp_opts { bool aflag; @@ -11,13 +11,12 @@ struct arp_opts { time_t expire_time; int flags; char *rifname; - unsigned int rifindex; + uint32_t rifindex; }; extern struct arp_opts opts; int print_entries_nl(uint32_t ifindex, struct in_addr addr); -int delete_nl(uint32_t ifindex, char *host); -int set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl, - char *host); +int delete_nl(char *host); +int set_nl(struct sockaddr_in *dst, struct sockaddr_dl *sdl, char *host); #endif diff --git a/usr.sbin/arp/arp_netlink.c b/usr.sbin/arp/arp_netlink.c index db1ef775dea2..34f21cf96f4f 100644 --- a/usr.sbin/arp/arp_netlink.c +++ b/usr.sbin/arp/arp_netlink.c @@ -79,13 +79,15 @@ get_link_info(struct snl_state *ss, uint32_t ifindex, static bool -has_l2(struct snl_state *ss, uint32_t ifindex) +has_l2(struct snl_state *ss, uint32_t ifindex, uint32_t *pflags) { struct snl_parsed_link_simple link = {}; + *pflags = 0; if (!get_link_info(ss, ifindex, &link)) return (false); + *pflags = link.ifi_flags; return (valid_type(link.ifi_type) != 0); } @@ -104,6 +106,7 @@ static int guess_ifindex(struct snl_state *ss, uint32_t fibnum, struct in_addr addr) { struct snl_writer nw; + uint32_t ifindex, ifflags; snl_init_writer(ss, &nw); @@ -133,9 +136,16 @@ guess_ifindex(struct snl_state *ss, uint32_t fibnum, struct in_addr addr) return (0); /* Check if the interface is of supported type */ - if (has_l2(ss, r.rta_oif)) + if (has_l2(ss, r.rta_oif, &ifflags)) return (r.rta_oif); + /* Check if we are doing proxy arp for P2P interface */ + if (ifflags & IFF_POINTOPOINT) { + /* Guess interface by dst prefix */ + if (get_ifinfo(addr.s_addr, NULL, &ifindex)) + return (ifindex); + } + /* Check the case when we matched the loopback route for P2P */ snl_init_writer(ss, &nw); hdr = snl_create_msg_request(&nw, RTM_GETNEXTHOP); @@ -326,11 +336,12 @@ print_entries_nl(uint32_t ifindex, struct in_addr addr) } int -delete_nl(uint32_t ifindex, char *host) +delete_nl(char *host) { struct snl_state ss = {}; struct snl_writer nw; struct sockaddr_in *dst; + uint32_t ifindex = opts.rifindex; dst = getaddr(host); if (dst == NULL) @@ -375,10 +386,11 @@ delete_nl(uint32_t ifindex, char *host) } int -set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl, char *host) +set_nl(struct sockaddr_in *dst, struct sockaddr_dl *sdl, char *host) { struct snl_state ss = {}; struct snl_writer nw; + uint32_t ifindex = opts.rifindex; nl_init_socket(&ss); From nobody Fri Oct 17 10:43:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp1cj15mrz6D4Y1; Fri, 17 Oct 2025 10: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 4cp1cj0Jhgz48Vp; Fri, 17 Oct 2025 10: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=1760697781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iI7pxKgqpxZuXfbFa0dbTWsAqmH59Z+LevvAtZVUzOQ=; b=kpKGmozQytsL74Q1nDcr/zirjwyv3fhkTcAWKgBja9sZh+16Kek097mmExrxCEVbe02+TZ 1h/rRD0+ywMHUotz2/CQqyk8bAKi+RspGv2PlqQE4qwY8Q/sS7JKU8spvfdWcOwIOIHnKi I/KLzmM/w2j0+k7sTYgQ367BjCsZ56MVf4c7pgzyXGQzKx7C9zfql2TFzqz4ZyJjmpMSLJ 617bI+Tf69HKypJADCdPJJrecutKlUVnCSB13Ow9lMGlY2GG+RzFOBbLRogIywpaR/GAdS t63hbdXvkOfNIyoG63Mc0gjOlxXoOW2G7ZanPeN2P0lMWuORxnku8jOfnnvM1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760697781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iI7pxKgqpxZuXfbFa0dbTWsAqmH59Z+LevvAtZVUzOQ=; b=FjxygfQTclIyv8LvWLwiDsvjnO0ui8XjFnYv/lnoZ0ISL3QH2fTZdLeNECrGXx1dMkY6ga mwM6FPO4xx1DTWrbuQgJ6MjO+KwGbY09fdYYPCIbyHPCt3PBe6CXIK/S66hvcvnFvnZqNO 3Wjk+WuhgiSH5B+oSmhKfsAaXQUntOH+v0SRTFaDLwvuTpy+VdQLDS85ilxRG596/hfD4C yQZRSKyneoACR8JszZOS9UqegEm0aSl1n5nBCNYKpcRIVBSWQv8d0z0kysfXxvq4Cv3Oh+ ma1Y5anSfPuSN5zJdGxxrWKzd2nuObP1Ib9WKSoRMdYWVtDuyF4DPxOZ8zg3Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760697781; a=rsa-sha256; cv=none; b=VQcMgqLvJ+Jdkh8EubWy2tsGGTJYTJ889dBx+E/7sW70Gz+B1MdhofIRtMtslk8cIHromQ JZkeMgPqWxjou1dkrnbAhI2DdzoXgvP+I4idG37SP8nCbLTVm3LExMmzaY8+px83YHvPTS EPbt+mSGcqRWwRInqvuhrUuqb1snrt5nro56Zc1ENe7Ny/Xsac0M8jXUMHhJtsdVROGgw5 CkZQOvLoEeaoc8J1mn5CBklz+V9LrfKDRCJ9ls1z7zaDA/vMrRFHjxP+siYDafe4yIHebx 0ckXDYQl5fFv+t9PdsIbCTsCTa3cmdu9ggxiq35/ARphD2Jtz3a5cwFxWj9V/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp1ch6qQszrgT; Fri, 17 Oct 2025 10:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HAh0O0072621; Fri, 17 Oct 2025 10:43:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HAh0pU072618; Fri, 17 Oct 2025 10:43:00 GMT (envelope-from git) Date: Fri, 17 Oct 2025 10:43:00 GMT Message-Id: <202510171043.59HAh0pU072618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: e757a92282fc - main - bsd.man.mk: Support MANGROUPS.yes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e757a92282fcd064c82cf2685dde4730743fc425 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=e757a92282fcd064c82cf2685dde4730743fc425 commit e757a92282fcd064c82cf2685dde4730743fc425 Author: Lexi Winter AuthorDate: 2025-10-17 10:40:39 +0000 Commit: Lexi Winter CommitDate: 2025-10-17 10:42:51 +0000 bsd.man.mk: Support MANGROUPS.yes Similar to SUBDIR and CONFGROUPS, this allows the use of MANGROUPS.${MK_FOO}, simplifying Makefile logic for optional manpages. MFC after: 3 seconds Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53126 --- share/mk/bsd.man.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 0a3594e05d94..1591a3e0905e 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -97,6 +97,14 @@ manlinksinstall: .PHONY all-man: +# Take groups from both MANGROUPS and MANGROUPS.yes, to allow syntax like +# MANGROUPS.${MK_FOO}=FOO. Sort and uniq the list of groups in case of +# duplicates. +.if defined(MANGROUPS) || defined(MANGROUPS.yes) +MANGROUPS:=${MANGROUPS} ${MANGROUPS.yes} +MANGROUPS:=${MANGROUPS:O:u} +.endif + .for __group in ${MANGROUPS} realmaninstall: realmaninstall-${__group} From nobody Fri Oct 17 10:43:01 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp1ck1SzRz6D4Y2; Fri, 17 Oct 2025 10:43: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 4cp1ck0b1Sz484H; Fri, 17 Oct 2025 10: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=1760697782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DW426c9c+Nbp4960wg2eQDdptFyd/MieQw4qEh3Omxs=; b=mZBJyQ8cnNTYDlJohbUCttUjGHok81nj49QQir6n2WUV/JCmqw9TlplUFpVHrIyONsyyXX 9FgNao9loPr8Ci7M7yh1D0f5NNzitW+DEUBxbDyF4bHMFg3wKH4xCREkRbl/vVwSESgBsw ccMIvvU4mb0QBKlSP2DjtyOJC7zjquSdg6jQIbb5X2E6pDOBvrpK3xj0W8Ye69akI4wCdc smTCh/qPSTGvxELi7civ8m26VM/ZBCSHYBk33KKUKzoAiwTlAOZ8I5OL7m21RpvSQE0izB xANAArq/OM4ypAgVqGk/ybLSca4ThgdhntV9FJguN3UxtPNFy5BiA/mb0+sWtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760697782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DW426c9c+Nbp4960wg2eQDdptFyd/MieQw4qEh3Omxs=; b=lC+Pa7gu9v/imZDjxXjYurdt2PBHJLjfxGsbKPSoxcvzBRAVfot3+CZwKjz8YSHMxBuUMZ WgSLxd3ZIhgh5Nces8EuBFyOc7BPsg2gUWd83VOJEpW56P/bpfzOHIibxaV+hd5Ym9JdJB WnaaPa2rxir5voevW9CQ3OFaZdq/Ef6cCvWHv0/hvQePPPIgNjWS+bA3l4KWtLnN2rV7ov wx93ZgBVkKuVJ0Kb4R0wukA/7RS5otV3+MxbUf+wZEX94DTj5NiDF2eiDGEivDYrosd4n+ 6EEIyqyVNEbAEnzm7YXC8XRqOXuj43t0D/s+h4EN0UEhXpodTIilfQHQDYDacQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760697782; a=rsa-sha256; cv=none; b=gw6ThfQkhCLSlFbdBdxeWcP2sOxH4bWZU0c+MaZqBRTcCcLdlSOsNrfjG0al5V+9hW1UjE 7ZoRy9iNHuXiNELV1roB37TMs0h5KAqN4ENzCuJuXv+/v2BS6Qf+mf7M1eo/DKjMAlfL05 uWLhZRgZwoqK+bqZy/iItbLOcIiG01e4xM1Qn2O/1sXsu66txjaDV8NcJ4XcWEodWr0sdZ dpScYXDLF9irrRXZAAg9C/hllUQJISkenJIur00n9vUasYrMWHbRXFBDcoiocO7ff0qBpZ 6ZsXdDDRpDNW35JXkixB2J3O9IVQYCfb0qbnFY9Aeocp9sTu1bAG0IOGCNYxiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp1cj72klzrsK; Fri, 17 Oct 2025 10:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HAh1IV072659; Fri, 17 Oct 2025 10:43:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HAh1BL072656; Fri, 17 Oct 2025 10:43:01 GMT (envelope-from git) Date: Fri, 17 Oct 2025 10:43:01 GMT Message-Id: <202510171043.59HAh1BL072656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: c0f17d637a4a - main - tar: Move to the utilities package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0f17d637a4ab1e5dcae6b931623b7b0ee5bece2 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=c0f17d637a4ab1e5dcae6b931623b7b0ee5bece2 commit c0f17d637a4ab1e5dcae6b931623b7b0ee5bece2 Author: Lexi Winter AuthorDate: 2025-10-17 10:42:03 +0000 Commit: Lexi Winter CommitDate: 2025-10-17 10:42:52 +0000 tar: Move to the utilities package tar(1) is not a core runtime utility; in particular, nothing in /etc/rc.d/* requires it. Move it to utilities, which is also where cpio(1) lives. This removes the dependency from runtime to libarchive. MFC after: 3 days Reviewed by: manu, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53059 --- usr.bin/tar/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile index 9260315fb30b..d3d29e03fd35 100644 --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -2,7 +2,6 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive -PACKAGE= runtime PROG= bsdtar BSDTAR_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ ${_LIBARCHIVEDIR}/libarchive/archive.h From nobody Fri Oct 17 11:55:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp3D966bSz6D9sK; Fri, 17 Oct 2025 11:55: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 4cp3D95f9lz3Phh; Fri, 17 Oct 2025 11:55:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LmEYVfNTbPz++xfcv5mxECD/RNwgguTlB8hUypg5Tmg=; b=E96N0WFCa/SWhVpAbsUcp9C9XLTR0u3xMI2yH1VWTIwNB/HltBSs9PrxMtXRCUjeUzlbw3 27ubheC2LM77SOXw4RTtW3kXWdJ0z/Hk23Oa9o6x6+GD0LISfZBFFReMUcvSNVq++4lG1c pZWPN2QpIgVceSM2SALtgC1aGSGdq0CAWp7KYG47RQ/WHxsAAXomDkKDRo63XdEBtWW/ZO 9/eKTlnQPJBsWjH0DVEWWB1zIf6OBrDEInTWoY24O8awAnO9sFopraCP9/zrN9O8d2TF30 VQU1IYDwp//FtIm3C/lKZ+nO6IWbTzaIoGLg09MgLpreyOxUjBmCpV+leYrrgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LmEYVfNTbPz++xfcv5mxECD/RNwgguTlB8hUypg5Tmg=; b=oqB1DQQLfWY1bzbk4havMBovOe/bWO9NBsKZjn8/QrE/xE6quc5M9s2J4NsXEEub+oHVEK 47BOuACVBtA9ILh4p7dEVEcPLlNRKL2la2tpIcCg1coZ4usSIbW4SkSOvRLVyqjoO3x9Q3 aTDftIMk76yuzwi0kZFitZFWHibWOZExQnKmRQiYEzc6jh7NiOVxTyBnzz309hCn+qBw9q iv8458K2eEEKQXQnIqgmZwYMXLN5wsH/uzq2ekyvlkX8WeBHUoAjaJkhr3B2b3LSaCYLtw mCq9n7mNc3u2blWlauQGWTRfRX0/zWHGbjwj6s/jOEwWW8VGlSEhxooIj/nz8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760702121; a=rsa-sha256; cv=none; b=p1MYCz2RKO0X+WvhTcXTMT98iT4umWrTD/irUqvPw9LJ/nXPbWGeLIai6+Bg5nuA0wbQfY D25aGk2m/3rgDE5m8jNmeuNFcDhvD3Mw8EmatH7+TxDVAzf3FPFFH5KtCVUBpRvkAd0JSU hje0ufJKNiwfdAX3o/+mVW7ggwWLD4diHv5y2t5jpfEyXljsly+C3PvWf2mR2alcjiCHJe g9aVLmAPcE+clPFLixPQjD42U0UAZ9uTjDxe1yjEpbI0jwA3MWDoHq4GMfcPouvZUF7K6D ssUFTLMcE6HUP3AHklroDRLwOdbY9Zu+o+L8U+5iDnfRS2nRiYtz+FN3LHNPBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp3D95BQDzthK; Fri, 17 Oct 2025 11:55:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HBtLgP004622; Fri, 17 Oct 2025 11:55:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HBtLTm004619; Fri, 17 Oct 2025 11:55:21 GMT (envelope-from git) Date: Fri, 17 Oct 2025 11:55:21 GMT Message-Id: <202510171155.59HBtLTm004619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 5854d1cbab10 - main - quot: Fix benign buffer overflow List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5854d1cbab1073d78519e7ad9a6eb5726341d587 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5854d1cbab1073d78519e7ad9a6eb5726341d587 commit 5854d1cbab1073d78519e7ad9a6eb5726341d587 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:54:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-17 11:54:48 +0000 quot: Fix benign buffer overflow If it encounters an inode whose owner does not have a pw entry, quot allocates a 7-byte buffer (8 in practice, since that is the minimum allocation size) and uses it to store the numeric uid preceded by a hash character. This will overflow the allocated buffer if the UID exceeds 6 decimal digits. Avoid this by using asprintf() instead. While here, simplify the common case as well using strdup(). Reported by: Igor Gabriel Sousa e Souza MFC after: 3 days Reviewed by: obiwac, emaste Differential Revision: https://reviews.freebsd.org/D53129 --- usr.sbin/quot/quot.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 4152c498371a..c11c46a500a1 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -280,14 +280,10 @@ user(uid_t uid) usr--) { if (!usr->name) { usr->uid = uid; - if (!(pwd = getpwuid(uid))) { - if ((usr->name = (char *)malloc(7))) - sprintf(usr->name,"#%d",uid); + asprintf(&usr->name, "#%u", uid); } else { - if ((usr->name = (char *) - malloc(strlen(pwd->pw_name) + 1))) - strcpy(usr->name,pwd->pw_name); + usr->name = strdup(pwd->pw_name); } if (!usr->name) errx(1, "allocate users"); From nobody Fri Oct 17 11:55:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp3DC007Qz6D9gM; Fri, 17 Oct 2025 11:55: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 4cp3DB6D0Rz3PHb; Fri, 17 Oct 2025 11:55:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qll/KRt9012Xbb5QBgjrRwWsf46z8L6J86QtRTqR/EA=; b=NLc6CBGYno23lg2PR+wsIMrHh0S/mFn6KHTIPxLF1cv9SQ9MWx1ittHyvyPJmAHNfyfELQ D/zJJv9wItBzz6PEkcPXY3Fb1CJJLGECaNce/dsQ3SlcVEFNs5N2TA1ZvqKfte1kt1bkN5 oTyP/vqDy/5Zz9zVHAOr6iUTuxqt7Hlr4fvdIfBUFTs9fVR57klwCBT59HN301c+tn0rqe PhuLnvGIUUf1SDvnIdiq/Qv/dgr5ZODGnaX0aZ/CRouaCs9/hYlatc12vlmW6SHY4Jx1/+ 7ZLXA151qusRkSv/3J8/G0QUUQc5IZ4uNxZ3WL5Y04kDNp92JXpjG7dSJY+gSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qll/KRt9012Xbb5QBgjrRwWsf46z8L6J86QtRTqR/EA=; b=WTaG6elcLLkkbJPGtNTedqTOEBozXY7xtfEDx+d8e2uLU8W/GVY95pc5C5LZMLeAKV9NaL Uky+x9inC18k+KQKfONWnzwcysWxE7mAkj1VXc/j5CWyXGd/mUcApD1ECdUpSj3jX8Hmvq HTf9Fm4ZFeAxCfuJlnajLMWXHzMSdynUuJzu5QS58vt3peKP/+yv9btau3efSK1AXUAi2Q Trw3MX5jC8uyk6rShj72wdxib7jJ+7hEY+kH5xdpUFfI8O7vLq6ke7xSfOkT4sclLsV8b3 qWLtRf7+Cce+V5g8bf/ajZFZKdmicCvT6T1dgO+EHe2QSskLT3HS6/dmVjNs9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760702122; a=rsa-sha256; cv=none; b=SOJsGfJs900HDGk8GpZOzF3X+DlyDRyi92Lg7TRiLkkxlRaS2rVtt+zy33LxTbTnwztdl2 M4odaNnf/UKlricDfo3loF9XaKVhKIJ7naYV0vOZIXn8nAk3wf+SAJIZclaIWhoOxK6AnQ V0ztgh+n1KyWZbJNepwu4qZGHObaAg8MTHtX+4j8WIh4r3HOXjYKkM8iV33rEXf/IbbG+E mYClRuOhdC16DRifYsJNG0SPR8Q3+/ZQiWGqYBL93tiWxmDXtjIVGZnorVPKuQCakoU4PB hsQhZUZLdKh0aJjK62Obtw7pBIJX3Ffnb0aPIeGiWAM1HRUjcBPyvZkrjUoCsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp3DB5qC3ztS1; Fri, 17 Oct 2025 11:55:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HBtMOk004661; Fri, 17 Oct 2025 11:55:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HBtMCp004658; Fri, 17 Oct 2025 11:55:22 GMT (envelope-from git) Date: Fri, 17 Oct 2025 11:55:22 GMT Message-Id: <202510171155.59HBtMCp004658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 195b00ec45e5 - main - quot: Clean up List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 195b00ec45e55c38da13d1bcd2d7eb6614abec59 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=195b00ec45e55c38da13d1bcd2d7eb6614abec59 commit 195b00ec45e55c38da13d1bcd2d7eb6614abec59 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:54:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-17 11:54:59 +0000 quot: Clean up * Fix numerous style violations. * Modernize somewhat. * Don't bother examining errno after calling get_inode(), as it always exits on error. * Fix confusing wording in the manual page. The code remains somewhat idiosyncratic, e.g. in its insistance on counting down rather than up in simple for loops, but in the absence of comprehensive automated tests, the risk of introducing bugs exceeds the benefit of rewriting these into more idiomatic forms. Reviewed by: obiwac Differential Revision: https://reviews.freebsd.org/D53130 --- usr.sbin/quot/Makefile | 2 - usr.sbin/quot/quot.8 | 7 +- usr.sbin/quot/quot.c | 227 ++++++++++++++++++++++--------------------------- 3 files changed, 106 insertions(+), 130 deletions(-) diff --git a/usr.sbin/quot/Makefile b/usr.sbin/quot/Makefile index ed8360ae938e..34ebcb1009c8 100644 --- a/usr.sbin/quot/Makefile +++ b/usr.sbin/quot/Makefile @@ -2,6 +2,4 @@ PROG= quot MAN= quot.8 LIBADD= ufs -WARNS?= 2 - .include diff --git a/usr.sbin/quot/quot.8 b/usr.sbin/quot/quot.8 index 81abe28b41d5..8da0625b246c 100644 --- a/usr.sbin/quot/quot.8 +++ b/usr.sbin/quot/quot.8 @@ -27,7 +27,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 8, 1994 +.Dd October 15, 2025 .Dt QUOT 8 .Os .Sh NAME @@ -55,9 +55,8 @@ blocks in files with this or lower size. For each user, display count of files and space occupied. .It Fl h Estimate the number of blocks in each file based on its size. -Despite that this does not give the correct results (it does not -account for the holes in files), this option is not any faster -and thus is discouraged. +Note that this does not account for sparse files and is no faster than +reporting the accurate block count. .It Fl k Force the numbers to be reported in kilobyte counts. By default, all sizes are reported in 512-byte block counts. diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index c11c46a500a1..0a3e3094d940 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -32,19 +32,20 @@ */ #include -#include #include #include #include #include #include +#include #include #include -#include #include #include #include +#include +#include #include #include #include @@ -52,10 +53,11 @@ #include /* some flags of what to do: */ -static char estimate; -static char count; -static char unused; -static void (*func)(int, struct fs *, char *); +static bool all; +static bool count; +static bool estimate; +static bool unused; +static void (*func)(int, struct fs *); static long blocksize; static char *header; static int headerlen; @@ -69,9 +71,9 @@ static struct user *user(uid_t); static int cmpusers(const void *, const void *); static void uses(uid_t, daddr_t, time_t); static void initfsizes(void); -static void dofsizes(int, struct fs *, char *); -static void douser(int, struct fs *, char *); -static void donames(int, struct fs *, char *); +static void dofsizes(int, struct fs *); +static void douser(int, struct fs *); +static void donames(int, struct fs *); static void usage(void); static void quot(char *, char *); @@ -89,7 +91,7 @@ static void quot(char *, char *); #ifdef COMPAT #define SIZE(n) (n) #else -#define SIZE(n) ((int)(((quad_t)(n) * 512 + blocksize - 1)/blocksize)) +#define SIZE(n) ((int)(((intmax_t)(n) * 512 + blocksize - 1) / blocksize)) #endif #define INOCNT(fs) ((fs)->fs_ipg) @@ -104,29 +106,26 @@ static void quot(char *, char *); static union dinode * get_inode(int fd, struct fs *super, ino_t ino) { - static caddr_t ipbuf; + static union dinode *ipbuf; static struct cg *cgp; static ino_t last; - static int cg; + static unsigned long cg; struct ufs2_dinode *di2; + off_t off; if (fd < 0) { /* flush cache */ - if (ipbuf) { - free(ipbuf); - ipbuf = 0; - if (super != NULL && super->fs_magic == FS_UFS2_MAGIC) { - free(cgp); - cgp = 0; - } - } - return 0; + free(ipbuf); + ipbuf = NULL; + free(cgp); + cgp = NULL; + return (NULL); } - if (!ipbuf || ino < last || ino >= last + INOCNT(super)) { + if (ipbuf == NULL || ino < last || ino >= last + INOCNT(super)) { if (super->fs_magic == FS_UFS2_MAGIC && - (!cgp || cg != ino_to_cg(super, ino))) { + (cgp == NULL || cg != ino_to_cg(super, ino))) { cg = ino_to_cg(super, ino); - if (!cgp && !(cgp = malloc(super->fs_cgsize))) + if (cgp == NULL && (cgp = malloc(super->fs_cgsize)) == NULL) errx(1, "allocate cg"); if (lseek(fd, (off_t)cgtod(super, cg) << super->fs_fshift, 0) < 0) err(1, "lseek cg"); @@ -135,12 +134,12 @@ get_inode(int fd, struct fs *super, ino_t ino) if (!cg_chkmagic(cgp)) errx(1, "cg has bad magic"); } - if (!ipbuf - && !(ipbuf = malloc(INOSZ(super)))) + if (ipbuf == NULL && (ipbuf = malloc(INOSZ(super))) == NULL) errx(1, "allocate inodes"); last = rounddown(ino, INOCNT(super)); - if (lseek(fd, (off_t)ino_to_fsba(super, last) << super->fs_fshift, 0) < (off_t)0 - || read(fd, ipbuf, INOSZ(super)) != (ssize_t)INOSZ(super)) + off = (off_t)ino_to_fsba(super, last) << super->fs_fshift; + if (lseek(fd, off, SEEK_SET) != off || + read(fd, ipbuf, INOSZ(super)) != (ssize_t)INOSZ(super)) err(1, "read inodes"); } @@ -150,7 +149,7 @@ get_inode(int fd, struct fs *super, ino_t ino) di2 = &((struct ufs2_dinode *)ipbuf)[ino % INOCNT(super)]; /* If the inode is unused, it might be unallocated too, so zero it. */ if (isclr(cg_inosused(cgp), ino % super->fs_ipg)) - bzero(di2, sizeof (*di2)); + memset(di2, 0, sizeof(*di2)); return ((union dinode *)di2); } @@ -166,8 +165,8 @@ static int virtualblocks(struct fs *super, union dinode *dp) sz = DIP(super, dp, di_size); #ifdef COMPAT - if (lblkno(super,sz) >= UFS_NDADDR) { - nblk = blkroundup(super,sz); + if (lblkno(super, sz) >= UFS_NDADDR) { + nblk = blkroundup(super, sz); if (sz == nblk) nblk += super->fs_bsize; } @@ -176,9 +175,9 @@ static int virtualblocks(struct fs *super, union dinode *dp) #else /* COMPAT */ - if (lblkno(super,sz) >= UFS_NDADDR) { - nblk = blkroundup(super,sz); - sz = lblkno(super,nblk); + if (lblkno(super, sz) >= UFS_NDADDR) { + nblk = blkroundup(super, sz); + sz = lblkno(super, nblk); sz = (sz - UFS_NDADDR + NINDIR(super) - 1) / NINDIR(super); while (sz > 0) { nblk += sz * super->fs_bsize; @@ -186,7 +185,7 @@ static int virtualblocks(struct fs *super, union dinode *dp) sz = (sz - 1 + NINDIR(super) - 1) / NINDIR(super); } } else - nblk = fragroundup(super,sz); + nblk = fragroundup(super, sz); return nblk / 512; #endif /* COMPAT */ @@ -234,10 +233,9 @@ inituser(void) int i; struct user *usr; - if (!nusers) { + if (nusers == 0) { nusers = 8; - if (!(users = - (struct user *)calloc(nusers,sizeof(struct user)))) + if ((users = calloc(nusers, sizeof(*users))) == NULL) errx(1, "allocate users"); } else { for (usr = users, i = nusers; --i >= 0; usr++) { @@ -255,14 +253,13 @@ usrrehash(void) struct user *svusr; svusr = users; - nusers <<= 1; - if (!(users = (struct user *)calloc(nusers,sizeof(struct user)))) + nusers *= 2; + if ((users = calloc(nusers, sizeof(*users))) == NULL) errx(1, "allocate users"); - for (usr = svusr, i = nusers >> 1; --i >= 0; usr++) { - for (usrn = users + (usr->uid&(nusers - 1)); usrn->name; - usrn--) { + for (usr = svusr, i = nusers / 2; --i >= 0; usr++) { + for (usrn = users + usr->uid % nusers; usrn->name; usrn--) { if (usrn <= users) - usrn = users + nusers; + usrn += nusers; } *usrn = *usr; } @@ -272,29 +269,24 @@ static struct user * user(uid_t uid) { struct user *usr; - int i; struct passwd *pwd; + int i; while (1) { - for (usr = users + (uid&(nusers - 1)), i = nusers; --i >= 0; - usr--) { - if (!usr->name) { + for (usr = users + uid % nusers, i = nusers; --i >= 0; usr--) { + if (usr->name == NULL) { usr->uid = uid; - if (!(pwd = getpwuid(uid))) { + if ((pwd = getpwuid(uid)) == NULL) asprintf(&usr->name, "#%u", uid); - } else { + else usr->name = strdup(pwd->pw_name); - } - if (!usr->name) + if (usr->name == NULL) errx(1, "allocate users"); - - return usr; - - } else if (usr->uid == uid) - return usr; - + } + if (usr->uid == uid) + return (usr); if (usr <= users) - usr = users + nusers; + usr += nusers; } usrrehash(); } @@ -303,15 +295,13 @@ user(uid_t uid) static int cmpusers(const void *v1, const void *v2) { - const struct user *u1, *u2; - u1 = (const struct user *)v1; - u2 = (const struct user *)v2; + const struct user *u1 = v1, *u2 = v2; - return u2->space - u1->space; + return (u2->space - u1->space); } -#define sortusers(users) (qsort((users),nusers,sizeof(struct user), \ - cmpusers)) +#define sortusers(users) \ + qsort((users), nusers, sizeof(struct user), cmpusers) static void uses(uid_t uid, daddr_t blks, time_t act) @@ -339,7 +329,7 @@ uses(uid_t uid, daddr_t blks, time_t act) #else #define FSZCNT 512 #endif -struct fsizes { +static struct fsizes { struct fsizes *fsz_next; daddr_t fsz_first, fsz_last; ino_t fsz_count[FSZCNT]; @@ -361,7 +351,7 @@ initfsizes(void) } static void -dofsizes(int fd, struct fs *super, char *name) +dofsizes(int fd, struct fs *super) { ino_t inode, maxino; union dinode *dp; @@ -375,13 +365,12 @@ dofsizes(int fd, struct fs *super, char *name) errx(1, "allocate fsize structure"); #endif /* COMPAT */ for (inode = 0; inode < maxino; inode++) { - errno = 0; - if ((dp = get_inode(fd,super,inode)) + if ((dp = get_inode(fd, super, inode)) != NULL && #ifdef COMPAT - && ((DIP(super, dp, di_mode) & IFMT) == IFREG - || (DIP(super, dp, di_mode) & IFMT) == IFDIR) + ((DIP(super, dp, di_mode) & IFMT) == IFREG || + (DIP(super, dp, di_mode) & IFMT) == IFDIR) #else /* COMPAT */ - && !isfree(super, dp) + !isfree(super, dp) #endif /* COMPAT */ ) { sz = estimate ? virtualblocks(super, dp) : @@ -400,9 +389,8 @@ dofsizes(int fd, struct fs *super, char *name) if (ksz < fp->fsz_last) break; } - if (!fp || ksz < fp->fsz_first) { - if (!(fp = (struct fsizes *) - malloc(sizeof(struct fsizes)))) + if (fp == NULL || ksz < fp->fsz_first) { + if ((fp = malloc(sizeof(*fp))) == NULL) errx(1, "allocate fsize structure"); fp->fsz_next = *fsp; *fsp = fp; @@ -416,24 +404,23 @@ dofsizes(int fd, struct fs *super, char *name) fp->fsz_count[ksz % FSZCNT]++; fp->fsz_sz[ksz % FSZCNT] += sz; #endif /* COMPAT */ - } else if (errno) { - err(1, "%s", name); } } sz = 0; - for (fp = fsizes; fp; fp = fp->fsz_next) { + for (fp = fsizes; fp != NULL; fp = fp->fsz_next) { for (i = 0; i < FSZCNT; i++) { - if (fp->fsz_count[i]) + if (fp->fsz_count[i] != 0) { printf("%jd\t%jd\t%d\n", (intmax_t)(fp->fsz_first + i), (intmax_t)fp->fsz_count[i], SIZE(sz += fp->fsz_sz[i])); + } } } } static void -douser(int fd, struct fs *super, char *name) +douser(int fd, struct fs *super) { ino_t inode, maxino; struct user *usr, *usrs; @@ -442,38 +429,36 @@ douser(int fd, struct fs *super, char *name) maxino = super->fs_ncg * super->fs_ipg - 1; for (inode = 0; inode < maxino; inode++) { - errno = 0; - if ((dp = get_inode(fd,super,inode)) - && !isfree(super, dp)) + if ((dp = get_inode(fd, super, inode)) != NULL && + !isfree(super, dp)) { uses(DIP(super, dp, di_uid), estimate ? virtualblocks(super, dp) : actualblocks(super, dp), DIP(super, dp, di_atime)); - else if (errno) { - err(1, "%s", name); } } - if (!(usrs = (struct user *)malloc(nusers * sizeof(struct user)))) + if ((usrs = malloc(nusers * sizeof(*usrs))) == NULL) errx(1, "allocate users"); - bcopy(users,usrs,nusers * sizeof(struct user)); + memcpy(usrs, users, nusers * sizeof(*usrs)); sortusers(usrs); for (usr = usrs, n = nusers; --n >= 0 && usr->count; usr++) { - printf("%5d",SIZE(usr->space)); + printf("%5d", SIZE(usr->space)); if (count) - printf("\t%5ld",usr->count); - printf("\t%-8s",usr->name); - if (unused) + printf("\t%5ld", usr->count); + printf("\t%-8s", usr->name); + if (unused) { printf("\t%5d\t%5d\t%5d", - SIZE(usr->spc30), - SIZE(usr->spc60), - SIZE(usr->spc90)); + SIZE(usr->spc30), + SIZE(usr->spc60), + SIZE(usr->spc90)); + } printf("\n"); } free(usrs); } static void -donames(int fd, struct fs *super, char *name) +donames(int fd, struct fs *super) { int c; ino_t maxino; @@ -484,18 +469,18 @@ donames(int fd, struct fs *super, char *name) /* first skip the name of the filesystem */ while ((c = getchar()) != EOF && (c < '0' || c > '9')) while ((c = getchar()) != EOF && c != '\n'); - ungetc(c,stdin); + ungetc(c, stdin); while (scanf("%ju", &inode) == 1) { if (inode > maxino) { warnx("illegal inode %ju", inode); return; } - errno = 0; - if ((dp = get_inode(fd,super,inode)) - && !isfree(super, dp)) { - printf("%s\t",user(DIP(super, dp, di_uid))->name); + if ((dp = get_inode(fd, super, inode)) != NULL && + !isfree(super, dp)) { + printf("%s\t", user(DIP(super, dp, di_uid))->name); /* now skip whitespace */ - while ((c = getchar()) == ' ' || c == '\t'); + while ((c = getchar()) == ' ' || c == '\t') + /* nothing */; /* and print out the remainder of the input line */ while (c != EOF && c != '\n') { putchar(c); @@ -503,11 +488,9 @@ donames(int fd, struct fs *super, char *name) } putchar('\n'); } else { - if (errno) { - err(1, "%s", name); - } /* skip this line */ - while ((c = getchar()) != EOF && c != '\n'); + while ((c = getchar()) != EOF && c != '\n') + /* nothing */; } if (c == EOF) break; @@ -534,7 +517,7 @@ quot(char *name, char *mp) get_inode(-1, NULL, 0); /* flush cache */ inituser(); initfsizes(); - if ((fd = open(name,0)) < 0) { + if ((fd = open(name, 0)) < 0) { warn("%s", name); close(fd); return; @@ -551,11 +534,11 @@ quot(char *name, char *mp) close(fd); return; } - printf("%s:",name); + printf("%s:", name); if (mp) - printf(" (%s)",mp); + printf(" (%s)", mp); putchar('\n'); - (*func)(fd, fs, name); + (*func)(fd, fs); free(fs); close(fd); } @@ -563,29 +546,27 @@ quot(char *name, char *mp) int main(int argc, char *argv[]) { - char all = 0; struct statfs *mp; struct fstab *fs; - int cnt; - int ch; + int ch, cnt; func = douser; #ifndef COMPAT - header = getbsize(&headerlen,&blocksize); + header = getbsize(&headerlen, &blocksize); #endif while ((ch = getopt(argc, argv, "acfhknv")) != -1) { switch (ch) { case 'a': - all = 1; + all = true; break; case 'c': func = dofsizes; break; case 'f': - count = 1; + count = true; break; case 'h': - estimate = 1; + estimate = true; break; #ifndef COMPAT case 'k': @@ -596,7 +577,7 @@ main(int argc, char *argv[]) func = donames; break; case 'v': - unused = 1; + unused = true; break; default: usage(); @@ -609,18 +590,16 @@ main(int argc, char *argv[]) usage(); if (all) { - cnt = getmntinfo(&mp,MNT_NOWAIT); - for (; --cnt >= 0; mp++) { - if (!strncmp(mp->f_fstypename, "ufs", MFSNAMELEN)) + for (cnt = getmntinfo(&mp, MNT_NOWAIT); --cnt >= 0; mp++) + if (strncmp(mp->f_fstypename, "ufs", MFSNAMELEN) == 0) quot(mp->f_mntfromname, mp->f_mntonname); - } } - while (--argc >= 0) { + while (argc-- > 0) { if ((fs = getfsfile(*argv)) != NULL) quot(fs->fs_spec, 0); else - quot(*argv,0); + quot(*argv, 0); argv++; } - return 0; + return (0); } From nobody Fri Oct 17 11:55:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp3DD1X7wz6D9wW; Fri, 17 Oct 2025 11:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cp3DC6wxyz3PqK; Fri, 17 Oct 2025 11:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gwkwb19+azoUfKg++vfqTjTyKFpqv1cDRxJJG4/70c=; b=CR1+82KYaohBQv3tWElZbXOgbBIZ2TwXlpdMOZa1QFKFlaEHjRJOahTVpKFBhw3juh7VK/ oSnIrIzrfUOAMoFGm8hALXO58nV3soZPpUd4WAGyiX0q7eIXSVDOuED97qglGKj5d/KF/D NNd77W/ep5JwHGMDb6hh6Tj0zuQybW92VM1/U48mrMlWWwIDz2NRzkY6wRSvqYQvyB3UEv aBxxe6v/wqAplErSdW1XTrhKqwJOvoIPIwbA932rBD/D8rc21ruR0Ckx5j5sYDiYhB/Rv2 5VMkTNR6ykgla6WCiuQuuG/LwQmoeLEuVd1O4DGvY02HVHwxtP8yCOlgQfOPjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gwkwb19+azoUfKg++vfqTjTyKFpqv1cDRxJJG4/70c=; b=vh1Y7DuiEfVRhlp5nbbY5iZ8DlV1J1KuvSyxDc1usEFrIj/H6lZUCvIBSxAdKbHVzDPSer pNduDDfvlmIijSD+1yHFnJOSsuK2p19de3Tk3i+VDZGgAuvfM2lNTgGBrEzUMQDw1AoteY FScts5l6fGAL45eRygm6Ooif91Ba4b+U0cdUK/M8AnEarPeJCHb/S0zT9f0ABPDSJD/Ijb OT2zSTiA4ALTWoZxgaTTtg4mtEtvkCK+Gtj+TWAqabnLTHAOe1U/vONqt2y8aaBWK/1pdg Tg3wkWcm4xl1sMQ5FVUMrscPCJWIrXiAsSMkCYfRVphosPCpjeuLCMcBo0aqqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760702124; a=rsa-sha256; cv=none; b=AZ8sTNA7mKM8VzNJxM4iSaUuwDJZwPYvznsklnH+eEAVqFaijhLwKRCL67tYG7iYMRn9io CORJ20sxnYJ/PDZ4Crv5Sg9q4lor8MOLrBrd/st09C68o3kdJp8pHHEifJWEcw64O7s6xD oRrdK/GJgca5eZRqX2Gl1ssYgmm+pkdJUpVgVCry9jex/UqI7rAvg1s+hIJIah8HCqBlbG njnJlo0rrFs9CHTaAYqlQ3QmEKmjo8V+WvB5GE+eSi875afxOyqCi0biSy+mmkUB/5VHla UMQ75vJB4fpkNKrw1zSjOL6DhTRsGQm5CJmoDpEbS/Y+WVoQM7H9mX3F46nerQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp3DC6XPsztgK; Fri, 17 Oct 2025 11:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HBtNNp004697; Fri, 17 Oct 2025 11:55:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HBtNDn004694; Fri, 17 Oct 2025 11:55:23 GMT (envelope-from git) Date: Fri, 17 Oct 2025 11:55:23 GMT Message-Id: <202510171155.59HBtNDn004694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 0eaca4a24b97 - main - quot: Drop the COMPAT version List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0eaca4a24b97c02685532f86c121a4cf415942c5 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=0eaca4a24b97c02685532f86c121a4cf415942c5 commit 0eaca4a24b97c02685532f86c121a4cf415942c5 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:55:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-17 11:55:03 +0000 quot: Drop the COMPAT version We've had this code for 30 years, but there has never been a way to build it. We have no idea if it still works, or if it ever worked. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53131 --- usr.sbin/quot/quot.c | 54 ---------------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 0a3e3094d940..ad9f65c94877 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -88,11 +88,7 @@ static void quot(char *, char *); * Due to the size of modern disks, we must cast intermediate * values to 64 bits to prevent potential overflows. */ -#ifdef COMPAT -#define SIZE(n) (n) -#else #define SIZE(n) ((int)(((intmax_t)(n) * 512 + blocksize - 1) / blocksize)) -#endif #define INOCNT(fs) ((fs)->fs_ipg) #define INOSZ(fs) \ @@ -153,27 +149,13 @@ get_inode(int fd, struct fs *super, ino_t ino) return ((union dinode *)di2); } -#ifdef COMPAT -#define actualblocks(fs, dp) (DIP(fs, dp, di_blocks) / 2) -#else #define actualblocks(fs, dp) DIP(fs, dp, di_blocks) -#endif static int virtualblocks(struct fs *super, union dinode *dp) { off_t nblk, sz; sz = DIP(super, dp, di_size); -#ifdef COMPAT - if (lblkno(super, sz) >= UFS_NDADDR) { - nblk = blkroundup(super, sz); - if (sz == nblk) - nblk += super->fs_bsize; - } - - return sz / 1024; - -#else /* COMPAT */ if (lblkno(super, sz) >= UFS_NDADDR) { nblk = blkroundup(super, sz); @@ -188,15 +170,11 @@ static int virtualblocks(struct fs *super, union dinode *dp) nblk = fragroundup(super, sz); return nblk / 512; -#endif /* COMPAT */ } static int isfree(struct fs *super, union dinode *dp) { -#ifdef COMPAT - return (DIP(super, dp, di_mode) & IFMT) == 0; -#else /* COMPAT */ switch (DIP(super, dp, di_mode) & IFMT) { case IFIFO: @@ -213,7 +191,6 @@ isfree(struct fs *super, union dinode *dp) default: errx(1, "unknown IFMT 0%o", DIP(super, dp, di_mode) & IFMT); } -#endif } static struct user { @@ -324,11 +301,7 @@ uses(uid_t uid, daddr_t blks, time_t act) usr->spc30 += blks; } -#ifdef COMPAT -#define FSZCNT 500 -#else #define FSZCNT 512 -#endif static struct fsizes { struct fsizes *fsz_next; daddr_t fsz_first, fsz_last; @@ -360,30 +333,12 @@ dofsizes(int fd, struct fs *super) int i; maxino = super->fs_ncg * super->fs_ipg - 1; -#ifdef COMPAT - if (!(fsizes = (struct fsizes *)malloc(sizeof(struct fsizes)))) - errx(1, "allocate fsize structure"); -#endif /* COMPAT */ for (inode = 0; inode < maxino; inode++) { if ((dp = get_inode(fd, super, inode)) != NULL && -#ifdef COMPAT - ((DIP(super, dp, di_mode) & IFMT) == IFREG || - (DIP(super, dp, di_mode) & IFMT) == IFDIR) -#else /* COMPAT */ !isfree(super, dp) -#endif /* COMPAT */ ) { sz = estimate ? virtualblocks(super, dp) : actualblocks(super, dp); -#ifdef COMPAT - if (sz >= FSZCNT) { - fsizes->fsz_count[FSZCNT-1]++; - fsizes->fsz_sz[FSZCNT-1] += sz; - } else { - fsizes->fsz_count[sz]++; - fsizes->fsz_sz[sz] += sz; - } -#else /* COMPAT */ ksz = SIZE(sz); for (fsp = &fsizes; (fp = *fsp); fsp = &fp->fsz_next) { if (ksz < fp->fsz_last) @@ -403,7 +358,6 @@ dofsizes(int fd, struct fs *super) } fp->fsz_count[ksz % FSZCNT]++; fp->fsz_sz[ksz % FSZCNT] += sz; -#endif /* COMPAT */ } } sz = 0; @@ -500,11 +454,7 @@ donames(int fd, struct fs *super) static void usage(void) { -#ifdef COMPAT - fprintf(stderr, "usage: quot [-cfhnv] [-a | filesystem ...]\n"); -#else /* COMPAT */ fprintf(stderr, "usage: quot [-cfhknv] [-a | filesystem ...]\n"); -#endif /* COMPAT */ exit(1); } @@ -551,9 +501,7 @@ main(int argc, char *argv[]) int ch, cnt; func = douser; -#ifndef COMPAT header = getbsize(&headerlen, &blocksize); -#endif while ((ch = getopt(argc, argv, "acfhknv")) != -1) { switch (ch) { case 'a': @@ -568,11 +516,9 @@ main(int argc, char *argv[]) case 'h': estimate = true; break; -#ifndef COMPAT case 'k': blocksize = 1024; break; -#endif /* COMPAT */ case 'n': func = donames; break; From nobody Fri Oct 17 11:55:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp3DF2jS0z6D9TZ; Fri, 17 Oct 2025 11:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cp3DF15l1z3PcN; Fri, 17 Oct 2025 11:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0WGH1Q71hHEwtBLuryH02ttH16oVTV8SXKXFDovvYWU=; b=gzqFc+ia8nmxDJRk/xOKhn2jYOd4GPF09+esIYBHeZLGApMq5GPJjEDaRqAzcXLI9TiBHR GcqZWvDMlO3ebk5MLlY4ksSOTJCSYvVUNyst5HzXPghgZcu5TIRl2LhYCkO13+1L8IHezm L0jb5NDRtuL8QVJRXEVNL+uTSCn4kiNWhtB7qOmIcb9/aR2z1Xv0TZUI7Ct2X8XKCXytLC MQd4QEfSBDrO4NcrhJ7UWOU5JjjMZnoCZGdLykmUY0gnFH8A4/eUbuZUSqITXjViTEU+lb ZlONIztQtFJk7ndg+ACuAomGEn3gThVXTJSp7nxa4iPF0BIIUQb6MQx7SB/Siw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0WGH1Q71hHEwtBLuryH02ttH16oVTV8SXKXFDovvYWU=; b=QSMj1hhZ88XI6llSnty2bpEMBPabuSVACyx5TD8NnQ8cYEili5O9eOuwLyj8QzWs3ukGc5 hVhO0tO5ZJu5qvtdKr2afdt7NkHrB6AIhL6rDxAEyGt4jUNJCxkv702jI1RRfZtAN3Z3ab X1qcSZrQ0K1ETQnFoL9CpMN6n67wTIgLN9XjPaIl8W9G2MCVNKP0wDvDxFPujksDb5Cplq I+eSXJh7D62VP99QH7o63PyUcx3972wCKkBdFqQ5pfHhw2ej/5ifEuKExOve14PZm1FVT9 OdNT4H5ekEbewXQa71DqAIcavYavDf+Ci0CP4OFke0WgOJwjozRwdHKQWkVahw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760702125; a=rsa-sha256; cv=none; b=VwGR740ZCv00JtdXEZbzodjk9PwkrG3GorW8oAoGhgw3O+NZklpwaX6j0+IinE9mMMNqFr C+c46Aa2zRJJ8tRmZAKPMOe9hy4FVZbELxrmg4V76ZQh4FjEuQmU3WTNSiwF0W7QviLQ7D ZcUaYmpFWrUPR11nPIoKBm4KU28+9h+3BrFaSLtv93cB9k6Q+jj6KGjLIsY4/J2TX2sCNr aTnxByfc5HcUVwrVxu0O+ZUSBlOcK2fCxWExIAlgyNab5euLObxsJscb0hCU/UrPooK5kh DAwuVXinYQq8LMcQHTW1mDJNxJMS3Cs/8vO2A4/aQ6AOT1zIt2a/skBwZxEnOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp3DF0hhZztMf; Fri, 17 Oct 2025 11:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HBtOPC004733; Fri, 17 Oct 2025 11:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HBtOna004730; Fri, 17 Oct 2025 11:55:24 GMT (envelope-from git) Date: Fri, 17 Oct 2025 11:55:24 GMT Message-Id: <202510171155.59HBtOna004730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 8209311c51d3 - main - quot: Drop the -h option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8209311c51d34c81edec8d09778201cb6e67c6a5 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8209311c51d34c81edec8d09778201cb6e67c6a5 commit 8209311c51d34c81edec8d09778201cb6e67c6a5 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:55:07 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-17 11:55:07 +0000 quot: Drop the -h option There was probably a time, more than 30 years ago, when the actual size of a file had to be calculated and this option saved time, but all it does today is give incorrect results for no benefit. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53132 --- usr.sbin/quot/quot.8 | 6 +----- usr.sbin/quot/quot.c | 36 ++++-------------------------------- 2 files changed, 5 insertions(+), 37 deletions(-) diff --git a/usr.sbin/quot/quot.8 b/usr.sbin/quot/quot.8 index 8da0625b246c..32e666e2a863 100644 --- a/usr.sbin/quot/quot.8 +++ b/usr.sbin/quot/quot.8 @@ -35,7 +35,7 @@ .Nd display disk space occupied by each user .Sh SYNOPSIS .Nm -.Op Fl cfhknv +.Op Fl cfknv .Op Fl a | Ar filesystem ... .Sh DESCRIPTION The @@ -53,10 +53,6 @@ number of files in this category, and aggregate total of blocks in files with this or lower size. .It Fl f For each user, display count of files and space occupied. -.It Fl h -Estimate the number of blocks in each file based on its size. -Note that this does not account for sparse files and is no faster than -reporting the accurate block count. .It Fl k Force the numbers to be reported in kilobyte counts. By default, all sizes are reported in 512-byte block counts. diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index ad9f65c94877..323648d8d550 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -55,7 +55,6 @@ /* some flags of what to do: */ static bool all; static bool count; -static bool estimate; static bool unused; static void (*func)(int, struct fs *); static long blocksize; @@ -63,7 +62,6 @@ static char *header; static int headerlen; static union dinode *get_inode(int, struct fs *, ino_t); -static int virtualblocks(struct fs *, union dinode *); static int isfree(struct fs *, union dinode *); static void inituser(void); static void usrrehash(void); @@ -149,33 +147,9 @@ get_inode(int fd, struct fs *super, ino_t ino) return ((union dinode *)di2); } -#define actualblocks(fs, dp) DIP(fs, dp, di_blocks) - -static int virtualblocks(struct fs *super, union dinode *dp) -{ - off_t nblk, sz; - - sz = DIP(super, dp, di_size); - - if (lblkno(super, sz) >= UFS_NDADDR) { - nblk = blkroundup(super, sz); - sz = lblkno(super, nblk); - sz = (sz - UFS_NDADDR + NINDIR(super) - 1) / NINDIR(super); - while (sz > 0) { - nblk += sz * super->fs_bsize; - /* sz - 1 rounded up */ - sz = (sz - 1 + NINDIR(super) - 1) / NINDIR(super); - } - } else - nblk = fragroundup(super, sz); - - return nblk / 512; -} - static int isfree(struct fs *super, union dinode *dp) { - switch (DIP(super, dp, di_mode) & IFMT) { case IFIFO: case IFLNK: /* should check FASTSYMLINK? */ @@ -337,8 +311,7 @@ dofsizes(int fd, struct fs *super) if ((dp = get_inode(fd, super, inode)) != NULL && !isfree(super, dp) ) { - sz = estimate ? virtualblocks(super, dp) : - actualblocks(super, dp); + sz = DIP(super, dp, di_blocks); ksz = SIZE(sz); for (fsp = &fsizes; (fp = *fsp); fsp = &fp->fsz_next) { if (ksz < fp->fsz_last) @@ -386,8 +359,7 @@ douser(int fd, struct fs *super) if ((dp = get_inode(fd, super, inode)) != NULL && !isfree(super, dp)) { uses(DIP(super, dp, di_uid), - estimate ? virtualblocks(super, dp) : - actualblocks(super, dp), + DIP(super, dp, di_blocks), DIP(super, dp, di_atime)); } } @@ -454,7 +426,7 @@ donames(int fd, struct fs *super) static void usage(void) { - fprintf(stderr, "usage: quot [-cfhknv] [-a | filesystem ...]\n"); + fprintf(stderr, "usage: quot [-cfknv] [-a | filesystem ...]\n"); exit(1); } @@ -514,7 +486,7 @@ main(int argc, char *argv[]) count = true; break; case 'h': - estimate = true; + /* ignored for backward compatibility */ break; case 'k': blocksize = 1024; From nobody Fri Oct 17 11:55:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp3DG3bQwz6D9pV; Fri, 17 Oct 2025 11:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cp3DG2JtPz3Pfj; Fri, 17 Oct 2025 11:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zEQCiaRSolN0/ZD02mmXD5Z0uNRLP/NTZxpDgWq3acw=; b=AJiEeuvHFgu5IM60dhRLj6vStCt9LicJyrO1p7ilLd7Xe9WOpHfu7ocAGeJVrrHNnyZDVz lpXo5b8QIaTYdT7IzBfrQ3u0w6Zn8dwQOquj5C/rCyRoeCCAe73Ue+Svtkt9jz7ukC0kyR bn9zr9tXg7NbgRziSegk5ve2X5Qz+sO70lr6MC0KtzGZVgTd7I0rSpPBCdPjhaPzR+LyO1 eypMfqeVv2wPIM/mTcN2pBML+fzTHq6+EYmQHbuvwCelruGOJynWjSqqnmoXVW1OMY4Rxw yxZI6hn8buW1SA0vVi+OI11yNCoCfTvvQS2OGbSXNU85/8ZfVS9DYBGXfPAW6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760702126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zEQCiaRSolN0/ZD02mmXD5Z0uNRLP/NTZxpDgWq3acw=; b=pqbz6eCBKVBjtktbY/dSK7K/vblQn7PIt4Vc9W8KYHV+a8+EsyvKtWRXyn61XHgt6McFNa N1tvabiCOS2iwFjsx03/RgFvxWRF2aW9pFY1VQs/4KTKLhwAR3qYk+JtiIOg/ATCGcnm3i ONPEjSdC1JHz5r5MGSyKVpzZ3PtU0kchHwOoNZWWAi+3EQNrd9581ybYOvIpZtIODoF7H7 kIru3OlWn/3Gxt+uqUOYqwKLpa86kQ3VVW4PMFjBfja89KZfKU+5siiRgYjt9RnYcO34zA 2W/cTcO25TkxQCirNsAwYCQqXY5SLqrgF5ClYn8TWtdV5S/5ymrPdwd3jqFasQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760702126; a=rsa-sha256; cv=none; b=OfBEeI+TFYKHNVRq1miOPlyraqlQQeMdw/MuQggUOnhd0MTbCl08a4hL9dlZJVNTtRrAKX RSBJHQjm6kP7MVLsRKUXid83EK95lJJl9M3JroONQB8T03OYStNbZyDPDm9ZJCpgiVmrA7 N2fVRfgubL9V3A7jSuFa3fg6GDGALjCqEgYbI6z9QpjBaNGGiQr2SDg1Sf0Sa6whCak3G0 GEGPybb7n9x86D2M3ZUcq8lhyrC8Cx1jlliGO+MHVdbIPEA6vaoRpl3cbbxwzRr9HKnuZP X7MDnJyK2ULfTqoRxA1qzCOKcsVQmjqm45c6kkpOVn+3AUP+wL6PnnrsWLfpOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp3DG1dJ6zthL; Fri, 17 Oct 2025 11:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HBtQ3o004769; Fri, 17 Oct 2025 11:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HBtQHE004766; Fri, 17 Oct 2025 11:55:26 GMT (envelope-from git) Date: Fri, 17 Oct 2025 11:55:26 GMT Message-Id: <202510171155.59HBtQHE004766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: aa870a1935bc - main - quot: Add tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa870a1935bccb66e02c4c31630706768a3e7d74 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=aa870a1935bccb66e02c4c31630706768a3e7d74 commit aa870a1935bccb66e02c4c31630706768a3e7d74 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:55:12 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-17 11:55:12 +0000 quot: Add tests To facilitate the task, we change the comparison function so that users with equal filesystem usage are sorted by UID, and add an undocumented option that prevents quot from replacing numerical UIDs with names. We also switch from getfsfile(3) to getmntpoint(3) so the first line is identical regardless of whether we pass quot a mountpoint or a device. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53133 --- etc/mtree/BSD.tests.dist | 2 + usr.sbin/quot/Makefile | 6 ++- usr.sbin/quot/quot.c | 19 +++++--- usr.sbin/quot/tests/Makefile | 4 ++ usr.sbin/quot/tests/quot_test.sh | 102 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 126 insertions(+), 7 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 8a752925d0a5..520b41c8b88f 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1285,6 +1285,8 @@ .. pw .. + quot + .. rpcbind .. sa diff --git a/usr.sbin/quot/Makefile b/usr.sbin/quot/Makefile index 34ebcb1009c8..2f32c8f2df8b 100644 --- a/usr.sbin/quot/Makefile +++ b/usr.sbin/quot/Makefile @@ -1,5 +1,9 @@ +.include + PROG= quot MAN= quot.8 -LIBADD= ufs +LIBADD= ufs util +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests .include diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 323648d8d550..879580f649b9 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,7 @@ /* some flags of what to do: */ static bool all; static bool count; +static bool noname; static bool unused; static void (*func)(int, struct fs *); static long blocksize; @@ -227,7 +229,7 @@ user(uid_t uid) for (usr = users + uid % nusers, i = nusers; --i >= 0; usr--) { if (usr->name == NULL) { usr->uid = uid; - if ((pwd = getpwuid(uid)) == NULL) + if (noname || (pwd = getpwuid(uid)) == NULL) asprintf(&usr->name, "#%u", uid); else usr->name = strdup(pwd->pw_name); @@ -248,7 +250,10 @@ cmpusers(const void *v1, const void *v2) { const struct user *u1 = v1, *u2 = v2; - return (u2->space - u1->space); + return (u2->space > u1->space ? 1 : + u2->space < u1->space ? -1 : + u1->uid > u2->uid ? 1 : + u1->uid < u2->uid ? -1 : 0); } #define sortusers(users) \ @@ -469,12 +474,11 @@ int main(int argc, char *argv[]) { struct statfs *mp; - struct fstab *fs; int ch, cnt; func = douser; header = getbsize(&headerlen, &blocksize); - while ((ch = getopt(argc, argv, "acfhknv")) != -1) { + while ((ch = getopt(argc, argv, "acfhkNnv")) != -1) { switch (ch) { case 'a': all = true; @@ -491,6 +495,9 @@ main(int argc, char *argv[]) case 'k': blocksize = 1024; break; + case 'N': + noname = true; + break; case 'n': func = donames; break; @@ -513,8 +520,8 @@ main(int argc, char *argv[]) quot(mp->f_mntfromname, mp->f_mntonname); } while (argc-- > 0) { - if ((fs = getfsfile(*argv)) != NULL) - quot(fs->fs_spec, 0); + if ((mp = getmntpoint(*argv)) != NULL) + quot(mp->f_mntfromname, mp->f_mntonname); else quot(*argv, 0); argv++; diff --git a/usr.sbin/quot/tests/Makefile b/usr.sbin/quot/tests/Makefile new file mode 100644 index 000000000000..d4e64691f905 --- /dev/null +++ b/usr.sbin/quot/tests/Makefile @@ -0,0 +1,4 @@ +PACKAGE= tests +ATF_TESTS_SH= quot_test + +.include diff --git a/usr.sbin/quot/tests/quot_test.sh b/usr.sbin/quot/tests/quot_test.sh new file mode 100644 index 000000000000..21088d162a53 --- /dev/null +++ b/usr.sbin/quot/tests/quot_test.sh @@ -0,0 +1,102 @@ +# +# Copyright (c) 2025 Dag-Erling Smørgrav +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# Create and mount a UFS filesystem on a small memory disk +quot_setup() +{ + atf_check -o save:dev mdconfig -t malloc -s 16M + local dev=$(cat dev) + atf_check -o ignore newfs "$@" /dev/$dev + atf_check mkdir mnt + local mnt=$(realpath mnt) + atf_check mount /dev/$dev "$mnt" + echo "/dev/$dev: ($mnt)" >expect + printf "%5d\t%5d\t%-8s\n" 8 2 "#0" >>expect +} + +# Create a directory owned by a given UID +quot_adduid() +{ + local uid=$1 + atf_check install -d -o $uid -g 0 mnt/$uid + printf "%5d\t%5d\t%-8s\n" 4 1 "#$uid" >>expect +} + +# Perform the tests +quot_test() +{ + local dev=$(cat dev) + # Create inodes owned by a large number of users to exercise + # hash collisions and rehashing. The code uses an open hash + # table that starts out with only 8 entries and doubles every + # time it fills up. + local uid + for uid in $(seq 1 32); do + quot_adduid $uid + done + # Also create inodes owned by users with long UIDs, up to the + # highest possible value (2^32 - 2, because chown(2) and + # friends interpret 2^32 - 1 as “leave unchanged”). + local shift + for shift in $(seq 6 32); do + quot_adduid $(((1 << shift) - 2)) + done + # Since quot operates directly on the underlying device, not + # on the mounted filesystem, we remount read-only to ensure + # that everything gets flushed to the memory disk. + atf_check mount -ur /dev/$dev + atf_check -o file:expect quot -fkN /dev/$dev + atf_check -o file:expect quot -fkN $(realpath mnt) +} + +# Unmount and release the memory disk +quot_cleanup() +{ + if [ -d mnt ]; then + umount mnt || true + fi + if [ -f dev ]; then + mdconfig -d -u $(cat dev) || true + fi +} + +atf_test_case ufs1 cleanup +ufs1_head() +{ + atf_set descr "Test quot on UFS1" + atf_set require.user root +} +ufs1_body() +{ + quot_setup -O1 + quot_test +} +ufs1_cleanup() +{ + quot_cleanup +} + +atf_test_case ufs2 cleanup +ufs2_head() +{ + atf_set descr "Test quot on UFS2" + atf_set require.user root +} +ufs2_body() +{ + quot_setup -O2 + quot_test +} +ufs2_cleanup() +{ + quot_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case ufs1 + atf_add_test_case ufs2 +} From nobody Fri Oct 17 12:47:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp4Mt6gKqz6DDxN; Fri, 17 Oct 2025 12:47: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 4cp4Mt69p3z3WQq; Fri, 17 Oct 2025 12:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760705226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p30Y3u9bhANY7r0r4w32UGnWdLyOW7b+T06ayUhU2ug=; b=AKQvF2ktB+C3KO4frx6l/fM+0h4NCxU+a1YniQD8vVHNgBL0p130Hz2O3MazK7raHNr/Tw TsxKzWExyHDJmR2W4paTJckQoZw5DphPB52CFCeKEcv4OciBtLHgpE7HKpMc26IEtd43pZ vuD8xF0t2qEKWTKfEFsrnocWnazOVdlN/8YWnQ5VNql4H2i37awECxkcVJdLJW9uCz6BZz 2LfMb/GfMwxFJdj56SCFhCzmBdcE5oq7dxF1MWuPBmBMV/OKdgTjPG1h5j8FEGV3ny+bLA 9LeiJAgkQ84u7JGR5bMHvGHO8Nz2ZL8jHfCXpJFQlr6SlWbcXaYGQr9HD+b9+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760705226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p30Y3u9bhANY7r0r4w32UGnWdLyOW7b+T06ayUhU2ug=; b=MHIFhbqn37BbBOWlwDfNY6GWulfKTaqHCAPPRSd57eJRNiW/VVY0Tt/0fF5UfhxrCoNHQP Z5cE7E6MqfRKUBxv6wGPPnM331RURTUkkb8fDpOxzMeNxp++zBGm9/ZD1cMcIvY5LVL46f uj9LcvelVEWxdPgOKYI8RvZw1sztTm4eQP31NKuLARI8zrKXoNP5TNAx/hlKGdZeItJD8N +/yujYJgc+t4ea5e16y7iQP5vwHgdfzm1HVbLnyUw1biuVKdyof4rza+QRU5a0UXiVwO+Z 6Vp1eVPVGhNrBRgH7ZlWGdIXXQnviHXu83LqYw4xq/AbrY27CfT8OLiJkhbLJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760705226; a=rsa-sha256; cv=none; b=oIuQYp80GVZBzbIX3kNSCa8uPx/8/a7eLzCQQHiXKvevtcJOfV4mmMqSk75qV/9trMIT91 modZcoqfhqEmYfj5C8/h3WnkhMJ8dlg1Vkj6boE8mQs+2Mh7Y3QlVAH/Lxf7Q+xpQxdt2G 1/W1AVcB1pOYadEdfxM3ob50zdhIGfk6gj6vhXX+dLa6bLK/EjQbBXVbMKuTdrJd4/fc4O p/6nTtGzmb7uL0+OMLWQSplKcvqASGciYc8U7e4onF8uZM0/1fhuKAD8WXh7XTYFWnIl5f GubM+1tZz4Q+7oGuT/mlrmepQcYAJet/18HMOK/30HkF3Yg9hzj2DyXbIlbgQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp4Mt5cydzvkQ; Fri, 17 Oct 2025 12:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HCl6wD000645; Fri, 17 Oct 2025 12:47:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HCl6Vx000642; Fri, 17 Oct 2025 12:47:06 GMT (envelope-from git) Date: Fri, 17 Oct 2025 12:47:06 GMT Message-Id: <202510171247.59HCl6Vx000642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: 88b9ca860ef3 - main - manpages: Use canonical names for Linux filesystems List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88b9ca860ef332d4d32e97e0f8a166f12cffc8e3 Auto-Submitted: auto-generated The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=88b9ca860ef332d4d32e97e0f8a166f12cffc8e3 commit 88b9ca860ef332d4d32e97e0f8a166f12cffc8e3 Author: Michael Osipov AuthorDate: 2025-10-17 09:24:12 +0000 Commit: Michael Osipov CommitDate: 2025-10-17 12:46:57 +0000 manpages: Use canonical names for Linux filesystems The manpages of linprocfs(5) and linsysfs(5) document incomplete names without "fs" suffix. Make them identical to other filesystems. PR: 283079 MFC after: 3 days Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D53155 --- share/man/man4/linprocfs.4 | 4 ++-- share/man/man4/linsysfs.4 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man4/linprocfs.4 b/share/man/man4/linprocfs.4 index 53940d7c02b0..dcd1c642b409 100644 --- a/share/man/man4/linprocfs.4 +++ b/share/man/man4/linprocfs.4 @@ -9,7 +9,7 @@ .Nd Linux process file system .Sh SYNOPSIS .Bd -literal -linproc /compat/linux/proc linprocfs rw 0 0 +linprocfs /compat/linux/proc linprocfs rw 0 0 .Ed .Sh DESCRIPTION The Linux process file system, or @@ -138,7 +138,7 @@ To mount a file system on .Pa /compat/linux/proc : .Pp -.Dl "mount -t linprocfs linproc /compat/linux/proc" +.Dl "mount -t linprocfs linprocfs /compat/linux/proc" .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , diff --git a/share/man/man4/linsysfs.4 b/share/man/man4/linsysfs.4 index 12729a814085..045e1af89173 100644 --- a/share/man/man4/linsysfs.4 +++ b/share/man/man4/linsysfs.4 @@ -9,7 +9,7 @@ .Nd Linux kernel objects file system .Sh SYNOPSIS .Bd -literal -linsys /compat/linux/sys linsysfs rw 0 0 +linsysfs /compat/linux/sys linsysfs rw 0 0 .Ed .Sh DESCRIPTION The @@ -66,7 +66,7 @@ The PCI device hierarchy node. .Sh EXAMPLES The most common usage follows: .Pp -.Dl "mount -t linsysfs linsys /compat/linux/sys" +.Dl "mount -t linsysfs linsysfs /compat/linux/sys" .Pp where .Pa /compat/linux/sys From nobody Fri Oct 17 13:00:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp4fx4sbTz6DFjY; Fri, 17 Oct 2025 13:00: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 4cp4fx40ksz3b9L; Fri, 17 Oct 2025 13:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760706009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tI1VRopkQy4Fh+uXUhD8KlxhhTe3UZb4w2PtaBtOP2s=; b=sDl8pnTEvU05fGu+MBCVX23taR0gQXnKVNgq1tkWM0tAKvzJbHteTNnrLBi7X3Gjn4JGjR /GmaXPPaD/4g3IugSZq4jC5wz43GX41xnX1HBu/xNyLLmj42oRr4QMgbHK7VuDohl03JrS CnD8T2ORB5cTKFYarZuv4LIWXBHeLoRUJMkOEnQiS8+y4tqV64/eaByTfEuC2TU36rNBt7 tLhPe/8/plaGfX0v7+0Z/gp7JFj9aPJrljBzvGCXxhi7MH63m99etpBR5WFU6aC925+hJU GouamEmWhTWpZoW7unvjUkQHtJtmMZmtJmFZttrCV8XqgSTwNpKW5IUjzaasEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760706009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tI1VRopkQy4Fh+uXUhD8KlxhhTe3UZb4w2PtaBtOP2s=; b=nO/OVzf8/ryttK/NTB/A6HCYDglByWTN2k8+M8GkoiPTqJPpE9TaOXGE1XvRckrUrYliA4 ljWdndk6bvPtDgnosztAfTfhcj3xE+h5n8m5XLu412/HhSQB09Fo4ynKYHGOeHB3avHgPo EpaJ1/mdTD6FWtwnhG5hBOyQwUGY9DNKzaLDwwFqmUr23/RkC8cCpUYCOXirT4cxzj+rk3 2fpaDMO23zK0PnAe7djtqK2D23uvXcDLAOsfBcxbxoHuLUjSYGeZh/NRjmGitDeOoixjPm MeR5mPKBpLAAOKeJg1ic00uX/+9+f50O7TEFNV31TUjv6xcBg61gKOlIEq1Uyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760706009; a=rsa-sha256; cv=none; b=n6qBI6qyAkhZiXNKbVdDUnQaVWGFYkfDcgTcec879Na5PIq5cACGivlcqIhK9HsuGdyX5K e/9V4OuAPT2n4Ju04s3pMrr3A/oCus6uUVFgeVgj7hD3u7acza5VQgkq5PhpYgwvxOP0z0 XvRNKsRqEtNKVfbCeyWV/jusTQ4tCX3BHa9bqhG3y8JG5mDTdA7+KClO2oVKjJT2NNspjZ plb8ks0RysRMmoMtJZ44577mw1C8c8lcQuYb/oVILLQe7o79ojkc61oMSMxvjevK31uxPu uB+loZEv859jvwbriP35GdPu0lqvRmmwyvK/2+RnqwiR4WPwkkMzBiPUADaZyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp4fx3RhDzwJp; Fri, 17 Oct 2025 13:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HD09N9024287; Fri, 17 Oct 2025 13:00:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HD096T024282; Fri, 17 Oct 2025 13:00:09 GMT (envelope-from git) Date: Fri, 17 Oct 2025 13:00:09 GMT Message-Id: <202510171300.59HD096T024282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: dfc1041c08ba - main - netmap: Fix error handling in nm_os_extmem_create() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dfc1041c08ba32f24b8050b4d635a0bbbfd9b767 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dfc1041c08ba32f24b8050b4d635a0bbbfd9b767 commit dfc1041c08ba32f24b8050b4d635a0bbbfd9b767 Author: Mark Johnston AuthorDate: 2025-10-17 12:55:17 +0000 Commit: Mark Johnston CommitDate: 2025-10-17 12:55:17 +0000 netmap: Fix error handling in nm_os_extmem_create() We bump the object reference count prior to mapping it into the kernel map, at which point the vm_map_entry owns the reference. Then, if vm_map_wire() fails, vm_map_remove() will release the reference, so we should avoid decrementing it in the error path. Reported by: Ilja van Sprundel Reviewed by: vmaffione MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53066 --- sys/dev/netmap/netmap_freebsd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c index 8cc543d54c2e..ac267a66d669 100644 --- a/sys/dev/netmap/netmap_freebsd.c +++ b/sys/dev/netmap/netmap_freebsd.c @@ -738,6 +738,7 @@ nm_os_extmem_create(unsigned long p, struct nmreq_pools_info *pi, int *perror) out_rem: vm_map_remove(kernel_map, e->kva, e->kva + e->size); + e->obj = NULL; /* reference consumed by vm_map_remove() */ out_rel: vm_object_deallocate(e->obj); e->obj = NULL; From nobody Fri Oct 17 13:00:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp4fz03lbz6DFnJ; Fri, 17 Oct 2025 13:00: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 4cp4fy4BYwz3bJK; Fri, 17 Oct 2025 13: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=1760706010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ndzcNbamNBXHUny7wOJW1cztoU2KNnGSf5CEcLKBDcU=; b=yEx0joBerrrY0NchhnQ3xNhEiGysvzIQ56J5vljD9vZ5pbrrgZnZ4cCcrefq+QsDjmOEsG PL6szSfhq+T2Nwpfx/Ox0Z97MWMtBaFEJqPzTJfa/kZMatohk39TrJoiZ4l0zIhw0AfUC0 6AVgsU8j4UXsxpbtD2Ug9lnpAz3ik2z6eOchwpK1GPp4GWViFZ3VOLgUbGjaOzmRPkGkQB txoL9ZfyGrzi8kdKg7gdDfS+IzkIGIg7DId4JUHi+niyJEsdHISCnu9Oku+RdE/Ux52wAP b/Sk1aUzu3P4cOZpYk67feyxwg1IamWIcSDZndFGzKct4p3mwmBNw6X7S8+MQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760706010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ndzcNbamNBXHUny7wOJW1cztoU2KNnGSf5CEcLKBDcU=; b=a0WfMqhsGIotnbHLWSyG02CjczxZK2vDv3WrA9qPTFpo4s5zH+NCctPCCUbMrLBuC3frOW qIE1WE8RN4oTXdtrqgrYSgwbT+6/weop8o6pA5akpqWz0Pdt6jswY2DtveXBdwW0A9ft/d xTi9CKwoe9mRwyRR6jjd/W/CJOJcfTSEAkYoBbeob5LrMd3Se7R+GDXsjtQUOG95yjsnnx ocSF6CGge/mm4UAPnWyMA/8SqW6m+S78iJLAtIBZOgL9+iAZpnPvjifVUlP/sSdzzlf5Je vO4S+TF4aGuWP+Y1WkdpH0EoeaMinwEcB0CMF4O7OkEox2gZP1CrD4JXvJVt5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760706010; a=rsa-sha256; cv=none; b=jZj9WmblK855WBWjhkYWHNBledDsGlaNzJwxBJekPDIzsbuoYbeCywYKb9ww4xsYGS4cXK jK01jVsVRkDjlsbrPk3MznG9AEMhXHwvc05FfH1Ry+Je6egMC6gjEKdoj8YPZmC9b8WNU+ GNLBOb7LFDXomPn5YIlWOVdaj1E0d1xm+DUCiNV1/w7DAKwTgeitO0f50uqr+5QHYJlcQ/ 81C1S0Z5O2oWusjsBjiAQecYq3dow3/vBMDtiA6MIIu3SA7qlevjhubgj4W3DaeHVGnkiV 02EWj8KEhohwQ48q3+6pUng6+xthc9vK34t/7zOTNj4uOwMr3RI5Ew3dN/hVrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp4fy3kytzwDq; Fri, 17 Oct 2025 13:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HD0AMA024845; Fri, 17 Oct 2025 13:00:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HD0ABP024837; Fri, 17 Oct 2025 13:00:10 GMT (envelope-from git) Date: Fri, 17 Oct 2025 13:00:10 GMT Message-Id: <202510171300.59HD0ABP024837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 28c0ef76841b - main - linprocfs: Add nodes for inotify List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28c0ef76841bbb322b6e39668e1c8e997c1f8000 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=28c0ef76841bbb322b6e39668e1c8e997c1f8000 commit 28c0ef76841bbb322b6e39668e1c8e997c1f8000 Author: Mark Johnston AuthorDate: 2025-10-17 12:55:56 +0000 Commit: Mark Johnston CommitDate: 2025-10-17 12:55:56 +0000 linprocfs: Add nodes for inotify These map directly onto sysctls under vfs.inotify of the same name. Reviewed by: olce, des MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53142 --- sys/compat/linprocfs/linprocfs.c | 77 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 5 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 95b212be1306..7ac48786c77b 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2216,6 +2216,67 @@ linprocfs_dosysvipc_shm(PFS_FILL_ARGS) return (0); } +static int +linprocfs_doinotify(const char *sysctl, PFS_FILL_ARGS) +{ + size_t size; + int error, val; + + if (uio->uio_rw == UIO_READ) { + size = sizeof(val); + error = kernel_sysctlbyname(curthread, + __DECONST(void *, sysctl), &val, &size, NULL, 0, 0, 0); + if (error == 0) + sbuf_printf(sb, "%d\n", val); + } else { + char *endp, *newval; + long vall; + + sbuf_trim(sb); + sbuf_finish(sb); + newval = sbuf_data(sb); + vall = strtol(newval, &endp, 10); + if (vall < 0 || vall > INT_MAX || endp == newval || + *endp != '\0') + return (EINVAL); + val = (int)vall; + error = kernel_sysctlbyname(curthread, + __DECONST(void *, sysctl), NULL, NULL, + &val, sizeof(val), 0, 0); + } + return (error); +} + +/* + * Filler function for proc/sys/fs/inotify/max_queued_events + */ +static int +linprocfs_doinotify_max_queued_events(PFS_FILL_ARGS) +{ + return (linprocfs_doinotify("vfs.inotify.max_queued_events", + PFS_FILL_ARGNAMES)); +} + +/* + * Filler function for proc/sys/fs/inotify/max_user_instances + */ +static int +linprocfs_doinotify_max_user_instances(PFS_FILL_ARGS) +{ + return (linprocfs_doinotify("vfs.inotify.max_user_instances", + PFS_FILL_ARGNAMES)); +} + +/* + * Filler function for proc/sys/fs/inotify/max_user_watches + */ +static int +linprocfs_doinotify_max_user_watches(PFS_FILL_ARGS) +{ + return (linprocfs_doinotify("vfs.inotify.max_user_watches", + PFS_FILL_ARGNAMES)); +} + /* * Filler function for proc/sys/fs/mqueue/msg_default */ @@ -2313,9 +2374,7 @@ linprocfs_domqueue_queues_max(PFS_FILL_ARGS) static int linprocfs_init(PFS_INIT_ARGS) { - struct pfs_node *root; - struct pfs_node *dir; - struct pfs_node *sys; + struct pfs_node *dir, *fs, *root, *sys; root = pi->pi_root; @@ -2466,10 +2525,18 @@ linprocfs_init(PFS_INIT_ARGS) NULL, PFS_RD); /* /proc/sys/fs/... */ - pfs_create_dir(sys, &dir, "fs", NULL, NULL, NULL, 0); + pfs_create_dir(sys, &fs, "fs", NULL, NULL, NULL, 0); + + pfs_create_dir(fs, &dir, "inotify", NULL, NULL, NULL, 0); + pfs_create_file(dir, NULL, "max_queued_events", + &linprocfs_doinotify_max_queued_events, NULL, NULL, NULL, PFS_RDWR); + pfs_create_file(dir, NULL, "max_user_instances", + &linprocfs_doinotify_max_user_instances, NULL, NULL, NULL, PFS_RDWR); + pfs_create_file(dir, NULL, "max_user_watches", + &linprocfs_doinotify_max_user_watches, NULL, NULL, NULL, PFS_RDWR); /* /proc/sys/fs/mqueue/... */ - pfs_create_dir(dir, &dir, "mqueue", NULL, NULL, NULL, 0); + pfs_create_dir(fs, &dir, "mqueue", NULL, NULL, NULL, 0); pfs_create_file(dir, NULL, "msg_default", &linprocfs_domqueue_msg_default, NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, NULL, "msgsize_default", From nobody Fri Oct 17 14:24:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp6X22dt9z6DMZL; Fri, 17 Oct 2025 14:24: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 4cp6X21zk1z3w2J; Fri, 17 Oct 2025 14:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760711058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KpBscR3BRyPxTZbreLkCuhEemgb+4OEhNzjQQnkaYV8=; b=FcZJgQhZUxC/HvpgMx+7AHbNeM+LEwIqV4uzrMdSkbE2/lgCLc44zaymgWAFbtAdtgBlq8 9aF0IdaBVIK9SbU3ehVpFp5YPW6WyKlyNenUJ9hEMoa5zmfy0XlB5oUvrA/no+ey600uPo sEDlpSfXpd85LmJ01UQcy00q+X5X/VHmlVDvhmR0hRHG3Y0avpM0nLl4ssXl/ql8zCpfIY d6tHvqifxJIQgtEH7hmYbMrCT4JvXu12i5Oq7MamAkIwLhccuH/W9zQFIXdva+HB55r+ak wqUyq3Xg96yOtjEJqBNp46z86/cCL/nDbJX5y7NRSQYDftK8gKhEXd7jn292Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760711058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KpBscR3BRyPxTZbreLkCuhEemgb+4OEhNzjQQnkaYV8=; b=Mzs4/XwNiO0VipcUyOysRNDlM9ZIq040LnIlf4JTlyRyUtJu/YQ4fYFJqKNEET4O1HEvqf bv2t9VyS5wpOk6Ows81d+d4fw7MdadxNwlono9Bo48aMkAAqLCInQaCfS1dR0mOmexz1Yv Ge5QRB8SJ3h3uqcE5/Z9dfijsoc4LlTExS6our60CLxOAdjy+t+3yucdYlLCTLLOYUStRy GcaMaolxJChS0d26UufWm9oOdhviCVPCGh6vIDIdr3KzGUw695afWdhOuiZtnjytMto4+M 71k26akoVxxvs5kQB+OJJ8mHVMtSlIKfD+y9UZs0sZ/shj1XmtTuCsX3CeZXcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760711058; a=rsa-sha256; cv=none; b=fR+jb5MkFjrX2ZXqOZHgB/5VHLPAGKNVQhUUC2TVmpGE8GQrkUohoAW9zxngYhxf+eFu2T BjFOHvX5nyt3mULFpSnJUogk0xc5uA05q1QUGkII3umjyM8Q3FNUioT0oV6yFhUkxF9j+C X67F0zVcB7tj7v3pamNIHLUzMVg7r8FDjopHkUh+CbRtdzOxJViVg+NZIq5TV1Zcf0wpz/ Hxp3cOxK7Y2m2h5+kZzqe71S2QXnF9cv5LUYfePJ+RsRcBpcuGfraIZEfiwischRBJpt2w EgA6PPpQ/KlN8XgRKv76er9IJYeTYh7gY6azck1Lt3lPOMPsd2Bcnh8xnCNPMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp6X21QsQzxrt; Fri, 17 Oct 2025 14:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HEOI6a088640; Fri, 17 Oct 2025 14:24:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HEOIcP088637; Fri, 17 Oct 2025 14:24:18 GMT (envelope-from git) Date: Fri, 17 Oct 2025 14:24:18 GMT Message-Id: <202510171424.59HEOIcP088637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 1ddff51060ad - main - regex/exhaust_test: Skip flaky 'regcomp_too_big' testcase on all archs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ddff51060ad759e35dcc4716b0bdcdb40255862 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1ddff51060ad759e35dcc4716b0bdcdb40255862 commit 1ddff51060ad759e35dcc4716b0bdcdb40255862 Author: Siva Mahadevan AuthorDate: 2025-10-03 13:56:32 +0000 Commit: Ed Maste CommitDate: 2025-10-17 14:24:01 +0000 regex/exhaust_test: Skip flaky 'regcomp_too_big' testcase on all archs PR: 259971 Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation --- contrib/netbsd-tests/lib/libc/regex/t_exhaust.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c index dd2e55635653..25bd23c5a025 100644 --- a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c +++ b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c @@ -186,10 +186,8 @@ ATF_TC_BODY(regcomp_too_big, tc) int e; struct rlimit limit; -#if defined(__i386__) if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/237450"); -#endif + atf_tc_skip("https://bugs.freebsd.org/259971"); limit.rlim_cur = limit.rlim_max = 256 * 1024 * 1024; ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1); From nobody Fri Oct 17 14:31:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp6h02RQ4z6DMZ2; Fri, 17 Oct 2025 14:31: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 4cp6h01mcXz3wpT; Fri, 17 Oct 2025 14:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760711472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HLELqE8tEHlyj2jTSlvFt6ZASkNdc6b1grj8BL/wMUs=; b=XdOenyaGZoTxE518eWILR5z4CzhK4oAqovRN/lGGA0HcZ6ztz2YJ4VAcO+XqKWGidJkMcS r9JHO9IC3tI8vczslS+KQuNScPpGVjEd2ufXlWQOcc66Z4K7Yr+NzYAM4Ci91gGVV4wUCQ ZzPgRwlj1Y3XL4MBZe+pV4RTMTLG1fHdP6V1Vg/O+qRVfk/ipCsWY1+LGT3Tf4L8rZ8R2K hvqfgDG+tE24hX3L5EXIui+XLTZcWDdBnQowXlWUfuCLqXgol+FpA01Uinnf8t2mq4ac68 ja/OtnKXvzKtuzHke/AsfPqrr3JI3Yg8z+RBQ3a9OO/0FHsCHqtSKmZQIOIyaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760711472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HLELqE8tEHlyj2jTSlvFt6ZASkNdc6b1grj8BL/wMUs=; b=WwlsFSJxqa19RO/pRWxxlYrkCu8aFaCPJDkUuobHavm3uDVu1ERhgLY9V6SzsXvzUHJ7Pn P5pxcxHa5jwrvX/onFBwQ3xg/ygdonG2yQtbXddOAam2OViL7+ROfOpwOGAE9W4CMiHmAT uBlb7uvNosryKLs9eEpzTQVMISZocPXPnP+ctpAlnUr+z/Mak+NBZqJmLGNi1BomXGiDOy 3QpxlRpIsSZGMUGA41SQ2ziZvrXYV47lfakoipxtVuULj/CVtmXR403T31XIf74ZedLt4x pEnsXHPMZMbd/PSJ7mYWKtgcMfJU4+8kLXFqzRecMcQIpU/rveXi4PVhF6ctfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760711472; a=rsa-sha256; cv=none; b=pSrV03znPgoJFkFIMWUVDA8NR33jBo9oehu/PWAAbD2Zo7kAmhVAT45C0oMYjEMqTcLN3Y gPFJDfUEbA4zjJRkI2HKNeZ7lj9EORT0F91QTK6U3Lwl65majQZ82OCLuTGmQu87+FnMGp Z8pgtkkvy6Vd4jhs4cxg2LEUlHQ+1CRlRbPXNL/i9Hca5V0v9fTJwUiU5anlbXRp0th63W vOAlAmM2iGRbXMALbWaqt0qWavmjj/I+l3nj9ZuvkCN+D5iOWN+sICudUQSrYmh5tKAhhm NANQp7edgMFj8M+dJGrtzoVX2coZsC6W22vlo+BCGHdgLrQWDlEweHWx+STzzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp6h01MfPzyZX; Fri, 17 Oct 2025 14:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HEVC9u000482; Fri, 17 Oct 2025 14:31:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HEVCQB000480; Fri, 17 Oct 2025 14:31:12 GMT (envelope-from git) Date: Fri, 17 Oct 2025 14:31:12 GMT Message-Id: <202510171431.59HEVCQB000480@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f39768e52e51 - main - vmm: Fix a deadlock between vm_smp_rendezvous() and vcpu_lock_all() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f39768e52e513264da60add0ca2412bddda271ff Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f39768e52e513264da60add0ca2412bddda271ff commit f39768e52e513264da60add0ca2412bddda271ff Author: Mark Johnston AuthorDate: 2025-10-17 13:09:38 +0000 Commit: Mark Johnston CommitDate: 2025-10-17 14:28:41 +0000 vmm: Fix a deadlock between vm_smp_rendezvous() and vcpu_lock_all() vm_smp_rendezvous() invokes a callback on all vCPUs, blocking the initiator until all vCPUs have responded. vcpu_lock_all() blocks each vCPU by waiting for it to go idle and setting the vCPU state to frozen. These two operations can deadlock on each other, particularly when booting a Windows guest, when vcpu_lock_all() blocks waiting for a rendezvous initiator, and the initiator is blocked waiting for the vCPU thread which called vcpu_lock_all() to invoke the rendezvous callback. Implement vcpu_lock_all() in a way that avoids deadlocks with vm_smp_rendezvous(). In particular, when traversing vCPUs, invoke the rendezvous callback on the vCPU's behalf to help the initiator finish. We can only safely do so when the vCPU is IDLE or we have already locked it, otherwise we may be racing with the target vCPU thread. Thus: - Use an exclusive lock to serialize vcpu_lock_all() callers, which lets us lock vCPUs out of order without fear of deadlock with parallel vcpu_lock_all() callers. - If a rendezvous is pending, lock all idle vCPUs and invoke the callback on their behalf. If the vcpu_lock_all() caller is itself a vCPU thread, this will handle that thread. - Block waiting for all non-idle vCPUs to idle, or until one of them initiates a rendezvous, in which case we go back and invoke callbacks on behalf of already-locked vCPUs. Note that on !amd64 no changes are needed since there is no rendezvous mechanism, so there is a separate vcpu_set_state_all() for them based on the previous vcpu_lock_all(). These will be merged together once vcpu state handling is consolidated into sys/dev/vmm. Reviewed by: corvink (previous version) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D52968 --- sys/amd64/include/vmm.h | 3 +- sys/amd64/vmm/vmm.c | 177 ++++++++++++++++++++++++++++++++++++++++-------- sys/arm64/include/vmm.h | 2 +- sys/arm64/vmm/vmm.c | 4 +- sys/dev/vmm/vmm_dev.c | 28 ++++++-- sys/riscv/include/vmm.h | 2 +- sys/riscv/vmm/vmm.c | 4 +- 7 files changed, 178 insertions(+), 42 deletions(-) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index 66d8991d36e8..ad67510fecf3 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -237,7 +237,7 @@ extern u_int vm_maxcpu; /* maximum virtual cpus */ int vm_create(const char *name, struct vm **retvm); struct vcpu *vm_alloc_vcpu(struct vm *vm, int vcpuid); void vm_disable_vcpu_creation(struct vm *vm); -void vm_slock_vcpus(struct vm *vm); +void vm_lock_vcpus(struct vm *vm); void vm_unlock_vcpus(struct vm *vm); void vm_destroy(struct vm *vm); int vm_reinit(struct vm *vm); @@ -362,6 +362,7 @@ enum vcpu_state { }; int vcpu_set_state(struct vcpu *vcpu, enum vcpu_state state, bool from_idle); +int vcpu_set_state_all(struct vm *vm, enum vcpu_state state); enum vcpu_state vcpu_get_state(struct vcpu *vcpu, int *hostcpu); static int __inline diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 2ac076551165..f7c59847140b 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -562,9 +562,9 @@ vm_alloc_vcpu(struct vm *vm, int vcpuid) } void -vm_slock_vcpus(struct vm *vm) +vm_lock_vcpus(struct vm *vm) { - sx_slock(&vm->vcpus_init_lock); + sx_xlock(&vm->vcpus_init_lock); } void @@ -990,6 +990,54 @@ save_guest_fpustate(struct vcpu *vcpu) static VMM_STAT(VCPU_IDLE_TICKS, "number of ticks vcpu was idle"); +/* + * Invoke the rendezvous function on the specified vcpu if applicable. Return + * true if the rendezvous is finished, false otherwise. + */ +static bool +vm_rendezvous(struct vcpu *vcpu) +{ + struct vm *vm = vcpu->vm; + int vcpuid; + + mtx_assert(&vcpu->vm->rendezvous_mtx, MA_OWNED); + KASSERT(vcpu->vm->rendezvous_func != NULL, + ("vm_rendezvous: no rendezvous pending")); + + /* 'rendezvous_req_cpus' must be a subset of 'active_cpus' */ + CPU_AND(&vm->rendezvous_req_cpus, &vm->rendezvous_req_cpus, + &vm->active_cpus); + + vcpuid = vcpu->vcpuid; + if (CPU_ISSET(vcpuid, &vm->rendezvous_req_cpus) && + !CPU_ISSET(vcpuid, &vm->rendezvous_done_cpus)) { + VMM_CTR0(vcpu, "Calling rendezvous func"); + (*vm->rendezvous_func)(vcpu, vm->rendezvous_arg); + CPU_SET(vcpuid, &vm->rendezvous_done_cpus); + } + if (CPU_CMP(&vm->rendezvous_req_cpus, + &vm->rendezvous_done_cpus) == 0) { + VMM_CTR0(vcpu, "Rendezvous completed"); + CPU_ZERO(&vm->rendezvous_req_cpus); + vm->rendezvous_func = NULL; + wakeup(&vm->rendezvous_func); + return (true); + } + return (false); +} + +static void +vcpu_wait_idle(struct vcpu *vcpu) +{ + KASSERT(vcpu->state != VCPU_IDLE, ("vcpu already idle")); + + vcpu->reqidle = 1; + vcpu_notify_event_locked(vcpu, false); + VMM_CTR1(vcpu, "vcpu state change from %s to " + "idle requested", vcpu_state2str(vcpu->state)); + msleep_spin(&vcpu->state, &vcpu->mtx, "vmstat", hz); +} + static int vcpu_set_state_locked(struct vcpu *vcpu, enum vcpu_state newstate, bool from_idle) @@ -1004,13 +1052,8 @@ vcpu_set_state_locked(struct vcpu *vcpu, enum vcpu_state newstate, * ioctl() operating on a vcpu at any point. */ if (from_idle) { - while (vcpu->state != VCPU_IDLE) { - vcpu->reqidle = 1; - vcpu_notify_event_locked(vcpu, false); - VMM_CTR1(vcpu, "vcpu state change from %s to " - "idle requested", vcpu_state2str(vcpu->state)); - msleep_spin(&vcpu->state, &vcpu->mtx, "vmstat", hz); - } + while (vcpu->state != VCPU_IDLE) + vcpu_wait_idle(vcpu); } else { KASSERT(vcpu->state != VCPU_IDLE, ("invalid transition from " "vcpu idle state")); @@ -1062,6 +1105,95 @@ vcpu_set_state_locked(struct vcpu *vcpu, enum vcpu_state newstate, return (0); } +/* + * Try to lock all of the vCPUs in the VM while taking care to avoid deadlocks + * with vm_smp_rendezvous(). + * + * The complexity here suggests that the rendezvous mechanism needs a rethink. + */ +int +vcpu_set_state_all(struct vm *vm, enum vcpu_state newstate) +{ + cpuset_t locked; + struct vcpu *vcpu; + int error, i; + uint16_t maxcpus; + + KASSERT(newstate != VCPU_IDLE, + ("vcpu_set_state_all: invalid target state %d", newstate)); + + error = 0; + CPU_ZERO(&locked); + maxcpus = vm->maxcpus; + + mtx_lock(&vm->rendezvous_mtx); +restart: + if (vm->rendezvous_func != NULL) { + /* + * If we have a pending rendezvous, then the initiator may be + * blocked waiting for other vCPUs to execute the callback. The + * current thread may be a vCPU thread so we must not block + * waiting for the initiator, otherwise we get a deadlock. + * Thus, execute the callback on behalf of any idle vCPUs. + */ + for (i = 0; i < maxcpus; i++) { + vcpu = vm_vcpu(vm, i); + if (vcpu == NULL) + continue; + vcpu_lock(vcpu); + if (vcpu->state == VCPU_IDLE) { + (void)vcpu_set_state_locked(vcpu, VCPU_FROZEN, + true); + CPU_SET(i, &locked); + } + if (CPU_ISSET(i, &locked)) { + /* + * We can safely execute the callback on this + * vCPU's behalf. + */ + vcpu_unlock(vcpu); + (void)vm_rendezvous(vcpu); + vcpu_lock(vcpu); + } + vcpu_unlock(vcpu); + } + } + + /* + * Now wait for remaining vCPUs to become idle. This may include the + * initiator of a rendezvous that is currently blocked on the rendezvous + * mutex. + */ + CPU_FOREACH_ISCLR(i, &locked) { + if (i >= maxcpus) + break; + vcpu = vm_vcpu(vm, i); + if (vcpu == NULL) + continue; + vcpu_lock(vcpu); + while (vcpu->state != VCPU_IDLE) { + mtx_unlock(&vm->rendezvous_mtx); + vcpu_wait_idle(vcpu); + vcpu_unlock(vcpu); + mtx_lock(&vm->rendezvous_mtx); + if (vm->rendezvous_func != NULL) + goto restart; + vcpu_lock(vcpu); + } + error = vcpu_set_state_locked(vcpu, newstate, true); + vcpu_unlock(vcpu); + if (error != 0) { + /* Roll back state changes. */ + CPU_FOREACH_ISSET(i, &locked) + (void)vcpu_set_state(vcpu, VCPU_IDLE, false); + break; + } + CPU_SET(i, &locked); + } + mtx_unlock(&vm->rendezvous_mtx); + return (error); +} + static void vcpu_require_state(struct vcpu *vcpu, enum vcpu_state newstate) { @@ -1083,36 +1215,23 @@ vcpu_require_state_locked(struct vcpu *vcpu, enum vcpu_state newstate) static int vm_handle_rendezvous(struct vcpu *vcpu) { - struct vm *vm = vcpu->vm; + struct vm *vm; struct thread *td; - int error, vcpuid; - error = 0; - vcpuid = vcpu->vcpuid; td = curthread; + vm = vcpu->vm; + mtx_lock(&vm->rendezvous_mtx); while (vm->rendezvous_func != NULL) { - /* 'rendezvous_req_cpus' must be a subset of 'active_cpus' */ - CPU_AND(&vm->rendezvous_req_cpus, &vm->rendezvous_req_cpus, &vm->active_cpus); - - if (CPU_ISSET(vcpuid, &vm->rendezvous_req_cpus) && - !CPU_ISSET(vcpuid, &vm->rendezvous_done_cpus)) { - VMM_CTR0(vcpu, "Calling rendezvous func"); - (*vm->rendezvous_func)(vcpu, vm->rendezvous_arg); - CPU_SET(vcpuid, &vm->rendezvous_done_cpus); - } - if (CPU_CMP(&vm->rendezvous_req_cpus, - &vm->rendezvous_done_cpus) == 0) { - VMM_CTR0(vcpu, "Rendezvous completed"); - CPU_ZERO(&vm->rendezvous_req_cpus); - vm->rendezvous_func = NULL; - wakeup(&vm->rendezvous_func); + if (vm_rendezvous(vcpu)) break; - } + VMM_CTR0(vcpu, "Wait for rendezvous completion"); mtx_sleep(&vm->rendezvous_func, &vm->rendezvous_mtx, 0, "vmrndv", hz); if (td_ast_pending(td, TDA_SUSPEND)) { + int error; + mtx_unlock(&vm->rendezvous_mtx); error = thread_check_susp(td, true); if (error != 0) diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h index 84b286a60b38..696a69669a2a 100644 --- a/sys/arm64/include/vmm.h +++ b/sys/arm64/include/vmm.h @@ -177,7 +177,7 @@ DECLARE_VMMOPS_FUNC(int, restore_tsc, (void *vcpui, uint64_t now)); int vm_create(const char *name, struct vm **retvm); struct vcpu *vm_alloc_vcpu(struct vm *vm, int vcpuid); void vm_disable_vcpu_creation(struct vm *vm); -void vm_slock_vcpus(struct vm *vm); +void vm_lock_vcpus(struct vm *vm); void vm_unlock_vcpus(struct vm *vm); void vm_destroy(struct vm *vm); int vm_reinit(struct vm *vm); diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c index aeda689f3b1a..bf52dc0fe916 100644 --- a/sys/arm64/vmm/vmm.c +++ b/sys/arm64/vmm/vmm.c @@ -469,9 +469,9 @@ vm_alloc_vcpu(struct vm *vm, int vcpuid) } void -vm_slock_vcpus(struct vm *vm) +vm_lock_vcpus(struct vm *vm) { - sx_slock(&vm->vcpus_init_lock); + sx_xlock(&vm->vcpus_init_lock); } void diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index 460a508a60dc..4961b21180e1 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -120,18 +120,18 @@ vcpu_unlock_one(struct vcpu *vcpu) vcpu_set_state(vcpu, VCPU_IDLE, false); } +#ifndef __amd64__ static int -vcpu_lock_all(struct vmmdev_softc *sc) +vcpu_set_state_all(struct vm *vm, enum vcpu_state newstate) { struct vcpu *vcpu; int error; uint16_t i, j, maxcpus; error = 0; - vm_slock_vcpus(sc->vm); - maxcpus = vm_get_maxcpus(sc->vm); + maxcpus = vm_get_maxcpus(vm); for (i = 0; i < maxcpus; i++) { - vcpu = vm_vcpu(sc->vm, i); + vcpu = vm_vcpu(vm, i); if (vcpu == NULL) continue; error = vcpu_lock_one(vcpu); @@ -141,16 +141,32 @@ vcpu_lock_all(struct vmmdev_softc *sc) if (error) { for (j = 0; j < i; j++) { - vcpu = vm_vcpu(sc->vm, j); + vcpu = vm_vcpu(vm, j); if (vcpu == NULL) continue; vcpu_unlock_one(vcpu); } - vm_unlock_vcpus(sc->vm); } return (error); } +#endif + +static int +vcpu_lock_all(struct vmmdev_softc *sc) +{ + int error; + + /* + * Serialize vcpu_lock_all() callers. Individual vCPUs are not locked + * in a consistent order so we need to serialize to avoid deadlocks. + */ + vm_lock_vcpus(sc->vm); + error = vcpu_set_state_all(sc->vm, VCPU_FROZEN); + if (error != 0) + vm_unlock_vcpus(sc->vm); + return (error); +} static void vcpu_unlock_all(struct vmmdev_softc *sc) diff --git a/sys/riscv/include/vmm.h b/sys/riscv/include/vmm.h index bc00474ed0fd..e227dd825966 100644 --- a/sys/riscv/include/vmm.h +++ b/sys/riscv/include/vmm.h @@ -149,7 +149,7 @@ DECLARE_VMMOPS_FUNC(void, vmspace_free, (struct vmspace *vmspace)); int vm_create(const char *name, struct vm **retvm); struct vcpu *vm_alloc_vcpu(struct vm *vm, int vcpuid); void vm_disable_vcpu_creation(struct vm *vm); -void vm_slock_vcpus(struct vm *vm); +void vm_lock_vcpus(struct vm *vm); void vm_unlock_vcpus(struct vm *vm); void vm_destroy(struct vm *vm); int vm_reinit(struct vm *vm); diff --git a/sys/riscv/vmm/vmm.c b/sys/riscv/vmm/vmm.c index 790dcc576507..4c9b1fa53f7a 100644 --- a/sys/riscv/vmm/vmm.c +++ b/sys/riscv/vmm/vmm.c @@ -346,9 +346,9 @@ vm_alloc_vcpu(struct vm *vm, int vcpuid) } void -vm_slock_vcpus(struct vm *vm) +vm_lock_vcpus(struct vm *vm) { - sx_slock(&vm->vcpus_init_lock); + sx_xlock(&vm->vcpus_init_lock); } void From nobody Fri Oct 17 14:45:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp70T2MJ3z6DNfQ; Fri, 17 Oct 2025 14:45: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 4cp70T1csfz3xrg; Fri, 17 Oct 2025 14:45:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760712329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEzpZP85Ex5Z09vtQHxOOmJsW2dAIY4CbVsYGYqC9oc=; b=yrXOcahEkcMmodprrldDoqlV3OBgNSh6n0ETrby/R3AU3wrMQz/AhXtSb8M5Az1x9UCMF9 eP0s7xU3cIesja5dK8lsbsAP44U+2DL5j+XdxEwhStess2WD5rbPS7PmoBFLhS/8mJ+p+r D6wAuW7ojktD61/gUspivtDpH1cyJ+PxE9mj5jGOGqy052DkuwuPLdFA0hou+j7U8LliIm zAfFgfyu4lhALapefXxeeV96tfgzZ2fTNSG7A5+PPAZOTVkZypLzFzaTc6gDIQd6QdAnMz SQmhqfm3m4bxC/o6diVQzN5Mf8T1VTNat33tYWQa1HDdZDDklV6il9F/BEVdCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760712329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEzpZP85Ex5Z09vtQHxOOmJsW2dAIY4CbVsYGYqC9oc=; b=TeCq6lDsWVKTv9Xro2zgBB9W6LZhTfhxU+FHl3D2mnb278IrANoLLa0tFnVm1yGyYe6Cvj VKs/Fifqi6nMzPHzHEkBc+cwUascfS9rf4isJ1AdSOy/dvC+cGGWxxIJ529jM6fGsdqQ62 gangMJentCexieIdtPhILBTHt+BFnCTtrqU2PZKmgDSiDw2nVsQf51P9wgMRdXMVeExDAp waN6eAAwjbgPYPq3xfqajUdirMfmReDKa3cpw+CzJ9UxiE0aPmlLAnzDJlnC9g8x1+0cIb VaAerABybnh9sFmvP4EAr8SDviXzRykZkiM5F1bSkmh0lwzkvurcQFUl1Bhegg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760712329; a=rsa-sha256; cv=none; b=YdpwlHeFyEoobnd3kW5IE0n2SqGVNAPCQ/D18AIy22rvW/XXyQsHijB2b/ZvyUdGGON1bT 8EyQla6lyxURVNw4H1INJ9mqyqtDpJiNTbmriZcLFGgAxRwevcptvt1eI/VlsKPKw8scj1 ouAHMtbezxpK9LxL9NNwlww0AiAaI9/0NbylUv7uqnKKOlaLSLMIgfcnsdIFPsW8Yc4Zgl iJI5u3xrSsgeNwLwWdkhCwSm/c1YohAxZy3dzCEKqRTMO6HJfnXoGF+fK2HsMs55F5b5g3 k8lYRSvi/keAKrqpu+3T/+lrXFFjNXm1iugzIhikkdLmDbbyRjkWt5KtCVrW1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp70T0xXrz104S; Fri, 17 Oct 2025 14:45:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HEjTpe026198; Fri, 17 Oct 2025 14:45:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HEjTYQ026195; Fri, 17 Oct 2025 14:45:29 GMT (envelope-from git) Date: Fri, 17 Oct 2025 14:45:29 GMT Message-Id: <202510171445.59HEjTYQ026195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 08345e62a28e - main - regex/exhaust_test: Update require.memory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08345e62a28eb971f65125f45c512a12b39ee2eb Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=08345e62a28eb971f65125f45c512a12b39ee2eb commit 08345e62a28eb971f65125f45c512a12b39ee2eb Author: Ed Maste AuthorDate: 2025-10-17 14:43:25 +0000 Commit: Ed Maste CommitDate: 2025-10-17 14:45:11 +0000 regex/exhaust_test: Update require.memory PR: 259971 Obtained from: NetBSD 7753bf0b705a Sponsored by: The FreeBSD Foundation --- contrib/netbsd-tests/lib/libc/regex/t_exhaust.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c index 25bd23c5a025..2f3d1025536b 100644 --- a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c +++ b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $ */ +/* $NetBSD: t_exhaust.c,v 1.10 2019/07/09 13:59:25 gson Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $"); +__RCSID("$NetBSD: t_exhaust.c,v 1.10 2019/07/09 13:59:25 gson Exp $"); #include #include @@ -177,7 +177,7 @@ ATF_TC_HEAD(regcomp_too_big, tc) " crash, but return a proper error code"); // libtre needs it. atf_tc_set_md_var(tc, "timeout", "600"); - atf_tc_set_md_var(tc, "require.memory", "64M"); + atf_tc_set_md_var(tc, "require.memory", "256M"); } ATF_TC_BODY(regcomp_too_big, tc) From nobody Fri Oct 17 15:02:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp7NL2yPGz6CB1H; Fri, 17 Oct 2025 15:02: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 4cp7NL2JgDz4236; Fri, 17 Oct 2025 15:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760713362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ax9Waeb6utH+AVF/c5TQY3k00Q47MkbxsccEZh2a2ek=; b=gk7Lzvv0P0/oyd3nCd4CnNmQ9aLy2zwQiRblGcjsnMffa5K29yUwCVlduSW3iSIZC3/QuU GK3ruQV0ZAdHybjmOrLN/hqIHU72I7ev26VJi080HXPUgiwbzpLgnCMASTJ5j/cN1mXJLn QD0tXo6X1qHQP8Iy0xvrGQ3PQYxLy0A9E7bU1yDfk7dC4PjxXgh4aqVCUKGLt9NLR9gHdC iQpssrrdDvY3M/zAPN2mmE1qsF7X6kFsXeJJIW6sKXlrsnDH+ClkJEL/dItOJRRiBYMEHW bjoYzza+bkb728MgBvXnzS6eLObQ/Cgb3LxO4zG1u5q7fgyAQ70Iha0v1xGCHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760713362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ax9Waeb6utH+AVF/c5TQY3k00Q47MkbxsccEZh2a2ek=; b=qT3wrTUoJ/Q6sWphbuwLZ98kAaS2zqVnpbX3VxHRghVKktGaItxzFY3eINA3TVpOn+35bd dONRPcYsfz6VXGbk8RsrWnKhZSWPvvIRbI/i38OceP02ByPiXwL4qQ7XLfglkhQk1RFSu0 hybHlLEZl0OwWeDn31Y8LOStkPmSaC2J4mxt3yV4a4+1vlqwEog4H9mM/qW4CHHH4ZeD5y tqrWCDWvO8aqdTJBZN6S8wsF4/W9feddfb46eNX/8Gl9vsIguXtQ7SdWqNka7VTPABRSaj 2bYNZrP0VA+Oi43Gl+959o+XaNGdXY89suMrFVwmVFIZpqwk4TxXtBV9r3+8+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760713362; a=rsa-sha256; cv=none; b=Ghgrfq/43mNrIvifZCidIHXbnX34LPaID0qWAP27uyLk2XH/YsUDEwHAFkikFph1VYGJa6 TlhY+2fvSQk/RJTiPssEMK8T6mG4CYgUGBF5DFJOP8E7Nj73dLxTU1fDINY1Fxq/AiOn7e 2eIsr0pyVvZS7TyK1M3WrECzEQ0oaGP3T5jFMw94H8UG+4J2gzGGMsL+U64u7PMfne45gY qLYtQzwdPCjswiIbPxZRhEgmAqNRrJamcIpWCTkD7VLCG8ua4lm30KPoal+4kui2sXapVH Z/NPAsBmvi9JrcSULuvDzL2qeuqIBCdmZke1qlFu8ir2nAtouXVAuVvXFFtCFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp7NL1gzLz10KH; Fri, 17 Oct 2025 15:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HF2grT063557; Fri, 17 Oct 2025 15:02:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HF2gjZ063554; Fri, 17 Oct 2025 15:02:42 GMT (envelope-from git) Date: Fri, 17 Oct 2025 15:02:42 GMT Message-Id: <202510171502.59HF2gjZ063554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: edbbf26e2650 - main - pci/n1sdp: Disable HotPlug List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: edbbf26e2650e02cd3925dd1deaacf9b8fb2e2a0 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=edbbf26e2650e02cd3925dd1deaacf9b8fb2e2a0 commit edbbf26e2650e02cd3925dd1deaacf9b8fb2e2a0 Author: Andrew Turner AuthorDate: 2025-10-17 15:02:19 +0000 Commit: Andrew Turner CommitDate: 2025-10-17 15:02:19 +0000 pci/n1sdp: Disable HotPlug Work around an issue when HotPlug is enabled where pcib3 and pcib5 continuously report the following: pcib3: HotPlug interrupt: 0x30 pcib3: Command Completed pcib3: HotPlug interrupt: 0x30 pcib3: Command Completed ... As a workaround disable HotPlug on the N1SDP as it's unlikely anyone will depend on it. Reviewed by: br Fixes: 1f5c50a86173 ("pci_host_generic:Add pcib_request_feature on ACPI") Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D53134 --- sys/dev/pci/controller/pci_n1sdp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/dev/pci/controller/pci_n1sdp.c b/sys/dev/pci/controller/pci_n1sdp.c index 487041bc78e4..22f0ea27d45b 100644 --- a/sys/dev/pci/controller/pci_n1sdp.c +++ b/sys/dev/pci/controller/pci_n1sdp.c @@ -345,6 +345,17 @@ n1sdp_pcie_write_config(device_t dev, u_int bus, u_int slot, bus_space_write_4(t, h, offset & ~3, data); } +static int +n1sdp_pcie_acpi_request_feature(device_t pcib __unused, device_t dev __unused, + enum pci_feature feature __unused) +{ + /* + * HotPlug isn't supported on the N1SDP as it causes an interrupt storm + */ + return (EINVAL); +} + + static device_method_t n1sdp_pcie_acpi_methods[] = { DEVMETHOD(device_probe, n1sdp_pcie_acpi_probe), DEVMETHOD(device_attach, n1sdp_pcie_acpi_attach), @@ -352,6 +363,7 @@ static device_method_t n1sdp_pcie_acpi_methods[] = { /* pcib interface */ DEVMETHOD(pcib_read_config, n1sdp_pcie_read_config), DEVMETHOD(pcib_write_config, n1sdp_pcie_write_config), + DEVMETHOD(pcib_request_feature, n1sdp_pcie_acpi_request_feature), DEVMETHOD_END }; From nobody Fri Oct 17 15:19:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp7lN0zLSz6CBwN; Fri, 17 Oct 2025 15:19:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cp7lN0SFHz43Nn; Fri, 17 Oct 2025 15:19:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760714352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUXFIDn5Cbs2H/eBr9YzkO10uFzrWXyrHaOm8KytwOw=; b=Q0ij+3SIe9duF1lVCm5u2iC2EzPBrGayRHp7Ag0isCIB8DxIeAUxEtnlIQ+bMx3pE3FeeK RhbIZtO4ZhX9+3vnCb9fClZuGc7qkyvHy/lVGLjav9U+um6sHIJ1wf1GseCDHLGA7DD9U/ TZah1b8Szttrwg4/SaGusMpXZFucq3Nb45nrFLg0qDuCuzy+8WCq+8BHxorHukNjd9ET9S L5C2t0BgEjC8uWkM/nfE5tKYm9VbDTY/KPSGB2MZadj0ZeaTrVd5EGnX8Ntt5DhcNYxF0B DisfS4E5P1Nn1hQDJIEfFJiOyvZdJJz5rbnWmzn8bzmo6wMfCCaRvcFTz+4Xrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760714352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUXFIDn5Cbs2H/eBr9YzkO10uFzrWXyrHaOm8KytwOw=; b=JHPhmgGdzFPC/DdmlXzbjwA5YFfxvluO/WYCL8fcZGmXNl+N54oYGLWKMQ89e6rABHpQpj fggcW+8Td6cSAWm+m4LcysJ9vQ9TzCaKzIpAQ02wqBn9QdWxu51v5you9QdEJanGDHyZvs jjhUf3Rnf/F/PC22jJEG27WimH2YPjZHhhfXZ/8Rxu9kQLjaSIndBneLSPfDhHEj8EvhiH ZR/+w/+DYkMNMQS3/fVIujM+gx6NKm6bQ61Gy+XVw+IKFK48FevjRs9A+X8NDd/a3aqChf q8VAPdlQBQZS2CKLrcX+rXgjZAr+19YAMS2u95GriL6vA5GsCLmJtd0W8GDI3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760714352; a=rsa-sha256; cv=none; b=OO1h6xtz+41r4xuLw3nIsoE2b1FsJq9tczkVmRtCYTAhCTpoVvTKqMqmdAvPLfcvnJ3TZC nF2d44MEEsHswzaqunuU8M5TGVjJm03bRf6KCTh8s21Vdz+kHMRMUlGA23DPw0ok5rVHD3 qOlksIUsvPYMtT+ss9sMcACqGsc96dqV9omLUIQ30tGQn6mJwA9Z6eliqjnMCFmTzBD0C6 +QvO/KfOnlBu9g0s9vn3MLuHGssr02tDS9if0v2znEwHsZju+33hcmfaDcr62oMmpfgIaB h8FTcWPca44kCt0hCqQer2crHNYIv8vQ3SZY5GdxIlIVYFeZf6i+kP9vsnD6vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp7lM6SZ1z10Yg; Fri, 17 Oct 2025 15:19:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HFJBa1083846; Fri, 17 Oct 2025 15:19:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HFJBvl083843; Fri, 17 Oct 2025 15:19:11 GMT (envelope-from git) Date: Fri, 17 Oct 2025 15:19:11 GMT Message-Id: <202510171519.59HFJBvl083843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 7b0fe2d405ae - main - vm_domainset: Ensure round-robin works properly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b0fe2d405ae09b1247bccc6fa45a6d2755cbe4c Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=7b0fe2d405ae09b1247bccc6fa45a6d2755cbe4c commit 7b0fe2d405ae09b1247bccc6fa45a6d2755cbe4c Author: Olivier Certner AuthorDate: 2025-09-25 14:40:30 +0000 Commit: Olivier Certner CommitDate: 2025-10-17 15:18:53 +0000 vm_domainset: Ensure round-robin works properly All iterators that rely on an object's 'struct domainset_ref' (field 'domain' on 'struct vm_object'), which is the case for page allocations with objects, are used with the corresponding object locked for writing, so cannot lose concurrent iterator index's increases even if those are made without atomic operations. The only offender was thread stack allocation, which has just been fixed in commit 3b9b64457676 ("vm: Fix iterator usage in vm_thread_stack_create()"). However, the interleaved policy would still reset the iterator index when restarting, losing track of the next domain to allocate from when applying round-robin, which all allocation policies do if allocation from the first domain fails. Fix this last round-robin problem by not resetting the shared index at iterator's phase init on DOMAINSET_POLICY_INTERLEAVE. Add an assertion to check that, when passed, an object is write-locked in order to prevent the problem mentioned in the first paragraph from reappearing. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52733 --- sys/vm/vm_domainset.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_domainset.c b/sys/vm/vm_domainset.c index 9fa17da954f7..c25ed0cc2267 100644 --- a/sys/vm/vm_domainset.c +++ b/sys/vm/vm_domainset.c @@ -113,7 +113,6 @@ vm_domainset_iter_interleave(struct vm_domainset_iter *di, int *domain) int d; d = di->di_offset % di->di_domain->ds_cnt; - *di->di_iter = d; *domain = di->di_domain->ds_order[d]; } @@ -260,9 +259,14 @@ vm_domainset_iter_page_init(struct vm_domainset_iter *di, struct vm_object *obj, * are immutable and unsynchronized. Updates can race but pointer * loads are assumed to be atomic. */ - if (obj != NULL && obj->domain.dr_policy != NULL) + if (obj != NULL && obj->domain.dr_policy != NULL) { + /* + * This write lock protects non-atomic increments of the + * iterator index in vm_domainset_iter_rr(). + */ + VM_OBJECT_ASSERT_WLOCKED(obj); dr = &obj->domain; - else + } else dr = &curthread->td_domain; vm_domainset_iter_init(di, dr->dr_policy, &dr->dr_iter, obj, pindex); From nobody Fri Oct 17 15:54:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp8Xt3qmQz6CFjn for ; Fri, 17 Oct 2025 15:55:10 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (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 4cp8Xt1jcBz47vM for ; Fri, 17 Oct 2025 15:55:10 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-93e7ece3025so28503039f.1 for ; Fri, 17 Oct 2025 08:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760716508; x=1761321308; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1xx2VXG3rlc8C2h+355v6YidKrbOMjr33anLfOnpP8M=; b=KE7yn/DL/OBHi64qyZvCVeRIqZ2CWG/iMvE3PEAPP87gVlNtutC3N1lXqDAZMwidRo IM7tWLbp22gl9wlt1CX2ErYesfPrUyhBNFRAy7P7ua6/SSe0ajKX52UJCakU0nQNZER+ ubRuUcJvvnzfN/2w1gzLnXHPxGw2O/53qG3S9+WE5bhs+UpJMRrUfZaQ43Z9d0zryRxz zm3yx64hRB+vgNxlO3HGbtgz0Bq0TPfI8gM9PA2w6flQMoc/h6L9wVngXkV4huAbnF+y jf/N8AC2GvBaD+IoS2fJ8pg0fDzH6EQcx06TN7D6WAXy4li8RQvwROIUCTQDR4hieHnJ B2nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760716508; x=1761321308; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1xx2VXG3rlc8C2h+355v6YidKrbOMjr33anLfOnpP8M=; b=aJM8a0TNRW5hkSD+eHB+KMyjQEZ4AGbVvJG4HcPFRj6Xj/eSeX9dHka+PXEhqaSG/u NjDOTpxCwn1wqecYq25guxfDYeCo56HUxpqHCIyeumaQJkM+Sq2dzWeGdiP2TW/NOp5t QKxJ5CqiuHKtaKGrUT8nXaX5juxADP9rLxJzBK9w4XQ3r2+R8RAwZzWsiyw+hQ1xZAnn esooiTsK1FQ1DHseLaUo3xoWu+RfIQ1mVCY7MUIgImDhkgrYQUqIcEiieQN6WhW5AF4P iwawSoS0JpCd9ptkPK4uw7RW61Q4UdxMf0HuHAexPlpQkRlC2aacP3e99NENKZq3Csz1 DTrQ== X-Forwarded-Encrypted: i=1; AJvYcCUpqoxvxi3yNO1MJhJPr7S+Niv7ZdXbgUcfT4b++zhnvPAsncPUYUM3gB3f8WJAAPSjlv0S4OKBkWpn+/bwV5H6Juk3KQ==@freebsd.org X-Gm-Message-State: AOJu0Yx4/ElaQ4FPyOCHGNCE1uou6m336NOeDqF4CoHvs5smJ/IrxBwM lSOQYw2Cj+Wo79+tqc/himNASlPU83TREs6wXOCj5MrWIKnMspAWojgiDRhhicSbSjwf9EMdHg7 nPOjZK64IHSHY50SQ1QcZuTdoHdj73A== X-Gm-Gg: ASbGncunA7sX7NfEDtu4elC7lobk5HiKHGDc1LSGMS3kWyRaZoHOLLuMqNzeQhxPEwy gGs6gg48xM5JiqG7UA+k3AbrA5QQGjCl1gXN81NSmk0VInNVBF1jkBA/J8ObuqRNuZs1rpTCzIR mOzZVXQB3avV6kJ+HcJ7+qebTKB9xodBsgtdxlYeKAxEclUbgb88TjiqxC6hyYhuOlGb6OoWiCa 2Aaj7BTmvDqpWSOYn1PxS5lAknFky9Tu5j/yCnAUXghCq9CdaCr+5Sbhow= X-Google-Smtp-Source: AGHT+IF4IByVlCqk3eDj9SxEOr8iH7B89dzofLrctPbYU9Rpq7+uKLneAW8Tl6CC3w1iPlAIBVhj9sjawRGOC0jaCQY= X-Received: by 2002:a5d:9383:0:b0:93e:4da7:4ebf with SMTP id ca18e2360f4ac-93e6a52bd12mr904805639f.0.1760716507522; Fri, 17 Oct 2025 08:55:07 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202510170805.59H85Ar5073755@gitrepo.freebsd.org> In-Reply-To: <202510170805.59H85Ar5073755@gitrepo.freebsd.org> From: Jason Harmening Date: Fri, 17 Oct 2025 10:54:56 -0500 X-Gm-Features: AS18NWAiN90zcL4zj9gBGbHErpNVlCmsDUTwUCKZpopSc9ESP5v6QHLSEWdXBi8 Message-ID: Subject: Re: git: 86db3c735dd9 - main - stress2: Added a regression test To: Peter Holm Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.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: 4cp8Xt1jcBz47vM Peter, Thank you for adding this test. On Fri, Oct 17, 2025 at 3:05=E2=80=AFAM Peter Holm wrote: > > The branch main has been updated by pho: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D86db3c735dd999f75eab54d848= fb8402e6689c80 > > commit 86db3c735dd999f75eab54d848fb8402e6689c80 > Author: Peter Holm > AuthorDate: 2025-10-17 08:04:48 +0000 > Commit: Peter Holm > CommitDate: 2025-10-17 08:04:48 +0000 > > stress2: Added a regression test > --- > tools/test/stress2/misc/unionfs20.sh | 206 +++++++++++++++++++++++++++++= ++++++ > 1 file changed, 206 insertions(+) > > diff --git a/tools/test/stress2/misc/unionfs20.sh b/tools/test/stress2/mi= sc/unionfs20.sh > new file mode 100755 > index 000000000000..0c87bc0d80aa > --- /dev/null > +++ b/tools/test/stress2/misc/unionfs20.sh > @@ -0,0 +1,206 @@ > +#!/bin/sh > + > +# > +# Copyright (c) 2025 Peter Holm > +# > +# SPDX-License-Identifier: BSD-2-Clause > +# > + > +# Bug 289700 - unionfs: page fault in unionfs_find_node_status when clos= ing a file within a socket's receive buffer > + > +# "Fatal trap 12: page fault while in kernel mode" seen: > +# https://people.freebsd.org/~pho/stress/log/log0618.txt > + > +. ../default.cfg > + > +prog=3D$(basename "$0" .sh) > +here=3D`pwd` > +log=3D/tmp/$prog.log > +md1=3D$mdstart > +md2=3D$((md1 + 1)) > +mp1=3D/mnt$md1 > +mp2=3D/mnt$md2 > + > +set -eu > +mdconfig -l | grep -q md$md1 && mdconfig -d -u $md1 > +mdconfig -l | grep -q md$md2 && mdconfig -d -u $md2 > + > +mdconfig -s 2g -u $md1 > +newfs $newfs_flags /dev/md$md1 > /dev/null > +mdconfig -s 2g -u $md2 > +newfs $newfs_flags /dev/md$md2 > /dev/null > + > +mkdir -p $mp1 $mp2 > +mount /dev/md$md1 $mp1 > +mount /dev/md$md2 $mp2 > +mount -t unionfs -o noatime $mp1 $mp2 > +set +e > + > +cd /tmp > +sed '1,/^EOF/d' < $here/$0 > $prog.c > +mycc -o $prog -Wall -Wextra -O2 $prog.c > +rm -f $prog.c > +[ -d $RUNDIR ] || mkdir -p $RUNDIR > +cd $RUNDIR > + > +n=3D3 > +for i in `jot $n`; do > + mkdir $mp2/d$i > +done > +(cd $here/../testcases/swap; ./swap -t 3m -i 20 -l 100 -h > /dev/null) & > +sleep 2 > +for i in `jot $n`; do > + (cd $mp2/d$i; /tmp/$prog) & > +done > +while pgrep -q $prog; do sleep .5; done > +while pkill swap; do :; done > +wait > + > +cd $here > +umount $mp2 # The unionfs mount > +umount $mp2 > +umount $mp1 > + > +mdconfig -d -u $md1 > +mdconfig -d -u $md2 > +rm -f /tmp/$prog > +exit 0 > +EOF > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define PARALLEL 2 > +#define SYNC 0 > + > +static int debug; > +static _Atomic(int) *share; > + > +int > +send_fd(int socket, int fd_to_send) > +{ > + struct cmsghdr *cmsg; > + struct msghdr msg =3D {0}; > + struct iovec iov; > + char buf[1] =3D {0}; // dummy data > + char cmsgbuf[CMSG_SPACE(sizeof(fd_to_send))]; > + > + memset(cmsgbuf, 0, sizeof(cmsgbuf)); > + > + iov.iov_base =3D buf; > + iov.iov_len =3D sizeof(buf); > + msg.msg_iov =3D &iov; > + msg.msg_iovlen =3D 1; > + > + msg.msg_control =3D cmsgbuf; > + msg.msg_controllen =3D sizeof(cmsgbuf); > + > + cmsg =3D CMSG_FIRSTHDR(&msg); > + cmsg->cmsg_level =3D SOL_SOCKET; > + cmsg->cmsg_type =3D SCM_RIGHTS; > + cmsg->cmsg_len =3D CMSG_LEN(sizeof(fd_to_send)); > + > + memcpy(CMSG_DATA(cmsg), &fd_to_send, sizeof(fd_to_send)); > + > + return (sendmsg(socket, &msg, 0)); > +} > + > +int > +recv_fd(int socket) > +{ > + struct cmsghdr *cmsg; > + struct msghdr msg =3D {0}; > + struct iovec iov; > + char buf[1]; > + int received_fd; > + char cmsgbuf[CMSG_SPACE(sizeof(received_fd))]; > + > + memset(cmsgbuf, 0, sizeof(cmsgbuf)); > + > + iov.iov_base =3D buf; > + iov.iov_len =3D sizeof(buf); > + msg.msg_iov =3D &iov; > + msg.msg_iovlen =3D 1; > + > + msg.msg_control =3D cmsgbuf; > + msg.msg_controllen =3D sizeof(cmsgbuf); > + > + if (recvmsg(socket, &msg, 0) < 0) > + err(1, "recvmsg()"); > + > + cmsg =3D CMSG_FIRSTHDR(&msg); > + if (cmsg =3D=3D NULL || cmsg->cmsg_len !=3D CMSG_LEN(sizeof(recei= ved_fd))) { > + fprintf(stderr, "No passed fd\n"); > + return (-1); > + } > + > + if (cmsg->cmsg_level !=3D SOL_SOCKET || cmsg->cmsg_type !=3D SCM_= RIGHTS) { > + fprintf(stderr, "Invalid cmsg_level or cmsg_type\n"); > + return (-1); > + } > + > + memcpy(&received_fd, CMSG_DATA(cmsg), sizeof(received_fd)); > + return (received_fd); > +} > + > +int > +main(void) > +{ > + pid_t pid; > + time_t start; > + size_t len; > + int fd, pair[2], status; > + > + fd =3D -1; > + len =3D PAGE_SIZE; > + if ((share =3D mmap(NULL, len, PROT_READ | PROT_WRITE, > + MAP_ANON | MAP_SHARED, -1, 0)) =3D=3D MAP_FAILED) > + err(1, "mmap"); > + > + if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, pair) =3D=3D -1) > + err(1, "socketpair"); > + > + start =3D time(NULL); > + while (time(NULL) - start < 180) { > + share[SYNC] =3D 0; > + if ((pid =3D fork()) =3D=3D -1) > + err(1, "fork"); > + if (pid =3D=3D 0) { > + close(pair[0]); > + atomic_fetch_add(&share[SYNC], 1); > + while (share[SYNC] !=3D PARALLEL) > + usleep(1000); > + // Not calling recv_fd() triggers the issue > +// fd =3D recv_fd(pair[1]); > + if (debug) > + fprintf(stderr, "Received fd=3D%d\n", fd)= ; > + _exit(0); > + } > + fd =3D open("foo", O_RDWR|O_CREAT|O_TRUNC, 0666); > + if (fd =3D=3D -1) > + err(1, "open"); > + if (debug) > + fprintf(stderr, "Sending fd=3D%d\n", fd); > + atomic_fetch_add(&share[SYNC], 1); > + while (share[SYNC] !=3D PARALLEL) > + usleep(1000); > + send_fd(pair[0], fd); > + usleep(arc4random() % 1000); > + wait(&status); > + close(fd); > + unlink("foo"); > + } > +} From nobody Fri Oct 17 15:58:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp8ck4ydTz6CFqP; Fri, 17 Oct 2025 15:58:30 +0000 (UTC) (envelope-from olce@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 4cp8ck4NPZz49QZ; Fri, 17 Oct 2025 15:58:30 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760716710; h=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=fXiaGzlp/usGwBN5wGZxUQiTYbiGttIJkfvR6W+F4bk=; b=yxffHUyAfHw7X07XK2qoqX+JmO9Rt8MyTv3C6z/F56SFzB80iYa9kqMjdQ180SoW3XDLSV 4IlVO7o+gxyMvOrTyXtE4cyFutdzB8sEYzj5IM8PpGId4ZneSJMdFv2ynInYYs+AVTggGJ TSJsxHGZ/qJXlhy7228FyVn9bbzylswxvMgNOD3XQNilF0wCcHo0SPX0RMFXFM35+8ZM+v priI0dyocW2aQL/PvziwCtKgtWCFnvNPCUsGtyd0J9F9miJED4SMdkY6TSvpLgJAOHrepV SzBphJc4ZR1FZvQXUYAO3086Um0KSLDdllf4V2WxNLLbz3q5FQ76hxMO9vNT5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760716710; h=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=fXiaGzlp/usGwBN5wGZxUQiTYbiGttIJkfvR6W+F4bk=; b=BR3jo9pgi6i9NCjT35M5KlAWtsFojaBZp8Pz4Tg1v0XSryJhGQQHyMfjqYLF/7t73CqivW PzFn5Ta16KkscjrDFlhRcrmyYOaC/GC/M2vO5/krS//gKWSq3Gzbws7hbxK2zMgrlmsV/x /xNsDeJW3Jfyde6/G/n8264NvAM1ovElR40dkHbJrgZr9secIo7vRVqKazwgIEL93TWk8h Usah+5VTN3j6VQrgVdWzK0d/k55oPDIZQmvzZfKHiPlml/iL6fTapks7V0lnbwMwYEoLpT Bj3Tg6e1gXBsU7afHWP0AqKTDgAq83U+nUT1qqyYICkF2e+8SOZrK5mXZaKrBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760716710; a=rsa-sha256; cv=none; b=Vz1UTcoIR1YPM2K0TQfa7SNeecRiVHDyDUItuuQC8+CwLIppFy3p2xBhLM4MmKo4bfAkTE lr3QpLM3HXLT4Cz0f4egvNhPF/uIqGCdrlxSoHiwfmWFPUeiihpM29cTPCh6KbcleOlhig XNIgDmBf8y05+JnW2BVuBZhmepq9j/n2dN3pTR226c2NkUq7aspY4Uns5i+MMuSus1UIGF iow4Al8eZOJ9s5LYAWQTY03VWWCeRVCQkTq1JwWWEKNuMH5H7qrVGpVV/aH7fRcm+zNkHE Q81IYHCZgR/2UIjBjZ/e0MONkyZGgqPXHMUPIqoFhScVrMgGxrfBDQU8Dmm73A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (using TLSv1.3 with cipher TLS_AES_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: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cp8cj6JZDzJZW; Fri, 17 Oct 2025 15:58:29 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Peter Holm Cc: Jason Harmening , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 86db3c735dd9 - main - stress2: Added a regression test Date: Fri, 17 Oct 2025 17:58:22 +0200 Message-ID: <24529152.gYbqZ1YImA@ravel> In-Reply-To: References: <202510170805.59H85Ar5073755@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart55097151.J2yNMGElB9"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart55097151.J2yNMGElB9 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Olivier Certner To: Peter Holm Date: Fri, 17 Oct 2025 17:58:22 +0200 Message-ID: <24529152.gYbqZ1YImA@ravel> MIME-Version: 1.0 > Peter, > Thank you for adding this test. +1 -- Olivier Certner --nextPart55097151.J2yNMGElB9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmjyZ54ACgkQjKEwQJce Jie5+BAAjrJu6c182QabnRVdeRDIKJscQ3eznt7UKg2U2t4lGzPcstnHvnBvOeg1 xWnrWLlX2NbK0n8jJgnGx1IMKsC8QesCOvBmZyjUXbbGjeh3GnTVJi26penaxZUQ lmcLXDnSZXwIHrGQb5QVcl8f9NK2vm9iIJZAbF2Nw0LOurDjrRCR7n/Fk8yPHvSH 9uSmDX0k628B8j4N0jgooMQ/nie6Jf4JAW/JL7i4k930ilVDtA9U87GYAD+y6xfS LD3qJFWDr+bR+6j7Uhcx1TxFoo6cgzO86VFGG6S42XIle8vSix00IUSzoGB4nCPx tTLDNkVfpg0XdXG8ET14vCMt74kOKF6gUqjwVESr/VSWGuQoEmhpIBkZXfh2Neer m6B3JweWhQGdpvjpKdxy5gGzoLbWi98Bn/EyMx5bZqdTEIP1Y+aboUR8p3JouE29 XAmLbTl3eyU97UNv2H9m98pkXnCyvkAB/RUEBGN3TFgozGNf9lHUoA9QEUbGCURu 3QyhpEJ5rNl4thwbD0Lk2bz3fm8f1YzItKfZuKQOB+VzAuluShXg0u4voAnD1Hfl cCQgm9C1ufsHF/ukwEXG6418wNUVrP66P4iQ5GDJ8KNaK4f+bsVyMhez8kqQ5q7q +KjVFhgspdNlMmuNgCnwrN+eFwhgUkcpwFVsKHuzPq8lPvJanT0= =hrB4 -----END PGP SIGNATURE----- --nextPart55097151.J2yNMGElB9-- From nobody Fri Oct 17 16:38:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9VM45Ptz6CK68; Fri, 17 Oct 2025 16:38: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 4cp9VM3WkDz3HRD; Fri, 17 Oct 2025 16:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2kQgbSilm8T/V4f5w2Blpr6RrtS8e3v3tl/tVqb3aw8=; b=c3jRkEGhk4HqDHDkTI46oYIB28etiLxoSFVD+fCM+yx9jk8BuaNaE2sadpcpNWUZNigYTU jER55mHAtqcZ+ZJNNQinacW+kbEjN9dXo3GvBvJRyED0DRNsz9bbGLfZJgiozfWKbqckCr UIkkPt0Bs8G1RdVy526Gj7TIfv479et8TOF6SQoz2yNNJBkuyD9F35bbj9/Bn7uVVvfTaq 8Qe9lW1Owfmjv98lpFuJX84zpkmGk6TpSwbTyC3hqNpk15gUwxYGpVei58o6X6rX5jDpee DqjFqxMdJIMjcp+8Meh3zoW72VdWJl53K8QeyJAcv8viKCY8N/d0dyQMSnygsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2kQgbSilm8T/V4f5w2Blpr6RrtS8e3v3tl/tVqb3aw8=; b=sIsBByJDPOejrRAQMMF++EC+DR3jh98CbJyqWj+XUrGYoxeelDkN5O0+2IKJuopc00dOyh NWRXoWmQRJoGTCuYJlflN04Udo5z3XZQg92yA3nZQQhZ9lV3Iftntk3CdipE5dF/cXbPLm L5VCRX2xTytEeZe55hlS3AYYYc5mVG/flOlzrSbKOnYH43v9KO61R18Zz6UE3UjKxSGBy/ q1lJTnYgakQba9+ED34DKA7LydPdbepuANgY/Oo8dJFGTzUTpyk32TCBm/rQJTvS+C1CDT 708FnsQ4hDWtCBaAf3FL4UobuIdlKsMB0Tve77p8KjpNF/hk4u/8Pnx71jD0sA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760719083; a=rsa-sha256; cv=none; b=aj1YqdHnOInCHKjDYbEz7eBR6+hJs5ET/q1tX+1Ht8lA3VZoLT0BjHm4A2MUThxMchTSXo JTtZDF9S2uD43zr8iqkCoL+Xxtl51umURGdivSubywtzYdGO5TrGNqjFW3yOKnce1vDEEJ jnYZtRGEg3euv98DuzI6LMrUfi9DUAblHTS15d8zacAjwb0YdfI0bq5r8loBq85D+7XIPw Zt3mB9QWdqPYgMLwSxvP6akX6gfskFQnLnYt2x24ga7komLyV02QPbSmUDS4rK5cAtyp7C 7uI2OBj7ySLdFa4EklsUo38Q9sRoGV8c1nIFdahIlku+eUoMRROgxO/agD1IGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp9VM35K9z12dg; Fri, 17 Oct 2025 16:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HGc312033821; Fri, 17 Oct 2025 16:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HGc3QU033818; Fri, 17 Oct 2025 16:38:03 GMT (envelope-from git) Date: Fri, 17 Oct 2025 16:38:03 GMT Message-Id: <202510171638.59HGc3QU033818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 194dadb5fcf4 - main - mailmap: Normalize jlduran author data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 194dadb5fcf436b5719db4c82653474313206ac0 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=194dadb5fcf436b5719db4c82653474313206ac0 commit 194dadb5fcf436b5719db4c82653474313206ac0 Author: Jose Luis Duran AuthorDate: 2025-10-17 16:35:42 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-17 16:35:42 +0000 mailmap: Normalize jlduran author data Reported by: emaste (srcmgr) --- .mailmap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index c546d84e41f2..10141fcf7b6c 100644 --- a/.mailmap +++ b/.mailmap @@ -12,7 +12,8 @@ Michal Meloun Dmitriy Alexandrov Alfonso Gregory <83477269+AtariDreams@users.noreply.github.com> Alfonso Gregory <83477269+gAlfonso-bit@users.noreply.github.com> -Jose Luis Duran +Jose Luis Duran +Jose Luis Duran Val Packett Piotr Paweł Stefaniak Sumit Saxena From nobody Fri Oct 17 16:43:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9cq27WFz6CKRK for ; Fri, 17 Oct 2025 16:43:39 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (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 4cp9cq0fm6z3K0R for ; Fri, 17 Oct 2025 16:43:39 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-781421f5be6so28813527b3.0 for ; Fri, 17 Oct 2025 09:43:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760719413; x=1761324213; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tai5WQpbGipZh4x2Qbd6VlKIvDXep+nILMDRnzE0HZk=; b=t3BnJvZaDhg9llZJI9pAxqAJO5IJaLcIUpV5XAQmnZvHdJt/60mgg+O7j90EWqFVMI ORP9sMjv6ylU7YwLTvp92smWYJTdoO5Y9LyKP2YZ3tZSGCxJ0pqeEItc4uu1qDEON6zb FgL7gDxqx0Mz8uWhSen7OfZv9788lu5zZjqwNllvxBXORg8qMMl6VgrPDnzYdzlxZC3J 6Vp8lzVHE+s2314JwxPX662hprji2FqUPWI1f5Tw0hsH/oroT9LT32HVAaV+IoRN/ltR 7Lyh93JW61vpR+nZ8WcjmauPKGDkLm1ZzIH84Rn754K/2fuXO2qxopOFaGbDkAblt9rR ElwA== X-Forwarded-Encrypted: i=1; AJvYcCWeQnvq3t4vHH03kkwKcEXDcwj3WR8ZBnLpFypFLyagiZkZ9uX77jXxmGhxhbmYN0ckzVQfeXoQDQ87EKbEI8ZMFbkJnw==@freebsd.org X-Gm-Message-State: AOJu0YyLMHSnIuNw9jZ/sFXy7Wm66yIUMxapKaETG62veDE6Dcgdx8nW vmiCBHAJpN10x956gEpXRnIUx9FTUceRnxFUwN0vg8jB5mrn6cJqsjVrbvKf7feUkts= X-Gm-Gg: ASbGncsElWT/u5TWDS9J64v0Hz8r7HWe7NR11C4YkU3NIUn3sUSMPBxMluY4LuObaBQ VIJDCnHFahA/ns/FbLeAr2KB4mbmpjh+PqfxppLMtNhBr5QcvbqNbiFICygssAI7zSLUNFaEB91 0pqyGVU26+HD+N+uy5xc1zR1FT01M6s0iqZEVy5iyI0x2oyBmh5dch1I0FnUicXLViETM2fnLqm fVp2Z/+lMa4xV7+vc9wlUlM6ef3xfZj7sEuyMfYZ+Pq2YgJhs4bFu6N5RTLFPUGhFcUqIS01WM5 tIIIgdSEd+80tb8FyF1CfEkQgnCRxNpcFpL1eTyzx7hHHKHkfZ5YvQPf5ONNsR/vqJpqexwd1WQ BCsFtCLW+yq5hH4b4GxNPFoQM70r1u9hkX9zg1ERmz0OrZaqAT91/eZmKhO2cna+sliGk6uqIFu i5Rk00MRb989OGHvKwiyQNvmEG5Brm5WU0xTR2Pwo= X-Google-Smtp-Source: AGHT+IFk4Dhh5QxsczezEvn4/Myszzbu9gZjwg3PQ3iYkhbw3q2/mwH8w5YS6rZ4NWawKQmC8yLKCg== X-Received: by 2002:a05:690c:338a:b0:739:7377:fda6 with SMTP id 00721157ae682-7836d2d6462mr41489127b3.42.1760719412907; Fri, 17 Oct 2025 09:43:32 -0700 (PDT) Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com. [209.85.128.176]) by smtp.gmail.com with ESMTPSA id 00721157ae682-784672a3e16sm111607b3.11.2025.10.17.09.43.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Oct 2025 09:43:32 -0700 (PDT) Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-781421f5be6so28813297b3.0 for ; Fri, 17 Oct 2025 09:43:32 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUDTm4EGwDKLXy/QOvqDQAVK3KhHe8Zwc2eYrzq3LswA2g8vs5RznmxzmK3fApfmtc0159y2/+6sobTyjZQwe2iRtKyqA==@freebsd.org X-Received: by 2002:a05:690e:11c4:b0:63e:1ca0:be73 with SMTP id 956f58d0204a3-63e1ca0c207mr2164662d50.37.1760719411795; Fri, 17 Oct 2025 09:43:31 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Fri, 17 Oct 2025 09:43:20 -0700 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWDOI7vD-owN-IYKQevM9EL5lc7dOzZKONklI3QsgrIGz-UqVcxkcEHY8gI Message-ID: Subject: Re: git: 0050289464fa - main - style(9): white space after ; and around binary operators To: Mark Johnston Cc: Rick Macklem , "David E. O'Brien" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.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: 4cp9cq0fm6z3K0R On Thu, Oct 16, 2025 at 4:58=E2=80=AFPM Mark Johnston w= rote: > > On Thu, Oct 16, 2025 at 04:21:45PM -0700, Rick Macklem wrote: > > Please be aware of the following snippets from "man 9 style": > > > > In general code can be considered "new code" when it makes up about 50% > > or more of the file(s) involved. This is enough to break precedents in > > the existing code and use the current style guidelines. > > > > Stylistic changes (including whitespace changes) are hard on the source > > repository and are to be avoided without good reason. > > +1 > > This kind of change accomplishes nothing except to be a source of merge > conflicts for others to deal with. > Not to pile on, but I would also suggest to avoid touching unrelated code in a single commit if not necessary. It helps avoid entanglement in backports. > > rick > > > > On Thu, Oct 16, 2025 at 3:05=E2=80=AFPM David E. O'Brien wrote: > > > > > > CAUTION: This email originated from outside of the University of Guel= ph. Do not click links or open attachments unless you recognize the sender = and know the content is safe. If in doubt, forward suspicious emails to ITh= elp@uoguelph.ca. > > > > > > The branch main has been updated by obrien: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D0050289464fa56ec79e060= b8d8378b9ff7145a0e > > > > > > commit 0050289464fa56ec79e060b8d8378b9ff7145a0e > > > Author: David E. O'Brien > > > AuthorDate: 2025-10-15 05:22:00 +0000 > > > Commit: David E. O'Brien > > > CommitDate: 2025-10-16 22:02:50 +0000 > > > > > > style(9): white space after ; and around binary operators > > > > > > in for() loops. Also, use 'while', where only the > > > conditional test of 'for' was used. > > > > > > Reviewed by: sjg From nobody Fri Oct 17 16:46:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9hL0bH4z6CKqj; Fri, 17 Oct 2025 16:46:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cp9hL05y5z3LDZ; Fri, 17 Oct 2025 16:46:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=frknIvUcwspGgKy38zO9kF1wThzeGTYCM4y+trROPk0=; b=G8KjQnWbmmUzEZziHome8q8xiWiRdzTwlJDnJiIDgcak0jZIHltKYcReeqrtsLIMiTLczX JU4Js3R1V7icSwwBLtRToeMXVE+5/BVXFzgRnPak30RYDrYeFN36Jj8UYYT6l82WZCTaqa ufhpTSa+RByCh+FR27PvCfQ4RufypW/xiy4XCpRxQ84HsOw+Ouhg/2dAO1Qrk13VpVh0Er Rx9zdrwIPSI2+MXS4tF8gvj8j4e0g6V6l1I3JKANz6+AgxKHkyx91CmkaTAV23OHI78S+3 bvnhN/4sh/cubr0oERjFTBt0pA+8mvrHXPf0TRvCXLij706P9NjT5MrL7YhfLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=frknIvUcwspGgKy38zO9kF1wThzeGTYCM4y+trROPk0=; b=vmCrxF4lSTBQG7UgtyBK2h7ehorLhqfwfiA4R7cAuOtv+tAIsO0A3xwgafSKYDrhlZSPLZ xK8CHzZLtFJdVttdtWzqlFK0edFglTF3tl9eh4R5o37Evk3Ja4t91apfySZRRi7C24jRk6 0p9w/DO0qbrBXsOR0sAZNaJSZlgb3QuskwNMgKygJ68qFlAw9yiQPm3ulxIDRQxw92Athv AC9HFveJA6no+hAKeX3OeGE+68bGyb1j6TlNV/XhveLhLNk6sA4sB5UuYTutctcXZ5UMYp xqo7vbLJBmhzW/4WfVBmrm0Z5q56/CQ9Oq/MaMAVlWPCAMTvdcIEZeQMUSMTMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760719602; a=rsa-sha256; cv=none; b=VgF0byCGkIyIFFfZAgcOX4z85AHVyVnSzUvVCbTj/oF4jhDJxPYleJzH2DZbhpjlzBnB+K 9GmCgsc+dgzciTrT+86lD5F0jSKgfofh9ZsAi9tnYaTF1ugutjkGGSQJB0ZiRrNvl2rF9N 4Jiy6LCHrxqaYzn4DQiNCjlGNRR9Qq+Jdac0DoKDqlVvmwtuHLUSQ4NKQL4w2MJ65nsrej 1V1u1HQwYwhTENZ6WcsDx+VsCZUk5F/ahKncMG/U8EeKUl+6natTuJidVOweJ/RhhiW8H+ za3yNJ3bZA8zUxySTUdBn5thg00m+c38yGmMkCEe+PvEqFjqEV2gnBNarVJt1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp9hK6nn3z136t; Fri, 17 Oct 2025 16:46:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HGkfD9052761; Fri, 17 Oct 2025 16:46:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HGkfRi052758; Fri, 17 Oct 2025 16:46:41 GMT (envelope-from git) Date: Fri, 17 Oct 2025 16:46:41 GMT Message-Id: <202510171646.59HGkfRi052758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 33afdf0e356d - main - dc(4): fix argument to if_foreach_llmaddr() for 21143. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33afdf0e356d84ffe5c62c886f84cf12ba147d3e Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=33afdf0e356d84ffe5c62c886f84cf12ba147d3e commit 33afdf0e356d84ffe5c62c886f84cf12ba147d3e Author: Chris Johns AuthorDate: 2025-10-17 12:38:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-17 16:45:58 +0000 dc(4): fix argument to if_foreach_llmaddr() for 21143. As found on RTEMS the argument to if_foreach_llmaddr() was wrong causing crashes. Fixes: 51e80820552e0 PR: 290314 MFC after: 3 days --- sys/dev/dc/if_dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index bed74c3b6181..5c1d7ff30976 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -999,7 +999,7 @@ dc_setfilt_21143(struct dc_softc *sc) else DC_CLRBIT(sc, DC_NETCFG, DC_NETCFG_RX_ALLMULTI); - if_foreach_llmaddr(ifp, dc_hash_maddr_21143, sp); + if_foreach_llmaddr(ifp, dc_hash_maddr_21143, sc); if (if_getflags(ifp) & IFF_BROADCAST) { h = dc_mchash_le(sc, if_getbroadcastaddr(ifp)); From nobody Fri Oct 17 16:46:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9hM3CFHz6CKkp; Fri, 17 Oct 2025 16:46: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 4cp9hM14Jjz3LMX; Fri, 17 Oct 2025 16:46:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Cm7zriP/6zkjUmv+o1NzFWw1EGuN4MXxG60X0iyz/c=; b=yRvG/Ir7VTNTU/6TGqS+sQ/Exub4DRWeTuN5ovzYxKMt02S9Jh72UTgi1JWw+wNlmcUASR DWipL8yt4uoEqFIwoIagS3s3RZMZAagQ/BDPAH0Bmgg9/zWzSmbp2D+Yn3s0v8beN4+6yP tt1Un1YTW0La6mQrnr+Mj6/9DjxrE3gbadcALjJwTx2za4SGm5TW/0w2LMaIiNTzDXkChg KnQ3Hx6NONxiUwa/Bb614QLbHg/w9iABUMpbaHFA+VzwsDNhHOtwfxN7ojnuN5+NdbxVdU WH+Gy6QiMaoGmrVnrnGn6osADJNmB5+4rLpCbMun6rUWQeQdcRL4jNFf8uZoPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Cm7zriP/6zkjUmv+o1NzFWw1EGuN4MXxG60X0iyz/c=; b=R7+/DEvtDpohhwY6ztnc/5inXRJ6t3HZdN9cylceMfRNXya9hDwFhH9veV9pVppU9fR33s ZDptOpqIJVfOIuVf01e9bqjaNAYVxlKJ7fntyVSzkBcllhgF1ofdb5NEf1riw/dRqSuNPl Xggei5NYhRRJd/noJB76OpxatMyMOIfCZEH0UwHGHfZwi/7vCADnVR9OyI8bbh6kq5Bppf S5lqtoabCx8J3hpweyXCrk7pNCpTZXxzIhKx4shUMVLNkCT9BvK+cBil/zlbCRliS0gwCW xj4nkMJsfRRtrGUNnVBoc/OjQQ8vuQtz3kpsaEKaJ0LGvxaKifEetOjwuj6mDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760719603; a=rsa-sha256; cv=none; b=vgcSszQJa31lS/7kMxC1pAUbMbanlEPKD4U5ohES66/humyi6Rvu0IGgCb5Y6iqSg7vErk hxHhqml2WfIo86O/XVPsgzUHuaZD1wagZVaCWPtv985ieuMOe4WKYN2099skBMlvhOoyLl b1XiNBqdkTo3DzmCZbtz2BuSBJYOD2W2zGbvl4Z5bRi0nwUIw/rbpF2i1nahSip3p1OerT zT59sMYofOfSkFEJPgezAsDo4YrJBL1rajyuqw/qNKqQ3rRyh8pI3tG4Zygu12jcrw4TzC Tv5Tx98BiGZi8RIbbJoR/a4xwGwuaTKP6+LjPX+51KmVWra0QnsD2saWxH+6vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp9hM0cZGz134V; Fri, 17 Oct 2025 16:46:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HGkgs2052800; Fri, 17 Oct 2025 16:46:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HGkgv8052797; Fri, 17 Oct 2025 16:46:42 GMT (envelope-from git) Date: Fri, 17 Oct 2025 16:46:42 GMT Message-Id: <202510171646.59HGkgv8052797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 51fbeadac4cc - main - igc(4): also build module on aarch64 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51fbeadac4ccce6aafe51be9377d4114321295e5 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=51fbeadac4ccce6aafe51be9377d4114321295e5 commit 51fbeadac4ccce6aafe51be9377d4114321295e5 Author: Bjoern A. Zeeb AuthorDate: 2025-10-17 12:56:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-17 16:45:58 +0000 igc(4): also build module on aarch64 igc(4) seems to work fine on arm64 for as much as I could test with a 2.5Gbit/s interface on a mPCIe card. Enable the module build so it is available. MFC after: 3 days --- sys/modules/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index feb9778c23da..63a0b3260e6d 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -577,6 +577,7 @@ _mlx5ib= mlx5ib ${MACHINE_CPUARCH} == "i386" _ena= ena _gve= gve +_igc= igc # gcc13 and earlier lack __builtin_bitcountg used by linux emulation .if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 140000) _iwlwifi= iwlwifi @@ -747,7 +748,6 @@ _et= et _ftgpio= ftgpio _ftwd= ftwd _exca= exca -_igc= igc _io= io _itwd= itwd _ix= ix From nobody Fri Oct 17 16:46:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9hN2yQmz6CKG7; Fri, 17 Oct 2025 16:46: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 4cp9hN270Zz3L5P; Fri, 17 Oct 2025 16:46:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMJYZQvEm1GdcVltl07G6nDyoI1axAUmFIyutDFg19k=; b=pFYylM1ANXdZa9Q+62txay6zml89MRvjYfs+eB93Y2K2Hthw0hb0cXNkWYwVLc1tWJTdUv 53Q0Y8A2Ihzv8limKRSOQXVAQ0FOqVWZw60guWc/m4mbsf5ciGdfbmLPMn2JJJBSGExrmZ 3BEIPKlI02gmSLeeZQ1iVLlvzPT5IDJmPvqL0kj/LHY/DZPZJO0RtCOidN5dyfotL9/z7N tlWf+OLr0mn4Th0PE93rL2iB1+St/8igu9fRfslVdnj4eAE6vOsrwMVZEpAnZEPlV4bFVR hTkd8ZU5yrO6WLXMqdzMvT02HqRltmj6yQ8z5Pa+xz+aHnH28/UaKJbmjqGarg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMJYZQvEm1GdcVltl07G6nDyoI1axAUmFIyutDFg19k=; b=jVX4SfJYXkxwoFKyY45IZUkLjFFwoeSHADaNUOg4Rrq/9JY1Nf2RrwDTUqlMm/6DZ/tqNw AgTzrcj/bzfZzxCiGl5h/i8nn1HM4Or44XR1OMbJmnlm/2EjVxvYqytSOilh+rOVdZHANs 643tWGnV7AITRbvO/FnlDgafjjgzF7pufEFEYah/CCAKgzMKIiL7FD3h1IvK34cXs2VHgM hT4KMasIDpCVBFblMHH9IAAXQbhiaC1f3Se4xuS/y8h5Z5EemgXlx/Gdqh1HubnIcaiQRa LsQ0ugbVn6p8KtMcaNGGGu9QBgknYi0X0KJgt9WTKYGp1wQvNVJUVKxC6+rVCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760719604; a=rsa-sha256; cv=none; b=KRISq2kyOY4l+EYdh3CSSqhqMjqam4+6/jQAwzo9npNFWTD7NGYVE4wohqEo/lp/pe63A9 uB7KdvLSVtsf5j2aqOOOklquP9ITrTH+GqTVf+m6kmH5a8jdrvdlDcFdsIXXofv+J3iFQg a3UOmv2F+2jvhlZSiNVyp94GFixqlF977qycVcqvzIxxCsSRP6AwWNO7bnrZTODvC/+cQk COh/8Ulm7EodrE2XiYC5r22V7ksWtgR7cFm6hJKppVq2yY9UKht69u5thqp0C54SAk5CK0 Hndy9nl9kIbqd0NsSo4KEAzYN9OrdxqSQBQChS6I6raU3IJmKVSNgVZ9BxYCVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp9hN1H5hz12Sl; Fri, 17 Oct 2025 16:46:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HGkiLg052837; Fri, 17 Oct 2025 16:46:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HGki79052834; Fri, 17 Oct 2025 16:46:44 GMT (envelope-from git) Date: Fri, 17 Oct 2025 16:46:44 GMT Message-Id: <202510171646.59HGki79052834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0ee6e36ea9b2 - main - bluetooth: ng_ubt_rtl/rtlbtfw: remove duplicate entry in device table List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ee6e36ea9b2dd959b0fb9f04ab98a01f93729fc Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0ee6e36ea9b2dd959b0fb9f04ab98a01f93729fc commit 0ee6e36ea9b2dd959b0fb9f04ab98a01f93729fc Author: Bjoern A. Zeeb AuthorDate: 2025-09-01 18:27:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-17 16:45:58 +0000 bluetooth: ng_ubt_rtl/rtlbtfw: remove duplicate entry in device table Remove the single 8822CU entry in all three places. It seems the only entry referencing a USB device. The same device is listed with the 8822CE devices. MFC after: 3 days Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D52324 --- sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c | 3 --- usr.sbin/bluetooth/rtlbtfw/main.c | 3 --- usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf | 10 ---------- 3 files changed, 16 deletions(-) diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c index 0181a67ac604..f35712cc8f69 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c @@ -81,9 +81,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] = { USB_VPI(0x0bda, 0xb00c, 0) }, { USB_VPI(0x0bda, 0xc822, 0) }, - /* Realtek 8822CU Bluetooth devices */ - { USB_VPI(0x13d3, 0x3549, 0) }, - /* Realtek 8851BE Bluetooth devices */ { USB_VPI(0x13d3, 0x3600, 0) }, diff --git a/usr.sbin/bluetooth/rtlbtfw/main.c b/usr.sbin/bluetooth/rtlbtfw/main.c index e87a98036265..280045a6aa25 100644 --- a/usr.sbin/bluetooth/rtlbtfw/main.c +++ b/usr.sbin/bluetooth/rtlbtfw/main.c @@ -64,9 +64,6 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x0bda, .product_id = 0xb00c }, { .vendor_id = 0x0bda, .product_id = 0xc822 }, - /* Realtek 8822CU Bluetooth devices */ - { .vendor_id = 0x13d3, .product_id = 0x3549 }, - /* Realtek 8851BE Bluetooth devices */ { .vendor_id = 0x13d3, .product_id = 0x3600 }, diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf index 61ae53db8f39..2ef56d2af93a 100644 --- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf +++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf @@ -36,16 +36,6 @@ notify 100 { action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -# Realtek 8822CU Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x13d3"; - match "product" "0x3549"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; - # Realtek 8851BE Bluetooth devices notify 100 { match "system" "USB"; From nobody Fri Oct 17 16:52:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9qD12klz6CLWC; Fri, 17 Oct 2025 16:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cp9qC5S8lz3NZ4; Fri, 17 Oct 2025 16:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FZU5IYsrBnSucKsss/MbjfLBPnkmhFCEWZA8Jtr2fcs=; b=sqtSfoMah/FUfbO3YbLTjKWGr0ISxd8deOCylSyVz5Oo+UqGiWaHuq0aQv/AhRIieeWkGB 56anm8T92rIf49qSe9Z9iImbeRpFcTk2foSomE9s9ER7DGbqhCv51wLw5fGspLT+Nrdcwa PqT+YZrPy2PaKhsAAVITAitrztZ14I0yPqdlZXZ4dEKIxl+GvNWPgQzcTpiuCL0zW1WH8A R1b8SckAVp6+ZNkFbrgbUKs3pCsOTX/sGzYIpoqKrLzE0amU5ylVP0PXvwa8uho47GKfMd rl+Yr3IIIMK58VCs/WsO3SM+qHg/k5609HgHxkDGSWqg9ykz5BUX6xcDQT4WiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760719959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FZU5IYsrBnSucKsss/MbjfLBPnkmhFCEWZA8Jtr2fcs=; b=JVRMibAlC30E3q3u9Vv5EXeE4Olyeg5UnakKQuzH1uoVm5LiMmb3fVxFNrY9ljUY4r5XwE 2owmvS46EmxtLEOtSS8MqdUMj/SG/Xk3aD7yo2xN7HiFUQ8RrRe5/kHibSBf2QX5vVKyxr 42BTXnktywgI7sxpXAN78CfDxlgdIbfpM6UaJM7TOpTq9hYCjmeNsTyMZNVjH9Ywwkg3Ww NMaPX9FcaVP3Ypysb3N06mJiKXX8KR1qRl6A92xJw9Lv4Lyk5YLp3PlZ4zgG257+RTqcbQ DbLN+4hocuXD8nL8gnO00XdKHmJ1iKhsCAX4LAqVzOyCzqrrpeaAS7YTB+X0Ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760719959; a=rsa-sha256; cv=none; b=FX9Oh6ob2RfTByz/pK7HUNX819k0/UvQMHVT13VcmosgyMnGSsuJeIYyyrFVLdE7u47QSN ySMp8WtRhJG27VvSpmN7QxONnp+jj5HxtSmglPhxn6Og7wqzxlKMb/ZtS9G0wtDvJgjFJh MEM7v0n+Qc1zVENl2V5SSsEzC4pi9fqjY7DkIICJqVKGGYWx11mgjIR7Tkxt2Rfi/XfvXL kPIJw0P3Au1nUvcj8x/vhwIas+Z7cC47ccN6BdOovhxLRyby8vHXIcRksiDWb0tOBVunC4 Fo780GXLuUalQs8vfjKdrzVQD+VVINTwl7rqlNc7mTrnXa2EtSsJXPNFHBktYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp9qC4l2dz13QC; Fri, 17 Oct 2025 16:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HGqdki070238; Fri, 17 Oct 2025 16:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HGqdNN070235; Fri, 17 Oct 2025 16:52:39 GMT (envelope-from git) Date: Fri, 17 Oct 2025 16:52:39 GMT Message-Id: <202510171652.59HGqdNN070235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 71b2f9853529 - main - vmimage.subr: Add missing directories to METALOG List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 71b2f9853529b1d1a160eaaa202e93a14f91eed1 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=71b2f9853529b1d1a160eaaa202e93a14f91eed1 commit 71b2f9853529b1d1a160eaaa202e93a14f91eed1 Author: Colin Percival AuthorDate: 2025-10-17 07:01:33 +0000 Commit: Colin Percival CommitDate: 2025-10-17 16:50:52 +0000 vmimage.subr: Add missing directories to METALOG Theoretically METALOG should include everything which needs to go into disk images; unfortunately there are still a few bugs which are resulting in directories not being listed -- and if METALOG has files in unrecorded directories, the directories end up being created with 000 permissions. Oddly enough, systems where / has 000 permissions are not very usable. As a temporary hack, compare the staging tree against METALOG and add entries for any unrecorded directories. This will hopefully be reverted before 15.0-RELEASE. Reviewed by: bapt, emaste, ivy Sponsored by: https://www.patreon.com/cperciva MFC after: 5 minutes Differential Revision: https://reviews.freebsd.org/D53153 --- release/tools/vmimage.subr | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index c3c917dcd642..842a808c623e 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -290,6 +290,24 @@ buildfs() { cat ${DESTDIR}/METALOG.pkg >> ${DESTDIR}/METALOG fi + # Check for any directories in the staging tree which weren't + # recorded in METALOG, and record them now. This is a quick hack + # to avoid creating unusable VM images and should go away once + # the bugs which produce such unlogged directories are gone. + grep type=dir ${DESTDIR}/METALOG | + cut -f 1 -d ' ' | + sort -u > ${DESTDIR}/METALOG.dirs + ( cd ${DESTDIR} && find . -type d ) | + sort | + comm -23 - ${DESTDIR}/METALOG.dirs > ${DESTDIR}/METALOG.missingdirs + if [ -s ${DESTDIR}/METALOG.missingdirs ]; then + echo "WARNING: Directories exist but were not in METALOG" + cat ${DESTDIR}/METALOG.missingdirs + fi + while read DIR; do + metalog_add_data ${DIR} + done < ${DESTDIR}/METALOG.missingdirs + # Sort METALOG file; makefs produces directories with 000 permissions # if their contents are seen before the directories themselves. env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted From nobody Fri Oct 17 16:53:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9r400JNz6CL6f; Fri, 17 Oct 2025 16:53: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 4cp9r36dnBz3P05; Fri, 17 Oct 2025 16:53:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HR8ZeUJDR62j5EA8duSgCiTEInVplluuJi0ngicQJsA=; b=HuLYUFNVAPb5BWvwR602KITzv54k+NnOYBqx8dELEY7q69pO2+7wQj/Yj4VOlmLgoR1rKI ac9t/+5uk+rbMPnRs3ZzWkaMphr8JwISICotaw8azG2NnBj5ORUTNO3WakzFNHe5gCOB6e kmeM8j10DUvhTfpqRMNJOuRJD/ZoM2GvaIHvA9JHH0V5ns1X7H9vBdZUgap8dRYkAT3Ooh 4rXW2CTzjF1KdC7DVDfxL4F0AaOzCqXsOF72v1Wy2YT/MyAnF1OlDMGKMGE1cUUv6kHSeK PaadpbyxAIrGAuseOtEvukPHX5L/BR38KK/8bJh9r2EpyqHmwyDCgKbLGDG0dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HR8ZeUJDR62j5EA8duSgCiTEInVplluuJi0ngicQJsA=; b=pzQS7Fe+v741AJ8N18RBQgiXrg/yGPx7WIw5RQs7JHgkuoCyVbnzmNtjoNlQGQId88xSl5 hN15HxD1Q71mCiES2ZNY7of75GT4j8Lkr3hzYMBOz74mY754A9pqMFbgKTHBU3Ala6zc2e lTMoMdGj9MyBHBp1DqEYDHSvkQeMS2f+vBNltqEkLdgZ+7N/nfSB6GYRnl3ZgAKyE7rRuI zer9nsDfUKV7VA3u2N0Gjr90tDK5Z+K7LFZ1/uT2Tk8d2OFA2lxb5w6TRLuYgGzerQfglZ dr1LjVAm3AW21UZMzpBZ69vzBrZxkrfJ2tkqi9ty8Qg3ODe+vx/MbWCANEL0xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760720003; a=rsa-sha256; cv=none; b=pjr/YFEQo70zQur1GHz9M4wrqI3DKvlsYsm7G0jQgMyE3OtjQTJEpkVJrPUf25Gs7M0Awa mA/xBnTC9GJWwiTt7Zo+Wr2Q/CBMObagdn1w1jC7caacMgwi7KHpwzAQ8pHXjcg5ftdm5h 8H9zVTgiyOqwbkf1pXrKp060aZ7KadoepDWjn9PxAq0aR1NJoBdGH7CWghagvKS0ZKJizK XrDuyiHEuI1P3JYrCkG9yF0fu1LUq9BgcsqZCtYHLQfOk0f03WgXQFr1evrp5ugdDO8wto qK09aGlrjlzt5PjEFtvFigGoS6wL/8cQ+MiQ5ZJ9MrZ3WzMN8yYYDiDiiZDHkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp9r36BhWz13QD; Fri, 17 Oct 2025 16:53:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HGrNEr070722; Fri, 17 Oct 2025 16:53:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HGrN2U070719; Fri, 17 Oct 2025 16:53:23 GMT (envelope-from git) Date: Fri, 17 Oct 2025 16:53:23 GMT Message-Id: <202510171653.59HGrN2U070719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 681295892924 - main - calendar: Add myself (jlduran) to calendar.freebsd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6812958929245d7226b75aae4541d39d53948f3c Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=6812958929245d7226b75aae4541d39d53948f3c commit 6812958929245d7226b75aae4541d39d53948f3c Author: Jose Luis Duran AuthorDate: 2025-03-19 19:00:49 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-17 16:53:02 +0000 calendar: Add myself (jlduran) to calendar.freebsd The bank no longer uses this information as a security question. --- usr.bin/calendar/calendars/calendar.freebsd | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/calendar/calendars/calendar.freebsd b/usr.bin/calendar/calendars/calendar.freebsd index b6e18083e24b..b85f2f1dee35 100644 --- a/usr.bin/calendar/calendars/calendar.freebsd +++ b/usr.bin/calendar/calendars/calendar.freebsd @@ -175,6 +175,7 @@ 04/22 Jakub Klama born in Blachownia, Silesia, Poland, 1989 04/25 Richard Gallamore born in Kissimmee, Florida, United States, 1987 04/26 Rene Ladan born in Geldrop, the Netherlands, 1980 +04/27 Jose Luis Duran born in Panama City, Panama, 1978 04/28 Oleg Bulyzhin born in Kharkov, USSR, 1976 04/28 Andriy Voskoboinyk born in Bila Tserkva, Ukraine, 1992 04/28 Nuno Teixeira born in Aveiro, Portugal, 1974 From nobody Fri Oct 17 17:03:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpB4D1vXjz6CLvx; Fri, 17 Oct 2025 17:03:56 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpB4D1DjZz3Q36; Fri, 17 Oct 2025 17:03:56 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720636; h=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=E9uAgL7iGR5n3/VGTmFcGq7FKENAfvHuf/6ltTzUIZ8=; b=Jy/de4IKeYAS6V0khRhuIL7upkvVzEeDJcHprDauMI9eGc46SwmsR+DImcCNJ9txzxWcQ0 qVXj2TBk3EoyjS/myb56mOjSl9CW65dUfm5FOgrX3ur0DqvOtTV9eqHZ/4OZTKkiPb1nBR +rfr9UbT+Z+P3CBcmWsIufUdXyhVfacVEaSgPn+k5tOp80BCKfi1be1Hk876DzVgy95Sqp 8vYMeBqtVAEkwT7og/NxMoiQYuqBVmMdYRFxVaHzlTHLF0RoVXw9QgXdqiq9jUhqOlqPpt HSctbWv56ksibiUdVvrLV5H4VL1jVeCo/HnnWzxYKsa2uSInAcbTCO/OZOqZLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720636; h=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=E9uAgL7iGR5n3/VGTmFcGq7FKENAfvHuf/6ltTzUIZ8=; b=vXaLPudM6RPVu1E9JW+Xlyzv3dxVqoAvEIotk9S+K+ZgUmAbKCeLjewdLHQDXVsFJQG/l9 oq3eu2fz/58mqtAS5AV84rb6b0+O9OS7Yz2rknSCF12x3HpY4QHYRsy8fCe1MRmsVJanto qWREyGu0txwGzLCo7niWn3HzCoDZ0THvwwoWwR2L90JzW56A97Pjc0uP/wInRpvTmpKNbU fd4y5pgF5TNxR00H/J0heF+mWWmgdzBuC8SWg/R2yj+gRbbX6digFNk1SkUcS64hlQzFZK zuZB7DDQLs00EaYg/o4wzlmGzMPmSE4/wHXB9Fcvz0E4xZYuh2dsFBjX4D2ueg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760720636; a=rsa-sha256; cv=none; b=vh9e+ibxvLykfCJALqI5xIG2/19boXoBgx8NCX/zBT69IdA3RxCJ4omFGlFAk8f83ga7nr 7iezw9ENMu+IRc+I9IEBiCjz8YWDjEfwqP9pzJlMFnHqQkb1IM8FFMS4q1RYOyP1w9xfzX 8Eb3aZWu16QSs+yx6v6fIA3uiHciMxwmFiu3DYQfmH4G3htmiLxp5IAdQUO2NNj3Z2MiYM nRkxS8Yld5fS1SpUiyD6n3q9xJDtbn0uwYUm9dWcgknbd2mK3LZ6+xOBzbBKJEVlY1eyeI MmJJrDIWVl8NAfVH029kAa9l7WyskKcjrwCbHMBy93+r05pkHQmVzxV3WkmynA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cpB4C1pZKzKH2; Fri, 17 Oct 2025 17:03:55 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 17 Oct 2025 10:03:53 -0700 From: Gleb Smirnoff To: "Enji Cooper (yaneurabeya)" Cc: Alexander Leidinger , Rick Macklem , "David E. O'Brien" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0050289464fa - main - style(9): white space after ; and around binary operators Message-ID: References: <202510162205.59GM5ZvD042942@gitrepo.freebsd.org> <16835444882475995d82a23078996276@Leidinger.net> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Oct 17, 2025 at 12:38:20AM -0700, Enji Cooper (yaneurabeya) wrote: E> I’m not sure about the percentage Rick mentioned, but I think Mark’s comment about avoiding merge conflicts is a key point (for FreeBSD as well as downstream consumers of FreeBSD. E> Unnecessary churn can also make reconciling changes with other sources, e.g., NetBSD, OpenBSD, more difficult for little to no gain. I will emphasize that such a sweeping commit that adds extra churn to main right when re@ is working on .0 release is not helpful at all. Right now re@ and anyone else who cares about 15.0-RELEASE would prefer no extra divergence betweem main and stable/15. If I a commit a bug fix right now around same lines that were touched by this commit, this bug fix will not be cherry-pickable to stable/15 and releng/15.0. P.S. I'm in favor of sweeping stylistic changes, but few weeks before branching a stable, not few weeks after. -- Gleb Smirnoff From nobody Fri Oct 17 18:25:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCtq1vBxz6CTC7; Fri, 17 Oct 2025 18:25: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 4cpCtq1Nk0z3byw; Fri, 17 Oct 2025 18:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760725555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PeGJY6SxwHIq6w3WutOiqTCq9vm62kqFp4/mfu3A+zI=; b=WYeQ1hscgpU9unjqSrOafmtGBrKYz2c4hXgYEwW6+v4EAGK140rtchPQsM9FZmSR1IT5EO qoJplm3JPBaw7lXEKK5TZGGU4B4nbRrlzjMTq8IyyFeJSJPXegcaGKAs5gi8BLJMMdIzqA LRfZc1mmQl49nDo8P2v0EoNeHizESSeB9dQtn9IiHHFm3qQ1JnLgvmKZ5yT2pq9WhKMi16 e14rrzdGc4llyJi/92EJrxqqAHqcg/h24ay/FEnBR9UCVYZSMBjgvBNrObRHhuU5Uu+ZP2 nGvEyo4yG5VH8cvPNagdNH45HtyBkuwo7tK0NxsnBPSdANgMOw3lEKWfj79ZZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760725555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PeGJY6SxwHIq6w3WutOiqTCq9vm62kqFp4/mfu3A+zI=; b=H201Hs9kZmSmEPAS9YaBCe93tl1zv+jpQ5D9Fc7QERnQMJlOrb9CKHytmvphgXdcM4Lf7z o+IbCayVIL5bSNLfWId1BQxGp/5DXOQeddvR+wP2aFsR01iyXXuJ+9TTpKOCBlPA7BQtwd xWbPoJH+fKgrwd11gLCmmyVNBXI+WIUvOs+IW3tWrvnHfIgJb4lFCWsCknXL+xgAgpCu2x n1WoFN3ykmUhtxFJ3/talNIM4CSsDTx3zAG3zVoCFT8QPIQ++MbZvA6ocfgECl7uf/gv5x +ki/09+FgoJ8rsCalLPGKefMjaMkJIQ01qKEQ8/FgkJRXPeTnBon3GIKelawPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760725555; a=rsa-sha256; cv=none; b=bHJxoCknG78bixnX3QTeGE05X6AB+uekG7dRpogVwmXJygNw2fTHxKq5LeGdB5carv6e+F 3CyauhQki7vD+lSljexeQXQDbv3XyggkgrnjtZE2XUNNemw85Lh2v2BArQlsq8LNH+tUdO QfxUgx1Uf88FGUxOFkN8dU4/IfJe3wuBTEMzj5r7tvbjOddtsynwgcH6qC+5cDP/SeKC09 j6KZ9o4xi9FMqrbSc5P/bOcI4sLkvk/JsOdcTHRV6dxoVRaTJxBVjaDz6F0mGZLwUmH1MZ qNQLyS2UmaZ5GmRgKts8UWQwpx912MSElvw3SGmpFkoYcR/Ji0H1ZnjeWBgrjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCtq0n1jz15mP; Fri, 17 Oct 2025 18:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HIPtV7042450; Fri, 17 Oct 2025 18:25:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HIPtOW042447; Fri, 17 Oct 2025 18:25:55 GMT (envelope-from git) Date: Fri, 17 Oct 2025 18:25:55 GMT Message-Id: <202510171825.59HIPtOW042447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 8a1d6d6da5cf - main - VOP_OPENCLOSE.9: note that td may be NULL for VOP_CLOSE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a1d6d6da5cfe0b69c08f20e52817aa9920efe87 Auto-Submitted: auto-generated The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=8a1d6d6da5cfe0b69c08f20e52817aa9920efe87 commit 8a1d6d6da5cfe0b69c08f20e52817aa9920efe87 Author: Jason A. Harmening AuthorDate: 2025-10-16 15:25:51 +0000 Commit: Jason A. Harmening CommitDate: 2025-10-17 18:24:33 +0000 VOP_OPENCLOSE.9: note that td may be NULL for VOP_CLOSE MFC after: 3 days Reviewed by: asomers, olce Differential Revision: https://reviews.freebsd.org/D53137 --- share/man/man9/VOP_OPENCLOSE.9 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/share/man/man9/VOP_OPENCLOSE.9 b/share/man/man9/VOP_OPENCLOSE.9 index 9a4f7069962d..672f9faa92f5 100644 --- a/share/man/man9/VOP_OPENCLOSE.9 +++ b/share/man/man9/VOP_OPENCLOSE.9 @@ -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 December 2, 2009 +.Dd October 17, 2025 .Dt VOP_OPEN 9 .Os .Sh NAME @@ -78,6 +78,17 @@ The access mode is a set of flags, including .Dv FWRITE , .Dv O_NONBLOCK , .Dv O_APPEND . +.Pp +The thread +.Fa td +passed to +.Fn VOP_CLOSE +may be +.Ql NULL +if the last reference to the open file is released from a kernel context, e.g., +the destruction of a socket buffer containing the file reference in a +.Dv SCM_RIGHTS +message. .Sh LOCKS .Fn VOP_OPEN expects From nobody Fri Oct 17 19:13:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpDyH5vz1z6CXlx; Fri, 17 Oct 2025 19:13: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 4cpDyH5FVBz3hQX; Fri, 17 Oct 2025 19:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760728439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AHxqP6WN9Q7oCUc6imqFRIq+S1csWPKgCddymm2qaEU=; b=aGEjqPqrKgewrnNy/NSgBugyYY+LHNtVeMtydSqd8xmt3K77A2YuHCZ8wbd/jUPKkC/esB TW6D9VLGaCeB7AE3wq7GKNgd4SvRHkov0WAhFHbFm/l7oxKdIskz2w5Fq+zhRafysF1OP7 2PQIUGcwEHMXtMpYtn8bajsRXqtmw1HP230dxNfs5ENv/lz1Tl9/+EYwRFoBcKPvURstU5 pRyCkXsqQKCYIDeQ73TSyvL3fggNcHLSZFeSKduSp49IYteqLpM4yih9oQOV7QegfZQ3R5 JPWTFwdu+xWrnVCS3jycEuJag7+H+ORxaCFu7Mz4VGg8e6nihoy4cjE4uaOenA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760728439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AHxqP6WN9Q7oCUc6imqFRIq+S1csWPKgCddymm2qaEU=; b=fgtZPNt1E5rgaVY/+Ivvj1bxq/JotsWF9fHrlex1lxUNiw69ydILX+kdP91bowW2X2ioWX OZhwyb0IXgDFlPszv+2JxK2/AQGLHgUUaQ46uHDNXBNoHfkU5m+UK5VyiRnZ9MX8V5sLlc VNjvMMmzk1FvMKFugRYhmWfN4HOEeGP9jy8FY0s8TFanv8grbw3LBr/llqzMuklFYWKss3 r9ZKpR3wn91nDSxCSBfoo6Qi/eBSATEINIxE3QugSivlAfJHiAijFBo0vsWi13rE7+ZWPG LAFzsGo7eF1NpFFFDQtjoUmYz9X1tVq6euCcwDvg4Ix+DsG8UhF1O5yc9GjXEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760728439; a=rsa-sha256; cv=none; b=RF3RUPoE5phX4yOzwH2B05xK60U+ThNdjACrXIdsyDAQLqn7+fABvvF0WZ7sJVcKHcVuju q6PlJ63AYzAtI+qS5bOB/QTGZSewA2kk25ul/+A6cgNnvrFWBiYbzSV3liikBo3iUvdkdO 4/k+EOnjTifu0MS26mo3oEpelzR//hS/6em0fEsXMakJ+vmee8rEu87nXws1ix/2Reozqw KdtUVeTA6yxbgifkdtQaELcZgRyYst+JZGCn5/E+EXKlXMyQOmBD7IogoTCaDkq+vk1YkU 0sIVjz5+CZqgpAxu2dkwTFXDDL2Myikm8/eHjuQ+0fEFK3Siilwu1s3tZJlQrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpDyH4lVkz16rl; Fri, 17 Oct 2025 19:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HJDxeh036209; Fri, 17 Oct 2025 19:13:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HJDxjH036206; Fri, 17 Oct 2025 19:13:59 GMT (envelope-from git) Date: Fri, 17 Oct 2025 19:13:59 GMT Message-Id: <202510171913.59HJDxjH036206@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 09a49cd49b4f - main - ncurses: Move utilities to the ncurses package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09a49cd49b4fecfb31b2b6677a938ef847289055 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=09a49cd49b4fecfb31b2b6677a938ef847289055 commit 09a49cd49b4fecfb31b2b6677a938ef847289055 Author: Lexi Winter AuthorDate: 2025-10-17 18:41:09 +0000 Commit: Lexi Winter CommitDate: 2025-10-17 19:13:13 +0000 ncurses: Move utilities to the ncurses package MFC after: 3 days Reviewed by: manu, kevans Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53163 --- usr.bin/ncurses/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/ncurses/Makefile b/usr.bin/ncurses/Makefile index 33001e6ab568..1ed8a2d9a915 100644 --- a/usr.bin/ncurses/Makefile +++ b/usr.bin/ncurses/Makefile @@ -1,4 +1,4 @@ -PACKAGE= runtime +PACKAGE= ncurses .include .include "${SRCTOP}/lib/ncurses/config.mk" From nobody Fri Oct 17 19:14:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpDyK0Nh5z6CY3M; Fri, 17 Oct 2025 19:14: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 4cpDyJ6nqQz3hBb; Fri, 17 Oct 2025 19:14:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760728441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cXnmafSbee6FotPoqgFmYtTIqvNUWJsQL607iVZlFXY=; b=snyhvq/SDVDRPGYTDK2kE8qbRzGDSVCDf/W9xwjTh2mfTqkaBuK02WD+Z9Mo3vP//7BAqM OAbFh09DmnYKAg3lN79x/5NRsBHBzZtFzHqLc3z8A51PdtdhZRy6bok2Tm9GmpyjATEACG 5lnsenCsPVIn2fVRsoUz8ZvBjJfPMyGa8QWmytZMuak8XZNdtwUza2zwl+3PyQZ+JPDTlj qgA2W2zz1crAsdqhMcUwKbKEUedaEokQrrObWAiL7u0Fl5+1x+kqjg4HCTDP8G4PGPLtcX G3K8+L513jhtBo0W0I2FybwTb01qZF6Jinswpc1yCd7tkfBVEoMqZfifm9WEHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760728440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cXnmafSbee6FotPoqgFmYtTIqvNUWJsQL607iVZlFXY=; b=iPEhytkG7s9vasrxQ1Cw8ANqthQmU8l2oHei0xlRwP+1qDkBm7rlAKqKTAsqSI+YR3eM8J i/+DD6YYa+95BhYoFMrpeTA10PyP5636HF8JCF5Z56gC9iLFAIUw0iWW28c/EICP3cyTUj qwoDCCYCMjMT6IJsmtGA2rJHgxxLSRwXrn8X8UAFmoNYrHofprnUraHPB0azFXcYG5PUGO 9nSVy/8N/lka2mTbbGU61Uio/VKNBZKH/2ASmN6MPEitkNwG9COedoIBCZSk+zsAo2Pcjj ObLJ69twif0YXV0b3LvYe/74P0Msht1fv29yb/2nDDBe+SyZHUEKgWh+lLYTNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760728441; a=rsa-sha256; cv=none; b=VY9bnARcXm3EZhY9EYXVwjaRQwU/dCew+sxcNenu+xe8qPV71NGwl+Hyc92YuKRi64H9fr +4SBmWy3K4yPRXkMmMQ2bMBAFE+T2MSHKNoZOMhZrWU6m42lyCnFK+E3bMxjtIW/fejzT/ CnJCOGq0bk8tvrak9DPxiC+QJBkfQN01+mtQVO6cr4pkcE30KlHKOfYOYFitZzzvQhqnkT 8Tz/LuehX4a8/+pASfbzz8SpFjGQiVxr/mNwSofOjzbQgBPRWBkAIf43NC3jKw3Q0TPvXu y2m1IdvuCbXIF8FvqozM5KH9Y4ZBS9TuP6vwdcwHMf9wxlaV0sdLiugx/ictiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpDyJ5hDFz16TS; Fri, 17 Oct 2025 19:14:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HJE0If036250; Fri, 17 Oct 2025 19:14:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HJE0uo036247; Fri, 17 Oct 2025 19:14:00 GMT (envelope-from git) Date: Fri, 17 Oct 2025 19:14:00 GMT Message-Id: <202510171914.59HJE0uo036247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 74a6bb524e5b - main - Makefile: Don't allow install{world,kernel} with pkgbase List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74a6bb524e5b9ad654a9acc5da5c195f406717b5 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=74a6bb524e5b9ad654a9acc5da5c195f406717b5 commit 74a6bb524e5b9ad654a9acc5da5c195f406717b5 Author: Lexi Winter AuthorDate: 2025-10-17 19:06:17 +0000 Commit: Lexi Winter CommitDate: 2025-10-17 19:13:13 +0000 Makefile: Don't allow install{world,kernel} with pkgbase Using these targets on a pkgbase system will cause the installed system to become out of sync with the package database, which is almost certain to cause issues the next time pkg(8) is used. To prevent users doing this accidentally, disallow install* if we detect that FreeBSD-runtime is installed in the target. The check can be overridden with DESTDIR=/ for users who are sure they want to do this. MFC after: 3 days Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52879 --- Makefile.inc1 | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index a86dead09aa1..e341599ac505 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -587,7 +587,16 @@ PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif # !defined(_MKSHOWCONFIG) +PKG_NAME_PREFIX?= FreeBSD +PKG_MAINTAINER?= re@FreeBSD.org +PKG_WWW?= https://www.FreeBSD.org +PKG_WORKERS_COUNT?= 1 + .if make(*package*) +.export PKG_NAME_PREFIX +.export PKG_MAINTAINER +.export PKG_WWW + .if !defined(PKG_TIMESTAMP) .if !empty(GIT_CMD) && exists(${GIT_CMD}) && exists(${SRCDIR}/.git) SOURCE_DATE_EPOCH!= ${GIT_CMD} -C ${SRCDIR} show -s --format=%ct HEAD @@ -598,14 +607,6 @@ SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} .else SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} .endif -PKG_WORKERS_COUNT?= 1 - -PKG_NAME_PREFIX?= FreeBSD -PKG_MAINTAINER?= re@FreeBSD.org -PKG_WWW?= https://www.FreeBSD.org -.export PKG_NAME_PREFIX -.export PKG_MAINTAINER -.export PKG_WWW .endif .if !defined(_MKSHOWCONFIG) @@ -1353,6 +1354,28 @@ __installcheck_DESTDIR: .PHONY .endif .endif +# +# Don't allow installworld or installkernel on a pkgbase system. This avoids +# accidentally updating a pkgbase system with install{world,kernel}, causing +# the installed system to become out of date with the package database. +# +# Skip the check if DESTDIR is defined on the assumption the user knows what +# they're doing. This means the check can be disabled for the running system +# using DESTDIR=/. +# +.if !make(distributeworld) && !defined(DESTDIR) +_installcheck_world: __installcheck_PKG +_installcheck_kernel: __installcheck_PKG +__installcheck_PKG: .PHONY +.if exists(${LOCALBASE}/sbin/pkg-static) + @if ${LOCALBASE}/sbin/pkg-static info -e ${PKG_NAME_PREFIX}-runtime; then \ + echo >&2 "ERROR: This target should not be used on a system installed from packages." ; \ + echo >&2 " To override this check, set DESTDIR=/."; \ + false; \ + fi +.endif +.endif + .if !defined(DB_FROM_SRC) # # Check for missing UIDs/GIDs. From nobody Fri Oct 17 21:01:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpHLs29Thz6ChS1; Fri, 17 Oct 2025 21:01: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 4cpHLs1D4Xz3vCM; Fri, 17 Oct 2025 21:01:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760734917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lho7+ifQHnUTP3NDe6avI/jnpopc4jNetVEcxpU731A=; b=CbaGm3ClZK64W+JhoO2qyiQB/stTaoSZsdV6ElKY7YDqN+jj5YR/uvGzOJvAoNpA9c4eDX V9oILCKI6CosljdKl4zNqnO4MEfseAKp2qh7XkR43ZWn23+L/bh9ZgrfiTqDhwGulAPqYg r4PbGSCd0KpDr0Xyq5PTis+csIwlhh7biyF5Z73coZE1HzcnXL0Q+mmdvGWqYthvw25F4B kIqRPoFOXeez9QhvXAXr73lqZsNrjnmsENPRqCY7WhJpnQvJEjtD6URwtD9MjBPA4Dgtay MJZjYj4m76VmBaHVydXXtr+7nG5r06VZpCv8PNnv1kfOOIqCKgg1UkZcDTCHUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760734917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lho7+ifQHnUTP3NDe6avI/jnpopc4jNetVEcxpU731A=; b=QSGkIm4CW4ETX5SbNq2s4tPBJFSZwhG6nRJJfQHMYxvS/LzIUzvVG1u3VCQ1bELdU2lSTS KabjnIW70fihYFhcN8kI05GO8MIr3EOhYxvhgWDHIHnY/HtGQx8WYOjRrJGNPYVZ+92Fm8 8MD7jAZHuI2cCHbyIozzau+oycA6mhkdb0pGLrP1IOYw48jpVVbD9bDIL9MHZlakN/TnUE gxFpXGwO729YVbLwRtJpFPLXAMK2/XDkraVDc2GJestAyOtG50frTKsTNhTfoN9ryKmoBx 4hYCl6fDQS6WGEBebEV19IrfJBpzzQyNiMmH4j7u62kmFOYMKRG4zYiYA3o7uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760734917; a=rsa-sha256; cv=none; b=C9FK60+oLWmq0SyC2Q/QhYlp97nmzb8icHfbN/obNEgPQdG+6WkPAhMvq32bQf2R25zT/M L4osM7dYZlMa/a/5WYw9fC2eJUMOB3fNw6iI9LtPz+yn+1tdUSqs8mpD3eiyIsZBAGKTbc 8DFPIfPquS2cyZRP7n0/GNVyRCSY1TWxcx3U8Ox21uwZzZV0TCJWelakLZcr01s2vGO6Ds VcRutP741cKayrNdFB7kn0zv9AnGoPmMV5MJUdl50Z+XLnlo5e4cXBaV8JTxmTQ4vcH/rp 0zxD0fXgCOFzTQZowtHVn3T6r7QBKrlLyYu+YflcRR6YcLlTU14RAOeyKcQABg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpHLs0pV6z19Wq; Fri, 17 Oct 2025 21:01:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HL1vkV042442; Fri, 17 Oct 2025 21:01:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HL1vXv042439; Fri, 17 Oct 2025 21:01:57 GMT (envelope-from git) Date: Fri, 17 Oct 2025 21:01:57 GMT Message-Id: <202510172101.59HL1vXv042439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: e868a2026635 - main - glabel: add a basic test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e868a2026635c0e083bd6201645add811a7005ba Auto-Submitted: auto-generated The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=e868a2026635c0e083bd6201645add811a7005ba commit e868a2026635c0e083bd6201645add811a7005ba Author: Brad Davis AuthorDate: 2025-10-17 19:55:10 +0000 Commit: Brad Davis CommitDate: 2025-10-17 21:01:33 +0000 glabel: add a basic test Reviewed by: asomers MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D53178 --- tests/sys/geom/class/Makefile | 1 + tests/sys/geom/class/label/Makefile | 7 +++++ tests/sys/geom/class/label/basic.sh | 59 +++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/tests/sys/geom/class/Makefile b/tests/sys/geom/class/Makefile index 3cf3a15273ac..c58ebc0f72a0 100644 --- a/tests/sys/geom/class/Makefile +++ b/tests/sys/geom/class/Makefile @@ -9,6 +9,7 @@ TESTS_SUBDIRS+= concat TESTS_SUBDIRS+= eli .endif TESTS_SUBDIRS+= gate +TESTS_SUBDIRS+= label TESTS_SUBDIRS+= mirror TESTS_SUBDIRS+= multipath TESTS_SUBDIRS+= nop diff --git a/tests/sys/geom/class/label/Makefile b/tests/sys/geom/class/label/Makefile new file mode 100644 index 000000000000..d0072a52c47c --- /dev/null +++ b/tests/sys/geom/class/label/Makefile @@ -0,0 +1,7 @@ +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +ATF_TESTS_SH+= basic + +.include diff --git a/tests/sys/geom/class/label/basic.sh b/tests/sys/geom/class/label/basic.sh new file mode 100755 index 000000000000..b67b41567c02 --- /dev/null +++ b/tests/sys/geom/class/label/basic.sh @@ -0,0 +1,59 @@ +#!/bin/sh +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2025 Brad Davis +# +# 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. +# + +class=label +. $(atf_get_srcdir)/../geom_subr.sh + +atf_test_case create cleanup +create_head() +{ + atf_set "descr" "Create and verify GEOM labels" + atf_set "require.user" "root" +} +create_body() +{ + geom_atf_test_setup + + f1=$(mktemp ${class}.XXXXXX) + atf_check truncate -s 32M "$f1" + attach_md md -t vnode -f "$f1" + + atf_check -s exit:0 -o match:"^Done." glabel create -v test "/dev/$md" + atf_check -s exit:0 -o match:"^label/test N/A $md$" glabel status "/dev/$md" + atf_check -s exit:0 -o match:"^/dev/label/test$" ls /dev/label/test + atf_check -s exit:0 glabel stop test +} +create_cleanup() +{ + geom_test_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case create +} From nobody Fri Oct 17 21:23:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpHqS13Pgz6CkSl; Fri, 17 Oct 2025 21:23: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 4cpHqS0FBQz3xdh; Fri, 17 Oct 2025 21:23:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760736196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q8eGd6HgQfhiTHDydn1MIwGCsV6TtC/WN39KJ6x7duo=; b=S2LklnZDAkYL2hgMqPeQ1iHBVIvAsYDH8T87h9/bL3fLpn1/8VI/DSwnYkwNduANFQGj7v iDAKlf5mcNNCJS+8h1SKS7+dRSItAvSZMqYP8Xx3UX3pJXQ2k/XUOCVVnjoQTFa+9A5q5H JFhYTo6q82l4Knm8RbGUHOkG99JL4z7Lyd0utwq7+aYF1RbBtk0Sm+OpWrZvdVrdFhs64A 4lKuWW2cmO02lu2NaGm9q/Gf+2yo+BQOmbrGrzgDiGOrHQpqEqqqX0M1L/G5WbpAIkmZ/F Bg3OAttxQHUAZ9TOabpwUV55MxNpDPzBPrfCQMIm/Srksw0IOrbXOkn3D1kfuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760736196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q8eGd6HgQfhiTHDydn1MIwGCsV6TtC/WN39KJ6x7duo=; b=MzQuKJIa9nt92L8eXUCtzjedYzX4mHpzXiGPcM6CqK+i/qtpT/w29+p6cVOTO18d0qzKaT 79Xn8waHnpUjjP5K6WHkVEO/ZG5bNARqnHB8GGEklwUrg02ouoC26N5Mtxlf1ew/KGbCKl CYNUmGyQ3D0hksm7rte+ee3tkHXG3ofp9gSRJPBMC+EdFNsvcWtfSzBComAolUTcdG9Q3e uZ3hOHBRn5wpxagswXb4JurKDzT0gjJSH0lRH0Ejd1hADzph52/gdLY9/zW+JzDUBksmEU URxy2pxs++uab978BCOHJzwOWEj61naixDaDq2bU7dsL242LKFV1IedIcAszwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760736196; a=rsa-sha256; cv=none; b=Bwq/G2t6UL1tzKMenBaWNNp2xYI8ghmeAaNXv1isB/X/wa0qUeTjmvDIQaNkhu/1GnD/FW F2lT+y6LCD7p84qK+/RSb37ohLogbePtyidccERkZfmsdXOzw+KNoleMtZmPTsSMWgVkqp Zn+NvRJln+c7xsLo8fu+cIISLT52h2G5cXpHD3qwZ7ocaq6K3c7Si2PGd5zqCztF29A7nn KKJV84WuUMHklOJvwQ6rjcrDDgI+u6PJGWqw3IW22L/iKuWpAHc/SGQHmuLB5n7wWXL5MT masy0ucRbS0bBk65sakRSRpG2CkeM1q9ylaQw3DgNBbtXphEVQ2KXOo7TfKMnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpHqR6cprz19tG; Fri, 17 Oct 2025 21:23:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HLNFOo079585; Fri, 17 Oct 2025 21:23:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HLNFSb079582; Fri, 17 Oct 2025 21:23:15 GMT (envelope-from git) Date: Fri, 17 Oct 2025 21:23:15 GMT Message-Id: <202510172123.59HLNFSb079582@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 96d82d2d133a - main - pt: Switch to swi(9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96d82d2d133acaf8effa2e3aee546276e39ff9f2 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=96d82d2d133acaf8effa2e3aee546276e39ff9f2 commit 96d82d2d133acaf8effa2e3aee546276e39ff9f2 Author: Bojan Novković AuthorDate: 2025-08-11 18:57:31 +0000 Commit: Bojan Novković CommitDate: 2025-10-17 21:20:21 +0000 pt: Switch to swi(9) The pt hwt(4) backend uses NMIs to receive updates about the latest t racing buffer offsets from the tracing hardware. However, it uses taskqueue(9) to schedule the bottom-half handler. This can lead to a panic since the taskqueue(9) code isn't aware it's being called from an NMI context and uses the regular scheduling interfaces. Fix this by scheduling the bottom-half handler using swi(9) and the SWI_FROMNMI flag. Fixes: 310162ea218a MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52491 --- sys/amd64/pt/pt.c | 221 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 123 insertions(+), 98 deletions(-) diff --git a/sys/amd64/pt/pt.c b/sys/amd64/pt/pt.c index c7b75767680a..6b2296de049c 100644 --- a/sys/amd64/pt/pt.c +++ b/sys/amd64/pt/pt.c @@ -42,15 +42,15 @@ */ #include +#include #include +#include #include #include #include #include #include -#include #include -#include #include #include @@ -94,12 +94,7 @@ MALLOC_DEFINE(M_PT, "pt", "Intel Processor Trace"); -SDT_PROVIDER_DEFINE(pt); -SDT_PROBE_DEFINE(pt, , , topa__intr); - -TASKQUEUE_FAST_DEFINE_THREAD(pt); - -static void pt_send_buffer_record(void *arg, int pending __unused); +static void pt_send_buffer_record(void *arg); static int pt_topa_intr(struct trapframe *tf); /* @@ -122,29 +117,24 @@ struct pt_buffer { size_t size; struct mtx lock; /* Lock for fields below. */ vm_offset_t offset; - uint64_t wrap_count; - int curpage; }; struct pt_ctx { int id; struct pt_buffer buf; /* ToPA buffer metadata */ - struct task task; /* ToPA buffer notification task */ struct hwt_context *hwt_ctx; uint8_t *save_area; /* PT XSAVE area */ }; /* PT tracing contexts used for CPU mode. */ static struct pt_ctx *pt_pcpu_ctx; -enum pt_cpu_state { - PT_DISABLED = 0, - PT_STOPPED, - PT_ACTIVE -}; +enum pt_cpu_state { PT_INACTIVE = 0, PT_ACTIVE }; static struct pt_cpu { struct pt_ctx *ctx; /* active PT tracing context */ enum pt_cpu_state state; /* used as part of trace stop protocol */ + void *swi_cookie; /* Software interrupt handler context */ + int in_pcint_handler; } *pt_pcpu; /* @@ -199,31 +189,28 @@ static __inline void pt_update_buffer(struct pt_buffer *buf) { uint64_t reg; - int curpage; + uint64_t offset; /* Update buffer offset. */ reg = rdmsr(MSR_IA32_RTIT_OUTPUT_MASK_PTRS); - curpage = (reg & PT_TOPA_PAGE_MASK) >> PT_TOPA_PAGE_SHIFT; - mtx_lock_spin(&buf->lock); - /* Check if the output wrapped. */ - if (buf->curpage > curpage) - buf->wrap_count++; - buf->curpage = curpage; - buf->offset = reg >> 32; - mtx_unlock_spin(&buf->lock); - - dprintf("%s: wrap_cnt: %lu, curpage: %d, offset: %zu\n", __func__, - buf->wrap_count, buf->curpage, buf->offset); + offset = ((reg & PT_TOPA_PAGE_MASK) >> PT_TOPA_PAGE_SHIFT) * PAGE_SIZE; + offset += (reg >> 32); + + atomic_store_rel_64(&buf->offset, offset); } static __inline void pt_fill_buffer_record(int id, struct pt_buffer *buf, struct hwt_record_entry *rec) { + vm_offset_t offset; + + offset = atomic_load_acq_64(&buf->offset); + rec->record_type = HWT_RECORD_BUFFER; rec->buf_id = id; - rec->curpage = buf->curpage; - rec->offset = buf->offset + (buf->wrap_count * buf->size); + rec->curpage = offset / PAGE_SIZE; + rec->offset = offset & PAGE_MASK; } /* @@ -273,9 +260,9 @@ pt_cpu_start(void *dummy) MPASS(cpu->ctx != NULL); dprintf("%s: curcpu %d\n", __func__, curcpu); + pt_cpu_set_state(curcpu, PT_ACTIVE); load_cr4(rcr4() | CR4_XSAVE); wrmsr(MSR_IA32_RTIT_STATUS, 0); - pt_cpu_set_state(curcpu, PT_ACTIVE); pt_cpu_toggle_local(cpu->ctx->save_area, true); } @@ -291,16 +278,16 @@ pt_cpu_stop(void *dummy) struct pt_cpu *cpu; struct pt_ctx *ctx; - /* Shutdown may occur before PT gets properly configured. */ - if (pt_cpu_get_state(curcpu) == PT_DISABLED) - return; - cpu = &pt_pcpu[curcpu]; ctx = cpu->ctx; - MPASS(ctx != NULL); - dprintf("%s: curcpu %d\n", __func__, curcpu); - pt_cpu_set_state(curcpu, PT_STOPPED); + dprintf("%s: curcpu %d\n", __func__, curcpu); + /* Shutdown may occur before PT gets properly configured. */ + if (ctx == NULL) { + dprintf("%s: missing context on cpu %d; bailing\n", __func__, + curcpu); + return; + } pt_cpu_toggle_local(cpu->ctx->save_area, false); pt_update_buffer(&ctx->buf); } @@ -406,13 +393,11 @@ pt_init_ctx(struct pt_ctx *pt_ctx, struct hwt_vm *vm, int ctx_id) return (ENOMEM); dprintf("%s: preparing ToPA buffer\n", __func__); if (pt_topa_prepare(pt_ctx, vm) != 0) { - dprintf("%s: failed to prepare ToPA buffer\n", __func__); free(pt_ctx->save_area, M_PT); return (ENOMEM); } pt_ctx->id = ctx_id; - TASK_INIT(&pt_ctx->task, 0, pt_send_buffer_record, pt_ctx); return (0); } @@ -426,7 +411,6 @@ pt_deinit_ctx(struct pt_ctx *pt_ctx) if (pt_ctx->save_area != NULL) free(pt_ctx->save_area, M_PT); memset(pt_ctx, 0, sizeof(*pt_ctx)); - pt_ctx->buf.topa_hw = NULL; } /* @@ -519,7 +503,6 @@ pt_backend_configure(struct hwt_context *ctx, int cpu_id, int thread_id) XSTATE_XCOMP_BV_COMPACT; pt_ext->rtit_ctl |= RTIT_CTL_TRACEEN; pt_pcpu[cpu_id].ctx = pt_ctx; - pt_cpu_set_state(cpu_id, PT_STOPPED); return (0); } @@ -549,12 +532,19 @@ pt_backend_disable(struct hwt_context *ctx, int cpu_id) if (ctx->mode == HWT_MODE_CPU) return; - KASSERT(curcpu == cpu_id, ("%s: attempting to disable PT on another cpu", __func__)); + + cpu = &pt_pcpu[cpu_id]; + + dprintf("%s: waiting for cpu %d to exit interrupt handler\n", __func__, + cpu_id); + pt_cpu_set_state(cpu_id, PT_INACTIVE); + while (atomic_cmpset_int(&cpu->in_pcint_handler, 1, 0)) + ; + pt_cpu_stop(NULL); CPU_CLR(cpu_id, &ctx->cpu_map); - cpu = &pt_pcpu[cpu_id]; cpu->ctx = NULL; } @@ -564,14 +554,14 @@ pt_backend_disable(struct hwt_context *ctx, int cpu_id) static int pt_backend_enable_smp(struct hwt_context *ctx) { - dprintf("%s\n", __func__); + + KASSERT(ctx->mode == HWT_MODE_CPU, + ("%s: should only be used for CPU mode", __func__)); if (ctx->mode == HWT_MODE_CPU && atomic_swap_32(&cpu_mode_ctr, 1) != 0) return (-1); - KASSERT(ctx->mode == HWT_MODE_CPU, - ("%s: should only be used for CPU mode", __func__)); smp_rendezvous_cpus(ctx->cpu_map, NULL, pt_cpu_start, NULL, NULL); return (0); @@ -583,6 +573,7 @@ pt_backend_enable_smp(struct hwt_context *ctx) static int pt_backend_disable_smp(struct hwt_context *ctx) { + struct pt_cpu *cpu; dprintf("%s\n", __func__); if (ctx->mode == HWT_MODE_CPU && @@ -593,6 +584,14 @@ pt_backend_disable_smp(struct hwt_context *ctx) dprintf("%s: empty cpu map\n", __func__); return (-1); } + CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { + cpu = &pt_pcpu[cpu_id]; + dprintf("%s: waiting for cpu %d to exit interrupt handler\n", + __func__, cpu_id); + pt_cpu_set_state(cpu_id, PT_INACTIVE); + while (atomic_cmpset_int(&cpu->in_pcint_handler, 1, 0)) + ; + } smp_rendezvous_cpus(ctx->cpu_map, NULL, pt_cpu_stop, NULL, NULL); return (0); @@ -611,13 +610,13 @@ pt_backend_init(struct hwt_context *ctx) int error; dprintf("%s\n", __func__); - if (ctx->mode == HWT_MODE_CPU) { - TAILQ_FOREACH(hwt_cpu, &ctx->cpus, next) { - error = pt_init_ctx(&pt_pcpu_ctx[hwt_cpu->cpu_id], - hwt_cpu->vm, hwt_cpu->cpu_id); - if (error) - return (error); - } + if (ctx->mode != HWT_MODE_CPU) + return (0); + TAILQ_FOREACH(hwt_cpu, &ctx->cpus, next) { + error = pt_init_ctx(&pt_pcpu_ctx[hwt_cpu->cpu_id], hwt_cpu->vm, + hwt_cpu->cpu_id); + if (error) + return (error); } return (0); @@ -647,20 +646,16 @@ pt_backend_deinit(struct hwt_context *ctx) pt_deinit_ctx(pt_ctx); } } else { - CPU_FOREACH(cpu_id) { - if (!CPU_ISSET(cpu_id, &ctx->cpu_map)) + CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { + if (pt_pcpu[cpu_id].ctx == NULL) continue; - if (pt_pcpu[cpu_id].ctx != NULL) { - KASSERT(pt_pcpu[cpu_id].ctx == - &pt_pcpu_ctx[cpu_id], - ("%s: CPU mode tracing with non-cpu mode PT" - "context active", - __func__)); - pt_pcpu[cpu_id].ctx = NULL; - } - pt_ctx = &pt_pcpu_ctx[cpu_id]; - pt_deinit_ctx(pt_ctx); - memset(&pt_pcpu[cpu_id], 0, sizeof(struct pt_cpu)); + KASSERT(pt_pcpu[cpu_id].ctx == &pt_pcpu_ctx[cpu_id], + ("%s: CPU mode tracing with non-cpu mode PT" + "context active", + __func__)); + pt_deinit_ctx(pt_pcpu[cpu_id].ctx); + pt_pcpu[cpu_id].ctx = NULL; + atomic_set_int(&pt_pcpu[cpu_id].in_pcint_handler, 0); } } @@ -675,15 +670,15 @@ pt_backend_read(struct hwt_vm *vm, int *curpage, vm_offset_t *curpage_offset, uint64_t *data) { struct pt_buffer *buf; + uint64_t offset; if (vm->ctx->mode == HWT_MODE_THREAD) buf = &((struct pt_ctx *)vm->thr->private)->buf; else buf = &pt_pcpu[vm->cpu->cpu_id].ctx->buf; - mtx_lock_spin(&buf->lock); - *curpage = buf->curpage; - *curpage_offset = buf->offset + (buf->wrap_count * vm->ctx->bufsize); - mtx_unlock_spin(&buf->lock); + offset = atomic_load_acq_64(&buf->offset); + *curpage = offset / PAGE_SIZE; + *curpage_offset = offset & PAGE_MASK; return (0); } @@ -762,15 +757,13 @@ static struct hwt_backend backend = { * Used as a taskqueue routine from the ToPA interrupt handler. */ static void -pt_send_buffer_record(void *arg, int pending __unused) +pt_send_buffer_record(void *arg) { + struct pt_cpu *cpu = (struct pt_cpu *)arg; struct hwt_record_entry record; - struct pt_ctx *ctx = (struct pt_ctx *)arg; - /* Prepare buffer record. */ - mtx_lock_spin(&ctx->buf.lock); + struct pt_ctx *ctx = cpu->ctx; pt_fill_buffer_record(ctx->id, &ctx->buf, &record); - mtx_unlock_spin(&ctx->buf.lock); hwt_record_ctx(ctx->hwt_ctx, &record, M_ZERO | M_NOWAIT); } static void @@ -795,36 +788,40 @@ static int pt_topa_intr(struct trapframe *tf) { struct pt_buffer *buf; + struct pt_cpu *cpu; struct pt_ctx *ctx; uint64_t reg; - SDT_PROBE0(pt, , , topa__intr); - - if (pt_cpu_get_state(curcpu) != PT_ACTIVE) { - return (0); - } + cpu = &pt_pcpu[curcpu]; reg = rdmsr(MSR_IA_GLOBAL_STATUS); if ((reg & GLOBAL_STATUS_FLAG_TRACETOPAPMI) == 0) { - /* ACK spurious or leftover interrupt. */ pt_topa_status_clear(); + return (0); + } + + if (pt_cpu_get_state(curcpu) != PT_ACTIVE) { return (1); } + atomic_set_int(&cpu->in_pcint_handler, 1); - ctx = pt_pcpu[curcpu].ctx; + ctx = cpu->ctx; + KASSERT(ctx != NULL, + ("%s: cpu %d: ToPA PMI interrupt without an active context", + __func__, curcpu)); buf = &ctx->buf; KASSERT(buf->topa_hw != NULL, - ("%s: ToPA PMI interrupt with invalid buffer", __func__)); - + ("%s: cpu %d: ToPA PMI interrupt with invalid buffer", __func__, + curcpu)); pt_cpu_toggle_local(ctx->save_area, false); pt_update_buffer(buf); pt_topa_status_clear(); - taskqueue_enqueue_flags(taskqueue_pt, &ctx->task, - TASKQUEUE_FAIL_IF_PENDING); if (pt_cpu_get_state(curcpu) == PT_ACTIVE) { + swi_sched(cpu->swi_cookie, SWI_FROMNMI); pt_cpu_toggle_local(ctx->save_area, true); lapic_reenable_pcint(); } + atomic_set_int(&cpu->in_pcint_handler, 0); return (1); } @@ -839,7 +836,7 @@ static int pt_init(void) { u_int cp[4]; - int error; + int error, i; dprintf("pt: Enumerating part 1\n"); cpuid_count(CPUID_PT_LEAF, 0, cp); @@ -869,20 +866,38 @@ pt_init(void) pt_pcpu_ctx = mallocarray(mp_ncpus, sizeof(struct pt_ctx), M_PT, M_ZERO | M_WAITOK); + for (i = 0; i < mp_ncpus; i++) { + error = swi_add(&clk_intr_event, "pt", pt_send_buffer_record, + &pt_pcpu[i], SWI_CLOCK, INTR_MPSAFE, + &pt_pcpu[i].swi_cookie); + if (error != 0) { + dprintf( + "%s: failed to add interrupt handler for cpu: %d\n", + __func__, error); + goto err; + } + } + nmi_register_handler(pt_topa_intr); - if (!lapic_enable_pcint()) { - nmi_remove_handler(pt_topa_intr); - hwt_backend_unregister(&backend); - free(pt_pcpu, M_PT); - free(pt_pcpu_ctx, M_PT); - pt_pcpu = NULL; - pt_pcpu_ctx = NULL; + if (lapic_enable_pcint()) { + initialized = true; + return (0); + } else printf("pt: failed to setup interrupt line\n"); - return (error); +err: + nmi_remove_handler(pt_topa_intr); + hwt_backend_unregister(&backend); + + for (i = 0; i < mp_ncpus; i++) { + if (pt_pcpu[i].swi_cookie != 0) + swi_remove(pt_pcpu[i].swi_cookie); } - initialized = true; + free(pt_pcpu, M_PT); + free(pt_pcpu_ctx, M_PT); + pt_pcpu = NULL; + pt_pcpu_ctx = NULL; - return (0); + return (error); } /* @@ -941,14 +956,24 @@ pt_supported(void) static void pt_deinit(void) { + int i; + struct pt_cpu *cpu; + if (!initialized) return; nmi_remove_handler(pt_topa_intr); lapic_disable_pcint(); hwt_backend_unregister(&backend); + + for (i = 0; i < mp_ncpus; i++) { + cpu = &pt_pcpu[i]; + swi_remove(cpu->swi_cookie); + } + free(pt_pcpu, M_PT); free(pt_pcpu_ctx, M_PT); pt_pcpu = NULL; + pt_pcpu_ctx = NULL; initialized = false; } From nobody Fri Oct 17 22:01:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpJgV4b4Rz6CmwP for ; Fri, 17 Oct 2025 22:01:26 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yx1-xb131.google.com (mail-yx1-xb131.google.com [IPv6:2607:f8b0:4864:20::b131]) (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 4cpJgP2fcmz41ZJ for ; Fri, 17 Oct 2025 22:01:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yx1-xb131.google.com with SMTP id 956f58d0204a3-63d8788b18dso2470159d50.2 for ; Fri, 17 Oct 2025 15:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760738475; x=1761343275; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2hmkzuS9YWhh7xEejc/mCHV2vE8rwTk2TSN44E+bXq4=; b=FHY/lxUDxN+KvPiQwNSdRQSkOtoUP4VI2O6/Q14u2CpZTisulTPB4BzKPT7qExeohm ocoEF+J+F1AVI7XWGEoWRrhCS/ODz+7pDKKyI/9SXIgInpBQ5aXYd1wWEjvq4wW1TWqw W5HWEfnI+znPImChYhTk9l1XNYQ4IfHVgz5C6FbFHb5gIGsCyGCugdCx1jcgBptQyda4 3oWeC7CTPYag/Z4y/9iqhq6YVfeUZd2bB7AaVmCIi6UvIiXuGJgsxs3Scmw9eKmfpRY6 s+dL0dM57PLhWRubd4gkykQfswEawDRqfVw9HHuSVhUjkkwTW0J3QtOHcHIureZA0Bdk d5XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760738475; x=1761343275; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2hmkzuS9YWhh7xEejc/mCHV2vE8rwTk2TSN44E+bXq4=; b=f6H1FKtr+1wOURZkofkeg01fB4iKo+sYZLLUFHNptA+jAfnJBvhDtcoEABMSD1Lmku 2fsCPeMST2kzCBuKCSmjRZh6Oz4j1+E8BT71r1c9+ARjDrKfgXAr7l2BzysZW7KxuxSU E5tZnjHnZsQJOa2GugQkRwBTMmKDH0dNU+l9ffaQLli496/ivNJ8FFyCppTMq+PwhcDA 0rus3PGIpSY3S19CJ/NGHvpEDNj0xXL4Jqmj77fZQKW7pNuCd+L3PN7e+RUyXrE12iP6 VZzFFrWyr2KwtbOh61EE5UOaoOdLu7gZ5yCm+w1dl5udw5mhH9KnH2lMmcQMtCxoOsxk ysbA== X-Forwarded-Encrypted: i=1; AJvYcCXcubT6ZKD2jnO78Ex5hJC/iwmO1wh3vFQ+Oon08jo5uxSlMajxewbFZgTBUOCxlFTcIsBcM/YOOc30IjbW+uOHuAdNvw==@freebsd.org X-Gm-Message-State: AOJu0Ywn1xClxfBdXJycz3P/j5yUFE4/I5/Ijr6N2ms9cEDMzea+YDzO 3Ggm2h2qmrtIp99MwPljVHYqJNkAQnxceDNWylTGwnYV8rfBLXRlxbe/K0WX1F6JEpE7VNsS8mO yY+IUMtIOfDAUi8Mqz0evkNIdjzv/S7U= X-Gm-Gg: ASbGncuE5iMF+apGKFxgy9mWM+PgsQ3xUogaGOK1+mxyVMvLkDn18y521gzuWgasw0R DB+y8/Rg9OQ12VhyUVat5sGshvb4Oi04ajWj6fkTfWewBCjLK/S9+7AsSPruD4ig8iHLMbaDLWK oBXa8sGy2HBznt3DMuYxYbYgA4Wio311B+GBftcrtOZgt+xV2viTSZF/Vz1poDT+kuOH8Kd1EWm F69mzOvg7RhU8eYXXmwMnPxvTRo2mF1TU33M68oxHMsDG50Ie0R4DzuAurDohoYEV1TrF6ydon0 N76QPa5JyweIs5QWJA== X-Google-Smtp-Source: AGHT+IFe/lZZNjznDRdjjwBEJfeq2soJTs9jNexLtAM2tcyP5Pat3DTo2kGcF30f/xGC0JAiOL8RItfPjER4miY5ekI= X-Received: by 2002:a05:690e:11cc:b0:63e:1943:ce46 with SMTP id 956f58d0204a3-63e1943d20cmr4303884d50.38.1760738475126; Fri, 17 Oct 2025 15:01:15 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202510171155.59HBtMCp004658@gitrepo.freebsd.org> In-Reply-To: <202510171155.59HBtMCp004658@gitrepo.freebsd.org> From: Ryan Libby Date: Fri, 17 Oct 2025 15:01:04 -0700 X-Gm-Features: AS18NWBZXd6mraobqQ1DFv5c7Sgx7mhjLNjbY17MS_qpqwb1-Jiwl-80qk-8pk0 Message-ID: Subject: Re: git: 195b00ec45e5 - main - quot: Clean up 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: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: 4cpJgP2fcmz41ZJ On Fri, Oct 17, 2025 at 4:55=E2=80=AFAM Dag-Erling Sm=C3=B8rgrav wrote: > > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D195b00ec45e55c38da13d1bcd2= d7eb6614abec59 > > commit 195b00ec45e55c38da13d1bcd2d7eb6614abec59 > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2025-10-17 11:54:59 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2025-10-17 11:54:59 +0000 > > quot: Clean up > > * Fix numerous style violations. > * Modernize somewhat. > * Don't bother examining errno after calling get_inode(), as it alway= s > exits on error. > * Fix confusing wording in the manual page. > > The code remains somewhat idiosyncratic, e.g. in its insistance on > counting down rather than up in simple for loops, but in the absence > of comprehensive automated tests, the risk of introducing bugs exceed= s > the benefit of rewriting these into more idiomatic forms. > > Reviewed by: obiwac > Differential Revision: https://reviews.freebsd.org/D53130 > --- > usr.sbin/quot/Makefile | 2 - > usr.sbin/quot/quot.8 | 7 +- > usr.sbin/quot/quot.c | 227 ++++++++++++++++++++++---------------------= ------ > 3 files changed, 106 insertions(+), 130 deletions(-) > > diff --git a/usr.sbin/quot/Makefile b/usr.sbin/quot/Makefile > index ed8360ae938e..34ebcb1009c8 100644 > --- a/usr.sbin/quot/Makefile > +++ b/usr.sbin/quot/Makefile > @@ -2,6 +2,4 @@ PROG=3D quot > MAN=3D quot.8 > LIBADD=3D ufs > > -WARNS?=3D 2 > - Apparently this broke the gcc build: https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc14_build/1897/ > --- all_subdir_usr.sbin/quot --- > In function 'usrrehash', > inlined from 'user' at /workspace/src/usr.sbin/quot/quot.c:244:3: > /workspace/src/usr.sbin/quot/quot.c:210:22: error: argument 1 range [1844= 6744071562067968, 18446744073709551615] exceeds maximum object size 9223372= 036854775807 [-Werror=3Dalloc-size-larger-than=3D] > 210 | if ((users =3D calloc(nusers, sizeof(*users))) =3D=3D NUL= L) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from /workspace/src/usr.sbin/quot/quot.c:51: > /tmp/obj/workspace/src/amd64.amd64/tmp/usr/include/stdlib.h: In function = 'user': > /tmp/obj/workspace/src/amd64.amd64/tmp/usr/include/stdlib.h:92:10: note: = in a call to allocation function 'calloc' declared here > 92 | void *calloc(size_t, size_t) __malloc_like __result_use_check > | ^~~~~~ Probably it is from -WARNS?=3D 2 I think gcc is saying that it thinks nusers may be negative. Maybe we can convince it that it can't be? For example, this rescues the build $ git diff diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 879580f649b9..384ae5b0c27e 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -178,7 +178,7 @@ static struct user { daddr_t spc60; daddr_t spc90; } *users; -static int nusers; +static unsigned int nusers; static void inituser(void) Ryan From nobody Fri Oct 17 22:41:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpKYH6mkfz6CqmZ; Fri, 17 Oct 2025 22:41: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 4cpKYH68crz44dx; Fri, 17 Oct 2025 22:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760740867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ONgE82iMzXEwivActnL+Vq9r6tob/F7/8om7lDP3rgw=; b=wFuB/IJ91Nr83BGJE/hmd5T3uKL/MOw2lk3eO8bb7lW4ZjWq4UkId1VTRH2HG6tn8vM4gW jCYqxcw0grLeNQj7OV7WP8UIHH8JZGFd7DShpc6C5gWFjl7iLDvyzluqNmsa67GS9KYHZH G5WKgxXG0/rm0HeY9wC5hRrgF0Q7OSlH8e1kv2mHYjyFQ63idM/YODAD3bOIRbEhiapVlZ UNyNhzbrl7xIkkPfkd1Fnj2SUyn27EVHIYrET3W0CvMmNwB6t+sNVMWQNfyhNpkuBZZ6u/ bOYXwLMv6TMMunxRuAgo3w3cjK32HFEyrXm/HOyMSF09PgVM7HmpSmMX7qCRGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760740867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ONgE82iMzXEwivActnL+Vq9r6tob/F7/8om7lDP3rgw=; b=otOtHe4kJ9gN6HYFLCtYtuCgwhipTmJshpzAhM9W9FkDe2nBZNv9ebEh3rWFvj0Ac49R7C UvZwGmcVK6F5HKUGMHg97nIvh1R5UkiI+zx85da68rOcjH0JPFx9m060AAFZePjsS+nPeV uWG/R8Uv8m9HTd93ewNuo4aIBGmqHKQsIKN+QhEFNoZ2fe64TVTaENzzdX2kCMidtY1omO 3uDWSvveMVP6Yn3IqZUZKZtLNI6c/EnxA8gwniUd4arKuY8GdhpliY111U/I1kEI1ier4x q1gz0NxaDvC9GpbCrEhU/sjznl1JxBp78j65lkJqA37LnNIcXO4hpeSqaFtjXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760740867; a=rsa-sha256; cv=none; b=Fn9gl0uyblPShsNU801PKvUXbafk3uC1tvl1/emDkMc2kksplDNljagbKNA+/y+D01GV43 RzJgXTAQC3zUwtpw09uJd9nAmUI7cSWlSrOLv3VFcncq4hKoIxgzWl490Zn+OKeP8wla7T HjnzZEENU3w/44oSRHXqM2sltrZJMWMYmk4cARRUwKF6XEvHd3Os/SRkTJug9JxUQDISCC lrB18RFJy4Wz1ipNGwFH6Rpu2mmId5MlZoKUcAIPfl/A+WJZ2qY/ZyVI20MqZ4LlIBRzUK WB9Zc5IQ1fBbGFW8SrfYSID3qCOhUlZV18zCPPWjwf/jeXQ7f5viY9Y32dQR5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpKYH5mDlz1Cny; Fri, 17 Oct 2025 22:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HMf7cD023452; Fri, 17 Oct 2025 22:41:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HMf7TE023449; Fri, 17 Oct 2025 22:41:07 GMT (envelope-from git) Date: Fri, 17 Oct 2025 22:41:07 GMT Message-Id: <202510172241.59HMf7TE023449@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3c052bec12fc - main - include/stdckdint.h: make the header compatible with C++ List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c052bec12fcf09f81ba0760ebecec38e196d332 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3c052bec12fcf09f81ba0760ebecec38e196d332 commit 3c052bec12fcf09f81ba0760ebecec38e196d332 Author: Konstantin Belousov AuthorDate: 2025-10-17 03:49:14 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-17 21:48:30 +0000 include/stdckdint.h: make the header compatible with C++ by removing the cast to _Bool. The _Bool type is not defined for C++, and the specification from the gcc info doc states that the return type of the __builtin_{add,sub,mul}_overflow() is bool already. This is done instead of including stdbool.h to avoid namespace pollution, since defining bool from stdckdint.h simingly is not sanctioned by ISO/IEC 9899:2024. PR: 290299 Reviewed by: des Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53149 --- include/stdckdint.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/stdckdint.h b/include/stdckdint.h index af3074dded89..9cb877fe8198 100644 --- a/include/stdckdint.h +++ b/include/stdckdint.h @@ -13,7 +13,7 @@ #if __GNUC_PREREQ__(5, 1) || __has_builtin(__builtin_add_overflow) #define ckd_add(result, a, b) \ - (_Bool)__builtin_add_overflow((a), (b), (result)) + __builtin_add_overflow((a), (b), (result)) #else #define ckd_add(result, a, b) \ _Static_assert(0, "checked addition not supported") @@ -21,7 +21,7 @@ #if __GNUC_PREREQ__(5, 1) || __has_builtin(__builtin_sub_overflow) #define ckd_sub(result, a, b) \ - (_Bool)__builtin_sub_overflow((a), (b), (result)) + __builtin_sub_overflow((a), (b), (result)) #else #define ckd_sub(result, a, b) \ _Static_assert(0, "checked subtraction not supported") @@ -29,7 +29,7 @@ #if __GNUC_PREREQ__(5, 1) || __has_builtin(__builtin_mul_overflow) #define ckd_mul(result, a, b) \ - (_Bool)__builtin_mul_overflow((a), (b), (result)) + __builtin_mul_overflow((a), (b), (result)) #else #define ckd_mul(result, a, b) \ _Static_assert(0, "checked multiplication not supported") From nobody Fri Oct 17 22:58:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpKxF3Q6wz6Crrx; Fri, 17 Oct 2025 22:58: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 4cpKxF2m8kz45t4; Fri, 17 Oct 2025 22:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760741905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7rfMosMMbfuZ+/UHqXPD2SCwg8E49AaC/oGHtjoa22A=; b=wxt0vcyAtALx2r/59jxDFyBo5LruhjhIrplhxvmeSDMHYfLOQ9D4ezHpPAB/BgK7QX3vAt KOU9E2eTpH00lw2YyHPJF4tN6gvuODrj8M4b9o7Vg0vci6wO/PQzvKad6CdjDCA1v2AAs6 lJXCHgCXAnwQZ73g0+n9gKYqXfGd5X8x5CAfFxKBZ0zDz82QBoGNZQ6kE1XxhMZ9zJvlYf UuTX9Ueiy2y2GK++tiVnLjfEeptbbhahtiGc+lM+8S0umGO5A/ZD7ElBRbbmaWg0AaX0HF fHGszQs+qFI4WDcNNT6Zmv20VI5QBB/5J8OaVqEGLJyrEd5nk3jjh3V9gqkF5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760741905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7rfMosMMbfuZ+/UHqXPD2SCwg8E49AaC/oGHtjoa22A=; b=e4+DvMDXNQnyyAWkvsXPAR33S4SA4P/EsTpxjPdngxh+hW+/49Ztsnk0mp2N6xNIH1Lrlc NLtcgJkOo/8dhSPnn5/uAKnCjE/g75RLrBa3vUCLgOJq8KsYA8TLnX3AzUnYvn3kO6BAel x4opV+xE5epUOk7cnEJf0DfpJMq4fF0/gwRv3COpRPHNFZN0jS9hulhNZtDnUKMWcaK1Zm rZn8PHtsODUndrCQ6HRrDktXLMX6z/t49aPqWYPCArcp8+SjkZ117EXut5Nejd8Gim1X51 mcTpbm7P4kxROJ2TIL+UeKOnJg2dMlcriG2uNfKdtMfrS2KTV5wRJh3grKTLkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760741905; a=rsa-sha256; cv=none; b=v9+5TlfEws/2qqKyPGtBGdwSd5Li6qBN1ywOTrYzl9B3RRzcgIQfWWpLLSEn6r74c7rpH3 Ff9v4dJgfD0PE5HfpVhxmi5YjfPrEV1ROvDinUCGVWOz9ETUjguav1cpnjQxiLU/mROWU2 au+7u+cClGUvVFqCNGC/+if+seGNwnoTgyHefIDHn1SKedBxuaVUCF/3fFSrvZ6RgH8lIE mmcWISArq3TxyJUH1V3/4gtbzH5VxwMrrU6WhnZok74p6SQFFQsp80wFsgf+Rosaoq32d0 lJ1pNi5Cx+dRajFkX7aDgb/wy7E5htEQrD5Itgu70NBo6QaChTKakiCm981IKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpKxF2MgGzXW; Fri, 17 Oct 2025 22:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HMwP1G048148; Fri, 17 Oct 2025 22:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HMwP5k048145; Fri, 17 Oct 2025 22:58:25 GMT (envelope-from git) Date: Fri, 17 Oct 2025 22:58:25 GMT Message-Id: <202510172258.59HMwP5k048145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: bf427a09b617 - main - libalias: quiet gcc -Wcalloc-transposed-args List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf427a09b617b60068af65a4c14632fea4ef7dda Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=bf427a09b617b60068af65a4c14632fea4ef7dda commit bf427a09b617b60068af65a4c14632fea4ef7dda Author: Ryan Libby AuthorDate: 2025-10-17 22:43:06 +0000 Commit: Ryan Libby CommitDate: 2025-10-17 22:43:06 +0000 libalias: quiet gcc -Wcalloc-transposed-args Reviewed by: phk Differential Revision: https://reviews.freebsd.org/D53151 --- sys/netinet/libalias/alias_db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index c143d74a2f45..41f0a328daec 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -2181,7 +2181,7 @@ LibAliasInit(struct libalias *la) #undef malloc /* XXX: ugly */ la = malloc(sizeof *la, M_ALIAS, M_WAITOK | M_ZERO); #else - la = calloc(sizeof *la, 1); + la = calloc(1, sizeof *la); if (la == NULL) return (la); #endif From nobody Fri Oct 17 22:58:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpKxH073Dz6Cs0t; Fri, 17 Oct 2025 22:58: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 4cpKxG3bN6z4627; Fri, 17 Oct 2025 22: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=1760741906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RVK5FvtZ1KjJN0wGiKhTG+MhSTh/Th/7Gcjp1ijbLyw=; b=F7jEBZkvpG0Eyt0UIMkX8CQgoR8ONqxchIF6isc/t6xqtEM4+N2KRmmhWfo/yogmncHtNJ 3/yRQsw/nBsUvbJ4LfCZ55p8mL2mvekb90dlL1A3G9q08GKyUAae49s1dv2hKDBA5xQu3z ry5Sp8w+Qu7+bw4cZYGwN3q7dy6lmNukk1082NwDCmXH2b0c7i7XhwoYjK5Y5b+97TfBF2 gns0pv7V8ZeXTxFcZbEreFzaV8AP/sUJsLD3PbK2vUXj+D/PL+K3JB/emJPGF3l9l/z3FH Fwr44gU9k92z5u3xhJAAQ98TDk7es23DfDWcEesa1+LPBkoKQKBXQWTL23QQKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760741906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RVK5FvtZ1KjJN0wGiKhTG+MhSTh/Th/7Gcjp1ijbLyw=; b=IMmd9r8RMyGNpQKJkup4bLgFpltMcmlZgnnXpH08k82rNdVp5JH7A8GQ/I2/1TU+fWZEf0 D7CyvX0UMi3o/+K2dc2SdYE1A110Edl8GfMuvU9kU1IgdCIGjv36sCVLJUubnu7jIYxJGQ XizFlnSPldmHrEr/JvbdPHNZ4gU6EupNRP3zh8u6WGDiAuy8F+k7BDPNmgiMcPYxxe18ko RUpXTVJ9bpxd/goPN6poVLntk+7/HtpF//NtRCol5GMcjrir0wVXUo160Xjqc+v2yL+3vC S2f3e5grG6KMN/LOKUUTjDi4eI6EmfSPjcliLbpLMjtZBqboFW9wpca/HSAJBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760741906; a=rsa-sha256; cv=none; b=C6xpOi1sXiSsVK8EGOSivksHPOCWNgQgVjaGmreWcxjcF4paZnXdK+owiIac9+w7ZUy25W 5+qXvICIuAWzb4fu7xRzp1PwEeF/aLeZlzWwejZBjMGm9I82ENa+pIg4l3AcJmuNMULzNe X2b786O2CNXolUDRxUchOFrZKVPVlTQqghWnELEHBv+Zqxjzrc8HdclnqYUKRd/1rTlA0n t0aOvheDG8P4ooTWv3cduR7JzJda82hgNzTyjgTqBC/3kBGv9VlN/IMTKWdK+3FOPLXtSG Qaf28fZVPSlivslMDLmTEkn7M8GnFtmomHjTQoFrwXDfV1VfP/LT5xnhDYe3Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpKxG303lzP6; Fri, 17 Oct 2025 22:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HMwQPf048181; Fri, 17 Oct 2025 22:58:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HMwQ6l048178; Fri, 17 Oct 2025 22:58:26 GMT (envelope-from git) Date: Fri, 17 Oct 2025 22:58:26 GMT Message-Id: <202510172258.59HMwQ6l048178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 5bd3ce4ef629 - main - achiem: quiet gcc -Warray-bounds List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bd3ce4ef629d2ffd57b4b58a7e7d56cb0e171a8 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=5bd3ce4ef629d2ffd57b4b58a7e7d56cb0e171a8 commit 5bd3ce4ef629d2ffd57b4b58a7e7d56cb0e171a8 Author: Ryan Libby AuthorDate: 2025-10-17 22:43:06 +0000 Commit: Ryan Libby CommitDate: 2025-10-17 22:43:06 +0000 achiem: quiet gcc -Warray-bounds gcc complains about accessing the byte as ads->common.bytes[3] as that field is declared as being one byte. Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D53152 --- sys/dev/ahci/ahciem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ahci/ahciem.c b/sys/dev/ahci/ahciem.c index c9e6c35f4233..012796aa5d6f 100644 --- a/sys/dev/ahci/ahciem.c +++ b/sys/dev/ahci/ahciem.c @@ -479,7 +479,7 @@ ahci_em_emulate_ses_on_led(device_t dev, union ccb *ccb) else ads->common.bytes[0] |= SES_OBJSTAT_NOTINSTALLED; if (ch->disablephy) - ads->common.bytes[3] |= SESCTL_DEVOFF; + ads->bytes[2] |= SESCTL_DEVOFF; ahci_putch(ch); } ccb->ccb_h.status = CAM_REQ_CMP; From nobody Sat Oct 18 02:56:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpRCR54KRz6CBn3; Sat, 18 Oct 2025 02:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpRCR33Rbz3Dkm; Sat, 18 Oct 2025 02:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760756163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TWdC0tyXfQ65+PKpWSbtOO/wpbpQNjnxH+NuuuXYAYo=; b=IFLRBCv/oW1VgNyrVVQE+kJ0xqVECRE2KEYBLk4vxN6D8tMfrHubcA3S/5M+dd91wuJfGq R/+WpzjHnDSawrO0ijV3pKud3LP9QCkMHAPm+NSoC9tXtowVigNUOGHe/HKULc4aleCt4r KaBLw3iqkNB0/degnLlynRuZMo7ByzgfcMIysJCQaNEkPITkI1QZHQhyLlpAeZVY/Ah/PI EA2HV5Zg0WNbNjZPKQvDYq9MeMYNp8zB0VE8G7QIin8IKXQdSHqsg7HCHcwKNhCCOCvijv gKwY2P+4aqdEIIsXbTqhul6RBAqZbCU1uiNVn0rIVBZ6kJTAJq87MfAdWJ7hUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760756163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TWdC0tyXfQ65+PKpWSbtOO/wpbpQNjnxH+NuuuXYAYo=; b=vkXinMJmVyOdLj3ByyZoa/QHcF845pc45wrX3JVGX1f8dgzw7M05nGvLFinK95x9eLbakt YE83mpLqZdCfMDFWy5LVlGVoziMv++B/n6zS1vqYz7We57tWmY8DWrkqML6ycwwpRj8D3b HHqoFZXcjCxh0sjnoYXRb3XWDTMiu9u3vWw0KltDRombUDKHWZIPYphrKFLyKhCoR7Eip7 12L393hx6IAEvOqzzuVJAPo4iXiMrkrZkHV6RNyBiwbsf7+RX8cdJDtQQRf7CkEfAJ/4TK k0nP0ziraY+VZawgv+W2EeooO+M3Dg7oK53Nyf+Z/molvNoMy6vsdLATGSM1ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760756163; a=rsa-sha256; cv=none; b=ES/8cxL52zBPUB/jKEu5tTOdV+BQVJ8mjHTs3kS0LgMLAFBvEk/vtrEtgqaTMa0z2KEpCW uoiFhe2RjSp8Ai97Ifihm+cBGJ5ZBc6DEgr7ZMmRJ0sG5zOxd8iYg30PO0nGpTbd7fNalD 6QSzSQpTC0weqpATPXS7n7eOKkoq7JdtbP+KknjgbnEs5xRMn3hai4B8ysDdG0Embb0Hi4 jJGD5gdhTy8OlL0cBzWiukrkEjkbWm381mXHO+aBD2ENKwJnCbYn3YFi/HgMesMBrVd81j 9jcJ8+dIekLEmp22Dyqhz5c3rg8wtBwlb7zGD9rxUFQb4u9ow6P9xhF31RAhtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpRCR2QYHz6SX; Sat, 18 Oct 2025 02:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I2u3IM096924; Sat, 18 Oct 2025 02:56:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I2u3xi096921; Sat, 18 Oct 2025 02:56:03 GMT (envelope-from git) Date: Sat, 18 Oct 2025 02:56:03 GMT Message-Id: <202510180256.59I2u3xi096921@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: f66068d937e6 - main - Add glabel tests to mtree List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f66068d937e6f278099f583447e9e305e620d5d1 Auto-Submitted: auto-generated The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=f66068d937e6f278099f583447e9e305e620d5d1 commit f66068d937e6f278099f583447e9e305e620d5d1 Author: Siva Mahadevan AuthorDate: 2025-10-18 02:50:55 +0000 Commit: Brad Davis CommitDate: 2025-10-18 02:55:35 +0000 Add glabel tests to mtree Fixes: e868a2026635: glabel: add a basic test. Submitted by: Siva Mahadevan Pointy hat to: brd Pull Request: https://github.com/freebsd/freebsd-src/pull/1877 --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 520b41c8b88f..f7a3b2a33703 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -835,6 +835,8 @@ .. gpt .. + label + .. mirror .. multipath From nobody Sat Oct 18 05:14:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGn0J6fz6CQMc; Sat, 18 Oct 2025 05:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpVGm6YqSz3V2Z; Sat, 18 Oct 2025 05:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X1nQr+4yrT6Grkb1lTDfdI7p7YMbENcrmAVR6LR/W2g=; b=rHFrH+fzNreZQBqcgrvsSY0oJu0ep2K4rfjDkx9adXt7EKOvYcDL0I4Xk3lE+xmvYSErQQ Q/m9ZfptfUSCDNZ5aOWWhX9qjDwz+IbELGIZOh08l1NcWom6TQ8+puXvyUDl59Ie5kHlPp yWXaLC95s2AeXJoWg9NR5NZwKHeNuRvhhfySJkJ4m82y1HTQ4sh2KidT/8X9/qr1Z0lPIg iXDsf3EQ6j61CtjuZaix4C2d2B7wDVn849JdN+q+Cb00rTt8MyQUVXKfLiB4uj1lXYHbCB lndBsQxKzOq4aRQrRTrOr838JEu5XWD784qG7RVTWWxVS0lLCE613XYmcGYGFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X1nQr+4yrT6Grkb1lTDfdI7p7YMbENcrmAVR6LR/W2g=; b=SvNUH5YVBsdaqgUrUEdspoKF62zWkxZbdi2cCUEioX1mN8LUWB8eFy8dFFo8zJ47w1Mnrj +yd/rKtRRroDBdFlWBfJYMY4dvg7rbOS81ymdItaWDP1cQvECR2f/6sydo0HO9DRfDwdDL glltkXqWxaVaFtwY7ntHPD3xBhVjatZ7PVKU0i3aHJjZywJyq3//yv0dTr1KxHEPnR7i3m TMbowYTK+OmQCOmA7GC4rfenOswaGdSn6aa6Qyx8cfA8ZNE3IdZgeHAOxXZ9pTLbx04tmw ajGWcyKjQ0j+LH5znt837GNGeNvvpUZ3MYnY3wwMIXkPBTBVCsSdIGjDue3zSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764448; a=rsa-sha256; cv=none; b=EzOmg74kMMWnX/hhnCkuPkgbGcaMOSxJb6lKJ/9IAQ6+RudhxVA5hmj4d8A8IQpKTjexWE oP2wz/GEtf/ZdFvWhDxACJIe/TwAb5Vz/tRWGnRyW1q9fNA5atOSXfEVGeNrSI+rxqFnvf KYtz6Dayq8KXyNMLSlhRDR18QKYH9OI7EQJhsUyU8bGRlUcR5S7vvkA+1wJLpQ9fP65FJm uhGoeEu2Yv2A3lBSltByVmZB0eNeK47MaHma5UqenOvPBmUkdW6Iw6/1C7xhYnrNEJBy0K olKvKLXLLnfjBEMbku7x8DRExuTJu15BY8hUUgY0kdzFfKihlrA+lE7Uj1/1FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGm5wGbzBrq; Sat, 18 Oct 2025 05:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5E80e062263; Sat, 18 Oct 2025 05:14:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5E8Ln062260; Sat, 18 Oct 2025 05:14:08 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:08 GMT Message-Id: <202510180514.59I5E8Ln062260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1265516c5c61 - main - struct file: add DFLAG_FORK, indicate copying on fork List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1265516c5c610fbc0d65451140e3f17b358cd015 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1265516c5c610fbc0d65451140e3f17b358cd015 commit 1265516c5c610fbc0d65451140e3f17b358cd015 Author: Konstantin Belousov AuthorDate: 2025-08-20 19:07:43 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:11:40 +0000 struct file: add DFLAG_FORK, indicate copying on fork instead of referencing or ignoring. The pass to handle copying is performed after all passable files are installed into the new file descriptor's table, since one of the future consumers of this interface (kqueue) needs all passable file descriptors already valid. After all fds are installed, the additional call for each copyable file is done to copy the underlying object. [MFC note: use fo_spares for fo_fork] Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/kern/kern_descrip.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++-- sys/sys/file.h | 4 ++++ 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 19118eb7f275..373542d16285 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2519,10 +2519,13 @@ fdcopy(struct filedesc *fdp) { struct filedesc *newfdp; struct filedescent *nfde, *ofde; + struct file *fp; int i, lastfile; + bool fork_pass; MPASS(fdp != NULL); + fork_pass = false; newfdp = fdinit(); FILEDESC_SLOCK(fdp); for (;;) { @@ -2533,10 +2536,35 @@ fdcopy(struct filedesc *fdp) fdgrowtable(newfdp, lastfile + 1); FILEDESC_SLOCK(fdp); } - /* copy all passable descriptors (i.e. not kqueue) */ + + /* + * Copy all passable descriptors (i.e. not kqueue), and + * prepare to handle copyable but not passable descriptors + * (kqueues). + * + * The pass to handle copying is performed after all passable + * files are installed into the new file descriptor's table, + * since kqueues need all referenced file descriptors already + * valid, including other kqueues. For the same reason the + * copying is done in two passes by itself, first installing + * not fully initialized ('empty') copyable files into the new + * fd table, and then giving the subsystems a second chance to + * really fill the copied file backing structure with the + * content. + */ newfdp->fd_freefile = fdp->fd_freefile; FILEDESC_FOREACH_FDE(fdp, i, ofde) { - if ((ofde->fde_file->f_ops->fo_flags & DFLAG_PASSABLE) == 0 || + const struct fileops *ops; + + ops = ofde->fde_file->f_ops; + fp = NULL; + if ((ops->fo_flags & DFLAG_FORK) != 0 && + (ofde->fde_flags & UF_FOCLOSE) == 0) { + if (ops->fo_fork(newfdp, ofde->fde_file, &fp, p1, + curthread) != 0) + continue; + fork_pass = true; + } else if ((ops->fo_flags & DFLAG_PASSABLE) == 0 || (ofde->fde_flags & UF_FOCLOSE) != 0 || !fhold(ofde->fde_file)) { if (newfdp->fd_freefile == fdp->fd_freefile) @@ -2545,11 +2573,30 @@ fdcopy(struct filedesc *fdp) } nfde = &newfdp->fd_ofiles[i]; *nfde = *ofde; + if (fp != NULL) + nfde->fde_file = fp; filecaps_copy(&ofde->fde_caps, &nfde->fde_caps, true); fdused_init(newfdp, i); } MPASS(newfdp->fd_freefile != -1); FILEDESC_SUNLOCK(fdp); + + /* + * Now handle copying kqueues, since all fds, including + * kqueues, are in place. + */ + if (__predict_false(fork_pass)) { + FILEDESC_FOREACH_FDE(newfdp, i, nfde) { + const struct fileops *ops; + + ops = nfde->fde_file->f_ops; + if ((ops->fo_flags & DFLAG_FORK) == 0 || + nfde->fde_file == NULL) + continue; + ops->fo_fork(newfdp, NULL, &nfde->fde_file, p1, + curthread); + } + } return (newfdp); } diff --git a/sys/sys/file.h b/sys/sys/file.h index c44fd0f28929..e0195c7c6c2a 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -139,6 +139,8 @@ typedef int fo_fspacectl_t(struct file *fp, int cmd, off_t *offset, off_t *length, int flags, struct ucred *active_cred, struct thread *td); typedef int fo_cmp_t(struct file *fp, struct file *fp1, struct thread *td); +typedef int fo_fork_t(struct filedesc *fdp, struct file *fp, struct file **fp1, + struct proc *p1, struct thread *td); typedef int fo_spare_t(struct file *fp); typedef int fo_flags_t; @@ -163,12 +165,14 @@ struct fileops { fo_fallocate_t *fo_fallocate; fo_fspacectl_t *fo_fspacectl; fo_cmp_t *fo_cmp; + fo_fork_t *fo_fork; fo_spare_t *fo_spares[8]; /* Spare slots */ fo_flags_t fo_flags; /* DFLAG_* below */ }; #define DFLAG_PASSABLE 0x01 /* may be passed via unix sockets. */ #define DFLAG_SEEKABLE 0x02 /* seekable / nonsequential */ +#define DFLAG_FORK 0x04 /* copy on fork */ #endif /* _KERNEL */ #if defined(_KERNEL) || defined(_WANT_FILE) From nobody Sat Oct 18 05:14:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGp1LYjz6CQDL; Sat, 18 Oct 2025 05:14: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 4cpVGp06xzz3VCV; Sat, 18 Oct 2025 05:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VnIKOtLGACbnBK+a8szoqWF/bjHkIDzreUwlNadhlMY=; b=qUC4/NVdS27UQD72vyniig75KcUmB0gfeTer9m373u+JmDDtrGDGGW7U+8HhGOOuECAWYo Ld7d4cOHDtA1WdkrHT3anb1eUmvYmwxz299CSlnCiRRnQcUV/+6sPw+pk7wFALsmSOerLP 7KucAA0Kh6cfgxkrbVNf57Kld6AoCtG2SUSh4FidhWT6sChknPTGsfv7NHQnhsWm5nC42P klYBKosUIN4bgYWmUAVw/oafpDzpyFMqz+kMP6njwYZvQtMGIbRPVn2NI5poX5GrXY/1CL q5G6FuQq0tBTFhiIBVcMJ4hbQEOaz1aguYKYx7dWJnXvN5CzRPl1CbPp8J0MeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VnIKOtLGACbnBK+a8szoqWF/bjHkIDzreUwlNadhlMY=; b=p2XqsBqjAdT/43Cqrayfyqe3XhfSjduz4ni5ptwejasG4ByDXckub99WxJFvDq+yWo+L83 iWcmUWRfkJl+4qWmCEUFnUv6j33O/rcy47OBTrqLptULt8zL9UxCOOm8P9tvUQhvMdk2P8 FZ690rPJ4FVWzuoPnhAbBFwUMCbD2i2r09BQhdtqt/rL8EGOcZUxO+M3JHsuzPiTrwdBOh 2sY5h4os6zsZWrUq3O+4ZonLKeYjElKTzbg5SkAm6X0RtKhCzxYNtjpuGpUqG59CWWmJJ+ PJ6bIqmjD+oHJ0VZE7wu3W348ZVtXSmAv1Denw4VXymq27GqqJSUBs/zcUDaXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764450; a=rsa-sha256; cv=none; b=JdmLN8A/L+PSOj0Ztx8+96iBfx8WPsqc81odvyfbVQnb5ToS87vUgSvghD8B2X+baVxWiP 3wOGRXRhFZ+ixuZQL1MBTVOHwmCWgGMcJywU5evSjZ0zWZc0w6ZUP15faMiF+LwsCo/HX2 qPt2O8N4uALNpxLtZVic76JUgxnQJJHI2oMd2bS5c+eZg1Fp10gb+Jb2rDCbVLi8fCuzHU COXJLzTSRLxzDGIJb8gDwZDsUwRyJioZkjRXHnVwuKODd7GHirH2T3ac/LG7IxbjFh8L76 PTpQMMwObdswKqww59NEItqMlvuvol4WGaJQl+Kx3aL5+zZunfUCfo/katikaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGn6r6XzBpP; Sat, 18 Oct 2025 05:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5E9uI062301; Sat, 18 Oct 2025 05:14:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5E9vh062298; Sat, 18 Oct 2025 05:14:09 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:09 GMT Message-Id: <202510180514.59I5E9vh062298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 37ce6052f6ac - main - kern_descrip.c: add struct proc argument to fdcopy() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37ce6052f6ac5064c5a982beed7393109111dd10 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=37ce6052f6ac5064c5a982beed7393109111dd10 commit 37ce6052f6ac5064c5a982beed7393109111dd10 Author: Konstantin Belousov AuthorDate: 2025-08-20 19:02:33 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:36 +0000 kern_descrip.c: add struct proc argument to fdcopy() The proc is the owner of the copied filedesc. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/kern/kern_descrip.c | 4 ++-- sys/kern/kern_fork.c | 2 +- sys/sys/filedesc.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 373542d16285..a71a601733e5 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2486,7 +2486,7 @@ fdunshare(struct thread *td) if (refcount_load(&p->p_fd->fd_refcnt) == 1) return; - tmp = fdcopy(p->p_fd); + tmp = fdcopy(p->p_fd, p); fdescfree(td); p->p_fd = tmp; } @@ -2515,7 +2515,7 @@ pdunshare(struct thread *td) * this is to ease callers, not catch errors. */ struct filedesc * -fdcopy(struct filedesc *fdp) +fdcopy(struct filedesc *fdp, struct proc *p1) { struct filedesc *newfdp; struct filedescent *nfde, *ofde; diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 7f6abae187b3..8b237b6dbd17 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -423,7 +423,7 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread * pd = pdshare(p1->p_pd); else pd = pdcopy(p1->p_pd); - fd = fdcopy(p1->p_fd); + fd = fdcopy(p1->p_fd, p2); fdtol = NULL; } else { if (fr->fr_flags2 & FR2_SHARE_PATHS) diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 0a388c90de26..4817855443af 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -265,7 +265,7 @@ int fdcheckstd(struct thread *td); void fdclose(struct thread *td, struct file *fp, int idx); void fdcloseexec(struct thread *td); void fdsetugidsafety(struct thread *td); -struct filedesc *fdcopy(struct filedesc *fdp); +struct filedesc *fdcopy(struct filedesc *fdp, struct proc *p1); void fdunshare(struct thread *td); void fdescfree(struct thread *td); int fdlastfile(struct filedesc *fdp); From nobody Sat Oct 18 05:14:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGq2phYz6CQG5; Sat, 18 Oct 2025 05:14: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 4cpVGq0lYVz3V2b; Sat, 18 Oct 2025 05:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ysvfx1ERSsIpesTBYZtME5x/Wqwcz0qv4kmdUVAi8Fg=; b=HNX/YoKUaugIuQo/4I8bB4xhON7IGMsxq/lT9Bzeii2DA7i80qRgyRKVU4pxBYrXKdPAr4 wZfxSTvMUhuPUJTUTIakpThcKTpR9alVWQ4tRm0xn3lpyeqRhXm/YvnRuBJPJkJ4TErlBC 94GKLTL4BakyEBFP9It/sF7TYDiI9fcTyAXOh/l0flpu4VUx6R/buLB5w5N1HnWKAkmb2a 5T/zBadnhPMhhmbLrxYGF4rrNill38mN0YDG8QZv2qAyE1OrUSmyuTf9Q6BqpN8UhTGqEL h5zWtnvP0nUWKQz9l7qdlkLWSsy1+KfqwaBJ70YrzUzziC+9WvpLX0xLs5f9bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ysvfx1ERSsIpesTBYZtME5x/Wqwcz0qv4kmdUVAi8Fg=; b=xL3Zmf794flbwq/wuU9doA0AbwCUNdvDFpSCoKuZFn2sUG6byE2ImpJXcL7hEnGsC4CrFL 7BHoJC8gWAJ6bPEIkUtuMvuPG7LmlrgCo/iMuqElSvTMsPFB9xHxy6vwcB+1UqwMKiLPxt 6bUPlB8y1j2KB6X7vWWcKRbi7VgK82cbpIeUAfBRTvs7dTtobRToKh7rFRoFKC5DMx3L0g Vy/sGDjOVBA2toTHJdYhTx7wj/TpCoc9qmqqwyVdFckKf7gRpkdJBKbPhfLbk79aDk0O/f bdCSh8kTIY5rlfx8e4ACiE81673shTBfpSc/XnhiZaHGphXe3bjk9aRn06Psow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764451; a=rsa-sha256; cv=none; b=mSL2NiB2HVxTyoS6AVZwvXmz1JfS5D7K39JKwm7Tyx8lXUK2StmzCCajSQcDRSGjc2anRG 5KPMfkgS7c6KsGfqTPZMzIi8VGpwAeZhtjMo+AAzCaHjBQHLGp3xf93SiVxhjsGhaG71md PtgpBWILvFlHjZtNMGLZS/SbyU4sne3ZBN9oCg5jXtGKbw6SpbY85D1krGNE8nbDOft32l ZJ6ms0VCDPsis/q4BfHz/cDDQ7JEcjkDynZdAIW5qVFg30+7CBdYh/Zd+YK671aychJa8b GqYRJdoUecol3mLcQxJDnUzPXb3La1W9WtAiJWmJW+ts2hfWo99HQc50/pMNvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGq0M9gzBRH; Sat, 18 Oct 2025 05:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5EAYA062334; Sat, 18 Oct 2025 05:14:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5EACQ062331; Sat, 18 Oct 2025 05:14:10 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:10 GMT Message-Id: <202510180514.59I5EACQ062331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 47ed42f3f44c - main - kqueue_fo_release(): print filter with underflow List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47ed42f3f44ca21210c9d9c56c693248dbca29bb Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=47ed42f3f44ca21210c9d9c56c693248dbca29bb commit 47ed42f3f44ca21210c9d9c56c693248dbca29bb Author: Konstantin Belousov AuthorDate: 2025-08-21 13:54:36 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:36 +0000 kqueue_fo_release(): print filter with underflow Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/kern/kern_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index a6333d8011b1..57b6b75cb848 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1576,7 +1576,7 @@ kqueue_fo_release(int filt) mtx_lock(&filterops_lock); KASSERT(sysfilt_ops[~filt].for_refcnt > 0, - ("filter object refcount not valid on release")); + ("filter object %d refcount not valid on release", filt)); sysfilt_ops[~filt].for_refcnt--; mtx_unlock(&filterops_lock); } From nobody Sat Oct 18 05:14:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGr4VNJz6CQ5y; Sat, 18 Oct 2025 05:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpVGr1jK5z3V0b; Sat, 18 Oct 2025 05:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pb0csVxPLx1PlFa967Y8P/LJIrN1le3swjixE9lLr0Q=; b=rvFvXARyx8kolvIiJwoX68UXV5vha41/p0JA5ckdEnbmDQNUBL+FDURefCtEzPkghaXVou N6MVXZgTwyWV29rTzaWB3RuAYt9x1u+voH5moW0xwcePOJWOPru/Wpmpm1CzcqwwHt/N2e c5+fVL4rpw/UbiAPCbhkm/K5BaoWWqNqmB+P7DGIFj3bog+MqqqANQ2NExe7qDgOMjOZ3p vSBdTO93kDANsgPipJEB2hxgVGOuTyX6/PwerDRFcCAz+lIFS5onC7MjCNcm6KeM7ibSwj gA4KjM4pETCL8kB12AxwvqF7L7qEKCJroOF+PyaAhWKMEcSa4u7SOs9XYs2usQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pb0csVxPLx1PlFa967Y8P/LJIrN1le3swjixE9lLr0Q=; b=iGFJvL8T9OygGnozCluUyyItLjDDMKq/NJOnK7lqtb72uYHTf4cavH6UA/QwXTfzxL3MX3 bJLuGSy8qbkY+uDpYZgZFDqNI7Fh/w/69rwH1BqN+IbdS4rDW+7YYYDSnNZgDB9RcRnKu9 Th18J/NtKjtAzyNUgD7p/k0Qx4cptnLb/PilfuJ0kRR+o1yLFYoapCE7XUwPsPRkYV9wP2 QnSIzE9quqgP/BJaesazhKrn9WCWA9bh8S3b6vnui/qeYgqYA6foYU+8C8k6WYmes0Jh6A ssqNexzHm6dHc1o0/G81JaN8PxRYcbj/EeXY7Ab46HCyDGjiWmIY7X8PzUM0NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764452; a=rsa-sha256; cv=none; b=s2gO8zVAtM8xCBvRWfBRC1HBINe3Z6vWHdfxKqowX6hZMr8mTLfIjjLv9h4Bq/yFn0jMB7 A4qg16AgyDJt151jKqXrTgPqEVf4n+Rr94JXbmAMXo8Og3T2eI+DsAubU2p/qdds+eGG/M 47lxz/cme8z4sjgeh7FfqkluyqLmN2B8BfDQebFkElfxPzIv0y03CE/+IFjJGINU6HO/0j V8ZzQ4nh2hmzlu56L3irdjABoklbl/UBWqk3a200xEeHy9bIg9K/uL7UuQjFcNeRLs2cGY ld/ghXdHZxG6tUEjLyyxLaNy+22G0H5GSmbyUCh4nFO+FyqqLwRHRNvzvAjmJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGr0wBvzBpQ; Sat, 18 Oct 2025 05:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5ECub062366; Sat, 18 Oct 2025 05:14:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5EC1R062363; Sat, 18 Oct 2025 05:14:12 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:12 GMT Message-Id: <202510180514.59I5EC1R062363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 78382caa3edb - main - kern/kern_event.c: extract kern_kqueue_alloc() from kern_kqueue() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78382caa3edbea4c3d3aad2b47ff9db3d77fc978 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=78382caa3edbea4c3d3aad2b47ff9db3d77fc978 commit 78382caa3edbea4c3d3aad2b47ff9db3d77fc978 Author: Konstantin Belousov AuthorDate: 2025-08-19 04:32:43 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:36 +0000 kern/kern_event.c: extract kern_kqueue_alloc() from kern_kqueue() The new helper function allows to allocate a kqueue and its file, without also allocating file descriptor. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/kern/kern_event.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 57b6b75cb848..5435f9702d06 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1177,28 +1177,28 @@ kqueue_init(struct kqueue *kq) TASK_INIT(&kq->kq_task, 0, kqueue_task, kq); } -int -kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps) +static int +kern_kqueue_alloc(struct thread *td, struct filedesc *fdp, int *fdip, + struct file **fpp, int flags, struct filecaps *fcaps, + struct kqueue **kqp) { - struct filedesc *fdp; - struct kqueue *kq; - struct file *fp; struct ucred *cred; - int fd, error; + struct kqueue *kq; + int error; - fdp = td->td_proc->p_fd; cred = td->td_ucred; if (!chgkqcnt(cred->cr_ruidinfo, 1, lim_cur(td, RLIMIT_KQUEUES))) return (ENOMEM); - error = falloc_caps(td, &fp, &fd, flags, fcaps); + error = fdip != NULL ? falloc_caps(td, fpp, fdip, flags, fcaps) : + _falloc_noinstall(td, fpp, 2); if (error != 0) { chgkqcnt(cred->cr_ruidinfo, -1, 0); return (error); } /* An extra reference on `fp' has been held for us by falloc(). */ - kq = malloc(sizeof *kq, M_KQUEUE, M_WAITOK | M_ZERO); + kq = malloc(sizeof(*kq), M_KQUEUE, M_WAITOK | M_ZERO); kqueue_init(kq); kq->kq_fdp = fdp; kq->kq_cred = crhold(cred); @@ -1207,6 +1207,22 @@ kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps) TAILQ_INSERT_HEAD(&fdp->fd_kqlist, kq, kq_list); FILEDESC_XUNLOCK(fdp); + *kqp = kq; + return (0); +} + +int +kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps) +{ + struct kqueue *kq; + struct file *fp; + int fd, error; + + error = kern_kqueue_alloc(td, td->td_proc->p_fd, &fd, &fp, flags, + fcaps, &kq); + if (error != 0) + return (error); + finit(fp, FREAD | FWRITE, DTYPE_KQUEUE, kq, &kqueueops); fdrop(fp, td); From nobody Sat Oct 18 05:14:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGt0cjLz6CQJt; Sat, 18 Oct 2025 05:14: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 4cpVGs2K3Xz3TpJ; Sat, 18 Oct 2025 05:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cq7/rO9gVrNkXxIKFFf3jA13ZLhJvMPHVwBsNeFRDUs=; b=WBaKMcU2MfjllKEHenpe0ohhsGGJnzR6ClvXwRicZJzDOynbTNhwhaICLo69gsuTvpFeCU X+rW0sumk1AEUEXUl8TVBdtFV/ZG/WvqmwfEHFgZr5AKs0D48IZNlFQnG91z6diYE91Rk2 E8p/6rbb+iSinCMt/IPXFPnkWKpdcuH7J+ckGFRMyJzV+qROe3g9yywp0moxiZRSVa6D0l KtrTYNbMQOGXk0uAgGLmFHHj87/Ja0t3CpejRr1UOp1c7F/S2bbQnZe41ZZoeSQlpM8Qdm LbGSikGjWMNN4IuRVQnomDtfBlBuM0dZluUNJLE1I5XQGPyo+OLCrKtepvSF4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cq7/rO9gVrNkXxIKFFf3jA13ZLhJvMPHVwBsNeFRDUs=; b=hheXb2UeXVMiG7VoYC4adkBMqGyzO5JzdXoEL/72R09UcAlxZMF1gcviofT+b4ilhALDfU eo6FcgFmnSIqQeM7e9r8BDz8wJZhV557uNHNpT50bFavM47eVhyL/FphHKqpXTRlfYN31w 9WTQ5smA9AnSqu6yGBNP/skuCJEXwzW0y9CcxdfCoj5YM5++iI1HNoFB9FKx7qjhj2kv6X Rjg8wEu2SZbLfrI1ro7Rz+u5vjbGQbICsF4Dp8TJzECkWGG1JiTwJSToXrsWG3wZWLugo/ Voqe31qdIOqcAy2M9NQpTxAIA45GLCAxOETJ8UBJ8wh/DBJa0n6KeBraJSyw/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764453; a=rsa-sha256; cv=none; b=EFg1LEG/VlGjEy2YUz1wAmmCE4KtQoBt5Qk3UztRK1AfDPyPypKL/aCIzR8mHvZ74jzCYn xrfeX8LR9olcJgd/l8KrGApwakY1ANlKZUxAdEunxbcAaYEZT5wHrBy9x+RUu1CV59HWzg 1mY+YbrKMRc0q9y08KvEapsiSIwizy65p3kq9Zkk/dES1ahx8Gdi4H/dKVStkhx9Hok1EO c5ygGBR3xM7TX3xItVda1wqpWKezvB0J2R+TzJTbirWxCUksyeKm0GtZ8sktopkb89Hl4G 8MePGSAgUZTM8TP51xQpWqaTUO5yfqAkHMAXHDB8xgeE0NIDfRxtIft430mNXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGs1vWbzBrr; Sat, 18 Oct 2025 05:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5ED39062399; Sat, 18 Oct 2025 05:14:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5EDTH062396; Sat, 18 Oct 2025 05:14:13 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:13 GMT Message-Id: <202510180514.59I5EDTH062396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 25cecc4ba284 - main - kern/kern_event.c: extract kqueue_acquire_ref() from kqueue_acquire() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25cecc4ba284096376b1348a807c0e2704d1b746 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=25cecc4ba284096376b1348a807c0e2704d1b746 commit 25cecc4ba284096376b1348a807c0e2704d1b746 Author: Konstantin Belousov AuthorDate: 2025-08-19 04:54:27 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:36 +0000 kern/kern_event.c: extract kqueue_acquire_ref() from kqueue_acquire() Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/kern/kern_event.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 5435f9702d06..80c289f7d802 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1871,17 +1871,8 @@ done: } static int -kqueue_acquire(struct file *fp, struct kqueue **kqp) +kqueue_acquire_ref(struct kqueue *kq) { - int error; - struct kqueue *kq; - - error = 0; - - kq = fp->f_data; - if (fp->f_type != DTYPE_KQUEUE || kq == NULL) - return (EINVAL); - *kqp = kq; KQ_LOCK(kq); if ((kq->kq_state & KQ_CLOSING) == KQ_CLOSING) { KQ_UNLOCK(kq); @@ -1889,8 +1880,22 @@ kqueue_acquire(struct file *fp, struct kqueue **kqp) } kq->kq_refcnt++; KQ_UNLOCK(kq); + return (0); +} - return error; +static int +kqueue_acquire(struct file *fp, struct kqueue **kqp) +{ + struct kqueue *kq; + int error; + + kq = fp->f_data; + if (fp->f_type != DTYPE_KQUEUE || kq == NULL) + return (EINVAL); + error = kqueue_acquire_ref(kq); + if (error == 0) + *kqp = kq; + return (error); } static void From nobody Sat Oct 18 05:14:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGt6d7vz6CQBp; Sat, 18 Oct 2025 05:14: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 4cpVGt3DrPz3TjF; Sat, 18 Oct 2025 05:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cuY6bz/oCPRwfQ+/qmpBpwaalatdJDBBpfCqlv6Xam0=; b=h4a2OXjiNOqMXvKIynd0MF75OmERNqoLoSZSkUdwT+jOsFXACkgW5v3IfxBrkiS62cZh+h pURFLkkL9Y8vct6xGvbqxiBdPtK3wq1S3PHG20lh/r7i3AZ8lAvOTAsbs2M1FJ9R8KryNE /we0kSzjTqnECYCSM+zKIIxpLo2daTXjEQv/dOWz0ThdnO+iyU7idbCflrPZaaf3W/TNF3 eNm5d0YTPHkIT6+rv+m8E/Ph04tT95GXI5v9BwfSsnaRdZc1i8u0VThl71RsJQPklsh4dA SHPhr3Ty/Dzc6DfbewI29WVoHHBr5+E3Qyd3ByG/ZcOCdM4uqna4H3AyrWyhXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cuY6bz/oCPRwfQ+/qmpBpwaalatdJDBBpfCqlv6Xam0=; b=Ze20V5oBOkQvVEZi5Clkhtzfuhf0RxFs01KPeTIP0jcZQwq+mC9M+abU7SxgtSs6SYUfUc kuiXESR3SH+tJFGRL5khJQqkE2KOJMh+lHPS8e8UhWR4SnwACnQnJsalmJIiwCZ4KevjaI gVwkdZSP+fU1ESbNkPveG5Qat1Uy5Ny+Ih4/NUpuGxnICzpxu1fOrAlBtfmZgeGbOm2K9s zHbxnmfE+B3zOKXcFCy49IstHJClSMowcp7de/c+XFYn+3NPGT8pKF6ZIfGv8VxtvyH4mx S2IBrOYXqUR1hOffpl+joBPs8jJw37DxsJQJlsmvvg2rC3y68Uek6s3cFZWXqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764454; a=rsa-sha256; cv=none; b=HoDNDf8LGQlInMDLHq4eNkn6UyV7scWW11p9SJCcM5wvAq9Fs6z4NGYR7neHsb+FyDo3qj cBuPRwk7/MzGBtV69+z1xPAEN3VDIgVGH66JAJR5CbnSyMuDeL19DdJSTF87kw2EPvEJNI rdzKD+j+BMTpZjpjVelmQndzU7UFph2rURqMOAWLoW73XKhtBihCFoUYWODQBR34HzDmFo dkcUXf8LiRsrji004/MwClpfOjC3LAIw1HP5K8VpgzrGiG8JhznUbHreustIbm+BSFJPk4 SFFotFhg+NzPcn12Psp9DkXnn2GmlAsZhSmh4QHt6ffG3zNGqVxX6QvpuKEE7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGt2q6rzBpR; Sat, 18 Oct 2025 05:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5EExf062434; Sat, 18 Oct 2025 05:14:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5EEBj062431; Sat, 18 Oct 2025 05:14:14 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:14 GMT Message-Id: <202510180514.59I5EEBj062431@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b11289f87123 - main - kqueuex(2): add KQUEUE_CPONFORK List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b11289f87123f8ae06fc70bc70d26a25d4356a65 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b11289f87123f8ae06fc70bc70d26a25d4356a65 commit b11289f87123f8ae06fc70bc70d26a25d4356a65 Author: Konstantin Belousov AuthorDate: 2025-08-19 04:34:04 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:36 +0000 kqueuex(2): add KQUEUE_CPONFORK The created kqueue is copied on fork, together with the registered events. This means that a new kqueue is created at the same fd index as the parent' kqueue, and all registered events are copied into the new kqueue (when possible). The current active events list is also duplicated. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/compat/linux/linux_event.c | 2 +- sys/kern/kern_event.c | 174 ++++++++++++++++++++++++++++++++++++++--- sys/sys/event.h | 2 + sys/sys/eventvar.h | 2 + sys/sys/syscallsubr.h | 3 +- 5 files changed, 168 insertions(+), 15 deletions(-) diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c index e88791659f1f..fc3ef7c3e90a 100644 --- a/sys/compat/linux/linux_event.c +++ b/sys/compat/linux/linux_event.c @@ -104,7 +104,7 @@ static int epoll_create_common(struct thread *td, int flags) { - return (kern_kqueue(td, flags, NULL)); + return (kern_kqueue(td, flags, false, NULL)); } #ifdef LINUX_LEGACY_SYSCALLS diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 80c289f7d802..1f3030995ec6 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -134,6 +134,7 @@ static fo_kqfilter_t kqueue_kqfilter; static fo_stat_t kqueue_stat; static fo_close_t kqueue_close; static fo_fill_kinfo_t kqueue_fill_kinfo; +static fo_fork_t kqueue_fork; static const struct fileops kqueueops = { .fo_read = invfo_rdwr, @@ -148,7 +149,9 @@ static const struct fileops kqueueops = { .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, .fo_cmp = file_kcmp_generic, + .fo_fork = kqueue_fork, .fo_fill_kinfo = kqueue_fill_kinfo, + .fo_flags = DFLAG_FORK, }; static int knote_attach(struct knote *kn, struct kqueue *kq); @@ -1151,7 +1154,7 @@ int sys_kqueue(struct thread *td, struct kqueue_args *uap) { - return (kern_kqueue(td, 0, NULL)); + return (kern_kqueue(td, 0, false, NULL)); } int @@ -1159,27 +1162,30 @@ sys_kqueuex(struct thread *td, struct kqueuex_args *uap) { int flags; - if ((uap->flags & ~(KQUEUE_CLOEXEC)) != 0) + if ((uap->flags & ~(KQUEUE_CLOEXEC | KQUEUE_CPONFORK)) != 0) return (EINVAL); flags = 0; if ((uap->flags & KQUEUE_CLOEXEC) != 0) flags |= O_CLOEXEC; - return (kern_kqueue(td, flags, NULL)); + return (kern_kqueue(td, flags, (uap->flags & KQUEUE_CPONFORK) != 0, + NULL)); } static void -kqueue_init(struct kqueue *kq) +kqueue_init(struct kqueue *kq, bool cponfork) { mtx_init(&kq->kq_lock, "kqueue", NULL, MTX_DEF | MTX_DUPOK); TAILQ_INIT(&kq->kq_head); knlist_init_mtx(&kq->kq_sel.si_note, &kq->kq_lock); TASK_INIT(&kq->kq_task, 0, kqueue_task, kq); + if (cponfork) + kq->kq_state |= KQ_CPONFORK; } static int kern_kqueue_alloc(struct thread *td, struct filedesc *fdp, int *fdip, - struct file **fpp, int flags, struct filecaps *fcaps, + struct file **fpp, int flags, struct filecaps *fcaps, bool cponfork, struct kqueue **kqp) { struct ucred *cred; @@ -1191,7 +1197,7 @@ kern_kqueue_alloc(struct thread *td, struct filedesc *fdp, int *fdip, return (ENOMEM); error = fdip != NULL ? falloc_caps(td, fpp, fdip, flags, fcaps) : - _falloc_noinstall(td, fpp, 2); + _falloc_noinstall(td, fpp, 1); if (error != 0) { chgkqcnt(cred->cr_ruidinfo, -1, 0); return (error); @@ -1199,31 +1205,33 @@ kern_kqueue_alloc(struct thread *td, struct filedesc *fdp, int *fdip, /* An extra reference on `fp' has been held for us by falloc(). */ kq = malloc(sizeof(*kq), M_KQUEUE, M_WAITOK | M_ZERO); - kqueue_init(kq); + kqueue_init(kq, cponfork); kq->kq_fdp = fdp; kq->kq_cred = crhold(cred); - FILEDESC_XLOCK(fdp); + if (fdip != NULL) + FILEDESC_XLOCK(fdp); TAILQ_INSERT_HEAD(&fdp->fd_kqlist, kq, kq_list); - FILEDESC_XUNLOCK(fdp); + if (fdip != NULL) + FILEDESC_XUNLOCK(fdp); + finit(*fpp, FREAD | FWRITE, DTYPE_KQUEUE, kq, &kqueueops); *kqp = kq; return (0); } int -kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps) +kern_kqueue(struct thread *td, int flags, bool cponfork, struct filecaps *fcaps) { struct kqueue *kq; struct file *fp; int fd, error; error = kern_kqueue_alloc(td, td->td_proc->p_fd, &fd, &fp, flags, - fcaps, &kq); + fcaps, cponfork, &kq); if (error != 0) return (error); - finit(fp, FREAD | FWRITE, DTYPE_KQUEUE, kq, &kqueueops); fdrop(fp, td); td->td_retval[0] = fd; @@ -1504,7 +1512,7 @@ kern_kevent_anonymous(struct thread *td, int nevents, struct kqueue kq = {}; int error; - kqueue_init(&kq); + kqueue_init(&kq, false); kq.kq_refcnt = 1; error = kqueue_kevent(&kq, td, nevents, nevents, k_ops, NULL); kqueue_drain(&kq, td); @@ -2958,6 +2966,146 @@ noacquire: return (error); } +static int +kqueue_fork_alloc(struct filedesc *fdp, struct file *fp, struct file **fp1, + struct thread *td) +{ + struct kqueue *kq, *kq1; + int error; + + MPASS(fp->f_type == DTYPE_KQUEUE); + kq = fp->f_data; + if ((kq->kq_state & KQ_CPONFORK) == 0) + return (EOPNOTSUPP); + error = kqueue_acquire_ref(kq); + if (error != 0) + return (error); + error = kern_kqueue_alloc(td, fdp, NULL, fp1, 0, NULL, true, &kq1); + if (error == 0) { + kq1->kq_forksrc = kq; + (*fp1)->f_flag = fp->f_flag & (FREAD | FWRITE | FEXEC | + O_CLOEXEC | O_CLOFORK); + } else { + kqueue_release(kq, 0); + } + return (error); +} + +static void +kqueue_fork_copy_knote(struct kqueue *kq1, struct knote *kn, struct proc *p1, + struct filedesc *fdp) +{ + struct knote *kn1; + const struct filterops *fop; + int error; + + fop = kn->kn_fop; + if (fop->f_copy == NULL || (fop->f_isfd && + fdp->fd_files->fdt_ofiles[kn->kn_kevent.ident].fde_file == NULL)) + return; + error = kqueue_expand(kq1, fop, kn->kn_kevent.ident, M_WAITOK); + if (error != 0) + return; + + kn1 = knote_alloc(M_WAITOK); + *kn1 = *kn; + kn1->kn_status |= KN_DETACHED; + kn1->kn_status &= ~KN_QUEUED; + kn1->kn_kq = kq1; + error = fop->f_copy(kn1, p1); + if (error != 0) { + knote_free(kn1); + return; + } + (void)kqueue_fo_find(kn->kn_kevent.filter); + if (fop->f_isfd && !fhold(kn1->kn_fp)) { + fop->f_detach(kn1); + kqueue_fo_release(kn->kn_kevent.filter); + knote_free(kn1); + return; + } + if (kn->kn_knlist != NULL) + knlist_add(kn->kn_knlist, kn1, 0); + KQ_LOCK(kq1); + knote_attach(kn1, kq1); + kn1->kn_influx = 0; + if ((kn->kn_status & KN_QUEUED) != 0) + knote_enqueue(kn1); + KQ_UNLOCK(kq1); +} + +static void +kqueue_fork_copy_list(struct klist *knlist, struct knote *marker, + struct kqueue *kq, struct kqueue *kq1, struct proc *p1, + struct filedesc *fdp) +{ + struct knote *kn; + + KQ_OWNED(kq); + kn = SLIST_FIRST(knlist); + while (kn != NULL) { + if ((kn->kn_status & KN_DETACHED) != 0 || + (kn_in_flux(kn) && (kn->kn_status & KN_SCAN) == 0)) { + kn = SLIST_NEXT(kn, kn_link); + continue; + } + kn_enter_flux(kn); + SLIST_INSERT_AFTER(kn, marker, kn_link); + KQ_UNLOCK(kq); + kqueue_fork_copy_knote(kq1, kn, p1, fdp); + KQ_LOCK(kq); + kn_leave_flux(kn); + kn = SLIST_NEXT(marker, kn_link); + /* XXXKIB switch kn_link to LIST? */ + SLIST_REMOVE(knlist, marker, knote, kn_link); + } +} + +static int +kqueue_fork_copy(struct filedesc *fdp, struct file *fp, struct file *fp1, + struct proc *p1, struct thread *td) +{ + struct kqueue *kq, *kq1; + struct knote *marker; + int error, i; + + error = 0; + MPASS(fp == NULL); + MPASS(fp1->f_type == DTYPE_KQUEUE); + + kq1 = fp1->f_data; + kq = kq1->kq_forksrc; + marker = knote_alloc(M_WAITOK); + marker->kn_status = KN_MARKER; + + KQ_LOCK(kq); + for (i = 0; i < kq->kq_knlistsize; i++) { + kqueue_fork_copy_list(&kq->kq_knlist[i], marker, kq, kq1, + p1, fdp); + } + if (kq->kq_knhashmask != 0) { + for (i = 0; i <= kq->kq_knhashmask; i++) { + kqueue_fork_copy_list(&kq->kq_knhash[i], marker, kq, + kq1, p1, fdp); + } + } + kqueue_release(kq, 1); + kq1->kq_forksrc = NULL; + KQ_UNLOCK(kq); + + knote_free(marker); + return (error); +} + +static int +kqueue_fork(struct filedesc *fdp, struct file *fp, struct file **fp1, + struct proc *p1, struct thread *td) +{ + if (*fp1 == NULL) + return (kqueue_fork_alloc(fdp, fp, fp1, td)); + return (kqueue_fork_copy(fdp, fp, *fp1, p1, td)); +} + struct knote_status_export_bit { int kn_status_bit; int knt_status_bit; diff --git a/sys/sys/event.h b/sys/sys/event.h index 084eaafcbdc0..6e71445f03b0 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -228,6 +228,7 @@ struct freebsd11_kevent32 { /* Flags for kqueuex(2) */ #define KQUEUE_CLOEXEC 0x00000001 /* close on exec */ +#define KQUEUE_CPONFORK 0x00000002 /* copy on fork */ struct knote; SLIST_HEAD(klist, knote); @@ -283,6 +284,7 @@ struct filterops { void (*f_touch)(struct knote *kn, struct kevent *kev, u_long type); int (*f_userdump)(struct proc *p, struct knote *kn, struct kinfo_knote *kin); + int (*f_copy)(struct knote *kn, struct proc *p1); }; /* diff --git a/sys/sys/eventvar.h b/sys/sys/eventvar.h index 7fec444447f9..7cb3269f1fdf 100644 --- a/sys/sys/eventvar.h +++ b/sys/sys/eventvar.h @@ -55,12 +55,14 @@ struct kqueue { #define KQ_CLOSING 0x10 #define KQ_TASKSCHED 0x20 /* task scheduled */ #define KQ_TASKDRAIN 0x40 /* waiting for task to drain */ +#define KQ_CPONFORK 0x80 int kq_knlistsize; /* size of knlist */ struct klist *kq_knlist; /* list of knotes */ u_long kq_knhashmask; /* size of knhash */ struct klist *kq_knhash; /* hash table for knotes */ struct task kq_task; struct ucred *kq_cred; + struct kqueue *kq_forksrc; }; #endif /* !_SYS_EVENTVAR_H_ */ diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 8237165b84ce..d32690634059 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -211,7 +211,8 @@ int kern_kevent_fp(struct thread *td, struct file *fp, int nchanges, int nevents, struct kevent_copyops *k_ops, const struct timespec *timeout); int kern_kill(struct thread *td, pid_t pid, int signum); -int kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps); +int kern_kqueue(struct thread *td, int flags, bool cponfork, + struct filecaps *fcaps); int kern_kldload(struct thread *td, const char *file, int *fileid); int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); int kern_kldunload(struct thread *td, int fileid, int flags); From nobody Sat Oct 18 05:14:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGx2jGsz6CQJv; Sat, 18 Oct 2025 05:14: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 4cpVGw5YPHz3V1V; Sat, 18 Oct 2025 05:14:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X0AZ90zo9FbB8u+xJrlKvNsjikfZVCKCWkkb2ZbfQB8=; b=UCtuzbN40LopS9Ypb4yVCtOPZyim27P3R/1nbhJ0BsiEINYMW9ZdW9HWfSHLOieAmXeIgy 4ezmZyT49GwIWjxUWkC04k7Xk4hBk1XSKDGXL4AGbTFcdx5cqJYX/RVL7k/g7BQx3sZILJ KwD3zBapVqfaR98Noi2lhoGw8ZKV0nLFSErUwd5FbtUG5iJPh1+/MepWQXRacUdJmh4TPh mvq7FPqBvU6Su0Iy9u3o8zP+xa97LgeS6CP6K8XcvUBTeyb2WLkLINIlhTsG7KmkjEs+a6 0z67wb+tfVItkWGBmsoZ7LczCRrQJ30+g4zpn8dI0jXGNryBUmAW5BmEdi/xSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X0AZ90zo9FbB8u+xJrlKvNsjikfZVCKCWkkb2ZbfQB8=; b=c7FzkigkKtVnuZRRSvZexCCRCzBWLCutptROBL78Q0DiIj/ydiE09yvbFCDDuxWM37T1vz cPVT+ZOB0rLaukbB0IHdg9I7S0BseDeoYwBV1qeC6/reJm46cPP2t0X9O4bBOeHgGGHLjc CrCSDsBtB8hYn2qO/dQV89sbGx8bhjTBzO9qRrG5G8gmUhZwTVZoBh9x5spwRqDDJ69ygL q5qt3w2EwQqmja64ApeoXvKuqdLMUrugklcetT2AavH5GYuafjZ4lT2HHTQJXjcYugbWE7 NEUHYNXVUz8++p3F9mnBDiXIdxQXG1FKZ3Mwm93UZuToyLpeJiMxaW1RFNtrnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764456; a=rsa-sha256; cv=none; b=gMBlICD2A9+yOSaCSJxOoF3Xf62vIqvdFJSdB4C+upV9L9H0cYvywq7N1q0ILSxBs+geHN ww4I9PLGFOZLJGs13X75GJwkyc+x/fSPkh7iE6zB+H9HQoLd7fyXU9ZW3uPseyuA5HXzvt RUdHyFZlQ4A063D7LjzfPew29ER058wfHAg86TK/VMDQZG1p+7Ss+MOu3w7wP7fQU7YPhi AjEJxpmKHor/ddUpCxd+Jtt+xIbVxvUQwXCwr/YkY5yhrK2+0gajMhXRnOxSZ91EQoEbFt BRuZ4VVhYD7eAlQCbIpV5oemdcTwf+gtit74Lhjv4INap2UDegTQXAksB7E1vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGw4xZ2zBd4; Sat, 18 Oct 2025 05:14:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5EGXE062504; Sat, 18 Oct 2025 05:14:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5EGWd062501; Sat, 18 Oct 2025 05:14:16 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:16 GMT Message-Id: <202510180514.59I5EGWd062501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6b71c4ff698e - main - kqueue: handle copy for vnode filters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b71c4ff698e1ba2266a85ff2ad89f2c2a8a16de Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6b71c4ff698e1ba2266a85ff2ad89f2c2a8a16de commit 6b71c4ff698e1ba2266a85ff2ad89f2c2a8a16de Author: Konstantin Belousov AuthorDate: 2025-08-23 12:06:42 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:36 +0000 kqueue: handle copy for vnode filters Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/kern/vfs_subr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 73e110c05bc1..c458a43d0c9f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6624,24 +6624,28 @@ static int filt_vfsvnode(struct knote *kn, long hint); static void filt_vfsdetach(struct knote *kn); static int filt_vfsdump(struct proc *p, struct knote *kn, struct kinfo_knote *kin); +static int filt_vfscopy(struct knote *kn, struct proc *p1); static const struct filterops vfsread_filtops = { .f_isfd = 1, .f_detach = filt_vfsdetach, .f_event = filt_vfsread, .f_userdump = filt_vfsdump, + .f_copy = filt_vfscopy, }; static const struct filterops vfswrite_filtops = { .f_isfd = 1, .f_detach = filt_vfsdetach, .f_event = filt_vfswrite, .f_userdump = filt_vfsdump, + .f_copy = filt_vfscopy, }; static const struct filterops vfsvnode_filtops = { .f_isfd = 1, .f_detach = filt_vfsdetach, .f_event = filt_vfsvnode, .f_userdump = filt_vfsdump, + .f_copy = filt_vfscopy, }; static void @@ -6825,6 +6829,16 @@ filt_vfsdump(struct proc *p, struct knote *kn, struct kinfo_knote *kin) return (0); } +static int +filt_vfscopy(struct knote *kn, struct proc *p1) +{ + struct vnode *vp; + + vp = (struct vnode *)kn->kn_hook; + vhold(vp); + return (0); +} + int vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off) { From nobody Sat Oct 18 05:14:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGw0Wvwz6CQGF; Sat, 18 Oct 2025 05:14: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 4cpVGv55Lmz3V3S; Sat, 18 Oct 2025 05:14:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BVaZjdR1OME61VUPJgAmSUpKV29zrRUBvLaUvj2gQYA=; b=SsUzJ3iU0WDtcfivylKLxn586nt/PqPB0knJ4pHB+oWzL38N/juuX6TjeliOFjJLn0sHwY N5qTMcG6pZ5HAo2lsM2OMQfKxQFq5zcm8fzX8TCmvZjkwDEOgsZi8DrebUebTVe7M2EeNS 0RnMfKjP57CDagn+YtaAg3GEb0fK1TV/nskFDWwOLPzLSm4B4gCliM+ooZESYCc0V8hb0M Xyqbcf4eUQbF4inv4aa5KA5iDe1u7vHJiCZQpw1M3tzE9zA7Dw7vHsYIPSfX/rYCnTWzE6 KBcRePx1zAp9UNZkQXwCx4UNRYKZDDb4cy6QmLGtllsq7NSl0wFI7ZK8BHYbHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BVaZjdR1OME61VUPJgAmSUpKV29zrRUBvLaUvj2gQYA=; b=NExRLkxeUR8zanAUqka8rE4VZMizB6Hwwz6xzrqcSmtoRnHkg6YaHAIB57uCvW7bAvR7uL 0h/Pfbkj6DXz7p6hwer8ST8H989QE2VHgHB5tIezrjJr9HNG73RlVePubYnsEMGwO7By4i q8jUl5sBGGUvngqwHgGHYhhGV9Rl6UrIczvnh2J08XSbKQxwCTrwzZu0jJr3FUKgbTPK1Q W/5YjFWMJJW0YzFo0FrOZJtKw0vqF36oiof1QMgpLFIBVP1gHnxA5SaBH8mFUryHhl/R8A p+yyZ9lXg10Y0Sfzo4OY2hrwnjJD9r5X63P+Biqwmpp1efAsneP31o6sOtdwxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764455; a=rsa-sha256; cv=none; b=Lk5UNWDIseyWnBHBkGliiNjVCkNzEd4acZTCB8Cq1MCLBO09XOGan0fAWv5UBxuXFzfk2r 4IbVr+mtJjvuiuFfsq/KL9Swc5fM4a7Q8+rys82ci+1f7W2eZ0mkSw1cKecDZSV4c0M2AZ 3Ifs8k+48hgBtz8xnp88+LMujcUPEUJHbPtsFuwGGt53AyLRgeTfnrQDfSsGIGaO4Fvr4q Xb0I6gMy1oh/7thxoNXbBv4z5SMJh+D0Tz+Sui5U7tQ1S6f/t9IKglk2x6zGit1WXqh8NA uykxjDs1p+c3WZstN6ArxpqLOG+YXjHNHLOlQUWKAz36iRi2j0KcExNfGE2C8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGv41T2zBng; Sat, 18 Oct 2025 05:14:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5EF0q062466; Sat, 18 Oct 2025 05:14:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5EFP7062463; Sat, 18 Oct 2025 05:14:15 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:15 GMT Message-Id: <202510180514.59I5EFP7062463@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c0e70e7b97dc - main - kern_event.c: support copy for timer events List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0e70e7b97dcfcbeedfdfbacf1543b756a616a18 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c0e70e7b97dcfcbeedfdfbacf1543b756a616a18 commit c0e70e7b97dcfcbeedfdfbacf1543b756a616a18 Author: Konstantin Belousov AuthorDate: 2025-08-20 19:06:05 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:36 +0000 kern_event.c: support copy for timer events Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/kern/kern_event.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 1f3030995ec6..4fd495fa1ec8 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -179,6 +179,7 @@ static void filt_timerdetach(struct knote *kn); static void filt_timerstart(struct knote *kn, sbintime_t to); static void filt_timertouch(struct knote *kn, struct kevent *kev, u_long type); +static int filt_timercopy(struct knote *kn, struct proc *p1); static int filt_timervalidate(struct knote *kn, sbintime_t *to); static int filt_timer(struct knote *kn, long hint); static int filt_userattach(struct knote *kn); @@ -215,6 +216,7 @@ static const struct filterops timer_filtops = { .f_detach = filt_timerdetach, .f_event = filt_timer, .f_touch = filt_timertouch, + .f_copy = filt_timercopy, }; static const struct filterops user_filtops = { .f_attach = filt_userattach, @@ -943,6 +945,30 @@ filt_timerattach(struct knote *kn) return (0); } +static int +filt_timercopy(struct knote *kn, struct proc *p) +{ + struct kq_timer_cb_data *kc_src, *kc; + + if (atomic_fetchadd_int(&kq_ncallouts, 1) + 1 > kq_calloutmax) { + atomic_subtract_int(&kq_ncallouts, 1); + return (ENOMEM); + } + + kn->kn_status &= ~KN_DETACHED; + kc_src = kn->kn_ptr.p_v; + kn->kn_ptr.p_v = kc = malloc(sizeof(*kc), M_KQUEUE, M_WAITOK); + kc->kn = kn; + kc->p = p; + kc->flags = kc_src->flags & ~KQ_TIMER_CB_ENQUEUED; + kc->next = kc_src->next; + kc->to = kc_src->to; + kc->cpuid = PCPU_GET(cpuid); + callout_init(&kc->c, 1); + kqtimer_sched_callout(kc); + return (0); +} + static void filt_timerstart(struct knote *kn, sbintime_t to) { From nobody Sat Oct 18 05:14:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGy3KZbz6CQDW; Sat, 18 Oct 2025 05:14: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 4cpVGx6NsSz3VDX; Sat, 18 Oct 2025 05:14:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MPzn3G2GdkbbhtpLMClUHKlNdyWLYmw+Kp+VLJGE544=; b=otX3p8yhX2GDd/uux/I8ErLI+VAwC2nADlIbHpJlmsPWBDBUhX2AZ0kSr4tmW4VIs2LlD0 BvjkySicj51HIHX122p7c8uzd1KLufnM4Q98fxoKk77BfGdqdbbK6BzjbOyFOAnoWcwpK3 vT7XvzWcvdB+LqBvAs3FBlXpgevPvfAHtkwjcVt2Kd0Yr9wlTkTMmjyqA23I1dzPCcSeVi cLJzzt4Jfka7a3xT+KVKt++ZD51w+4iXIRcokuMTTWK7Zf4yW4it7N5DsgNfl8RBVdmUl1 n3B44IWAK084gDtGxE4OqMnDjDrCVjaYp1xs5AHWfm0d5LWnug9P7p1stmnUXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MPzn3G2GdkbbhtpLMClUHKlNdyWLYmw+Kp+VLJGE544=; b=eULi4OL/XFo5cRg6Xkku/HspduoyLEby8cc6NRx7iw1E+6wN5UGAI0b7CLKLVR/7kTPkjk Q5weFoxuiueKv+G4TiEOgzW64hgb6ueupEmyGElUFPni52NZfjtF6eZanf/b1rL6mdmOxL DIgBui+Z8d77D/VOdv18is+6lJVY/MnoBPBhb0ktHn8ncEMmF0oMBjZP/6zuor9dYK3Si3 4EcOhUAUz79DSnLtAMJpzMQ1CRQgOabVcFkt2tGWcrkv9SCrz9H+iTKCmJtugGDr+HerXZ B9bK62DE2GgLUu+gxNlOQwQD3mJfGK34W1DH02hBcvaS6ZOtGX16eZdIc1dB/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764457; a=rsa-sha256; cv=none; b=kHIJvgrWTdAEvf0TQ2grVvC6Kxrqe4uISVvCO6S3dOPfMkkIG4v807vYevJ0pZD/FrHnSv WORZoSu3882gGGPGHQwuqpYVSDe3Xb+I1p4HKqVw3EOP86mXsYnIIgRTAEijcWGDFQTA20 u0A/87SczRGxOoaB36eV6WEUHJEFojfn+fnp6QSEkNjuh1leZfdOJBh+G3yS1L+yqBs0Rk KjewPb9dnZlC2hbYPTiGI9A8E85fMHkv7y/bh5yLXBmaGa7T5eDwTkVSGFgoD7TOZvMs7W LaIR8/SQmz5lFYAkxMof61ayJKUz6uuaGFsk5ooCqZj3fQuDqn4oIw4dUI/dZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGx5RvkzBl8; Sat, 18 Oct 2025 05:14:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5EHnF062538; Sat, 18 Oct 2025 05:14:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5EHTs062535; Sat, 18 Oct 2025 05:14:17 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:17 GMT Message-Id: <202510180514.59I5EHTs062535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7a72e88781ae - main - kqueue: handle copy for netmap filters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a72e88781ae294aae6b97e1972cb19b2a670412 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7a72e88781ae294aae6b97e1972cb19b2a670412 commit 7a72e88781ae294aae6b97e1972cb19b2a670412 Author: Konstantin Belousov AuthorDate: 2025-08-23 14:42:19 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:36 +0000 kqueue: handle copy for netmap filters Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/dev/netmap/netmap_freebsd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c index ac267a66d669..9fb4370129f3 100644 --- a/sys/dev/netmap/netmap_freebsd.c +++ b/sys/dev/netmap/netmap_freebsd.c @@ -1407,19 +1407,34 @@ netmap_knwrite(struct knote *kn, long hint) return netmap_knrw(kn, hint, POLLOUT); } +static int +netmap_kncopy(struct knote *kn, struct proc *p1) +{ + struct netmap_priv_d *priv; + struct nm_selinfo *si; + + priv = kn->kn_hook; + si = priv->np_si[kn->kn_filter == EVFILT_WRITE ? NR_TX : NR_RX]; + NMG_LOCK(); + si->kqueue_users++; + NMG_UNLOCK(); + return (0); +} + static const struct filterops netmap_rfiltops = { .f_isfd = 1, .f_detach = netmap_knrdetach, .f_event = netmap_knread, + .f_copy = netmap_kncopy, }; static const struct filterops netmap_wfiltops = { .f_isfd = 1, .f_detach = netmap_knwdetach, .f_event = netmap_knwrite, + .f_copy = netmap_kncopy, }; - /* * This is called when a thread invokes kevent() to record * a change in the configuration of the kqueue(). From nobody Sat Oct 18 05:14:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVH04rwwz6CQ8V; Sat, 18 Oct 2025 05:14: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 4cpVH01ZWyz3VDy; Sat, 18 Oct 2025 05:14:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88hXTM7nZYZa5VrIvvhg7Km3pK8WWAAiruXRXO/HhDg=; b=g9eMx7/eYGGGOl11UbN3Rtsm1I0+PdzDwP9U/PP7NatL+IgZwQLZQ4KEW/SL57JR5qZ4+J 6MdNL4UcI7YC+vJb1grThTUIaeSE8AmugXgBJcwXJCa1aa9XLpEjPJ2sEdiZreGMXwU6wY r3kUAshFFyWLn072PebxJOJ4y4r9owEcCPkkIesVtKwD0DmnNtxLjy9/Njjo5yA7fBeK+K FfT4MIt4O1duLW3f0faC97uCezZ7xGDtZnG+0l8/KDAsoanqaTiXTsfTVMkW/D3Gm49Wna ozQGRxkvDnC6H75uC9Z8bysf51LIOQM6HJH3ARoY102NQa1L6WprJudeTHi19g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88hXTM7nZYZa5VrIvvhg7Km3pK8WWAAiruXRXO/HhDg=; b=kVZkMajfEa5sZHhbMc0Di4E12Smelahjtf71tQBFZIKFKalSYe5OPPJkYkGduYCJucZZ9h P/aRdtpjbgLC0VknifE2AvX3oSbb/eJPPbZTwZdTjkewxDOEn18aRMxCI/oLAPpA+uHqne PsHYPPBaZAnzv9vlG8fuQZsQ2rJAJ+0UcYPWhyFHEYsccRhORvcHRB0UDdcSvBaudPlsrt 4oQBI1KAcrQklYhxa0stCHWnTiQb9tgm1mwbpfnZM5v0mSXqAoZcWcyHdtUuL35KLBdOWJ Zqhf4cVuA171yUnx1q11sNFoNFzY1yQE0F3HTjUoSEjRbYH1VBZ0y2hW6dbBvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764460; a=rsa-sha256; cv=none; b=CCsZVrs0DeCexjNf5WTxZUxz0/5y9Do1b8WMdtK6GcC4/YcjIIxyBNPCK1r5Ew290M9p++ YqTCoS+OMh2xFpF9UaZULJCsnUyw3oL5+n16trR6Ps9800mm7BwBnjoGIvlB/lRkCwB7CQ sC4gqj0U9pb5xohwFhdGfcSPxJs6T9ywpdYYFlQemwmD3TlSpaqxf+qKqrbfDyHyiGqd6E fP4QN6w41oGTB97DioYnWPJ0+ZzWWli9lpdKK7q1KOWPagIpQJOtAXMFb7uyZC4bRlv0K6 yzaPTwv9zEej1m99LdNAymPnSj13T6EDyoCWLB5XJQpsfQS9R6YxaN6VrZdv+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]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGz6xwvzBpS; Sat, 18 Oct 2025 05:14:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5EJeE062603; Sat, 18 Oct 2025 05:14:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5EJCc062600; Sat, 18 Oct 2025 05:14:19 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:19 GMT Message-Id: <202510180514.59I5EJCc062600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a4981ededef3 - main - kqueue.2: document KQUEUE_CPONFORK List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4981ededef3c2d867ddd991905e4b65bc917a62 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a4981ededef3c2d867ddd991905e4b65bc917a62 commit a4981ededef3c2d867ddd991905e4b65bc917a62 Author: Konstantin Belousov AuthorDate: 2025-10-08 03:06:20 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:37 +0000 kqueue.2: document KQUEUE_CPONFORK Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- lib/libsys/kqueue.2 | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/lib/libsys/kqueue.2 b/lib/libsys/kqueue.2 index 96c9b0222a37..a8ebabf02cf7 100644 --- a/lib/libsys/kqueue.2 +++ b/lib/libsys/kqueue.2 @@ -97,10 +97,37 @@ system call also creates a new kernel event queue, and additionally takes a .Fa flags argument, which is a bitwise-inclusive OR of the following flags: -.Bl -tag -width "KQUEUE_CLOEXEC" +.Bl -tag -width "KQUEUE_CPONFORK" .It Dv KQUEUE_CLOEXEC The returned file descriptor is automatically closed on .Xr execve 2 +.It Dv KQUEUE_CPONFORK +When this flag is set, the created kqueue is copied into +the child process on +.Xr fork 2 +calls. +The kqueue descriptor index of the new kqueue will be inherited by the child, +that is, the numeric value of the descriptor will remain the same. +.Pp +Copying is deep, that is, each registered event in the original kqueue is +copied (and not shared) into the new kqueue. +This is contrary to how other descriptor types are handled upon +.Xr fork 2 , +where the copied file descriptor references the same file object +as the source descriptor (shallow copy). +.Pp +By default, in other words, when the flag is not set, kqueues from +the parent are not copied on fork to the child process. +The corresponding file descriptor indeces are unused in the child. +.Pp +Registered events that reference file descriptors which are not +duplicated on fork, are not copied into the new kqueue. +For instance, if the event references a file descriptor opened with the +.Dv O_CLOEXEC +flag set, it is not copied. +Similarly, if event references a kqueue opened without the +.Dv KQUEUE_CPONFORK +flag, the event is not copied. .El .Pp The From nobody Sat Oct 18 05:14:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpVGz4NPMz6CQDX; Sat, 18 Oct 2025 05:14:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpVGy6X5Hz3VYJ; Sat, 18 Oct 2025 05:14:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6dwn/ftPXy33mNj/x3t93xovbduap8k0aGuzlgf9K8A=; b=qaW8NxX7t0kp7BlBupyHfebGPNDmWl7DrxTtd7vPs+PSyNdI+6LkkgFc9F7q8A3hhDPJYX TBPVwJHEJeAentMAUf0S3467WSwrA8Lyr99auIcKBRasJloZlUpx6u8/eL/OkJoHeLMISZ d85RhfH229qIWWj1Rcxh/KXy58O1k6KLpSvXVVR3vHfyo2W0WEkC6w/PYIwXcVo177zXRc jbSkLm6XM69Be8r6BNzrWxcFMAxT2LTdNi8tSyNOUWtXINRgMKg1MWJIbfxW5OuXoXuL8Y g0lzqRAg5WM82ruFCecZ9Wr5qLFy1bZ4n8FikETMG8rg4wXzkAHCk7o6kmIspg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760764458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6dwn/ftPXy33mNj/x3t93xovbduap8k0aGuzlgf9K8A=; b=r686r3N7EoTVhpBp5Bk90uRuo5RWq7qc2Kn3X5hSMpwphmJQ71q4gTlSbd30sub+oHGhAb 9URScpmbxH+jOq3WYXbobV3cH3ZXacByFdskS9ziaT1N49dNWGpHwMFQDBh/nCChRdSVLT pralGXK4posnGI3g8GSDLHNM0vKckkWSjzstk6ZOvtAKsjHHrqbl00b5clAfiMj0NZo073 huFPp3kBSNRsREYoZWQ1u4lKHtZPR3cfibZWK86r5sRQtuV2fCx69WmIUIw+3cVtK3Sym/ qbGWAyz7uzzWak6B5zTe11o7YyQiZeBOMJ+GfAkfNGgTwZizGn8+y68muyPx8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760764458; a=rsa-sha256; cv=none; b=oKpsCOttWuBpwJIQVSSiJqpYmX1mpm0nkEVxfchOGtDbcokpXJzaQjGGBzlldPkYVuKFBp 65v0mj8qt4e4evb0UwVQUr/wpTngz5QKWh+tKWvpfOFCzTAmjqfcTH84rcOzkexhLCF+qi xa+28vHo2Ra8AQsOAavdfBDMGnVYkWlGyED9vxo7BOkDoaTtHBXQ9BW90xte5ikHkhBOYE H0cMPt7qBujl542mBIyhcN9FV/RlKUlFKUr7c08vBb2RkvBzyu5hVsj6Rj9q+V99gyyoHw AZsvF5Z6QGvBl5iGL1xOKeVTURd9Pg8yLTJ+V9zCrfMMs4ZqrwyEs1ByMqbPZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpVGy5zl5zBrs; Sat, 18 Oct 2025 05:14:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I5EINd062570; Sat, 18 Oct 2025 05:14:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I5EISl062567; Sat, 18 Oct 2025 05:14:18 GMT (envelope-from git) Date: Sat, 18 Oct 2025 05:14:18 GMT Message-Id: <202510180514.59I5EISl062567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 36138969847b - main - knotes: kqueue: handle copy for trivial filters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36138969847b231cd98f48272e2bdf88a8dc08dd Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=36138969847b231cd98f48272e2bdf88a8dc08dd commit 36138969847b231cd98f48272e2bdf88a8dc08dd Author: Konstantin Belousov AuthorDate: 2025-10-16 22:32:45 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-18 05:12:37 +0000 knotes: kqueue: handle copy for trivial filters Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045 --- sys/arm/ti/ti_pruss.c | 1 + sys/cam/scsi/scsi_pass.c | 3 ++- sys/cam/scsi/scsi_target.c | 1 + sys/compat/linuxkpi/common/src/linux_compat.c | 2 ++ sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c | 1 + sys/dev/atkbdc/psm.c | 1 + sys/dev/cyapa/cyapa.c | 3 ++- sys/dev/evdev/cdev.c | 1 + sys/dev/evdev/uinput.c | 1 + sys/dev/gpio/gpioc.c | 3 ++- sys/dev/hid/hidraw.c | 1 + sys/dev/hid/u2f.c | 1 + sys/dev/null/null.c | 6 ++++-- sys/dev/qat/qat_common/adf_freebsd_dev_processes.c | 1 + sys/dev/usb/usb_dev.c | 2 ++ sys/fs/cuse/cuse.c | 2 ++ sys/fs/fuse/fuse_device.c | 2 ++ sys/geom/geom_dev.c | 1 + sys/kern/kern_devctl.c | 1 + sys/kern/kern_event.c | 12 ++++++++++++ sys/kern/kern_jaildesc.c | 1 + sys/kern/kern_sig.c | 1 + sys/kern/subr_log.c | 1 + sys/kern/sys_eventfd.c | 7 +++++-- sys/kern/sys_pipe.c | 5 ++++- sys/kern/sys_procdesc.c | 1 + sys/kern/tty.c | 2 ++ sys/kern/tty_pts.c | 2 ++ sys/kern/uipc_mqueue.c | 2 ++ sys/kern/uipc_socket.c | 3 +++ sys/kern/uipc_usrreq.c | 2 ++ sys/kern/vfs_aio.c | 4 +++- sys/kern/vfs_inotify.c | 1 + sys/kern/vfs_subr.c | 1 + sys/net/bpf.c | 2 ++ sys/net/if_tuntap.c | 2 ++ sys/security/audit/audit_pipe.c | 1 + sys/sys/event.h | 1 + sys/x86/acpica/acpi_apm.c | 1 + 39 files changed, 77 insertions(+), 9 deletions(-) diff --git a/sys/arm/ti/ti_pruss.c b/sys/arm/ti/ti_pruss.c index 4e9f2022240c..bae1de9f2ddf 100644 --- a/sys/arm/ti/ti_pruss.c +++ b/sys/arm/ti/ti_pruss.c @@ -793,6 +793,7 @@ static const struct filterops ti_pruss_kq_read = { .f_isfd = 1, .f_detach = ti_pruss_irq_kqread_detach, .f_event = ti_pruss_irq_kqevent, + .f_copy = knote_triv_copy, }; static void diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c index c3587421c176..b44ab866dfe7 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -206,7 +206,8 @@ static struct cdevsw pass_cdevsw = { static const struct filterops passread_filtops = { .f_isfd = 1, .f_detach = passreadfiltdetach, - .f_event = passreadfilt + .f_event = passreadfilt, + .f_copy = knote_triv_copy, }; static MALLOC_DEFINE(M_SCSIPASS, "scsi_pass", "scsi passthrough buffers"); diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index 21c78e35dadc..39ce2bcea8f4 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -108,6 +108,7 @@ static const struct filterops targread_filtops = { .f_isfd = 1, .f_detach = targreadfiltdetach, .f_event = targreadfilt, + .f_copy = knote_triv_copy, }; static struct cdevsw targ_cdevsw = { diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 458744a9fec6..ff0f477ea8cc 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1171,12 +1171,14 @@ static const struct filterops linux_dev_kqfiltops_read = { .f_isfd = 1, .f_detach = linux_file_kqfilter_detach, .f_event = linux_file_kqfilter_read_event, + .f_copy = knote_triv_copy, }; static const struct filterops linux_dev_kqfiltops_write = { .f_isfd = 1, .f_detach = linux_file_kqfilter_detach, .f_event = linux_file_kqfilter_write_event, + .f_copy = knote_triv_copy, }; static void diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c index 0dd2ecd7fd8d..3ddbfcb97184 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c @@ -183,6 +183,7 @@ static struct filterops zvol_filterops_vnode = { .f_isfd = 1, .f_detach = zvol_filter_detach, .f_event = zvol_filter_vnode, + .f_copy = knote_triv_copy, }; extern uint_t zfs_geom_probe_vdev_key; diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 8563b5f93aa2..137758b104d3 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -5287,6 +5287,7 @@ static const struct filterops psmfiltops = { .f_isfd = 1, .f_detach = psmfilter_detach, .f_event = psmfilter, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/dev/cyapa/cyapa.c b/sys/dev/cyapa/cyapa.c index ed755f992949..464b03c0ab64 100644 --- a/sys/dev/cyapa/cyapa.c +++ b/sys/dev/cyapa/cyapa.c @@ -1121,7 +1121,8 @@ static int cyapafilt(struct knote *, long); static const struct filterops cyapa_filtops = { .f_isfd = 1, .f_detach = cyapafiltdetach, - .f_event = cyapafilt + .f_event = cyapafilt, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/dev/evdev/cdev.c b/sys/dev/evdev/cdev.c index 9fe1299a0937..dd4115cdfc71 100644 --- a/sys/dev/evdev/cdev.c +++ b/sys/dev/evdev/cdev.c @@ -96,6 +96,7 @@ static const struct filterops evdev_cdev_filterops = { .f_attach = NULL, .f_detach = evdev_kqdetach, .f_event = evdev_kqread, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/dev/evdev/uinput.c b/sys/dev/evdev/uinput.c index 9ac9fee8a157..76a530479c02 100644 --- a/sys/dev/evdev/uinput.c +++ b/sys/dev/evdev/uinput.c @@ -104,6 +104,7 @@ static const struct filterops uinput_filterops = { .f_attach = NULL, .f_detach = uinput_kqdetach, .f_event = uinput_kqread, + .f_copy = knote_triv_copy, }; struct uinput_cdev_state diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c index 6c6f79227166..f690140af97b 100644 --- a/sys/dev/gpio/gpioc.c +++ b/sys/dev/gpio/gpioc.c @@ -158,7 +158,8 @@ static const struct filterops gpioc_read_filterops = { .f_attach = NULL, .f_detach = gpioc_kqdetach, .f_event = gpioc_kqread, - .f_touch = NULL + .f_touch = NULL, + .f_copy = knote_triv_copy, }; static struct gpioc_pin_event * diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c index 4855843cd265..d17356642042 100644 --- a/sys/dev/hid/hidraw.c +++ b/sys/dev/hid/hidraw.c @@ -182,6 +182,7 @@ static const struct filterops hidraw_filterops_read = { .f_isfd = 1, .f_detach = hidraw_kqdetach, .f_event = hidraw_kqread, + .f_copy = knote_triv_copy, }; static void diff --git a/sys/dev/hid/u2f.c b/sys/dev/hid/u2f.c index 08f1a5ceedba..4232322c61df 100644 --- a/sys/dev/hid/u2f.c +++ b/sys/dev/hid/u2f.c @@ -132,6 +132,7 @@ static struct filterops u2f_filterops_read = { .f_isfd = 1, .f_detach = u2f_kqdetach, .f_event = u2f_kqread, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index 8525eb9543c3..c4f138b102c7 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -61,12 +61,14 @@ static int zero_ev(struct knote *kn, long hint); static const struct filterops one_fop = { .f_isfd = 1, - .f_event = one_ev + .f_event = one_ev, + .f_copy = knote_triv_copy, }; static const struct filterops zero_fop = { .f_isfd = 1, - .f_event = zero_ev + .f_event = zero_ev, + .f_copy = knote_triv_copy, }; static struct cdevsw full_cdevsw = { diff --git a/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c b/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c index 67e1d4ad2cab..c5b745bb78fb 100644 --- a/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c +++ b/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c @@ -89,6 +89,7 @@ static struct filterops adf_state_read_filterops = { .f_attach = NULL, .f_detach = adf_state_kqread_detach, .f_event = adf_state_kqread_event, + .f_copy = knote_triv_copy, }; static struct cdev *adf_processes_dev; diff --git a/sys/dev/usb/usb_dev.c b/sys/dev/usb/usb_dev.c index 293b0c72587f..e58d6a674ec0 100644 --- a/sys/dev/usb/usb_dev.c +++ b/sys/dev/usb/usb_dev.c @@ -1231,12 +1231,14 @@ static const struct filterops usb_filtops_write = { .f_isfd = 1, .f_detach = usb_filter_detach, .f_event = usb_filter_write, + .f_copy = knote_triv_copy, }; static const struct filterops usb_filtops_read = { .f_isfd = 1, .f_detach = usb_filter_detach, .f_event = usb_filter_read, + .f_copy = knote_triv_copy, }; /* ARGSUSED */ diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c index d63a7d4691cf..b2524324584a 100644 --- a/sys/fs/cuse/cuse.c +++ b/sys/fs/cuse/cuse.c @@ -195,12 +195,14 @@ static const struct filterops cuse_client_kqfilter_read_ops = { .f_isfd = 1, .f_detach = cuse_client_kqfilter_read_detach, .f_event = cuse_client_kqfilter_read_event, + .f_copy = knote_triv_copy, }; static const struct filterops cuse_client_kqfilter_write_ops = { .f_isfd = 1, .f_detach = cuse_client_kqfilter_write_detach, .f_event = cuse_client_kqfilter_write_event, + .f_copy = knote_triv_copy, }; static d_open_t cuse_client_open; diff --git a/sys/fs/fuse/fuse_device.c b/sys/fs/fuse/fuse_device.c index 57b3559731f7..75bc0357571f 100644 --- a/sys/fs/fuse/fuse_device.c +++ b/sys/fs/fuse/fuse_device.c @@ -126,11 +126,13 @@ static const struct filterops fuse_device_rfiltops = { .f_isfd = 1, .f_detach = fuse_device_filt_detach, .f_event = fuse_device_filt_read, + .f_copy = knote_triv_copy, }; static const struct filterops fuse_device_wfiltops = { .f_isfd = 1, .f_event = fuse_device_filt_write, + .f_copy = knote_triv_copy, }; /**************************** diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 27c65f15d5e3..db0bc77a752f 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -82,6 +82,7 @@ static const struct filterops gdev_filterops_vnode = { .f_isfd = 1, .f_detach = gdev_filter_detach, .f_event = gdev_filter_vnode, + .f_copy = knote_triv_copy, }; static struct cdevsw g_dev_cdevsw = { diff --git a/sys/kern/kern_devctl.c b/sys/kern/kern_devctl.c index a1696225df32..a37cb23efed8 100644 --- a/sys/kern/kern_devctl.c +++ b/sys/kern/kern_devctl.c @@ -130,6 +130,7 @@ static const struct filterops devctl_rfiltops = { .f_isfd = 1, .f_detach = filt_devctl_detach, .f_event = filt_devctl_read, + .f_copy = knote_triv_copy, }; static struct cdev *devctl_dev; diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 4fd495fa1ec8..1baa24d278bf 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -191,11 +191,13 @@ static void filt_usertouch(struct knote *kn, struct kevent *kev, static const struct filterops file_filtops = { .f_isfd = 1, .f_attach = filt_fileattach, + .f_copy = knote_triv_copy, }; static const struct filterops kqread_filtops = { .f_isfd = 1, .f_detach = filt_kqdetach, .f_event = filt_kqueue, + .f_copy = knote_triv_copy, }; /* XXX - move to kern_proc.c? */ static const struct filterops proc_filtops = { @@ -203,12 +205,14 @@ static const struct filterops proc_filtops = { .f_attach = filt_procattach, .f_detach = filt_procdetach, .f_event = filt_proc, + .f_copy = knote_triv_copy, }; static const struct filterops jail_filtops = { .f_isfd = 0, .f_attach = filt_jailattach, .f_detach = filt_jaildetach, .f_event = filt_jail, + .f_copy = knote_triv_copy, }; static const struct filterops timer_filtops = { .f_isfd = 0, @@ -223,6 +227,7 @@ static const struct filterops user_filtops = { .f_detach = filt_userdetach, .f_event = filt_user, .f_touch = filt_usertouch, + .f_copy = knote_triv_copy, }; static uma_zone_t knote_zone; @@ -352,6 +357,7 @@ filt_nullattach(struct knote *kn) static const struct filterops null_filtops = { .f_isfd = 0, .f_attach = filt_nullattach, + .f_copy = knote_triv_copy, }; /* XXX - make SYSINIT to add these, and move into respective modules. */ @@ -3132,6 +3138,12 @@ kqueue_fork(struct filedesc *fdp, struct file *fp, struct file **fp1, return (kqueue_fork_copy(fdp, fp, *fp1, p1, td)); } +int +knote_triv_copy(struct knote *kn __unused, struct proc *p1 __unused) +{ + return (0); +} + struct knote_status_export_bit { int kn_status_bit; int knt_status_bit; diff --git a/sys/kern/kern_jaildesc.c b/sys/kern/kern_jaildesc.c index 3f322b271400..a564393d3366 100644 --- a/sys/kern/kern_jaildesc.c +++ b/sys/kern/kern_jaildesc.c @@ -344,6 +344,7 @@ static const struct filterops jaildesc_kqops = { .f_isfd = 1, .f_detach = jaildesc_kqops_detach, .f_event = jaildesc_kqops_event, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 21f765b17f62..a55f3c761449 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -124,6 +124,7 @@ const struct filterops sig_filtops = { .f_attach = filt_sigattach, .f_detach = filt_sigdetach, .f_event = filt_signal, + .f_copy = knote_triv_copy, }; static int kern_forcesigexit = 1; diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index 5380902e602f..aac35a56130e 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -79,6 +79,7 @@ static const struct filterops log_read_filterops = { .f_attach = NULL, .f_detach = logkqdetach, .f_event = logkqread, + .f_copy = knote_triv_copy, }; static struct logsoftc { diff --git a/sys/kern/sys_eventfd.c b/sys/kern/sys_eventfd.c index c2a0f67cae85..04ed107c933d 100644 --- a/sys/kern/sys_eventfd.c +++ b/sys/kern/sys_eventfd.c @@ -85,13 +85,16 @@ static int filt_eventfdwrite(struct knote *kn, long hint); static const struct filterops eventfd_rfiltops = { .f_isfd = 1, .f_detach = filt_eventfddetach, - .f_event = filt_eventfdread + .f_event = filt_eventfdread, + .f_copy = knote_triv_copy, }; + static const struct filterops eventfd_wfiltops = { .f_isfd = 1, .f_detach = filt_eventfddetach, - .f_event = filt_eventfdwrite + .f_event = filt_eventfdwrite, + .f_copy = knote_triv_copy, }; struct eventfd { diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 57ebe8dc85f0..6531cea31423 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -181,20 +181,23 @@ static int filt_pipedump(struct proc *p, struct knote *kn, static const struct filterops pipe_nfiltops = { .f_isfd = 1, .f_detach = filt_pipedetach_notsup, - .f_event = filt_pipenotsup + .f_event = filt_pipenotsup, /* no userdump */ + .f_copy = knote_triv_copy, }; static const struct filterops pipe_rfiltops = { .f_isfd = 1, .f_detach = filt_pipedetach, .f_event = filt_piperead, .f_userdump = filt_pipedump, + .f_copy = knote_triv_copy, }; static const struct filterops pipe_wfiltops = { .f_isfd = 1, .f_detach = filt_pipedetach, .f_event = filt_pipewrite, .f_userdump = filt_pipedump, + .f_copy = knote_triv_copy, }; /* diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c index acaf1241cb2e..c5db21544b0f 100644 --- a/sys/kern/sys_procdesc.c +++ b/sys/kern/sys_procdesc.c @@ -486,6 +486,7 @@ static const struct filterops procdesc_kqops = { .f_isfd = 1, .f_detach = procdesc_kqops_detach, .f_event = procdesc_kqops_event, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/kern/tty.c b/sys/kern/tty.c index c8e2c561b7cf..067471eb949a 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -754,12 +754,14 @@ static const struct filterops tty_kqops_read = { .f_isfd = 1, .f_detach = tty_kqops_read_detach, .f_event = tty_kqops_read_event, + .f_copy = knote_triv_copy, }; static const struct filterops tty_kqops_write = { .f_isfd = 1, .f_detach = tty_kqops_write_detach, .f_event = tty_kqops_write_event, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c index 1291770a9ccb..2672935c2d89 100644 --- a/sys/kern/tty_pts.c +++ b/sys/kern/tty_pts.c @@ -491,11 +491,13 @@ static const struct filterops pts_kqops_read = { .f_isfd = 1, .f_detach = pts_kqops_read_detach, .f_event = pts_kqops_read_event, + .f_copy = knote_triv_copy, }; static const struct filterops pts_kqops_write = { .f_isfd = 1, .f_detach = pts_kqops_write_detach, .f_event = pts_kqops_write_event, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index a8aec397b352..4c1bb1ff228e 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -281,11 +281,13 @@ static const struct filterops mq_rfiltops = { .f_isfd = 1, .f_detach = filt_mqdetach, .f_event = filt_mqread, + .f_copy = knote_triv_copy, }; static const struct filterops mq_wfiltops = { .f_isfd = 1, .f_detach = filt_mqdetach, .f_event = filt_mqwrite, + .f_copy = knote_triv_copy, }; /* diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index fe2d8d056062..eb9544628137 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -191,16 +191,19 @@ static const struct filterops soread_filtops = { .f_isfd = 1, .f_detach = filt_sordetach, .f_event = filt_soread, + .f_copy = knote_triv_copy, }; static const struct filterops sowrite_filtops = { .f_isfd = 1, .f_detach = filt_sowdetach, .f_event = filt_sowrite, + .f_copy = knote_triv_copy, }; static const struct filterops soempty_filtops = { .f_isfd = 1, .f_detach = filt_sowdetach, .f_event = filt_soempty, + .f_copy = knote_triv_copy, }; so_gen_t so_gencnt; /* generation count for sockets */ diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 90489e99491a..807271488af2 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1855,11 +1855,13 @@ static const struct filterops uipc_write_filtops = { .f_isfd = 1, .f_detach = uipc_filt_sowdetach, .f_event = uipc_filt_sowrite, + .f_copy = knote_triv_copy, }; static const struct filterops uipc_empty_filtops = { .f_isfd = 1, .f_detach = uipc_filt_sowdetach, .f_event = uipc_filt_soempty, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index e63fa4c01434..60916a9fbd32 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -345,12 +345,14 @@ static const struct filterops aio_filtops = { .f_attach = filt_aioattach, .f_detach = filt_aiodetach, .f_event = filt_aio, + .f_copy = knote_triv_copy, }; static const struct filterops lio_filtops = { .f_isfd = 0, .f_attach = filt_lioattach, .f_detach = filt_liodetach, - .f_event = filt_lio + .f_event = filt_lio, + .f_copy = knote_triv_copy, }; static eventhandler_tag exit_tag, exec_tag; diff --git a/sys/kern/vfs_inotify.c b/sys/kern/vfs_inotify.c index b265a5ff3a62..e60d8426ee42 100644 --- a/sys/kern/vfs_inotify.c +++ b/sys/kern/vfs_inotify.c @@ -111,6 +111,7 @@ static const struct filterops inotify_rfiltops = { .f_isfd = 1, .f_detach = filt_inotifydetach, .f_event = filt_inotifyevent, + .f_copy = knote_triv_copy, }; static MALLOC_DEFINE(M_INOTIFY, "inotify", "inotify data structures"); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index c458a43d0c9f..58975f7ac932 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6545,6 +6545,7 @@ const struct filterops fs_filtops = { .f_attach = filt_fsattach, .f_detach = filt_fsdetach, .f_event = filt_fsevent, + .f_copy = knote_triv_copy, }; static int diff --git a/sys/net/bpf.c b/sys/net/bpf.c index a347dbe2eb73..f598733773d0 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -253,12 +253,14 @@ static const struct filterops bpfread_filtops = { .f_isfd = 1, .f_detach = filt_bpfdetach, .f_event = filt_bpfread, + .f_copy = knote_triv_copy, }; static const struct filterops bpfwrite_filtops = { .f_isfd = 1, .f_detach = filt_bpfdetach, .f_event = filt_bpfwrite, + .f_copy = knote_triv_copy, }; /* diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index c8dbb6aa8893..56bb90cce9bc 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -261,6 +261,7 @@ static const struct filterops tun_read_filterops = { .f_attach = NULL, .f_detach = tunkqdetach, .f_event = tunkqread, + .f_copy = knote_triv_copy, }; static const struct filterops tun_write_filterops = { @@ -268,6 +269,7 @@ static const struct filterops tun_write_filterops = { .f_attach = NULL, .f_detach = tunkqdetach, .f_event = tunkqwrite, + .f_copy = knote_triv_copy, }; static struct tuntap_driver { diff --git a/sys/security/audit/audit_pipe.c b/sys/security/audit/audit_pipe.c index fb773fd04297..4d9815467e1a 100644 --- a/sys/security/audit/audit_pipe.c +++ b/sys/security/audit/audit_pipe.c @@ -243,6 +243,7 @@ static const struct filterops audit_pipe_read_filterops = { .f_attach = NULL, .f_detach = audit_pipe_kqdetach, .f_event = audit_pipe_kqread, + .f_copy = knote_triv_copy, }; /* diff --git a/sys/sys/event.h b/sys/sys/event.h index 6e71445f03b0..ebbcdb703183 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -348,6 +348,7 @@ struct rwlock; void knote(struct knlist *list, long hint, int lockflags); void knote_fork(struct knlist *list, int pid); +int knote_triv_copy(struct knote *kn, struct proc *p1); struct knlist *knlist_alloc(struct mtx *lock); void knlist_detach(struct knlist *knl); void knlist_add(struct knlist *knl, struct knote *kn, int islocked); diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index 8e5785cf0ed6..919f76949dd4 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -64,6 +64,7 @@ static const struct filterops apm_readfiltops = { .f_isfd = 1, .f_detach = apmreadfiltdetach, .f_event = apmreadfilt, + .f_copy = knote_triv_copy, }; static struct cdevsw apm_cdevsw = { From nobody Sat Oct 18 07:59:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpYxQ49d4z6ChNn; Sat, 18 Oct 2025 07:59: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 4cpYxQ3fnqz3nCj; Sat, 18 Oct 2025 07:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760774362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=duTmT0lsFuNe9Q6aHNoLC/kobq3TuqmLrrISYgLiAa4=; b=k+dYouDUHzJvi68KrIg/tF9F+i5wBg2Ug8Kj4r0pmw5Ej8UxsuL3gJok1iYuywreLAp6LK nzEQLhheOlHEW5J7G1wZXlqlICvDCS2/+I1e3pdMUgMog1ihIpyMSYOrf56KOZsUszT5B8 Y8UKPtS7hYW3K+JPzqhoT1kk2m9m1GhJ8y6WmaZQDsYfhJemVTxEs/R6RLKurX/8o+wh/u r1owDT6cyEm06Ow+228Nleu8UB6wMBm37VrBEFUrAY9kevyn3ncCXxAbHDEGIh4HHtiKkA 7KmxWCkd637T6RCgh22/Wig6pmt2hSVr0pg1v5h6FRldAJ0mlCHfXqhColxv9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760774362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=duTmT0lsFuNe9Q6aHNoLC/kobq3TuqmLrrISYgLiAa4=; b=PFyXbwHS9M6psXlP9uMgfQCi/ZRlBmro3KfYofIxbpEYNNHQWZw8YpDwe/1TMFrmrZhM1B b73kvN74zVXtHgK4IG2cUmHyP/9z6cVfQCyWPfH1bD12u2ToKggXUyXq4YzlZa8mcxTAxP 3epkdBTdRH7bnOPpPTHNtzs2SJfabYg3WuNomDO3FAGy1+oqcaXE2fqDRvh+KZ4qXjPxK1 RzXxMiPtoDjhAk4WyCnQedKfF/Pe1qZmeT3zk9mPovwr6OkQ3d6Pw8T6EE6UhS/k3EuO8/ oGw7xbVJIfVqcWCnmpNaGxuu403e3+PQz2A3UkQLlNPU12oDfOT5kTrXr+CN3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760774362; a=rsa-sha256; cv=none; b=KMyKeIyLUf2vmSL0kb0XFg5IoA+3XlcQ7r5Xca49uGkxUPV2xC2hglITlQbsqEpI5nH47G dLbuQQjLxrs+t0de9oZoV3UrqA5D1Y7FdMK5tCUGEjS0r9ZGiqR8qApNBGN+Ca24Nfrvrc 1PFd/iQo2IhjKG35J/Smcu7Rlmf//BSMrTUL8LzJcnoW/xkWOQvvVslWfHwoJ4SaLtijsk Chu33taJ9dhtuNQUnaDTmWZxJz+9JllPa+asJeO9pk23lFE4bBS2p5rm+EDGEI8kYarfqi jLXGfhpEINbAh+yMSW4e/d4LDFDElsMR+k+lNPLRom4Y0grbjWh5goQydnASmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpYxQ2YK2zYrl; Sat, 18 Oct 2025 07:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59I7xMTn062930; Sat, 18 Oct 2025 07:59:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59I7xMK5062927; Sat, 18 Oct 2025 07:59:22 GMT (envelope-from git) Date: Sat, 18 Oct 2025 07:59:22 GMT Message-Id: <202510180759.59I7xMK5062927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: d7ff2ded4748 - main - stress2: Added kqueuex(KQUEUE_CPONFORK) test scenarios List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7ff2ded474871d69f19b0d03deed5f66d78435e Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=d7ff2ded474871d69f19b0d03deed5f66d78435e commit d7ff2ded474871d69f19b0d03deed5f66d78435e Author: Peter Holm AuthorDate: 2025-10-18 07:58:50 +0000 Commit: Peter Holm CommitDate: 2025-10-18 07:58:50 +0000 stress2: Added kqueuex(KQUEUE_CPONFORK) test scenarios --- tools/test/stress2/misc/kevent17.sh | 176 +++++++++++++++++++++++++++++++++ tools/test/stress2/misc/kevent18.sh | 152 +++++++++++++++++++++++++++++ tools/test/stress2/misc/kevent19.sh | 187 ++++++++++++++++++++++++++++++++++++ 3 files changed, 515 insertions(+) diff --git a/tools/test/stress2/misc/kevent17.sh b/tools/test/stress2/misc/kevent17.sh new file mode 100755 index 000000000000..e7b8f1a0a00c --- /dev/null +++ b/tools/test/stress2/misc/kevent17.sh @@ -0,0 +1,176 @@ +#!/bin/sh + +# +# Copyright (c) 2025 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# A kqueuex(KQUEUE_CPONFORK) test scenario +# Test scenario suggestion by: kib + +. ../default.cfg +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +dir=/tmp +odir=`pwd` +prog=$(basename "$0" .sh) +cd $dir +sed '1,/^EOF/d' < $odir/$0 > $dir/$prog.c +mycc -o $prog -Wall -Wextra -O0 -g $prog.c || exit 1 +rm -f $prog.c +cd $odir + +set -e +mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint +[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart +mdconfig -a -t swap -s 2g -u $mdstart +newfs $newfs_flags md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint +set +e + +(cd $odir/../testcases/swap; ./swap -t 5m -i 20 -h -l 100 > /dev/null) & +cd $mntpoint +$dir/$prog +s=$? +[ -f $prog.core -a $s -eq 0 ] && + { ls -l $prog.core; mv $prog.core /tmp; s=1; } +cd $odir +while pkill -9 swap; do :; done +wait + +for i in `jot 6`; do + mount | grep -q "on $mntpoint " || break + umount $mntpoint && break || sleep 10 +done +[ $i -eq 6 ] && exit 1 +mdconfig -d -u $mdstart +rm -rf $dir/$prog +exit $s + +EOF +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static volatile u_int *share; +static int loops; +static char *file = "file"; + +#define MAXLOOPS 100 +#define PARALLEL 1 +#define RUNTIME (2 * 60) +#define SYNC 0 + +static void +test(void) +{ + pid_t pid; + struct kevent ev[2]; + struct timespec ts; + int kq, fd, n; + + if ((fd = open(file, O_RDONLY, 0)) == -1) + err(1, "open(%s). %s:%d", file, __func__, __LINE__); + + atomic_add_int(&share[SYNC], 1); + while (share[SYNC] != PARALLEL) + usleep(10000); + + if ((kq = kqueuex(KQUEUE_CPONFORK)) < 0) + err(1, "kqueuex"); + + ts.tv_sec = 5; + ts.tv_nsec = 0; + n = 0; + EV_SET(&ev[n], fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, + NOTE_DELETE, 0, 0); + n++; + + if (kevent(kq, ev, n, NULL, 0, NULL) < 0) + err(1, "kevent()"); + if (loops >= MAXLOOPS) { /* start using fork(2) */ + if ((pid = fork()) == 0) { + n = kevent(kq, NULL, 0, ev, 1, &ts); + if (n == -1) + err(1, "kevent() in fork\n"); + close(fd); + close(kq); + _exit(0); + } + if (waitpid(pid, NULL, 0) != pid) + err(1, "waitpid(%d)\n", pid); + } + + n = kevent(kq, NULL, 0, ev, 1, &ts); + if (n == -1) + err(1, "kevent()"); + close(fd); + close(kq); + + _exit(0); +} + +int +main(void) +{ + pid_t pids[PARALLEL]; + size_t len; + time_t start; + int e, fd, i, status; + + e = 0; + len = PAGE_SIZE; + loops = 0; + if ((share = mmap(NULL, len, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED) + err(1, "mmap"); + + start = time(NULL); + while ((time(NULL) - start) < RUNTIME && e == 0) { + loops++; + if ((fd = open(file, O_CREAT | O_TRUNC | O_RDWR, 0660)) == + -1) + err(1, "open(%s)", file); + close(fd); + share[SYNC] = 0; + for (i = 0; i < PARALLEL; i++) { + + if ((pids[i] = fork()) == 0) + test(); + if (pids[i] == -1) + err(1, "fork()"); + } + while (share[SYNC] != PARALLEL) + usleep(10000); + if (unlink(file) == -1) + err(1, "unlink(%s). %s:%d\n", file, + __FILE__, __LINE__); + for (i = 0; i < PARALLEL; i++) { + if (waitpid(pids[i], &status, 0) == -1) + err(1, "waitpid(%d)", pids[i]); + if (status != 0) { + if (WIFSIGNALED(status)) + fprintf(stderr, + "pid %d exit signal %d\n", + pids[i], WTERMSIG(status)); + } + e += status == 0 ? 0 : 1; + } + } + + return (e); +} diff --git a/tools/test/stress2/misc/kevent18.sh b/tools/test/stress2/misc/kevent18.sh new file mode 100755 index 000000000000..1492c49e2921 --- /dev/null +++ b/tools/test/stress2/misc/kevent18.sh @@ -0,0 +1,152 @@ +#!/bin/sh + +# +# Copyright (c) 2025 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# A kqueuex(KQUEUE_CPONFORK) test scenario + +# Sleeping thread seen in WiP code: +# https://people.freebsd.org/~pho/stress/log/log0615.txt + +. ../default.cfg + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +ulimit -k 5000 || { echo FAIL; exit 1; } + +odir=`pwd` +prog=$(basename "$0" .sh) + +cd /tmp +sed '1,/^EOF/d' < $odir/$0 > $prog.c +mycc -o $prog -Wall -Wextra -O2 -g $prog.c -lpthread || exit 1 +rm -f $prog.c +cd $odir + +mount | grep "on $mntpoint " | grep -q md$mdstart && umount -f $mntpoint +mdconfig -l | grep -q $mdstart && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 2g -u $mdstart +newfs $newfs_flags md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint +chmod 777 $mntpoint + +su $testuser -c "(cd $mntpoint; /tmp/$prog)" & +for i in `jot 99`; do + sleep 1 + kill -0 $! 2>/dev/null || break +done +pkill $prog +wait +umount -f $mntpoint + +while mount | grep -q $mntpoint; do + umount $mntpoint || sleep 1 +done +mdconfig -d -u $mdstart +rm -f /tmp/$prog + +exit 0 +EOF +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PARALLEL 64 + +static int fd; +static char path[80]; + +static void * +spin(void *arg __unused) +{ + int i; + + for (i= 0;; i++) { + snprintf(path, sizeof(path), "file.%06d.%d", getpid(), i); + fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0622); + if (fd == -1 && errno == ENOTDIR) + break; + if (fd == -1) + err(1, "open(%s)", path); + close(fd); + fd = 0; + unlink(path); + } + fprintf(stderr, "spin loops: %d\n", i + 1); + return (NULL); +} + +static void * +test(void *arg __unused) +{ + struct kevent ev; + struct timespec ts; + pid_t pid; + int i, kq, n; + + for (i = 0; i < 500000; i++) { + if ((kq = kqueuex(KQUEUE_CPONFORK)) < 0) + err(1, "kqueueex(KQUEUE_CPONFORK)"); + + n = 0; + memset(&ev, 0, sizeof(ev)); + EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, + NOTE_DELETE|NOTE_RENAME|NOTE_EXTEND, 0, 0); + n++; + + if ((pid = fork()) == 0) { + kevent(kq, &ev, n, NULL, 0, NULL); + _exit(0); + } + if (waitpid(pid, NULL, 0) != pid) + err(1, "waitpid(%d)", pid); + + kevent(kq, &ev, n, NULL, 0, NULL); + memset(&ev, 0, sizeof(ev)); + ts.tv_sec = 0; + ts.tv_nsec = 1000000; + if ((n = kevent(kq, NULL, 0, &ev, 1, &ts)) == -1) + err(1, "kevent()"); + + close(kq); + } + return (NULL); +} + +int +main(void) +{ + pthread_t cp[PARALLEL], sp; + int e, i; + + if ((e = pthread_create(&sp, NULL, spin, NULL)) != 0) + errc(1, e, "pthread_create"); + + for (i = 0; i < PARALLEL; i++) { + if ((e = pthread_create(&cp[i], NULL, test, NULL)) != 0) + errc(1, e, "pthread_create"); + } + + for (i = 0; i < PARALLEL; i++) + pthread_join(cp[i], NULL); + pthread_join(sp, NULL); + + close(fd); + + return (0); +} diff --git a/tools/test/stress2/misc/kevent19.sh b/tools/test/stress2/misc/kevent19.sh new file mode 100755 index 000000000000..0170fe0d93c8 --- /dev/null +++ b/tools/test/stress2/misc/kevent19.sh @@ -0,0 +1,187 @@ +#!/bin/sh + +# A kqueuex(KQUEUE_CPONFORK) test scenario + +set -u +prog=$(basename "$0" .sh) + +cat > /tmp/$prog.c < +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef KQUEUE_CPONFORK +#define KQUEUE_CPONFORK 0x2 +#endif + +static pid_t pid_pipe_beat; +static pid_t pid_controller; + +static void +sighup_handler(int sig __unused) +{ + kill(pid_pipe_beat, SIGKILL); + _exit(1); +} + +static void +pipe_beat(int wp) +{ + static const char a[1] = { 'a' }; + ssize_t s; + + for (;;) { + sleep(1); + s = write(wp, a, 1); + if (s < 0) + err(1, "pipe write"); + if (s == 0) + errx(1, "short pipe write"); + } +} + +static void +worker(int kq, int rp) +{ + struct kevent ev[1]; + char a[1]; + ssize_t s; + int n; + + for (;;) { + n = kevent(kq, NULL, 0, ev, nitems(ev), NULL); + if (n == -1) { + kill(pid_controller, SIGHUP); + err(1, "kqueue"); + } + if (n == 0) + continue; // XXXKIB + switch (ev[0].filter) { + case EVFILT_TIMER: + printf("tick\n"); + break; + case EVFILT_READ: + if (ev[0].ident != (uintptr_t)rp) { + kill(pid_controller, SIGHUP); + errx(1, "unknown read ident %d\n", (int)ev[0].ident); + } + s = read(rp, a, sizeof(a)); + if (s == -1) { + kill(pid_controller, SIGHUP); + err(1, "read"); + } + if (s == 0) { + kill(pid_controller, SIGHUP); + errx(1, "EOF"); + } + printf("%c\n", a[0]); + break; + default: + kill(pid_controller, SIGHUP); + errx(1, "unknown fiter %d\n", ev[0].filter); + break; + } + } +} + +static void +usage(void) +{ + fprintf(stderr, "Usage: kqfork [fork]\n"); + exit(2); +} + +int +main(int argc, char *argv[]) +{ + struct kevent ev[2]; + struct sigaction sa; + int kq, n, pp[2]; + pid_t pid_worker; + bool do_fork; + + do_fork = false; + if (argc != 1 && argc != 2) + usage(); + if (argc == 2) { + if (strcmp(argv[1], "fork") != 0) + usage(); + do_fork = true; + } + + memset(&sa, 0, sizeof(sa)); + sa.sa_handler = sighup_handler; + if (sigaction(SIGHUP, &sa, NULL) == -1) + err(1, "sigaction(SIGHUP)"); + + memset(&sa, 0, sizeof(sa)); + sa.sa_flags = SA_NOCLDWAIT | SA_NOCLDSTOP; + sa.sa_handler = SIG_IGN; + if (sigaction(SIGCHLD, &sa, NULL) == -1) + err(1, "sigaction(SIGCHLD)"); + + if (pipe(pp) == -1) + err(1, "pipe"); + + pid_pipe_beat = fork(); + if (pid_pipe_beat == -1) + err(1, "fork"); + if (pid_pipe_beat == 0) { + close(pp[0]); + pipe_beat(pp[1]); + } + + kq = kqueuex(do_fork ? KQUEUE_CPONFORK : 0); + if (kq == -1) + err(1, "kqueuex"); + + EV_SET(&ev[0], 1, EVFILT_TIMER, EV_ADD, NOTE_SECONDS, 1, NULL); + EV_SET(&ev[1], pp[0], EVFILT_READ, EV_ADD, 0, 0, NULL); + n = kevent(kq, ev, nitems(ev), NULL, 0, NULL); + if (n == -1) { + kill(pid_pipe_beat, SIGKILL); + err(1, "kevent reg"); + } + if (n != 0) { + kill(pid_pipe_beat, SIGKILL); + errx(1, "kevent reg %d", n); + } + + pid_controller = getpid(); + + if (do_fork) { + pid_worker = fork(); + if (pid_worker == -1) { + kill(pid_pipe_beat, SIGKILL); + err(1, "fork"); + } + if (pid_worker == 0) { + close(pp[1]); + worker(kq, pp[0]); + } + + for (;;) + pause(); + } else { + worker(kq, pp[0]); + } + exit(0); // unreachable +} +EOF +cc -o /tmp/$prog -Wall -Wextra -O2 /tmp/$prog.c || exit 1 + +echo "--> No fork" +timeout 4s /tmp/$prog +echo "--> fork" +timeout 4s /tmp/$prog fork + +rm -f /tmp/$prog.c $prog +exit 0 From nobody Sat Oct 18 13:18:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpj1D0WTtz6D7Tp; Sat, 18 Oct 2025 13: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 4cpj1C73Csz3JJ7; Sat, 18 Oct 2025 13: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=1760793488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z7K4HjGmVW6uX5MMzWqULXOY5bkywsj/zMnstj1t0Nc=; b=H/jfPDwRz0/nA88z0xQuMKwRiG3ugFsDajXUUEW/x8/rbii4rh7j1noV5UIEdiA/AruCLf D3w3ZJoTdmm1Xh7ae8lI+MMJ1tFcQmKvoRAYqcz6c0N+4hFYKfaHz8m/VH4FiSQR8qqdv+ kdsAvgIBOKwQWkphO+h4sZ9CjhfK2ZAgqaK38tBavs7HnbGvu99OZKTWmG92GX0z7Ro9Wa N45vR53tg/OAkc4gKDNWM+y6PfJv2w4kmO1dUxEtclb8vwF8NnVe3heFuIr36e+4KaXt6x zrQZcbCa/Cw8/aW6Mpmnxd2S2JJejPfOIbR/U1a1ZOzgDtQ0WR0+5AZpPN8kqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760793488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z7K4HjGmVW6uX5MMzWqULXOY5bkywsj/zMnstj1t0Nc=; b=COwYxrmocF4KWLchWz5iIXEK/Zvp9nM4s2aG400rvtjja8JbRpdYjy8zUglmqCEv/XZbTe 38Uqxz6ZeBRMiFQTR5hxZyZzD+fI6HOKDOC37Os58ws+NTl/C3T0R0ZPoLLa57O8A2mXQf cxMJpSdpkVKb83jLIQpBoHZtDhzGNKPbQSD4tolMsN7m6iP+W61dIJ+2CBAh7ZGzXqhs2N xpe/MfdAqgjCj86kRi84XocYLFvABosjkcFMzR2ji4cJBZwmW+EwrPZGFGifSd5iUb/WK8 ulxHSJZduDvVkJIFs7Zx5Se+yvhIRxrO609B5V+NFgnGt0l3dJs37dgvdDLmzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760793488; a=rsa-sha256; cv=none; b=QhBqKvLAJY33lf9wjz1I/fP2IJG7wFp4klqIotWzldeNgAkNTy+GtbCxKeXttGQFUcaDou Pe7vOj1SEI5JecbH90QDhxZw6QK0pBsWzFVcE069IydPx3sQui+AdOO7rwZP9x/2U+5S+z kx0oeQL2EbSC/9oCnfpP2rxnwTquiNbIdoFVD1i+ZD5Fcq/38IFEWuD3IVvpr9y0E0A+Fi G7rF/Ga/VzQe99ZAB5SZZ/g3+MmawSjdvZDHYqWTPnJfhaI0L3HbEk3R7N3/SM2YVDAEzq 3sj4OId4muGcPtv5Day6BOM7BmhFmt1b1mvDPH4pflIjnhptl5uXu0s7tG72/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpj1C6Mr8zjhl; Sat, 18 Oct 2025 13:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59IDI72c064445; Sat, 18 Oct 2025 13:18:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IDI766064442; Sat, 18 Oct 2025 13:18:07 GMT (envelope-from git) Date: Sat, 18 Oct 2025 13:18:07 GMT Message-Id: <202510181318.59IDI766064442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 56eee778325b - main - devd/snd.conf: Note that any command can be used for the action List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56eee778325b2c839cfbc86a7fec4a355c51ba58 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=56eee778325b2c839cfbc86a7fec4a355c51ba58 commit 56eee778325b2c839cfbc86a7fec4a355c51ba58 Author: Christos Margiolis AuthorDate: 2025-10-18 13:17:38 +0000 Commit: Christos Margiolis CommitDate: 2025-10-18 13:17:38 +0000 devd/snd.conf: Note that any command can be used for the action Sponsored by: The FreeBSD Foundation MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D53175 --- sbin/devd/snd.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/devd/snd.conf b/sbin/devd/snd.conf index cf9cd9e94191..a45f427f6c79 100644 --- a/sbin/devd/snd.conf +++ b/sbin/devd/snd.conf @@ -5,6 +5,9 @@ notify 0 { match "type" "IN"; match "cdev" "dsp[0-9]+"; + # Other audio servers or device switching commands can be used here + # instead of virtual_oss(8). + # # FIXME: We are hardcoding /dev/vdsp.ctl here, simply because it is a # common virtual_oss control device name. Until we find a proper way to # define control devices here, /dev/vdsp.ctl can be changed to the @@ -18,6 +21,6 @@ notify 0 { match "type" "OUT"; match "cdev" "dsp[0-9]+"; - # FIXME: See comment above. + # See comment above. action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -P /dev/$cdev"; }; From nobody Sat Oct 18 13:18:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpj1F0nTlz6D7JC; Sat, 18 Oct 2025 13:18: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 4cpj1F0BCNz3Jd4; Sat, 18 Oct 2025 13:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760793489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EpCS4mj5Jjqi7EAxf9gBT4w2qCS5HX2X0Xl+odbOSTQ=; b=UQrb5dbIU5LNh68khz77Lu35XxTaWx48BSEx21eZO1zD0za84VpdbeRQL95Y78zjkfAHa8 rFvOM8TiWw8g+hcHtiNZpiogJgr4hiqROn3UvUxNz6d4OKo73POYGsl/5BL4cpvyIRJMij bQwGS6C98I4WisK7CFbf0h0BwyhURF2tPowWbb+POYJjHOXYrURlg5NMRLb75CeSFThnjB g5GqYsNjCLy08mTp+NtINKef2cFUvIRzJ26Kr6pAeLH9Q0BQbdRxN8FBfUNgyga5DNz4oD RoQVHqlwfW8Qa0hg2QtXXDneMlqPXy50B887gGMWZKLDFwrXekWpTowFAv4I9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760793489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EpCS4mj5Jjqi7EAxf9gBT4w2qCS5HX2X0Xl+odbOSTQ=; b=Smto7O+YCpIuw61X3NdE7FpZu9vbnBxr+unv1fw/ad5Xatx6MjIwEq48jQrv4aiExurQVO SMEQ6vHD9QsAEbMRqlI5oevQAOH/0kxPfCfu8YbSxW0LUoNPb87LWWZgBP/+2+SjXg0Avz /zOgnP0dSB+jmnu6063JU0dFXHk58injcZhI83vg39Tclwl9YQZvfixiG7v661Fijt5jUP S3zSzaw6EYgSNq4YvvCcMnZRcYotd5Sxp1BCR/7svqsDgeGgobcx3zzpI+RxtVXUli/G+b gAX3zlOM7NMRELoPyelVZc12o1snoT3VAL2yAn3Vn5/+1k6b0DeDCrJZVJl3Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760793489; a=rsa-sha256; cv=none; b=JqQFrys3ZFAJoOCAdhU4Ocy2jKkXqwVISqGVnfguHYoImzbYHfL7G2LDSNlRIPVwOr1e/4 LDW35ZewhqNkQZmUg76hbFdVOg2rtD4LEk3vc/P5LTkcXG3tDmXqaGNbpUzPn1n1z4MBAy H01uWJ2uFQGiDtunw4zfnYgBh8/gQwLDx0ES7Zi+hX81yjzDLykkCz2bqAJJFZ8ez3bRqE vHroLRhUZ05bcmCuHsthZNSrhS6lMn+73HxSI6e77H6Fk3LGMPSu7SsP2dQU15LqQkWh13 v0FKnkWsPrju1kanJu/7LGX5H7g/29/J5dzgepih1jpOjdOsatfETq8tNBFgUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpj1D6nqTzjsQ; Sat, 18 Oct 2025 13:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59IDI81J064477; Sat, 18 Oct 2025 13:18:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IDI86w064474; Sat, 18 Oct 2025 13:18:08 GMT (envelope-from git) Date: Sat, 18 Oct 2025 13:18:08 GMT Message-Id: <202510181318.59IDI86w064474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 30a873ee3739 - main - virtual_oss(8): Retire unused utils.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30a873ee3739dfd44b233907534ec1c33c21b78a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=30a873ee3739dfd44b233907534ec1c33c21b78a commit 30a873ee3739dfd44b233907534ec1c33c21b78a Author: Christos Margiolis AuthorDate: 2025-10-18 13:17:43 +0000 Commit: Christos Margiolis CommitDate: 2025-10-18 13:17:43 +0000 virtual_oss(8): Retire unused utils.h Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53174 --- .../virtual_oss/virtual_bt_speaker/bt_speaker.c | 1 - usr.sbin/virtual_oss/virtual_oss/int.h | 3 --- usr.sbin/virtual_oss/virtual_oss/main.c | 1 - usr.sbin/virtual_oss/virtual_oss/utils.h | 31 ---------------------- 4 files changed, 36 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c b/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c index c61eaf1c338d..0e406cccca21 100644 --- a/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c +++ b/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c @@ -47,7 +47,6 @@ #include "avdtp_signal.h" #include "bt.h" -#include "utils.h" static int (*bt_receive_f)(struct bt_config *, void *, int, int); static int (*avdtpACPHandlePacket_f)(struct bt_config *cfg); diff --git a/usr.sbin/virtual_oss/virtual_oss/int.h b/usr.sbin/virtual_oss/virtual_oss/int.h index b3cc573ba8a9..69a943832074 100644 --- a/usr.sbin/virtual_oss/virtual_oss/int.h +++ b/usr.sbin/virtual_oss/virtual_oss/int.h @@ -318,9 +318,6 @@ extern void vclient_rx_equalizer(struct virtual_client *, int64_t *, size_t); extern int vclient_eq_alloc(struct virtual_client *); extern void vclient_eq_free(struct virtual_client *); -/* Internal utilities */ -extern int bt_speaker_main(int argc, char **argv); - /* Internal compressor */ extern void voss_compressor(int64_t *, double *, const struct virtual_compressor *, const unsigned, const unsigned, const int64_t); diff --git a/usr.sbin/virtual_oss/virtual_oss/main.c b/usr.sbin/virtual_oss/virtual_oss/main.c index 3f7fb84ce4c6..afa4ad0727ca 100644 --- a/usr.sbin/virtual_oss/virtual_oss/main.c +++ b/usr.sbin/virtual_oss/virtual_oss/main.c @@ -48,7 +48,6 @@ #include "backend.h" #include "int.h" -#include "utils.h" #include "virtual_oss.h" pthread_mutex_t atomic_mtx; diff --git a/usr.sbin/virtual_oss/virtual_oss/utils.h b/usr.sbin/virtual_oss/virtual_oss/utils.h deleted file mode 100644 index f0998dc75dae..000000000000 --- a/usr.sbin/virtual_oss/virtual_oss/utils.h +++ /dev/null @@ -1,31 +0,0 @@ -/*- - * Copyright (c) 2019 Hans Petter Selasky - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _VIRTUAL_UTILS_H_ -#define _VIRTUAL_UTILS_H_ - -int bt_speaker_main(int argc, char **argv); - -#endif /* _VIRTUAL_UTILS_H_ */ From nobody Sat Oct 18 14:46:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpkzD1rbCz6DFF8; Sat, 18 Oct 2025 14:46: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 4cpkzD1bPNz3Qhs; Sat, 18 Oct 2025 14:46:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760798792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kdu+aXydkO0ckBznZsZEojb5uvnm0XhK/Be6iapvJMg=; b=vAz+VqBD9A9Yw9DQ3AJKh2d3sxdqWoX1C6YLPLjMJ8x+aANmf0qGonIQgTI4p7Yr9bnyKD UW5qAdTDNuMt/OLrM5cuM+TgpHaMly/nWGGLMgKHnp+n6xVt6rMKEmEMlAVsYLfbBIXVGf TyY5xIkUqFgU8bTvJP3dMwP4tlwnGnNXb6oeI21u099sIAyw3xDUEanLAPL8LURoGR4y5Q 5+g+J8qSkSQB11ozFdsEniJs30uzsPI0ahGv3DaqovefwmJyFvt0pL8OV1jEQkTaaIIoid zwDEnH2iyVMFUuv44VoNTUyChfC0+wCAdsCmbvSP6sm1ZgKSiXl1/+oVMnAwxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760798792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kdu+aXydkO0ckBznZsZEojb5uvnm0XhK/Be6iapvJMg=; b=LOzE5zhVcCvGRt+unCsmS+6HJJfTS7UhOtnxmT7rAqLahpyCpu2T04sgsQlqG15IzWSzxp kQmlOus15tnHhaX4l02vONFYhV4PR7giVl8JVd5EB1VEdJojt7fEb7fcWeq67UvA40xNDf oZm9K+Fr0XcDouzI6+8RbnXVEppAdd14jh9JvMq4kkJsXqGaTPj4HEBbDeSrc7ioLxLALy LznU77q3LaXDVbIhQw7CFLFhGi1dy/thnFLZVoGVxpDIh8NZoM1jGTPlSCHMbciLPvwmxm Nwri2BZIfOSOniYN8AObv3ZzIJk0NJjE0ROeZGChzSrhCroC3ZSpt//faIr9Jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760798792; a=rsa-sha256; cv=none; b=AUXDrZJ60mhJGe3TNOHuJjbrA20TueOd752JRTX2MAeaXe617AuZCpqXvBgCgV3Apm3olW rskwzODD+tMfo8ZUSjEyHXzm8GhhcZbAwXmVpQpw6RXiWbnyrgnSNMnOa87wo8852axJQM D5tAJEohHYpYRJvueL5n+PbLx/PC6jCnAK/EnNwmk2XW2gvkHX1TgVrxNv6SVtyti2lHa3 LMr07jZlWhfgpRFBhgsITqu3h58UQNlD0nsd/AYbH0QiAOk76y8X4UtKcIsj3Gmwlo/v0F Bmg1d0AsSJMtTI5SVZD9vVZwhlHlCri27Sb1cwsrjkX/W64d5xVzMWID8C+DDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpkzD178szmDl; Sat, 18 Oct 2025 14:46:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59IEkWTn032586; Sat, 18 Oct 2025 14:46:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IEkW9V032583; Sat, 18 Oct 2025 14:46:32 GMT (envelope-from git) Date: Sat, 18 Oct 2025 14:46:32 GMT Message-Id: <202510181446.59IEkW9V032583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 8f4a0d2f7b96 - main - libc: Import OpenBSD's inet_net_{ntop,pton} List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f4a0d2f7b96099001dbc51e06114df1a0e6d291 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=8f4a0d2f7b96099001dbc51e06114df1a0e6d291 commit 8f4a0d2f7b96099001dbc51e06114df1a0e6d291 Author: Lexi Winter AuthorDate: 2025-10-18 14:18:40 +0000 Commit: Lexi Winter CommitDate: 2025-10-18 14:45:42 +0000 libc: Import OpenBSD's inet_net_{ntop,pton} Our versions of these functions (originally taken from BIND) simply don't work correctly for AF_INET6. These were removed from BIND itself quite a while ago, but OpenBSD has made several fixes in the mean time, so import their code. Add tests for both functions. PR: 289198 Reported by: Nico Sonack MFC after: 1 week Reviewed by: des Obtained from: OpenBSD (lib/libc/net) Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52629 --- lib/libc/inet/inet_net_ntop.c | 206 ++++++-------------- lib/libc/inet/inet_net_pton.c | 363 +++++++++++------------------------- lib/libc/tests/net/Makefile | 2 + lib/libc/tests/net/inet_net_test.cc | 333 +++++++++++++++++++++++++++++++++ 4 files changed, 492 insertions(+), 412 deletions(-) diff --git a/lib/libc/inet/inet_net_ntop.c b/lib/libc/inet/inet_net_ntop.c index 9d98dbb5ca99..30dd5c0571f2 100644 --- a/lib/libc/inet/inet_net_ntop.c +++ b/lib/libc/inet/inet_net_ntop.c @@ -1,20 +1,23 @@ -/*- - * SPDX-License-Identifier: ISC +/* $OpenBSD: inet_net_ntop.c,v 1.9 2019/07/03 03:24:04 deraadt Exp $ */ + +/* + * Copyright (c) 2012 by Gilles Chehade + * Copyright (c) 1996 by Internet Software Consortium. * - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") - * Copyright (c) 1996,1999 by Internet Software Consortium. + * SPDX-License-Identifier: ISC * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. */ #include "port_before.h" @@ -31,18 +34,10 @@ #include "port_after.h" -#ifdef SPRINTF_CHAR -# define SPRINTF(x) strlen(sprintf/**/x) -#else -# define SPRINTF(x) ((size_t)sprintf x) -#endif - -static char * inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, - size_t size); -static char * inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, - size_t size); +static char *inet_net_ntop_ipv4(const u_char *, int, char *, size_t); +static char *inet_net_ntop_ipv6(const u_char *, int, char *, size_t); -/*% +/* * char * * inet_net_ntop(af, src, bits, dst, size) * convert network number from network to presentation format. @@ -66,7 +61,7 @@ inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size) } } -/*% +/* * static char * * inet_net_ntop_ipv4(src, bits, dst, size) * convert IPv4 network number from network to presentation format. @@ -83,53 +78,63 @@ static char * inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) { char *odst = dst; - char *t; u_int m; int b; + char *ep; + int advance; + + ep = dst + size; + if (ep <= dst) + goto emsgsize; if (bits < 0 || bits > 32) { errno = EINVAL; return (NULL); } - if (bits == 0) { - if (size < sizeof "0") + if (ep - dst < sizeof "0") goto emsgsize; *dst++ = '0'; - size--; *dst = '\0'; } /* Format whole octets. */ for (b = bits / 8; b > 0; b--) { - if (size <= sizeof "255.") + if (ep - dst < sizeof "255.") + goto emsgsize; + advance = snprintf(dst, ep - dst, "%u", *src++); + if (advance <= 0 || advance >= ep - dst) goto emsgsize; - t = dst; - dst += SPRINTF((dst, "%u", *src++)); + dst += advance; if (b > 1) { + if (dst + 1 >= ep) + goto emsgsize; *dst++ = '.'; *dst = '\0'; } - size -= (size_t)(dst - t); } /* Format partial octet. */ b = bits % 8; if (b > 0) { - if (size <= sizeof ".255") + if (ep - dst < sizeof ".255") goto emsgsize; - t = dst; if (dst != odst) *dst++ = '.'; m = ((1 << b) - 1) << (8 - b); - dst += SPRINTF((dst, "%u", *src & m)); - size -= (size_t)(dst - t); + advance = snprintf(dst, ep - dst, "%u", *src & m); + if (advance <= 0 || advance >= ep - dst) + goto emsgsize; + dst += advance; } /* Format CIDR /width. */ - if (size <= sizeof "/32") + if (ep - dst < sizeof "/32") + goto emsgsize; + advance = snprintf(dst, ep - dst, "/%u", bits); + if (advance <= 0 || advance >= ep - dst) goto emsgsize; - dst += SPRINTF((dst, "/%u", bits)); + dst += advance; return (odst); emsgsize: @@ -137,132 +142,27 @@ inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) return (NULL); } -/*% - * static char * - * inet_net_ntop_ipv6(src, bits, fakebits, dst, size) - * convert IPv6 network number from network to presentation format. - * generates CIDR style result always. Picks the shortest representation - * unless the IP is really IPv4. - * always prints specified number of bits (bits). - * return: - * pointer to dst, or NULL if an error occurred (check errno). - * note: - * network byte order assumed. this means 192.5.5.240/28 has - * 0b11110000 in its fourth octet. - * author: - * Vadim Kogan (UCB), June 2001 - * Original version (IPv4) by Paul Vixie (ISC), July 1996 - */ - static char * -inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) { - u_int m; - int b; - int p; - int zero_s, zero_l, tmp_zero_s, tmp_zero_l; - int i; - int is_ipv4 = 0; - unsigned char inbuf[16]; - char outbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128")]; - char *cp; - int words; - u_char *s; +inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) +{ + int ret; + char buf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255:255:255:255/128")]; if (bits < 0 || bits > 128) { errno = EINVAL; return (NULL); } - cp = outbuf; - - if (bits == 0) { - *cp++ = ':'; - *cp++ = ':'; - *cp = '\0'; - } else { - /* Copy src to private buffer. Zero host part. */ - p = (bits + 7) / 8; - memcpy(inbuf, src, p); - memset(inbuf + p, 0, 16 - p); - b = bits % 8; - if (b != 0) { - m = ~0 << (8 - b); - inbuf[p-1] &= m; - } - - s = inbuf; - - /* how many words need to be displayed in output */ - words = (bits + 15) / 16; - if (words == 1) - words = 2; - - /* Find the longest substring of zero's */ - zero_s = zero_l = tmp_zero_s = tmp_zero_l = 0; - for (i = 0; i < (words * 2); i += 2) { - if ((s[i] | s[i+1]) == 0) { - if (tmp_zero_l == 0) - tmp_zero_s = i / 2; - tmp_zero_l++; - } else { - if (tmp_zero_l && zero_l < tmp_zero_l) { - zero_s = tmp_zero_s; - zero_l = tmp_zero_l; - tmp_zero_l = 0; - } - } - } - - if (tmp_zero_l && zero_l < tmp_zero_l) { - zero_s = tmp_zero_s; - zero_l = tmp_zero_l; - } - - if (zero_l != words && zero_s == 0 && ((zero_l == 6) || - ((zero_l == 5 && s[10] == 0xff && s[11] == 0xff) || - ((zero_l == 7 && s[14] != 0 && s[15] != 1))))) - is_ipv4 = 1; - - /* Format whole words. */ - for (p = 0; p < words; p++) { - if (zero_l != 0 && p >= zero_s && p < zero_s + zero_l) { - /* Time to skip some zeros */ - if (p == zero_s) - *cp++ = ':'; - if (p == words - 1) - *cp++ = ':'; - s++; - s++; - continue; - } + if (inet_ntop(AF_INET6, src, buf, size) == NULL) + return (NULL); - if (is_ipv4 && p > 5 ) { - *cp++ = (p == 6) ? ':' : '.'; - cp += SPRINTF((cp, "%u", *s++)); - /* we can potentially drop the last octet */ - if (p != 7 || bits > 120) { - *cp++ = '.'; - cp += SPRINTF((cp, "%u", *s++)); - } - } else { - if (cp != outbuf) - *cp++ = ':'; - cp += SPRINTF((cp, "%x", *s * 256 + s[1])); - s += 2; - } - } + ret = snprintf(dst, size, "%s/%d", buf, bits); + if (ret < 0 || ret >= size) { + errno = EMSGSIZE; + return (NULL); } - /* Format CIDR /width. */ - sprintf(cp, "/%u", bits); - if (strlen(outbuf) + 1 > size) - goto emsgsize; - strcpy(dst, outbuf); return (dst); - -emsgsize: - errno = EMSGSIZE; - return (NULL); } /* @@ -271,5 +171,3 @@ emsgsize: */ #undef inet_net_ntop __weak_reference(__inet_net_ntop, inet_net_ntop); - -/*! \file */ diff --git a/lib/libc/inet/inet_net_pton.c b/lib/libc/inet/inet_net_pton.c index d566a0e1d3c3..14c88eb72014 100644 --- a/lib/libc/inet/inet_net_pton.c +++ b/lib/libc/inet/inet_net_pton.c @@ -1,20 +1,23 @@ -/*- - * SPDX-License-Identifier: ISC +/* $OpenBSD: inet_net_pton.c,v 1.14 2022/12/27 17:10:06 jmc Exp $ */ + +/* + * Copyright (c) 2012 by Gilles Chehade + * Copyright (c) 1996,1999 by Internet Software Consortium. * - * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") - * Copyright (C) 1996, 1998, 1999, 2001, 2003 Internet Software Consortium. + * SPDX-License-Identifier: ISC * - * Permission to use, copy, modify, and/or distribute this software for any + * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. */ #include "port_before.h" @@ -22,7 +25,6 @@ #include #include #include -#include #include #include @@ -34,13 +36,37 @@ #include "port_after.h" -#ifdef SPRINTF_CHAR -# define SPRINTF(x) strlen(sprintf/**/x) -#else -# define SPRINTF(x) ((size_t)sprintf x) -#endif +static int inet_net_pton_ipv4(const char *, u_char *, size_t); +static int inet_net_pton_ipv6(const char *, u_char *, size_t); -/*% +/* + * static int + * inet_net_pton(af, src, dst, size) + * convert network number from presentation to network format. + * accepts hex octets, hex strings, decimal octets, and /CIDR. + * "size" is in bytes and describes "dst". + * return: + * number of bits, either imputed classfully or specified with /CIDR, + * or -1 if some failure occurred (check errno). ENOENT means it was + * not a valid network specification. + * author: + * Paul Vixie (ISC), June 1996 + */ +int +inet_net_pton(int af, const char *src, void *dst, size_t size) +{ + switch (af) { + case AF_INET: + return (inet_net_pton_ipv4(src, dst, size)); + case AF_INET6: + return (inet_net_pton_ipv6(src, dst, size)); + default: + errno = EAFNOSUPPORT; + return (-1); + } +} + +/* * static int * inet_net_pton_ipv4(src, dst, size) * convert IPv4 network number from presentation to network format. @@ -57,22 +83,24 @@ * Paul Vixie (ISC), June 1996 */ static int -inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { - static const char xdigits[] = "0123456789abcdef"; - static const char digits[] = "0123456789"; - int n, ch, tmp = 0, dirty, bits; +inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) +{ + static const char + xdigits[] = "0123456789abcdef", + digits[] = "0123456789"; + int n, ch, tmp, dirty, bits; const u_char *odst = dst; - ch = *src++; + ch = (unsigned char)*src++; if (ch == '0' && (src[0] == 'x' || src[0] == 'X') - && isascii((unsigned char)(src[1])) - && isxdigit((unsigned char)(src[1]))) { + && isascii((unsigned char)src[1]) && isxdigit((unsigned char)src[1])) { /* Hexadecimal: Eat nybble string. */ - if (size <= 0U) + if (size == 0) goto emsgsize; - dirty = 0; - src++; /*%< skip x or X. */ - while ((ch = *src++) != '\0' && isascii(ch) && isxdigit(ch)) { + tmp = 0, dirty = 0; + src++; /* skip x or X. */ + while ((ch = (unsigned char)*src++) != '\0' && + isascii(ch) && isxdigit(ch)) { if (isupper(ch)) ch = tolower(ch); n = strchr(xdigits, ch) - xdigits; @@ -82,14 +110,14 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { else tmp = (tmp << 4) | n; if (++dirty == 2) { - if (size-- <= 0U) + if (size-- == 0) goto emsgsize; *dst++ = (u_char) tmp; dirty = 0; } } - if (dirty) { /*%< Odd trailing nybble? */ - if (size-- <= 0U) + if (dirty) { /* Odd trailing nybble? */ + if (size-- == 0) goto emsgsize; *dst++ = (u_char) (tmp << 4); } @@ -104,16 +132,16 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { tmp += n; if (tmp > 255) goto enoent; - } while ((ch = *src++) != '\0' && + } while ((ch = (unsigned char)*src++) != '\0' && isascii(ch) && isdigit(ch)); - if (size-- <= 0U) + if (size-- == 0) goto emsgsize; *dst++ = (u_char) tmp; if (ch == '\0' || ch == '/') break; if (ch != '.') goto enoent; - ch = *src++; + ch = (unsigned char)*src++; if (!isascii(ch) || !isdigit(ch)) goto enoent; } @@ -121,10 +149,10 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { goto enoent; bits = -1; - if (ch == '/' && isascii((unsigned char)(src[0])) && - isdigit((unsigned char)(src[0])) && dst > odst) { + if (ch == '/' && isascii((unsigned char)src[0]) && + isdigit((unsigned char)src[0]) && dst > odst) { /* CIDR width specifier. Nothing can follow it. */ - ch = *src++; /*%< Skip over the /. */ + ch = (unsigned char)*src++; /* Skip over the /. */ bits = 0; do { n = strchr(digits, ch) - digits; @@ -132,8 +160,9 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { bits *= 10; bits += n; if (bits > 32) - goto enoent; - } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch)); + goto emsgsize; + } while ((ch = (unsigned char)*src++) != '\0' && + isascii(ch) && isdigit(ch)); if (ch != '\0') goto enoent; } @@ -147,29 +176,23 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { goto enoent; /* If no CIDR spec was given, infer width from net class. */ if (bits == -1) { - if (*odst >= 240) /*%< Class E */ + if (*odst >= 240) /* Class E */ bits = 32; - else if (*odst >= 224) /*%< Class D */ - bits = 8; - else if (*odst >= 192) /*%< Class C */ + else if (*odst >= 224) /* Class D */ + bits = 4; + else if (*odst >= 192) /* Class C */ bits = 24; - else if (*odst >= 128) /*%< Class B */ + else if (*odst >= 128) /* Class B */ bits = 16; - else /*%< Class A */ + else /* Class A */ bits = 8; /* If imputed mask is narrower than specified octets, widen. */ if (bits < ((dst - odst) * 8)) bits = (dst - odst) * 8; - /* - * If there are no additional bits specified for a class D - * address adjust bits to 4. - */ - if (bits == 8 && *odst == 224) - bits = 4; } /* Extend network to cover the actual mask. */ while (bits > ((dst - odst) * 8)) { - if (size-- <= 0U) + if (size-- == 0) goto emsgsize; *dst++ = '\0'; } @@ -184,222 +207,48 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { return (-1); } -static int -getbits(const char *src, int *bitsp) { - static const char digits[] = "0123456789"; - int n; - int val; - char ch; - - val = 0; - n = 0; - while ((ch = *src++) != '\0') { - const char *pch; - - pch = strchr(digits, ch); - if (pch != NULL) { - if (n++ != 0 && val == 0) /*%< no leading zeros */ - return (0); - val *= 10; - val += (pch - digits); - if (val > 128) /*%< range */ - return (0); - continue; - } - return (0); - } - if (n == 0) - return (0); - *bitsp = val; - return (1); -} static int -getv4(const char *src, u_char *dst, int *bitsp) { - static const char digits[] = "0123456789"; - u_char *odst = dst; - int n; - u_int val; - char ch; - - val = 0; - n = 0; - while ((ch = *src++) != '\0') { - const char *pch; +inet_net_pton_ipv6(const char *src, u_char *dst, size_t size) +{ + struct in6_addr in6; + int ret; + int bits; + size_t bytes; + char buf[INET6_ADDRSTRLEN + sizeof("/128")]; + char *sep; + const char *errstr; - pch = strchr(digits, ch); - if (pch != NULL) { - if (n++ != 0 && val == 0) /*%< no leading zeros */ - return (0); - val *= 10; - val += (pch - digits); - if (val > 255) /*%< range */ - return (0); - continue; - } - if (ch == '.' || ch == '/') { - if (dst - odst > 3) /*%< too many octets? */ - return (0); - *dst++ = val; - if (ch == '/') - return (getbits(src, bitsp)); - val = 0; - n = 0; - continue; - } - return (0); + if (strlcpy(buf, src, sizeof buf) >= sizeof buf) { + errno = EMSGSIZE; + return (-1); } - if (n == 0) - return (0); - if (dst - odst > 3) /*%< too many octets? */ - return (0); - *dst++ = val; - return (1); -} -static int -inet_net_pton_ipv6(const char *src, u_char *dst, size_t size) { - static const char xdigits_l[] = "0123456789abcdef", - xdigits_u[] = "0123456789ABCDEF"; - u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; - const char *xdigits, *curtok; - int ch, saw_xdigit; - u_int val; - int digits; - int bits; - size_t bytes; - int words; - int ipv4; + sep = strchr(buf, '/'); + if (sep != NULL) + *sep++ = '\0'; - memset((tp = tmp), '\0', NS_IN6ADDRSZ); - endp = tp + NS_IN6ADDRSZ; - colonp = NULL; - /* Leading :: requires some special handling. */ - if (*src == ':') - if (*++src != ':') - goto enoent; - curtok = src; - saw_xdigit = 0; - val = 0; - digits = 0; - bits = -1; - ipv4 = 0; - while ((ch = *src++) != '\0') { - const char *pch; + ret = inet_pton(AF_INET6, buf, &in6); + if (ret != 1) + return (-1); - if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL) - pch = strchr((xdigits = xdigits_u), ch); - if (pch != NULL) { - val <<= 4; - val |= (pch - xdigits); - if (++digits > 4) - goto enoent; - saw_xdigit = 1; - continue; - } - if (ch == ':') { - curtok = src; - if (!saw_xdigit) { - if (colonp) - goto enoent; - colonp = tp; - continue; - } else if (*src == '\0') - goto enoent; - if (tp + NS_INT16SZ > endp) - return (0); - *tp++ = (u_char) (val >> 8) & 0xff; - *tp++ = (u_char) val & 0xff; - saw_xdigit = 0; - digits = 0; - val = 0; - continue; - } - if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && - getv4(curtok, tp, &bits) > 0) { - tp += NS_INADDRSZ; - saw_xdigit = 0; - ipv4 = 1; - break; /*%< '\\0' was seen by inet_pton4(). */ - } - if (ch == '/' && getbits(src, &bits) > 0) - break; - goto enoent; - } - if (saw_xdigit) { - if (tp + NS_INT16SZ > endp) - goto enoent; - *tp++ = (u_char) (val >> 8) & 0xff; - *tp++ = (u_char) val & 0xff; - } - if (bits == -1) + if (sep == NULL) bits = 128; - - words = (bits + 15) / 16; - if (words < 2) - words = 2; - if (ipv4) - words = 8; - endp = tmp + 2 * words; - - if (colonp != NULL) { - /* - * Since some memmove()'s erroneously fail to handle - * overlapping regions, we'll do the shift by hand. - */ - const int n = tp - colonp; - int i; - - if (tp == endp) - goto enoent; - for (i = 1; i <= n; i++) { - endp[- i] = colonp[n - i]; - colonp[n - i] = 0; + else { + bits = strtonum(sep, 0, 128, &errstr); + if (errstr) { + errno = EINVAL; + return (-1); } - tp = endp; } - if (tp != endp) - goto enoent; bytes = (bits + 7) / 8; - if (bytes > size) - goto emsgsize; - memcpy(dst, tmp, bytes); - return (bits); - - enoent: - errno = ENOENT; - return (-1); - - emsgsize: - errno = EMSGSIZE; - return (-1); -} - -/*% - * int - * inet_net_pton(af, src, dst, size) - * convert network number from presentation to network format. - * accepts hex octets, hex strings, decimal octets, and /CIDR. - * "size" is in bytes and describes "dst". - * return: - * number of bits, either imputed classfully or specified with /CIDR, - * or -1 if some failure occurred (check errno). ENOENT means it was - * not a valid network specification. - * author: - * Paul Vixie (ISC), June 1996 - */ -int -inet_net_pton(int af, const char *src, void *dst, size_t size) { - switch (af) { - case AF_INET: - return (inet_net_pton_ipv4(src, dst, size)); - case AF_INET6: - return (inet_net_pton_ipv6(src, dst, size)); - default: - errno = EAFNOSUPPORT; + if (bytes > size) { + errno = EMSGSIZE; return (-1); } + memcpy(dst, &in6.s6_addr, bytes); + return (bits); } /* @@ -408,5 +257,3 @@ inet_net_pton(int af, const char *src, void *dst, size_t size) { */ #undef inet_net_pton __weak_reference(__inet_net_pton, inet_net_pton); - -/*! \file */ diff --git a/lib/libc/tests/net/Makefile b/lib/libc/tests/net/Makefile index 24cff61e8d24..ec0668633508 100644 --- a/lib/libc/tests/net/Makefile +++ b/lib/libc/tests/net/Makefile @@ -4,8 +4,10 @@ ATF_TESTS_C+= ether_test ATF_TESTS_C+= eui64_aton_test ATF_TESTS_C+= eui64_ntoa_test ATF_TESTS_CXX+= link_addr_test +ATF_TESTS_CXX+= inet_net_test CXXSTD.link_addr_test= c++20 +CXXSTD.inet_net_test= c++20 CFLAGS+= -I${.CURDIR} diff --git a/lib/libc/tests/net/inet_net_test.cc b/lib/libc/tests/net/inet_net_test.cc new file mode 100644 index 000000000000..4ecf5a3de492 --- /dev/null +++ b/lib/libc/tests/net/inet_net_test.cc @@ -0,0 +1,333 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Tests for inet_net_pton() and inet_net_ntop(). + */ + +#include +#include + +#include +#include + +#include +#include +#include + +#include + +using namespace std::literals; + +/* + * inet_net_ntop() and inet_net_pton() for IPv4. + */ +ATF_TEST_CASE_WITHOUT_HEAD(inet_net_inet4) +ATF_TEST_CASE_BODY(inet_net_inet4) +{ + /* + * Define a list of addresses we want to check. Each address is passed + * to inet_net_pton() to convert it to an in_addr, then we convert the + * in_addr back to a string and compare it with the expected value. We + * want to test over-long prefixes here (such as 10.0.0.1/8), so we also + * specify what the result is expected to be. + */ + + struct test_addr { + std::string input; + unsigned bits; + std::string output; + }; + + auto test_addrs = std::vector{ + // Simple prefixes that fall on octet boundaries. + { "10.0.0.0/8", 8, "10/8" }, + { "10.1.0.0/16", 16, "10.1/16" }, + { "10.1.2.0/24", 24, "10.1.2/24" }, + { "10.1.2.3/32", 32, "10.1.2.3/32" }, + + // Simple prefixes with the short-form address. + { "10/8", 8, "10/8" }, + { "10.1/16", 16, "10.1/16" }, + { "10.1.2/24", 24, "10.1.2/24" }, + + // A prefix that doesn't fall on an octet boundary. + { "10.1.64/18", 18, "10.1.64/18" }, + + // An overlong prefix with bits that aren't part of the prefix. + { "10.0.0.1/8", 8, "10/8" }, + }; + + for (auto const &addr: test_addrs) { + /* + * Convert the input string to an in_addr + bits, and make + * sure the result produces the number of bits we expected. + */ + + auto in = in_addr{}; + auto bits = inet_net_pton(AF_INET, addr.input.c_str(), + &in, sizeof(in)); + ATF_REQUIRE(bits != -1); + ATF_REQUIRE_EQ(bits, addr.bits); + + /* + * Convert the in_addr back to a string + */ + + /* + * XXX: Should there be a constant for the size of the result + * buffer? For now, use ADDRSTRLEN + 3 ("/32") + 1 (NUL). + * + * Fill the buffer with 'Z', so we can check the result was + * properly terminated. + */ + auto strbuf = std::vector(INET_ADDRSTRLEN + 3 + 1, 'Z'); + auto ret = inet_net_ntop(AF_INET, &in, bits, + strbuf.data(), strbuf.size()); + ATF_REQUIRE(ret != NULL); + ATF_REQUIRE_EQ(ret, strbuf.data()); + + /* Make sure the result was NUL-terminated and find the NUL */ + ATF_REQUIRE(strbuf.size() >= 1); + auto end = std::ranges::find(strbuf, '\0'); + ATF_REQUIRE(end != strbuf.end()); + + /* + * Check the result matches what we expect. Use a temporary + * string here instead of std::ranges::equal because this + * means ATF can print the mismatch. + */ + auto str = std::string(std::ranges::begin(strbuf), end); + ATF_REQUIRE_EQ(str, addr.output); + } +} + +/* + * inet_net_ntop() and inet_net_pton() for IPv6. + */ +ATF_TEST_CASE_WITHOUT_HEAD(inet_net_inet6) +ATF_TEST_CASE_BODY(inet_net_inet6) +{ + /* + * Define a list of addresses we want to check. Each address is + * passed to inet_net_pton() to convert it to an in6_addr, then we + * convert the in6_addr back to a string and compare it with the + * expected value. We want to test over-long prefixes here (such + * as 2001:db8::1/32), so we also specify what the result is + * expected to be. + */ + + struct test_addr { + std::string input; + unsigned bits; + std::string output; + }; + + auto test_addrs = std::vector{ + // A prefix with a trailing :: + { "2001:db8::/32", 32, "2001:db8::/32" }, + + // A prefix with a leading ::. Note that the output is + // different from the input because inet_ntop() renders + // this prefix with an IPv4 suffix for legacy reasons. + { "::ffff:0:0/96", 96, "::ffff:0.0.0.0/96" }, + *** 184 LINES SKIPPED *** From nobody Sat Oct 18 16:13:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpmvB4KTLz6DLbH; Sat, 18 Oct 2025 16:13: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 4cpmvB3cjQz3ZYg; Sat, 18 Oct 2025 16:13:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760803990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fNF0lm9q1CcQi//lpY6Z1OAHFjE32vaUh8imfJ12c3U=; b=rC1kN1FrmgpTCSA9J/o4H2x9hS4SSceHUFhJIXkwVVmqnd3GO+BynJrpFcWZ2AS+KRwhs0 7Ahucu6YGWPCAuPIcg/xaccg6ZJRwx1RhZGoCiLaDK1mrAZP0q+9HrsL+3Je/p4pNwHKwg FwhvWToRIIvZFMTz3vzpkulGf9V2pxVcS+/wG9TZGDySoia114nwS6OPk3FA/pQUTkmqzP bOrWuYjGw7+F1tWJjgwMzgWEE3OmJRlXIm66MaEeBxIwB1xLsIfvnFiTHT5DxRyGM0HDJu H1EaWHHydEE039pQievddZgFyeQGVH28d75d/JhE52aV2JJ4LEjzCgFGhewcNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760803990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fNF0lm9q1CcQi//lpY6Z1OAHFjE32vaUh8imfJ12c3U=; b=m+lmRYL9d7fNrmiSllBW29/HvFVs08sAIh1WcqgtI8YacfJpZK+XxtBBOoGop9XIG/F8rh KiCeJB8qz3R6HvehSJoiROX0l1MC0Idbz0N6YC9rfNKeTC1WR+FMKiqvltIWW3l2cOuLwO 081VmRRtH6K5cWFhCjF3CoiW0xmFjmnhzt7rx0moRDa4KEGk4OtLk/0wyMS/aZx/1wgPuC oX2N28CQmaBAGBHtjJ+cz2BzPxDv1bDQncNh2pkWFf3u2eTCzggS6fsDlgx3srOuBvxLmU hUdgaiG5XEGDvt1TXMAkJELCGA31Y7Z6t/5qGgbafSAw6TYHxzPb9tawfGDq8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760803990; a=rsa-sha256; cv=none; b=I2Ygr8zz2+KS56ZL2nhABqRIPukJSSkMfyBL0JbziLjgiPhy5Ex0aDk9ykFEpRt8LHFUBn bQ819hi3YnoM1x7MZeGwokaoIcJqoFmzvHpkjYm/A/NGT1hpaMKkRwIXzp+V7sZCoSA57u qij58Pr2ql3CMacXsdjcdZBCbc/75BHaD38utTR5GBiBIep+MTKRc8NSayzK6TxJpdbzRg QfLCX2Um2yzX0+EPweXh/yStb6U5l/Etni09xgDEKA4j1PVBKT9kT4yuWtnsn8hBAa142v ar7/5G9KcwG6IPtxtQJ2dHQ8sr1oDrtIk444nDgHSnyJ18k4t55ojxkRUYB1Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpmvB37nrzp2M; Sat, 18 Oct 2025 16:13:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59IGDAXN000759; Sat, 18 Oct 2025 16:13:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IGDAn4000756; Sat, 18 Oct 2025 16:13:10 GMT (envelope-from git) Date: Sat, 18 Oct 2025 16:13:10 GMT Message-Id: <202510181613.59IGDAn4000756@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 301e6c47127d - main - imgact: Mark brandinfo and note structures as const List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 301e6c47127d358073a35c1ecd7b8cf014d0bb92 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=301e6c47127d358073a35c1ecd7b8cf014d0bb92 commit 301e6c47127d358073a35c1ecd7b8cf014d0bb92 Author: Zhenlei Huang AuthorDate: 2025-10-18 16:11:30 +0000 Commit: Zhenlei Huang CommitDate: 2025-10-18 16:11:30 +0000 imgact: Mark brandinfo and note structures as const No functional change intended. Reviewed by: kib MFC after: 10 days MFC with: 80336636b6b9f7a3bdad007c400e85eae017d2a2 Differential Revision: https://reviews.freebsd.org/D53173 --- sys/arm/arm/elf_machdep.c | 4 ++-- sys/i386/i386/elf_machdep.c | 12 ++++++------ sys/i386/linux/linux_sysvec.c | 12 ++++++------ sys/kern/imgact_elf.c | 4 ++-- sys/powerpc/powerpc/elf32_machdep.c | 8 ++++---- sys/powerpc/powerpc/elf64_machdep.c | 12 ++++++------ sys/riscv/riscv/elf_machdep.c | 4 ++-- sys/sys/imgact_elf.h | 6 +++--- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index ea6437f320ce..881c4fcff475 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -106,7 +106,7 @@ struct sysentvec elf32_freebsd_sysvec = { }; INIT_SYSENTVEC(elf32_sysvec, &elf32_freebsd_sysvec); -static Elf32_Brandinfo freebsd_brand_info = { +static const Elf32_Brandinfo freebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_ARM, .compat_3_brand = "FreeBSD", @@ -118,7 +118,7 @@ static Elf32_Brandinfo freebsd_brand_info = { .header_supported= elf32_arm_abi_supported, }; -SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, +C_SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c index 13769af0fbca..14c942942d08 100644 --- a/sys/i386/i386/elf_machdep.c +++ b/sys/i386/i386/elf_machdep.c @@ -92,7 +92,7 @@ struct sysentvec elf32_freebsd_sysvec = { }; INIT_SYSENTVEC(elf32_sysvec, &elf32_freebsd_sysvec); -static Elf32_Brandinfo freebsd_brand_info = { +static const Elf32_Brandinfo freebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_386, .compat_3_brand = "FreeBSD", @@ -103,11 +103,11 @@ static Elf32_Brandinfo freebsd_brand_info = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, +C_SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); -static Elf32_Brandinfo freebsd_brand_oinfo = { +static const Elf32_Brandinfo freebsd_brand_oinfo = { .brand = ELFOSABI_FREEBSD, .machine = EM_386, .compat_3_brand = "FreeBSD", @@ -118,11 +118,11 @@ static Elf32_Brandinfo freebsd_brand_oinfo = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, +C_SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_oinfo); -static Elf32_Brandinfo kfreebsd_brand_info = { +static const Elf32_Brandinfo kfreebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_386, .compat_3_brand = "FreeBSD", @@ -133,7 +133,7 @@ static Elf32_Brandinfo kfreebsd_brand_info = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_MANDATORY }; -SYSINIT(kelf32, SI_SUB_EXEC, SI_ORDER_ANY, +C_SYSINIT(kelf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &kfreebsd_brand_info); diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 85877bf40997..14b5f64388d2 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -796,7 +796,7 @@ linux_vdso_reloc(char *mapping, Elf_Addr offset) } } -static Elf_Brandnote linux_brandnote = { +static const Elf_Brandnote linux_brandnote = { .hdr.n_namesz = sizeof(GNU_ABI_VENDOR), .hdr.n_descsz = 16, /* XXX at least 16 */ .hdr.n_type = 1, @@ -805,7 +805,7 @@ static Elf_Brandnote linux_brandnote = { .trans_osrel = linux_trans_osrel }; -static Elf32_Brandinfo linux_brand = { +static const Elf32_Brandinfo linux_brand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", @@ -816,7 +816,7 @@ static Elf32_Brandinfo linux_brand = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -static Elf32_Brandinfo linux_glibc2brand = { +static const Elf32_Brandinfo linux_glibc2brand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", @@ -827,7 +827,7 @@ static Elf32_Brandinfo linux_glibc2brand = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -static Elf32_Brandinfo linux_muslbrand = { +static const Elf32_Brandinfo linux_muslbrand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", @@ -839,7 +839,7 @@ static Elf32_Brandinfo linux_muslbrand = { LINUX_BI_FUTEX_REQUEUE }; -Elf32_Brandinfo *linux_brandlist[] = { +const Elf32_Brandinfo *linux_brandlist[] = { &linux_brand, &linux_glibc2brand, &linux_muslbrand, @@ -849,7 +849,7 @@ Elf32_Brandinfo *linux_brandlist[] = { static int linux_elf_modevent(module_t mod, int type, void *data) { - Elf32_Brandinfo **brandinfo; + const Elf32_Brandinfo **brandinfo; int error; struct linux_ioctl_handler **lihp; diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index a1fabbc86f27..779158b41221 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -231,7 +231,7 @@ static const Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; #define aligned(a, t) (rounddown2((u_long)(a), sizeof(t)) == (u_long)(a)) -Elf_Brandnote __elfN(freebsd_brandnote) = { +const Elf_Brandnote __elfN(freebsd_brandnote) = { .hdr.n_namesz = sizeof(FREEBSD_ABI_VENDOR), .hdr.n_descsz = sizeof(int32_t), .hdr.n_type = NT_FREEBSD_ABI_TAG, @@ -254,7 +254,7 @@ __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel) static int GNU_KFREEBSD_ABI_DESC = 3; -Elf_Brandnote __elfN(kfreebsd_brandnote) = { +const Elf_Brandnote __elfN(kfreebsd_brandnote) = { .hdr.n_namesz = sizeof(GNU_ABI_VENDOR), .hdr.n_descsz = 16, /* XXX at least 16 */ .hdr.n_type = 1, diff --git a/sys/powerpc/powerpc/elf32_machdep.c b/sys/powerpc/powerpc/elf32_machdep.c index e1118713bff0..6b904c02ea15 100644 --- a/sys/powerpc/powerpc/elf32_machdep.c +++ b/sys/powerpc/powerpc/elf32_machdep.c @@ -143,7 +143,7 @@ struct sysentvec elf32_freebsd_sysvec = { }; INIT_SYSENTVEC(elf32_sysvec, &elf32_freebsd_sysvec); -static Elf32_Brandinfo freebsd_brand_info = { +static const Elf32_Brandinfo freebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_PPC, .compat_3_brand = "FreeBSD", @@ -158,11 +158,11 @@ static Elf32_Brandinfo freebsd_brand_info = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, +C_SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); -static Elf32_Brandinfo freebsd_brand_oinfo = { +static const Elf32_Brandinfo freebsd_brand_oinfo = { .brand = ELFOSABI_FREEBSD, .machine = EM_PPC, .compat_3_brand = "FreeBSD", @@ -173,7 +173,7 @@ static Elf32_Brandinfo freebsd_brand_oinfo = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, +C_SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_oinfo); diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c index a999f742caeb..0be40bed69cb 100644 --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -154,7 +154,7 @@ static bool ppc64_elfv1_header_match(const struct image_params *params, static bool ppc64_elfv2_header_match(const struct image_params *params, const int32_t *, const uint32_t *); -static Elf64_Brandinfo freebsd_brand_info_elfv1 = { +static const Elf64_Brandinfo freebsd_brand_info_elfv1 = { .brand = ELFOSABI_FREEBSD, .machine = EM_PPC64, .compat_3_brand = "FreeBSD", @@ -166,11 +166,11 @@ static Elf64_Brandinfo freebsd_brand_info_elfv1 = { .header_supported = &ppc64_elfv1_header_match }; -SYSINIT(elf64v1, SI_SUB_EXEC, SI_ORDER_ANY, +C_SYSINIT(elf64v1, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_info_elfv1); -static Elf64_Brandinfo freebsd_brand_info_elfv2 = { +static const Elf64_Brandinfo freebsd_brand_info_elfv2 = { .brand = ELFOSABI_FREEBSD, .machine = EM_PPC64, .compat_3_brand = "FreeBSD", @@ -182,11 +182,11 @@ static Elf64_Brandinfo freebsd_brand_info_elfv2 = { .header_supported = &ppc64_elfv2_header_match }; -SYSINIT(elf64v2, SI_SUB_EXEC, SI_ORDER_ANY, +C_SYSINIT(elf64v2, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_info_elfv2); -static Elf64_Brandinfo freebsd_brand_oinfo = { +static const Elf64_Brandinfo freebsd_brand_oinfo = { .brand = ELFOSABI_FREEBSD, .machine = EM_PPC64, .compat_3_brand = "FreeBSD", @@ -198,7 +198,7 @@ static Elf64_Brandinfo freebsd_brand_oinfo = { .header_supported = &ppc64_elfv1_header_match }; -SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, +C_SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_oinfo); diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c index 67b1fcc4c1a9..5bd4af4c15f8 100644 --- a/sys/riscv/riscv/elf_machdep.c +++ b/sys/riscv/riscv/elf_machdep.c @@ -100,7 +100,7 @@ static struct sysentvec elf64_freebsd_sysvec = { }; INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); -static Elf64_Brandinfo freebsd_brand_info = { +static const Elf64_Brandinfo freebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_RISCV, .compat_3_brand = "FreeBSD", @@ -110,7 +110,7 @@ static Elf64_Brandinfo freebsd_brand_info = { .brand_note = &elf64_freebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; -SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST, +C_SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_info); static void diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 9e2a233248b4..25ce7871ba7c 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -87,7 +87,7 @@ typedef struct { const char *interp_newpath; int flags; const Elf_Brandnote *brand_note; - bool (*header_supported)(const struct image_params *, + bool (*const header_supported)(const struct image_params *, const int32_t *, const uint32_t *); /* High 8 bits of flags is private to the ABI */ #define BI_CAN_EXEC_DYN 0x0001 @@ -132,8 +132,8 @@ bool __elfN(parse_notes)(const struct image_params *, const Elf_Note *, void __elfN(dump_thread)(struct thread *, void *, size_t *); extern int __elfN(fallback_brand); -extern Elf_Brandnote __elfN(freebsd_brandnote); -extern Elf_Brandnote __elfN(kfreebsd_brandnote); +extern const Elf_Brandnote __elfN(freebsd_brandnote); +extern const Elf_Brandnote __elfN(kfreebsd_brandnote); #endif /* _KERNEL */ #endif /* !_SYS_IMGACT_ELF_H_ */ From nobody Sat Oct 18 17:15:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cppGm4SmYz6CQtH; Sat, 18 Oct 2025 17:15: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 4cppGm2f8mz3gv7; Sat, 18 Oct 2025 17:15:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760807712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rFJ2Vd3EnI99KQoO5zcKOkszSsTDgkhyX8jNkKJqbII=; b=IMGEe44DVF1nUlKZcmNnhKXjzjAFUlVD0Qi80oJWmye4eftxVPowTeffkMohV3kRFpZNg+ e1As/e2nJwLE7ncHRB26YyTbuNJWUIb2zMYr/AU+/M9NLPfWAEZhYev5Wc62YCmpQu0IrQ VlkQqO5vS4hkMKi7IP6MvCjhEDZcF6eBWO2YBKA/fJdOJ4YJBTdm43nX5WC7JveHYB/V1s bB4ymrwswTCipl9MqvNL+gNYzbIrorsfwKhkogSZGbFDB7nyuIQg5Y1mn0IcBKHHN8MNUi 0KUB4JxEIzrtRt+VdUmN0L3GBKRdjEWl1AGlRRfadSyOULGHFVgLBxhNa3EcpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760807712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rFJ2Vd3EnI99KQoO5zcKOkszSsTDgkhyX8jNkKJqbII=; b=gJGwSudQ8vMxGXmDcRzRQJs9kVPM+xNbt64bbLyokhk6lEdJz/+jkbXaU/J5DYP9YmAz0a PsQNTGguA1b9gPnXQvNR53zRlx32a4+bIPVHv2/TboKgCedoXKCkm1Qqo8FcgPIyZm+wLt KPvfVO37pZsrpQuWm2suhhdRlyLai+XudHEPmkpYLgoCb/bmCmTrysia9SfktQqyk9tm5J CbW7KzCpkj9N9R+cUSG2Q7GGzTiUKJJVfbatfs4EYURdkshtpLM9GaRhloETqsw5hWAeq3 Aw/hy3FDsIisbWaBlJW32sZvL0Xl7WwDLsqClC+PeWgtsGrWAPZHIMvuORIr2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760807712; a=rsa-sha256; cv=none; b=hHHYYjgYjuK2DU6DEgC7UUNhkXbNLbrudbsex4Clx+Q9NNUMZaU9GNbZ1RarqkhThzB8Xw PNU0J1gfh6ExE5IWCK1LYFPkXRatl+V1eAaf6BEjHkHcxydiX3bJkU3Ut3AfeZhGs/Jw75 gUgm2wmHptttipWvMiC1BVHfttlUTqeLaRJKsYjWjLrhwHsFzJJwEAZEFFS94a21iqM32E gAVHTdbGIc+wmLAN31kWTwvj73vDVz91/wQO2hJZlNOMiFN7kNxG2Ch5ddPJaUp/Lf1aOY 1x7ZTsphxpTrw71Uk+q4HyBvI4yfgLA4SqkWOvtwb94Gu77+HwXZYay/+o+GOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cppGm2FngzqL6; Sat, 18 Oct 2025 17:15:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59IHFCAX015380; Sat, 18 Oct 2025 17:15:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IHFCvW015377; Sat, 18 Oct 2025 17:15:12 GMT (envelope-from git) Date: Sat, 18 Oct 2025 17:15:12 GMT Message-Id: <202510181715.59IHFCvW015377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: edadbc6ee955 - main - rc: dmesg: Allow umask to be configurable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: edadbc6ee95570627679f3bc14a1d5476d0ce339 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=edadbc6ee95570627679f3bc14a1d5476d0ce339 commit edadbc6ee95570627679f3bc14a1d5476d0ce339 Author: Jose Luis Duran AuthorDate: 2025-10-17 14:34:55 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-18 17:11:49 +0000 rc: dmesg: Allow umask to be configurable Allow umask to be configurable. Being able to set the umask via an rc variable is useful when setting: security.bsd.unprivileged_read_msgbuf=0 As it allows a user to configure: dmesg_umask="066" Without modifying the rc script, and preventing the contents of the $dmesg_file (/var/run/dmesg.boot) from being publicly readable. PR: 272552 Reviewed by: netchild MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53169 --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/dmesg | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 939acd3b5226..ada9094360f6 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -707,6 +707,7 @@ osrelease_enable="YES" # Update /var/run/os-release on boot (or NO). osrelease_file="/var/run/os-release" # File to update for os-release. osrelease_perms="444" # Default permission for os-release file. dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot +dmesg_umask="022" # Default umask for /var/run/dmesg.boot file. watchdogd_enable="NO" # Start the software watchdog daemon watchdogd_flags="" # Flags to watchdogd (if enabled) watchdogd_timeout="" # watchdogd timeout, overrides -t in watchdogd_flags diff --git a/libexec/rc/rc.d/dmesg b/libexec/rc/rc.d/dmesg index 51e35d5d4e80..736449f3b159 100755 --- a/libexec/rc/rc.d/dmesg +++ b/libexec/rc/rc.d/dmesg @@ -19,7 +19,7 @@ stop_cmd=":" do_dmesg() { rm -f ${dmesg_file} - ( umask 022 ; /sbin/dmesg $rc_flags > ${dmesg_file} ) + ( umask "${dmesg_umask}" ; /sbin/dmesg $rc_flags > ${dmesg_file} ) } load_rc_config $name From nobody Sat Oct 18 17:15:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cppGl3h0gz6CRJ6; Sat, 18 Oct 2025 17:15: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 4cppGl2Ddgz3gVw; Sat, 18 Oct 2025 17:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760807711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WD+PjQx4StgMoE/V1k04dplR8804OKn/UcWL6MTxoFY=; b=Zz6n0+a0gr/afCeLuMgFp42cB4Rd/GEhhZE9wEvwJBffyhd6ppf0MplEl4mOCKsw25rz13 bDKHHhapADzh/FxTaKiTCx7dPlJzhtnOvGv3DlhMwxxf8N0Lv5Azfa1HuwsTnBa4kf5bMu ywJL1b8j3tzs/OOvdlglmd9DQXarHP4yyXlTVCh5AJxBJxiaLUVIeSh53aM3fBXePQuAxv 9UokVP3i2dTC4ClCb+DqJ52xi5Xb83dR+0yyXC6t3BicSAr30jqYdR/hs4RqrUMcV/Aqmv frpg0UVdqylu3Qq+tOEZG9UYaFN92T/elTIlk3JPeDjz9rFWp2QJFgwVdsDCKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760807711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WD+PjQx4StgMoE/V1k04dplR8804OKn/UcWL6MTxoFY=; b=IEDbMr9kgND9cVEpKyO8JJCtQSXWaH9sf21auJAAqbNj3/p7jlsYaPbcPo2dRqRQahvjsS xkI01N45xmiisKmKJwSJ53WMEaufmGg/I0EyLqc/a16EgqV1ayYWI8Bt3R9kfnrDGNrnPM Zjg5D+Dd/BmNQR/am0RnSYvQwlZTeyvwcG7YzzxrK5qrk6hLurq3bVsOPLjpH5Z58xtEFH OpUh56WmAh4wpnRI717CnVbKpEEasKszS+nGWQ0Y4m+tFcLQ+7OZfgKhMnK7yzX7BTs+5P 0IVkdsAlanZFXRhnklwHYWZdbmcSTojE+vwhK1fiHDOcEpjEHf2eBqeeVuHGFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760807711; a=rsa-sha256; cv=none; b=EDtr0514LEgwPwUOmuPm6Bsri7tyI/Rj0HyjVDtMtLv/MFUObiOtLJQ7qS0QPJwGk1Yjjl cjlfB2A1dlS585XQ4Hp5JsVQUAs2iyW342y+99kceL7QQpqQ0H2u1/BLJDK6RCE5RrLELY Mg5GOmf9JSL8igWMwrPVea1OAxNaCA3xOBYHgip8Rh+WmuPfOPuvxdsFssl75PLnYf+Q4m sBBZAal1PWl63HNADSX8UXbMCqLpX3j0M3uOTa4HgdhIKhJ09hDPlvuv43SLstbc+yLoYr KnUgXOgust6LkMnGKQl3qzYj8jayPA2eyGUUJBj4NYG/sdbgdokvWp3ALIwMOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cppGl1lJ2zqL5; Sat, 18 Oct 2025 17:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59IHFBZu015345; Sat, 18 Oct 2025 17:15:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IHFBe8015342; Sat, 18 Oct 2025 17:15:11 GMT (envelope-from git) Date: Sat, 18 Oct 2025 17:15:11 GMT Message-Id: <202510181715.59IHFBe8015342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 982d70ca2e63 - main - rc.conf: Fix typo interferring -> interfering List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 982d70ca2e6333b7e8ccf828b004ccf20a9cc550 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=982d70ca2e6333b7e8ccf828b004ccf20a9cc550 commit 982d70ca2e6333b7e8ccf828b004ccf20a9cc550 Author: Jose Luis Duran AuthorDate: 2025-10-17 14:15:46 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-18 17:04:25 +0000 rc.conf: Fix typo interferring -> interfering Reviewed by: emaste MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53168 --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index b7cce777c4f6..939acd3b5226 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -24,7 +24,7 @@ : ${_localbase:="$(/sbin/sysctl -n user.localbase 2> /dev/null)"} : ${_localbase:="/usr/local"} -# rc_debug can't be set here without interferring with rc.subr's setting it +# rc_debug can't be set here without interfering with rc.subr's setting it # when the kenv variable rc.debug is set. #rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. From nobody Sat Oct 18 17:15:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cppGn6d0zz6CRNT; Sat, 18 Oct 2025 17:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cppGn3xvnz3gpP; Sat, 18 Oct 2025 17:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760807713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yfw7qdXBRgbjiBCsp6s9rrzXTLJ3F8/qBVN2XcJcbAY=; b=nR69fF67oA1ARyiQ0s/nOA9p2vDYGgVPvKZRXDV47tNclIOPqqBQKD27C4fvpCWBJjZoNN /CBdN5JszREMVgH+tyclSk0/7jwn0lFoZc46LDj5X2rHGx7XFmC5VFSducpVUf8aZNjzBu 64vcz4rQLSa/NQ3Cpkrq46jAh0ZG5qiCijQacuwkAjKyxKCOCwxNIkpCy+zGZRb29775Ye 5wcHzHKqvps+RVeltG8rCQpkiglEzZVantzOsXGHxBe4IxpWZXA8N/WC0uXgxaTi8QAcQk +kC+xUIH9dhQ5t1hJPSxVdl9HXZyT1YvHAB2hwkP+3VOtMiZLOlXqRXRxjl5ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760807713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yfw7qdXBRgbjiBCsp6s9rrzXTLJ3F8/qBVN2XcJcbAY=; b=YUTra174sV7LCwdB2q+F/1TJzaD/xFlSLj8L5RwabB1PxAFBrZE9Ujru48UgKoFndE6n/S won+LOq42TdEQRLpjaxucE/M+SIkLRBWFqZfc/z6E43Xi+vuc/p0A+F1RdByYfGHpcYe33 m3PHjKJK5hjl35z3AmGPvoLt6DZdfKyDKQGnvWunGuSxze7PbJRzSx3bdGEIRkDhbBwrcm 6DKt749w0yn8QAwR5+UiowhqUoSTu907liwmUj6v4hzWVTwvTSQfSy1Bk2H5ls90XFfYVQ fTAqxeZyAuLG3ziH2WnGav6kNM4mPdi+wPOILedgcM9pApsfhWsGSfMLeGhACw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760807713; a=rsa-sha256; cv=none; b=JO04YUJod96XtXgDB84PobgeSzJ7+N2tOU1Z4a0m/fgcUpnDdPgR6ufFAQitUaMFYQDoDM U3uAE9uMirqKjAqR4rcT/NMjXHQOVU2PmijEcjKGzy4daThukH8GmKiyeWZ3Q2j+XD0yPB 8EYjHGHluIyY0nJG/HvS3SchQftB/ezM3rK/x5v49RuRNW6UpMabPtBotw8MY6QmoH7OKE mPMAA+WONTbY6AWA09agAxPvHO/XOyPbItbszRlkgZv+rbUANKjWtWe2iP7awVl0LV8sFP xJVVEgWaxapL11MiZxN0zYRT9vCuAzVIg2hFHwG19qszkPnInnJscuP83RamIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cppGn3Dq5zqZG; Sat, 18 Oct 2025 17:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59IHFD2N015415; Sat, 18 Oct 2025 17:15:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IHFDJN015412; Sat, 18 Oct 2025 17:15:13 GMT (envelope-from git) Date: Sat, 18 Oct 2025 17:15:13 GMT Message-Id: <202510181715.59IHFDJN015412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 4ee348e27143 - main - bsdinstall: Fix typos List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ee348e27143b857445fd261cbe6695d6d57c836 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4ee348e27143b857445fd261cbe6695d6d57c836 commit 4ee348e27143b857445fd261cbe6695d6d57c836 Author: Jose Luis Duran AuthorDate: 2025-10-17 15:16:32 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-18 17:13:16 +0000 bsdinstall: Fix typos Reviewed by: emaste MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53170 --- usr.sbin/bsdinstall/scripts/auto | 2 +- usr.sbin/bsdinstall/scripts/bootconfig | 2 +- usr.sbin/bsdinstall/scripts/jail | 2 +- usr.sbin/bsdinstall/scripts/keymap | 2 +- usr.sbin/bsdinstall/scripts/script | 2 +- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 8058b1a41dbf..5fefc07e4c07 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -73,7 +73,7 @@ msg_yes="YES" # error [$msg] # # Display generic error message when a script fails. An optional message -# argument can preceed the generic message. User is given the choice of +# argument can precede the generic message. User is given the choice of # restarting the installer or exiting. # error() diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 6736e78b450a..9c188c1d8a91 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -163,7 +163,7 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then rmdir "${mntpt}" fi - # Try to set the UEFI NV BootXXXX variables to recod the boot location + # Try to set the UEFI NV BootXXXX variables to record the boot location if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then update_uefi_bootentry fi diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index 3b1b2ee98fff..8e001fc4a027 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -45,7 +45,7 @@ user_env_vars="BSDINSTALL_DISTSITE DISTRIBUTIONS" # error [$msg] # # Display generic error message when a script fails. An optional message -# argument can preceed the generic message. User is given the choice of +# argument can precede the generic message. User is given the choice of # restarting the installer or exiting. # error() { diff --git a/usr.sbin/bsdinstall/scripts/keymap b/usr.sbin/bsdinstall/scripts/keymap index 6f4060c0772e..669a1062df95 100755 --- a/usr.sbin/bsdinstall/scripts/keymap +++ b/usr.sbin/bsdinstall/scripts/keymap @@ -216,7 +216,7 @@ while :; do n=$( eval f_dialog_menutag2index_with_help \ \"\$menu_choice\" $menu_list ) - # Turn that number ithe name of the keymap struct + # Turn that number into the name of the keymap struct k=$( set -- $KEYMAPS; eval echo \"\${$(( $n - 2))}\" ) # Get actual keymap setting while we update $keymap and $KEYMAPFILE diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script index 00ded5f8e24d..21da2ea7c366 100755 --- a/usr.sbin/bsdinstall/scripts/script +++ b/usr.sbin/bsdinstall/scripts/script @@ -144,7 +144,7 @@ else # # Work around this in an extremely lame way for the specific # case of EFI system partitions only. This *ONLY WORKS* if - # /boot/efi is empty and does not handle analagous problems on + # /boot/efi is empty and does not handle analogous problems on # other systems (ARM, PPC64). tar -xf "$BSDINSTALL_DISTDIR/$set" -C $BSDINSTALL_CHROOT --exclude boot/efi mkdir -p $BSDINSTALL_CHROOT/boot/efi diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 95cbba3fa131..9ea6ec3a4ac9 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -255,7 +255,7 @@ msg_encrypt_disks="Encrypt Disks?" msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions" msg_error="Error" msg_force_4k_sectors="Force 4K Sectors?" -msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.vdev.min_auto_ashift=12" +msg_force_4k_sectors_help="Align partitions to 4K sector boundaries and set vfs.zfs.vdev.min_auto_ashift=12" msg_freebsd_installer="$OSNAME Installer" msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted" msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk" From nobody Sat Oct 18 19:09:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cprpL5xHBz6CbFJ; Sat, 18 Oct 2025 19:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cprpL5M3Lz3tns; Sat, 18 Oct 2025 19:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760814554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WA0pTX8b7O1dmY83O6l1dpZ5fLTunngVofcJb+UYnzY=; b=ghfFho36d40pW1NeIzp8OFvoEOVeXTOx9N+kkyBDiv910Ro/guHy4sGNYF2y1SofprEWZx +VnWAxG68znC2++/g74v4/XBOLWOeOlR+Q4ADbHAxou6cfFv52uIOLIjVBdMJ6xb7TwrTE at/mks6ddWL6+tats/YoxdVzLsxsNJUwDwoKu7w/TyX1ioplYfO6CL2jzhT4VX3mncUV8W h6t2KA/eEfOQlAmkRmaYY9QyOHeRe8E1wJhOwAaysz6TeoRzePlumIfpVcTC364vwIbP7s KfwiZRyPFXnqQt/ZciN3SM2UyUc4ZwZ2LMUIfCySE3UFwhGBIgWBMHPJGV1Zeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760814554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WA0pTX8b7O1dmY83O6l1dpZ5fLTunngVofcJb+UYnzY=; b=JYMcsm9IDlAZQJQxUaUnu0smVVRyT4ndW+Mr0K4a2Iv6WrEUhtMazfGBlW8pKCI37J2Fk+ c+qLTXtTVzn9lYXGhVTxdH51UOj9TqqOKoYOpWYxtbCXmGtJ96rwLyoARNxg+SpJ55gZUC 229613MHAlDjYbHLwxtZDNoR8HEa8ep6QpQvBCava4/99oe2db5nZx+2loV39PksCHj68z Tr2MUZIOEYCz4DHiup7vR/jWOKSymhoaljTDuh740X1oHj0HZfxJ4TmWLg2+3KlNjFXxbL EL+zPKNldn5EFYgIKx1zmiGaD/qZaZZ6n8n4qfSp4cbxJzU0ObssG0IdNqw4/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760814554; a=rsa-sha256; cv=none; b=mi9X8FZw4ITcrbpFdpyTOM1k7Ljumxk+nT7in5aDgqcUi87Q04Ji947j5EyO2r8pni89Oo k4fzbCHC8xosidFb6d1pFkOmIf6JbiJDMuRmKkiYigT6DJUFcHL+/OhIkMD6uAqaUi9+fB PtzC0QSekC5I/apAojR8XPaBNsWa7VMKfd8O7Q78OYt4jgEZVV8hpKeYlEDkyeQ1zJx9lq yRMVnMzG/k3mpF5oR1y0Y6D+KKo/uq5rqY8oeGQjGAhrK8KNsFSZ2inHJYJyy30klaPy1O Os9tai9AwxHDb5+gAnmBE157rOnhy7zwh7qYYoXRpTH8lRFGYBIpvULL25i6hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cprpL4f4XztTC; Sat, 18 Oct 2025 19:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59IJ9EMk024088; Sat, 18 Oct 2025 19:09:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IJ9E1u024085; Sat, 18 Oct 2025 19:09:14 GMT (envelope-from git) Date: Sat, 18 Oct 2025 19:09:14 GMT Message-Id: <202510181909.59IJ9E1u024085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: 6fa18fe74461 - main - mkimg: Add a -h option and improve usage output to be more expressive List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fa18fe74461497f9a557af806552d246159272e Auto-Submitted: auto-generated The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa18fe74461497f9a557af806552d246159272e commit 6fa18fe74461497f9a557af806552d246159272e Author: Brad Davis AuthorDate: 2025-10-03 21:57:06 +0000 Commit: Brad Davis CommitDate: 2025-10-18 19:08:36 +0000 mkimg: Add a -h option and improve usage output to be more expressive Reviewed by: imp, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52906 --- usr.bin/mkimg/mkimg.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/usr.bin/mkimg/mkimg.c b/usr.bin/mkimg/mkimg.c index a7409b686560..27b79b82ca02 100644 --- a/usr.bin/mkimg/mkimg.c +++ b/usr.bin/mkimg/mkimg.c @@ -142,8 +142,10 @@ static void usage(const char *why) { - warnx("error: %s", why); - fputc('\n', stderr); + if (why != NULL) { + warnx("error: %s", why); + fputc('\n', stderr); + } fprintf(stderr, "usage: %s \n", getprogname()); fprintf(stderr, " options:\n"); @@ -171,19 +173,19 @@ usage(const char *why) print_schemes(1); fputc('\n', stderr); fprintf(stderr, " partition specification:\n"); - fprintf(stderr, "\t[/]::[:[+]]\t- " + fprintf(stderr, "\t[/