From nobody Mon Oct 13 00:27:12 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJ8H3Pj7z6BWxx for ; Mon, 13 Oct 2025 00:27:27 +0000 (UTC) (envelope-from jlduran@gmail.com) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 4clJ8F5tn1z480m 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.175 as permitted sender) smtp.mailfrom=jlduran@gmail.com Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-85e6c623ebaso65237485a.0 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=1760315245; x=1760920045; 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=smAE2hWL9zSPIWkbC8DMin7TWL+0tAUrEMdNokFGlySfB25JcJnP7iQYeRDwdaq2dF yCrp7QzAxqJyanlSmkSgMYVl9uMMgTm/OUy7mJOJHWhwXUZXmXOJGhjAYnVWSGjOPK+I 8hYrUjDLpM6ybOJJAwMiiKt6Dbj4kAezV6ruZ2JbkeidBtjRfRogrcddsqSwyxkm+uRH jnjPbRT98fL7cWWsT4xia02DpXztqsFCrrBRkCyk3j/Jv4Weq505HVmxA20Xlo/AJOiB Bk2/WztuhkrZq7Ekshd5flpq6CQDQ4I1YkYelok/WNbnrP31KtcTz3d3qQp09Q/hqZuk rl+Q== X-Forwarded-Encrypted: i=1; AJvYcCWOipS7vf9HXXdsEHqbwhilm6UnxtqpTUEzwy51XOdIQCf5WK/caXZvFP5Yt9ciKFHb8EpKE7zf4o/f0NHI7wg5O8nl@freebsd.org X-Gm-Message-State: AOJu0YzrXw3pF79KGQvghcIeFjxqbaY10KqSgtdLq3BS3V/bWyu7iHEl UO8C9sPOjYRp9rAMd5krT+1nTA+IDj0WhvMtlPoxWSvI0YkdoifOD1wjdy6oZ6vm X-Gm-Gg: ASbGncva0XS0ihEM01ELpVD98tUaCMnx+b62uWywTOCm/ywI960sjdSOeR8/99loP89 OnahyVUHCt+qk7LxbfMg56XL5wbLBnU7Y/iMcGqW1c+OwjMnEA0nfttO0mQ9KwYf7zFLkmssyI9 VdPgbsCm91enBuJbaIMBQM1VlIwQ1OvhWLNJh8Rr/5kBmNPzN40S9vzkZlQbZmrzPWFOL/fiSBf LiHFKDu2zbvMTF7awQd4mOB9Zw1NtSbCbwLfrO2HuO8j0hqZBI88sq3lubciPQAbAXtEzGpmo6C Q5fOq/PVppRJSDNIiOcRJ14cp8KY8XOFhN2mSsNlg97ZwrXSh63sZmMg4jRKaMQ+WK8pcpqTFKb 7YtWEgW+tg7e0DvMCYaQlevEAzrGCFg4GY5AoIZ9OPIoLl2FE+8PJhrCsMXpeP26JNbO74C96u3 9FfNacbg== X-Google-Smtp-Source: AGHT+IGmHV2rDGlWbDcsxceUgGr0REMga74/wMAV8YYG+7ZqQHc8oHAUitp+WQkwy/Q9t1BYXTRhjQ== X-Received: by 2002:a05:620a:1987:b0:856:9348:fd68 with SMTP id af79cd13be357-8834f3cec8dmr1749941185a.0.1760315244304; Sun, 12 Oct 2025 17:27:24 -0700 (PDT) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com. [209.85.222.174]) by smtp.gmail.com with ESMTPSA id af79cd13be357-884a2939e9esm874140785a.59.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:24 -0700 (PDT) Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-85a9d0d9170so65988985a.1 for ; Sun, 12 Oct 2025 17:27:23 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUkq9F8fvhyLyhGE+QDTEMpcemP7iiSMLMXCjp5gCe/29KFa3OetFNWE+O7aKW5us3qwvFp6hWuORdTvm75/vU//3JB@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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <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]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; REPLYTO_DOM_EQ_TO_DOM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.174:received,209.85.222.175:from]; MISSING_XM_UA(0.00)[]; HAS_REPLYTO(0.00)[jlduran@freebsd.org]; 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]; FREEFALL_USER(0.00)[jlduran]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.175:from]; FROM_HAS_DN(0.00)[] X-Rspamd-Queue-Id: 4clJ8F5tn1z480m 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 00:30:04 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCJ4pTWz6BVy7; Mon, 13 Oct 2025 00:30: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 4clJCJ49XCz48tT; Mon, 13 Oct 2025 00:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLf3lkTgoS14cJzT2JY786Mmp7+R+gnx6cKmV7p6g1s=; b=MOa47Aixx45VcvVYJfF+MRvfPDor+o3SVX0Tg42u0c/ooxghWJ6QDD2bXvtC9j1WVXI8ye W4v7yqgtVaV2BVuC+vSTJsozks7630bzSU7MgAPqxUaSeIgjEX4zmsDgs2GA0SFMMpF5Gi 45UoDhuty77YSpmnHttveeYF7N9Q+fs2vo+HFpDFZ5Vswy1nxt7HP+96T7oKYFTNqrbZVd U0AQw687juUjhGBK7MB+fW62oved3ekZHngQ+1tSF/R1vGfhiMN2FvK1M3APQoi+TCd3u9 9JjNWfQPe6k2CMfRGps/dhJtnRkIAOyiEO5prCTMniGTJWaW20i287dxPjUWlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLf3lkTgoS14cJzT2JY786Mmp7+R+gnx6cKmV7p6g1s=; b=rwNZQCiuTRvnZJCV9Hb7zPIyJ5MI4VDBDHQ7mosIEScvBZ3Gk0AwhqhN9iE7gQEzh/qPZ/ 66tM8C5JuFrB70KTjLM55C7IhrgZoGU/M6tghNFrbyNoD2g/YFklz5ndtppszW3L/HDwlT lZvU4VD1ABr7cgR2uBBrZIXqnC5pGm0UTPEXbsHY6Avrl8DjCl7Wd3bJFn7pEXR1vIhP6u sWv2leth3PeCgYEZHTTyywAQF3buU3ztDmuNGYXEi0e6SqYL98xxyxWR6XJX1UScg7HiwH aRhhzIumIRJ+GiGa/PrQWZCX3WNz7sSlBhqWEwdoQ4eEtYqG/rRjbZHH6UyP2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315404; a=rsa-sha256; cv=none; b=q1F0qmMUByn/1AdopB1O10OaHapUl9sxZFp2LcIq+K1lcjXzGN5UCtxx3XDQsVo78NZ3nv FXv2KDr9TD6J4n4c6hkE5sNp+bIDrVKaOY8bKLxfphl6MwpCsOAH3Aa52K8n29t7/gg4H1 gM202e+yLGY9RBYgh9TzauoleIJ9op+KZyp3nSM4u++i8HNmUsTMoFxeb1T8X9ERcHJ8Am Sn3iERXpWK/Yn/5reAhBRM2fkv/+a1gNZYia5RWF/ywgVEdzuU6jlMawaCo3Hp/2bcQesK RqKcgByQnNifTeX5d97oAO5WCADPVhGzNT8erLicyc5oLcCwWfPBnQaSXTAw7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCJ3Ykyzk74; Mon, 13 Oct 2025 00:30: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 59D0U4Ww042364; Mon, 13 Oct 2025 00:30:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0U4Wt042359; Mon, 13 Oct 2025 00:30:04 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:04 GMT Message-Id: <202510130030.59D0U4Wt042359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f0f57fde342d - stable/14 - kern_exit.c: do not leak reaper bitmap busy bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f0f57fde342d79aec17ef56406aa08bb1eaa1f79 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f0f57fde342d79aec17ef56406aa08bb1eaa1f79 commit f0f57fde342d79aec17ef56406aa08bb1eaa1f79 Author: Konstantin Belousov AuthorDate: 2025-10-01 03:17:31 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:42 +0000 kern_exit.c: do not leak reaper bitmap busy bits PR: 289917 (cherry picked from commit f19ef352ec63f9fcc10076a263b8ce402ba31379) --- sys/kern/kern_exit.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 0c3070f2e360..6f772b488b79 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -129,6 +129,27 @@ proc_realparent(struct proc *child) return (parent); } +static void +reaper_clear(struct proc *p, struct proc *rp) +{ + struct proc *p1; + bool clear; + + sx_assert(&proctree_lock, SX_XLOCKED); + LIST_REMOVE(p, p_reapsibling); + if (p->p_reapsubtree == 1) + return; + clear = true; + LIST_FOREACH(p1, &rp->p_reaplist, p_reapsibling) { + if (p1->p_reapsubtree == p->p_reapsubtree) { + clear = false; + break; + } + } + if (clear) + proc_id_clear(PROC_ID_REAP, p->p_reapsubtree); +} + void reaper_abandon_children(struct proc *p, bool exiting) { @@ -140,7 +161,7 @@ reaper_abandon_children(struct proc *p, bool exiting) return; p1 = p->p_reaper; LIST_FOREACH_SAFE(p2, &p->p_reaplist, p_reapsibling, ptmp) { - LIST_REMOVE(p2, p_reapsibling); + reaper_clear(p2, p); p2->p_reaper = p1; p2->p_reapsubtree = p->p_reapsubtree; LIST_INSERT_HEAD(&p1->p_reaplist, p2, p_reapsibling); @@ -154,27 +175,6 @@ reaper_abandon_children(struct proc *p, bool exiting) p->p_treeflag &= ~P_TREE_REAPER; } -static void -reaper_clear(struct proc *p) -{ - struct proc *p1; - bool clear; - - sx_assert(&proctree_lock, SX_LOCKED); - LIST_REMOVE(p, p_reapsibling); - if (p->p_reapsubtree == 1) - return; - clear = true; - LIST_FOREACH(p1, &p->p_reaper->p_reaplist, p_reapsibling) { - if (p1->p_reapsubtree == p->p_reapsubtree) { - clear = false; - break; - } - } - if (clear) - proc_id_clear(PROC_ID_REAP, p->p_reapsubtree); -} - void proc_clear_orphan(struct proc *p) { @@ -974,7 +974,7 @@ proc_reap(struct thread *td, struct proc *p, int *status, int options) sx_xunlock(PIDHASHLOCK(p->p_pid)); LIST_REMOVE(p, p_sibling); reaper_abandon_children(p, true); - reaper_clear(p); + reaper_clear(p, p->p_reaper); PROC_LOCK(p); proc_clear_orphan(p); PROC_UNLOCK(p); From nobody Mon Oct 13 00:30:05 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCK5DLGz6BWrY; Mon, 13 Oct 2025 00:30: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 4clJCK4Cjbz48rc; Mon, 13 Oct 2025 00:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=olbNBnJ+MKvQmoIasWinNn8zv7USh67F9Kcm4LqgvAA=; b=E86xcWS6vmrfwP54E4aKQzjEP0WWps46iC2u9p10cFOU4qjFZ3p9zxUBcbrV5KCtoPbbrW zwgHe/USk4NjJX+jPW0eCr/d6qJZKkUi4P4gJrx+Qq/eujPO10jt9gxU28Ss1vq3W6LEO2 tfXrsvgJJrC3L4+h5s4G+OGfb9MXR2qq7xv8HlzNA2ls+MjiSLoQILltpW3czfBDQVge68 Pu73KBvIVXYP4BYghvVud9tU670cImMM1015o0tQL/WeeajAcgwYlg962LtR7agZDYls9f YH4ZXHF1EBZVYjqiXc1ypo+8YW/n1KjtdnvKa+LlPdOYOYhizyVLiembGoqgHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=olbNBnJ+MKvQmoIasWinNn8zv7USh67F9Kcm4LqgvAA=; b=eHO+0pqmQjJ9v2VfeZFuvN9vq1oj61oLZfFgdUExa2+Epq8wRAHERFW/O3V83utFUkK5AD B99Eb8EJR+6xs8f5y3V9Egsd6OrWJp5NWIvRG5mBgGg96fyRXjmxnpStab5ZDa2AIdMFPl kV/5pUZBRMLhPumy68DGYlJfUpXuO+IE+FKZKMbAsLgPT5WgR1q6aHJeZt6Z2hqvbspAfL STNoOiCw8B2cU6/zDEGeyFzchiyVarS4J1GBz9QOgPCfteTeaJY6HH5a3POF0o031WtMml eYHRVBP4V7wJzF94MgvahcEkn/ErW+JEAsAScmY9LdJsEu06wFWHRDObH2paXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315405; a=rsa-sha256; cv=none; b=Hb7dE8Kq6AFA/Ae9+hTayhFK+fWsnPbHp1SsTIK1Sh5CFAa9F3q98CQhXCOn1RqqLAkdwF ul3YJq02ntijMrBbsGV9VhUw8R7LV96ADzhEGm4gzGgTU+gRXxtreiaSx8n30i61eqFe7D ZJXm0QF+Kju8vlZUb4Q207b+oNLgySsrvHQMM0enQv1wOxQvNr2wuKsm7ozONy6Zr8jubI lVYYfSW37eVMpmaj7+VSEDAqM5WI2qvn9xIiAFpRCLk9v4/zYLWE25VxV9M8YVj081QD3E P0mRHjDWiJkX2vDXoUa31sz0JQc8pi6j11ESBoU298aw1VRehP2w/sreiOwyTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCK3knZzkFH; Mon, 13 Oct 2025 00:30: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 59D0U5nK042627; Mon, 13 Oct 2025 00:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0U5cg042622; Mon, 13 Oct 2025 00:30:05 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:05 GMT Message-Id: <202510130030.59D0U5cg042622@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3bd1780213bf - stable/14 - kern: replace several EBADF with EINVAL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3bd1780213bf53f6229ea2f00b1b975b18652836 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3bd1780213bf53f6229ea2f00b1b975b18652836 commit 3bd1780213bf53f6229ea2f00b1b975b18652836 Author: Konstantin Belousov AuthorDate: 2025-09-07 10:59:45 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:43 +0000 kern: replace several EBADF with EINVAL (cherry picked from commit fd9e09cb2ab07993e8dc783c802f273329e70bb8) --- sys/kern/kern_event.c | 2 +- sys/kern/sys_procdesc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 50d04e1fe253..d1145c37e128 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1771,7 +1771,7 @@ kqueue_acquire(struct file *fp, struct kqueue **kqp) kq = fp->f_data; if (fp->f_type != DTYPE_KQUEUE || kq == NULL) - return (EBADF); + return (EINVAL); *kqp = kq; KQ_LOCK(kq); if ((kq->kq_state & KQ_CLOSING) == KQ_CLOSING) { diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c index 3221885c9277..ef8c397a05b6 100644 --- a/sys/kern/sys_procdesc.c +++ b/sys/kern/sys_procdesc.c @@ -132,7 +132,7 @@ procdesc_find(struct thread *td, int fd, const cap_rights_t *rightsp, if (error) return (error); if (fp->f_type != DTYPE_PROCDESC) { - error = EBADF; + error = EINVAL; goto out; } pd = fp->f_data; @@ -178,7 +178,7 @@ kern_pdgetpid(struct thread *td, int fd, const cap_rights_t *rightsp, if (error) return (error); if (fp->f_type != DTYPE_PROCDESC) { - error = EBADF; + error = EINVAL; goto out; } *pidp = procdesc_pid(fp); From nobody Mon Oct 13 00:30:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCL6FJqz6BWts; Mon, 13 Oct 2025 00:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clJCL4pvtz48yX; Mon, 13 Oct 2025 00:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nn1YvCykMmoq8BcrdjKJQoEamO/DfgaBj8xq8+CBN6M=; b=WSUZyufEY+Qqjofi+StNlKOs26+QEwImooIn8j9lWXy3xX7kqPpa3m+MbR0neaqj4gyQc6 jqJsWW38nn4z3+9bY3/2QA7OQ9DGvOs+8uFZY87Cm4JAN/kAfq1mF+OZ5UdA0bke97omT/ ppbqT8gNOVervY8q3MktNIFMs7AZ2S46UesbXo94dSHGlo49tPNFwq5UrAqjmThC+mUBTJ wArlRhuIZiX1wT2Y6ZAq91TMTCYbaAidR2njtZNqTfMEPhr4fz/2EZ3K4YbuZANqZpnh8G QYku/BODi02H9hHUCgH8Ud4MYATw4YHIIVGEcNjxw3Q1XZZw5BV+nZ9xjXGQlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nn1YvCykMmoq8BcrdjKJQoEamO/DfgaBj8xq8+CBN6M=; b=J9Vaii/W2yt94YyqOguCbJV6Ns+AWqkE3MWq+w6sUY7uxUohNoiiicx6u3g6PHQc2oaYAn lbcxBVN4lTmMNfczo5n+PXai3zAIvKemQWcIPRVWTQdsxcchcwZp27BgFCIbqe1VQm2RX6 wpYmUDFDvAhBjQvKdJzjE0Ebcov+e5JGVScXR4hx29SH4Cc9Fm/iiTGmInclP3fNiRN4OF UjsOPYyvtdWokpXpOs86TKPfVig0OurnSLhbK/aKILLQdEFIBjp6tf1nVdaGCAxTzhK9m4 OJU/q4Laaykg7i6QSXZzIB1zfqIlKO+pjYabn4/TuHfKM1If5b61unz3QGv7Vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315406; a=rsa-sha256; cv=none; b=h3aNIi1TJ0qePuSKSLwTY8b0PFaQ+JBetV03+jcyWqUF9d3ZqPDGLDYuBY4WdjRLvjvRbF OLEMmKB3LW6bxB4g2naa7Vjn4AP0JEHHX6E07jiy3GRkcsBW6ZiZMdmvPrLp2v00S6C1TL 2d4/G2iEL+IhMj2cj3r6obkLXeqUDVuFJ6aqPHLF2Ky67McaFRG52fja/BqRz9eDy+cuKh ApqQWqsrnrFTPNrpgwhi36vt1hz/P0QQh6pBeMKJQN6lAZhdoIxm5khLBHAuOyJ2M9/DeP xtEqNUIAJWNQYPq+2i4nWUgMkzLrSwVFZOXdTNkWR9elofKKgzk3lury7yHzjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCL4DdNzkNs; Mon, 13 Oct 2025 00:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D0U6MN042890; Mon, 13 Oct 2025 00:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0U6Ud042885; Mon, 13 Oct 2025 00:30:06 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:06 GMT Message-Id: <202510130030.59D0U6Ud042885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 84b512720455 - stable/14 - pdgetpid(2): switch back returning EBADF for non-procdesc fd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 84b51272045564ef63787423105334176aa6014e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=84b51272045564ef63787423105334176aa6014e commit 84b51272045564ef63787423105334176aa6014e Author: Konstantin Belousov AuthorDate: 2025-09-13 19:23:27 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:43 +0000 pdgetpid(2): switch back returning EBADF for non-procdesc fd (cherry picked from commit a85525a5c8b28f1516d49e5d6ae5842873c24643) --- sys/kern/sys_procdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c index ef8c397a05b6..b2b638b6f99f 100644 --- a/sys/kern/sys_procdesc.c +++ b/sys/kern/sys_procdesc.c @@ -178,7 +178,7 @@ kern_pdgetpid(struct thread *td, int fd, const cap_rights_t *rightsp, if (error) return (error); if (fp->f_type != DTYPE_PROCDESC) { - error = EINVAL; + error = EBADF; goto out; } *pidp = procdesc_pid(fp); From nobody Mon Oct 13 00:30:07 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCN3J4Fz6BWcf; Mon, 13 Oct 2025 00:30: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 4clJCM5gGZz48lY; Mon, 13 Oct 2025 00:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WqPF7DTi6KePXw8c9tu2gkIrdnIk26REXkvdfuNks+k=; b=ggYZBnxvaRJ0n5nc9XGgwhnbxF5tG2/IZk0B0dR02nvqp2z0nf0u9eoZEsqurkXx7rTNZd zXUKAJEMyfP//v3icAO01goRx+ichsSzykklfpZsLTNTXM3vhR1BjFIqD8q0qsD5jg/sU1 D9KVmzYNQ5hpYXmrB2gS+P6diFq3Y68NPwKIdMMoEGqRWw8VMOlYEK8GwMYaSXE0sPx3KP 96Xc1VZm0b/fnHIqhn6YE5u+Q4CWgIs9sm+lg5s1dxY5zkV6KodxnEfLYXhMc+EkwyjnPz SLQy916NR+A7hgPI+4awK9bIjBT9bfmDgQ+QjPbDHuUhUYxGz9bMennRb2goqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WqPF7DTi6KePXw8c9tu2gkIrdnIk26REXkvdfuNks+k=; b=pu+XJF/77NNgnu/Pl18GNX7jQsk7hVoEUM/zVyuL9J3t7a3WH8rjTUOHEz6Shv1hpUoV1N obzvuOh4C7e+vZCQwCbPDk30uPJqFCQSDSzrP3rsE6tZWQJAnjjZh/YbBsSAqHRs44fSSa LkmQ7mV1gkZp60aH9DYQxEa8RKQzhYKucAm39EN272Jzt7GvtWl18YSb6hHyGkfScRA3xm thkdPZZ5oLWBxLke17IbHbhTvs7mUkNq+vAYu3D1ExM/KRCHMS2HWpCoEEoIuuHw4kVJ40 pKLnx3AJ5u4P8isaNJ1580J89DTCLL/zu15q50gZM4BpXDZPJAxpA64sbmaWgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315407; a=rsa-sha256; cv=none; b=QRId4w3WsFLYQk2tkShADp/3zI+zSmlW/PmVO2iDgsBKsBkniPwAgk+HeWnq+QNLKjLbvy TYxOQuwSCIq/jZPKyYh/e/2BodN0zosNSz1frjGtf2hBKyS+hU89MF2bJXj4MxhdcKSl1W vWp28QlvDEAsroYf3T0LJjBXQZQ6FRWa7pSGnF7Lo6FOVGc3ABUgvzJJasBXuzXczUh0ZO ScPRC2Dm7PYIYl1pvJApRVc3we4mOvXZf8ck9SAggITgHHNlRApeOSjoPUk+HlkDb2Mvj8 jgPh7K+RhT0bruZHVbybP8adZAg9kF+Sjn7zKPff8GFtycElS4UNR3XQnKormQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCM5Fqfzk9S; Mon, 13 Oct 2025 00:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D0U7rE043151; Mon, 13 Oct 2025 00:30:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0U7Ow043146; Mon, 13 Oct 2025 00:30:07 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:07 GMT Message-Id: <202510130030.59D0U7Ow043146@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5f4168fa9f29 - stable/14 - vm/vm_fault.c: cleanup includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5f4168fa9f29a2985a16c34a5571c20c6775f622 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5f4168fa9f29a2985a16c34a5571c20c6775f622 commit 5f4168fa9f29a2985a16c34a5571c20c6775f622 Author: Konstantin Belousov AuthorDate: 2025-08-06 21:53:23 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:43 +0000 vm/vm_fault.c: cleanup includes (cherry picked from commit 0854b4f569e1e68032e431b1efb45b9fd9849194) --- sys/vm/vm_fault.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 3e4fe7bdae36..5eb19d4e287b 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -73,11 +73,9 @@ * Page fault handling module. */ -#include #include "opt_ktrace.h" #include "opt_vm.h" -#include #include #include #include From nobody Mon Oct 13 00:30:08 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCP1JSpz6BX1G; Mon, 13 Oct 2025 00:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clJCN6PzNz48lN; Mon, 13 Oct 2025 00:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WAFa/SYI8PzP7GHqvuITgTmG4+Oh5j4jnTnprK1gKtk=; b=vZ5SHKOeKc/dGDAF5W+RHtFk0lNkjWl7lSeLFlSrR/frXgcooXn2GjeDIRr2nlrBgxZb5E WJiObG9J7RXZZQNXY+5F9LWVDMO0yqPHjIwYcC9vE506nG3b4QKouiNcmIOG7wQAOdnWl+ fa7vPjEPQaZkJJY5hLh1O9uRHTfscaUeJy8wvDmUbnzTvLG3Zn7noIdLzoABiTvl5jx0QT 84O5CoOtYZ3qEB/R17fpgeG1SjuveGqKf3NFaoYvqJa3y8Sr/GAwFUdOqv/EKAgki04/oW XMMXAfpUZivRlPgiaL/EVKob+v0xpPKmZ1EEyyWom/8DDLEeQf7SoKZsNqpNUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WAFa/SYI8PzP7GHqvuITgTmG4+Oh5j4jnTnprK1gKtk=; b=ql9AUT+vgvGNEObTDdV4Mt+wmvGNVzXQHUi8YN/1W0Cc2hmmPqZKLZv0AJ5oJXOezdXdvH NeJcL//LJSuHLyjlqjAmbdd+KN3BG3mg2L9zkGL2dTmZa+pkLpWXAB0g1C9ACF8v9ginbl 4u5QX95LkaUVekE7KZZzopki4MEHZEeiUY1d0S5OlHUqL/1VrpadC7RVRzwxCGmTjzFwxI tktsOzMq4uhexT4qV6PXU+BLUjPw1iLJ7MPIxzR6z6iGDYzUV0LV54lCMyKo/WfQZ4N4fA jvE8nbDmfbfSOQLSjfQl8pnpFfjZVWFdH9VNfPZQIUJ4Zp5qM/QvUdadUWcz9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315408; a=rsa-sha256; cv=none; b=DyKHpFR81PXygyHqaRLm1zrwM1nnj90CvUKO3JTPGQYPP+yVS1mnT7G3VvrqLh+bQ39sVl nHS8yu45Dy8BftVuAqgoN0YHueS8//fmBcPWrP4dJn7H7vZcGOI/4LfFfZUr0MbvaMReL4 QSxqJq+6jSpAyyqT1+GrAubkLog7Z9cCBfcvGx976OGAIBwwtjHYs/qNJZbp5JVbZsZFaJ Ux6ADbrTNv5iL1j4WDy8bVZTtMB+i8oCyK2p8QoUfOX31JQuPI4e1/atmDFeP7kABlh6Hs IBdfmcwf4X7SV0P2rcfhOj/WjCRrRVtaTVQWPtkLr51iWvyncJFyVewBEr6zyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCN5Z1qzkFJ; Mon, 13 Oct 2025 00:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D0U8Rt043414; Mon, 13 Oct 2025 00:30:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0U8Dj043409; Mon, 13 Oct 2025 00:30:08 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:08 GMT Message-Id: <202510130030.59D0U8Dj043409@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3126c57163fb - stable/14 - vm_fault: drop never-true busy_sleep test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3126c57163fbbeb0d013d9c04d87a44a458b3f07 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3126c57163fbbeb0d013d9c04d87a44a458b3f07 commit 3126c57163fbbeb0d013d9c04d87a44a458b3f07 Author: Doug Moore AuthorDate: 2025-07-06 20:46:00 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:44 +0000 vm_fault: drop never-true busy_sleep test (cherry picked from commit 2d6185cf87e815d4951a9ddcf5c535ebd07a8815) --- sys/vm/vm_fault.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 5eb19d4e287b..32c3d698b085 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1423,8 +1423,7 @@ vm_fault_busy_sleep(struct faultstate *fs) } vm_object_pip_wakeup(fs->object); vm_fault_unlock_map(fs); - if (fs->m != vm_page_lookup(fs->object, fs->pindex) || - !vm_page_busy_sleep(fs->m, "vmpfw", 0)) + if (!vm_page_busy_sleep(fs->m, "vmpfw", 0)) VM_OBJECT_UNLOCK(fs->object); VM_CNT_INC(v_intrans); vm_object_deallocate(fs->first_object); From nobody Mon Oct 13 00:30:10 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCR3xRFz6BWrp; Mon, 13 Oct 2025 00:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clJCR0bq0z495J; Mon, 13 Oct 2025 00:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XCRiAn9nabcD0dJPTWBquWgH96qiKnce6lmJ9JWBGl4=; b=hm8hd+oZAAX4zfZayMz4tk7IIAskf8b+1HsnAYUu3Z1vdFhAtSr/rx41gdIDaRKVFg8ueJ PY4J1beaD5RBNZ1KxlAMdmmc1kUryPl9wAMhkwn4VPRU6TO5OWtoaiX5r2VcZHxbVPiOfZ C1rJGetEGEZTQ/L/WIJnf1os1CDtqBg3Snd3sRqwR8WHGj+kOYKIE/dF1w8XdQyKlX5uWF yPi2SpYvR9/pkDLf9R6yiFeUv1KhBz+/EdTW8hmyTMaZk6hYSyzbEy9IgzH18dg2OSD4Kg jIcWdSZZsxJ28Nou2ZRxurDa5OlzB6DVlOwz7MOxugttYaMwE4l4qffpRVoaFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XCRiAn9nabcD0dJPTWBquWgH96qiKnce6lmJ9JWBGl4=; b=cDq5ASrgtOOM7+akyuxBsNiGHo4q8lJW32IP63oT2o3DOLLElRs6Sv/zyDpk0s2asdsnWD pw7dy+FG4Kzc/3qml+DM9QJY/lYa70hTvSHJI4ILxTvn8Cb7GR6AFoXSP5lhun/f2DmK77 6T7vygZeHNVZoAFAoJbKobN9HcC5m2sid/UhaM8gBfjaYRFVV5G9b0QaNJw1C6kx3rUZev vGC7p9BQztBnT3xAvnh1I2yW2O8QSH8vosrTwffuTOFxcPR09IgOerDS+9ebmlpNdvwpyE Fh4hRQCXJ6tidbKTXdi4CMmlTbAdjuzHDPdPa5qBQtGBKZUK61wKDRrsdBNZew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315411; a=rsa-sha256; cv=none; b=bzN8WqdF31uQ8EMHD7W8q2k6slyokSVd8j0AZxiEphbrDLTNPlgBCUt5nC5C3zFqUi3SDW pHnP3A/WdsXngOW44aHmRCGNWIEiXU1SbmHMPwMC8BeFFfVx9FeMIX3GGugPIvnPtnTD74 f0ZTyjNyuWK2Py2IdnGHrbfci/Dv1Y8DzVReScKKV9DtqdY7QST93/O0rGwKG8JrXG1PSy Z+q72dyNjH48xQW2EJkjyMNgdZlnsUaQ/bnjJvmjqMp/xsyX9zeVFH4YyqniRJ6UN+VNUe OwTdRC5A//XZIRTm5bvwBKpMWZdon4KgyO0jOpNOrCJnh+K6z6/hKuRi82L7gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCQ72kBzkFK; Mon, 13 Oct 2025 00:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D0UAm2044612; Mon, 13 Oct 2025 00:30:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0UA48044606; Mon, 13 Oct 2025 00:30:10 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:10 GMT Message-Id: <202510130030.59D0UA48044606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e7422f7dfd0e - stable/14 - vm_fault: add vm_fault_might_be_cow() helper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e7422f7dfd0e4c1f0db5560f171260d78bad9383 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e7422f7dfd0e4c1f0db5560f171260d78bad9383 commit e7422f7dfd0e4c1f0db5560f171260d78bad9383 Author: Konstantin Belousov AuthorDate: 2025-08-14 03:39:05 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:45 +0000 vm_fault: add vm_fault_might_be_cow() helper (cherry picked from commit 5bd4c04a4e7f7bda657e6027e64675d0caf50715) --- sys/vm/vm_fault.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 89acbb0095e9..796b4c44b3f9 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -259,6 +259,12 @@ vm_fault_unlock_vp(struct faultstate *fs) } } +static bool +vm_fault_might_be_cow(struct faultstate *fs) +{ + return (fs->object != fs->first_object); +} + static void vm_fault_deallocate(struct faultstate *fs) { @@ -266,7 +272,7 @@ vm_fault_deallocate(struct faultstate *fs) vm_fault_page_release(&fs->m_cow); vm_fault_page_release(&fs->m); vm_object_pip_wakeup(fs->object); - if (fs->object != fs->first_object) { + if (vm_fault_might_be_cow(fs)) { VM_OBJECT_WLOCK(fs->first_object); vm_fault_page_free(&fs->first_m); VM_OBJECT_WUNLOCK(fs->first_object); @@ -990,7 +996,7 @@ vm_fault_cow(struct faultstate *fs) { bool is_first_object_locked; - KASSERT(fs->object != fs->first_object, + KASSERT(vm_fault_might_be_cow(fs), ("source and target COW objects are identical")); /* @@ -1154,7 +1160,7 @@ vm_fault_zerofill(struct faultstate *fs) * If there's no object left, fill the page in the top * object with zeros. */ - if (fs->object != fs->first_object) { + if (vm_fault_might_be_cow(fs)) { vm_object_pip_wakeup(fs->object); fs->object = fs->first_object; fs->pindex = fs->first_pindex; @@ -1417,7 +1423,7 @@ vm_fault_busy_sleep(struct faultstate *fs, int allocflags) * likely to reclaim it. */ vm_page_aflag_set(fs->m, PGA_REFERENCED); - if (fs->object != fs->first_object) { + if (vm_fault_might_be_cow(fs)) { vm_fault_page_release(&fs->first_m); vm_object_pip_wakeup(fs->first_object); } @@ -1711,7 +1717,7 @@ found: * top-level object, we have to copy it into a new page owned by the * top-level object. */ - if (fs.object != fs.first_object) { + if (vm_fault_might_be_cow(&fs)) { /* * We only really need to copy if we want to write it. */ From nobody Mon Oct 13 00:30:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCQ3z7hz6BVyK; Mon, 13 Oct 2025 00:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clJCQ1KK5z48td; Mon, 13 Oct 2025 00:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QxPCMkwHwdWf7emq72ke/mU8KXo7gaC9ADtWazc/+z8=; b=Slytu+f51HH1rgmHQqmewWPyZsnX7p1YbE5XhhvmNsVGcO48JgADm4RtL4rP3LOh1XcGQi EZsbSE8oFlBa5dkW4ADkxc5fuIrOuktLbFqOQP7jZapsLSyY7qsOxMRHu8WLER2zGJJ0dz udiJ+3JXuFkBrSpbNfKWuyXF7UpXtd9av2bxBVpXeiC4VQsEL42GcuoostuvH98hiFMVTE /kSnT/j4vojmrr5di2I6B+RzksxzIscYbmHn3puS4OpNI14B+A0nSasP9daUVAGxjYxW9h +crOLZ6tW1hAadEFdwvLUbsb/KQo0UCOsxSCNGeWVtt0OJuvXAxM6iqzM8BcLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QxPCMkwHwdWf7emq72ke/mU8KXo7gaC9ADtWazc/+z8=; b=o1uO0SN9C03QgoRS8tdgH3AYLf6B5N7U07P0DPdGTkXGk+7EaojPshw5mp2Grh9lvot3Pq 239+b+8mPrUL+hq7ulMhAt6hNpy6E2tQ6CquApk+TQoe6byo4RT1VMZKEApA+Q6tEe/W8M BRn23C4+AzidviNuAXoAtJMrHpk73Kt+sRjb7iGK1+/k3HwYp/3Y2/z1L8vQaCeniRkGDf oc0+xOJwKz4aawyUhcqtMLgPLKqMPff2oQ7YUNnzJzHIkrQZHiqMLJgtcgBDLMzBmQPaM1 x+GBla8FKgC7ZRmQupYjeJ8Otaro8+85mYOauJeP8kNoBcCWNEBNkQJtzDdE4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315410; a=rsa-sha256; cv=none; b=jA4nsX45gr/LVjD8VxuxKqy6QVv7wUplFBh12tqvHSWb2PRTfHW2BD+jzZFNNcMHvCcttS t+TkAx2gN23pYtuiBJzAge1gFjGt+/GJUOiYV5UiPemvRjBOKxBlQoGCnu3Gtag+x21g+p W0Wr4exG83SY1OoT76OUxoDd0UwB9zlzJKKl+gEo+1LUoUS+ZfhbZro+62A1KneL63Nc1T sayleu1sm4fgzM/bLdDz3Zdipde6M5FBB+K276IBDeuWFNMRs9ygPFEGUJcchJuD4ys8/h S3qNHV33049inD7NpTTsHE8tgttq1a5/Mb33Rv2/ft/SronyUNZqiYMmbzJGFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCQ0BHMzkcB; Mon, 13 Oct 2025 00:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D0U9l9043934; Mon, 13 Oct 2025 00:30:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0U9eK043929; Mon, 13 Oct 2025 00:30:09 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:09 GMT Message-Id: <202510130030.59D0U9eK043929@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 4b938ed09069 - stable/14 - vm_fault_busy_sleep(): pass explicit allocflags for vm_page_busy_sleep() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4b938ed09069e24e6c2714b62b4b5559081da67b Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b938ed09069e24e6c2714b62b4b5559081da67b commit 4b938ed09069e24e6c2714b62b4b5559081da67b Author: Konstantin Belousov AuthorDate: 2025-08-06 21:49:10 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:44 +0000 vm_fault_busy_sleep(): pass explicit allocflags for vm_page_busy_sleep() (cherry picked from commit c6b79f587f27649f90e00bc131d37bafa50ffc62) --- sys/vm/vm_fault.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 32c3d698b085..89acbb0095e9 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1409,7 +1409,7 @@ vm_fault_getpages(struct faultstate *fs, int *behindp, int *aheadp) * page except, perhaps, to pmap it. */ static void -vm_fault_busy_sleep(struct faultstate *fs) +vm_fault_busy_sleep(struct faultstate *fs, int allocflags) { /* * Reference the page before unlocking and @@ -1423,7 +1423,7 @@ vm_fault_busy_sleep(struct faultstate *fs) } vm_object_pip_wakeup(fs->object); vm_fault_unlock_map(fs); - if (!vm_page_busy_sleep(fs->m, "vmpfw", 0)) + if (!vm_page_busy_sleep(fs->m, "vmpfw", allocflags)) VM_OBJECT_UNLOCK(fs->object); VM_CNT_INC(v_intrans); vm_object_deallocate(fs->first_object); @@ -1468,7 +1468,7 @@ vm_fault_object(struct faultstate *fs, int *behindp, int *aheadp) fs->m = vm_page_lookup(fs->object, fs->pindex); if (fs->m != NULL) { if (!vm_page_tryxbusy(fs->m)) { - vm_fault_busy_sleep(fs); + vm_fault_busy_sleep(fs, 0); return (FAULT_RESTART); } From nobody Mon Oct 13 00:30:11 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCS4vHhz6BWfx; Mon, 13 Oct 2025 00:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clJCS18d4z49Dv; Mon, 13 Oct 2025 00:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3xSv2VAVvKoZ8rEAg4jeH+LP6+g5Fu5O95dEOYZHDw=; b=Z+Ggk46/9nerdhlH3zNFrk2+iSfD3/U3cjcULSjt5uQHXZEU0yIT1KPAtXvjC5K0G57lVd 827sWg+El5dGE8+km/1r4xspM6VmI+agaIJ0tLJJjIM3TtOQ8vTOXHqwM9SdtJMAlEg1Hy hrqGsNvlZZ22fq23kp7E/ODkvgOtp+QrsRvJDtqopnSMkmtk7yPwfketiP/Fgn7uLiI3sB R67sjutRWbPmwmhIXFqKUkqfynKdqS7JTitedsXGuZ0cgx5WzuLkbDn4EujxRD554QuDSE w8YDHB7emUbZ3cJlZvCBotFY9Eiut43dLUo1S2594X8LG3S4KNb5+SNQoVvPhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3xSv2VAVvKoZ8rEAg4jeH+LP6+g5Fu5O95dEOYZHDw=; b=Pnxn1Ag8hewCoIS56UGMNFnlEBmvBQ/iTuKWuo29nINGcbjjiZiirAplaJWpi2elQor31K oj5JmzD8lzay6k0VW5Kiu2lmDIXJ9Mx6EZ6d+sGxOcswQBCqzfynUu5wGvJNvSggMWOvf7 w9Z2S51uCgR1lJt4hGgYDfj7+SHjIHd0qWFA8Aa5WgaSe4oisD+VFk+tPNIrEyb06A7+I6 ilL5Q8Ua2pTzcZySqZeIytnKf+dKB6pFe+qkps68fEYvyBXzSxef0D8tPY+gBCBP+nJHCI 25QS96lootalq8EXAE3sjvJ792WL5EyxCQoYsi6rial2SZWr0zFkWukracYbcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315412; a=rsa-sha256; cv=none; b=APDq3dscdxs8euRmP9QphJH/U0sFsWA6jGlUca8cRx0T3lXaP+ViAQfRz2Oj0JP54N5j+e tAArSP7KkizbOtdX/FldUaSeAJRhFtubfj9Yf7OSO17tytWasHfwgKUrRMO9keIQnvSH39 k6ugkzbZjoCEpSXDEwO3rZUhNEPHTOKRe1ix5FHZclpu5kfUTjfAaN+/iogkSvSxRZ6siY V6TnxY+hp8RhpGwSLZ3prLz1GVX7tqXv8KwBfLfFnKz51bzrmiLBTeUl2mHm9ZCkIiEMsQ TSWr+ZoAjndsiGaDm9JnXz/OLTqdNAmuaCGrhZhENvcAJl65k8cbkW+jpySFeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCS0VRbzkcC; Mon, 13 Oct 2025 00:30: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 59D0UBkj045241; Mon, 13 Oct 2025 00:30:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0UBxl045236; Mon, 13 Oct 2025 00:30:11 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:11 GMT Message-Id: <202510130030.59D0UBxl045236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f4d5c6d65168 - stable/14 - vm_fault: add helper vm_fault_can_cow_rename() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f4d5c6d65168d3d9b99a2332d854c14b231188e6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f4d5c6d65168d3d9b99a2332d854c14b231188e6 commit f4d5c6d65168d3d9b99a2332d854c14b231188e6 Author: Konstantin Belousov AuthorDate: 2025-07-24 10:47:52 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:45 +0000 vm_fault: add helper vm_fault_can_cow_rename() (cherry picked from commit 3f05bbdbd80f2eefb647e595dc73e80d6186d6a5) --- sys/vm/vm_fault.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 796b4c44b3f9..9ba96ab888d6 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -991,6 +991,16 @@ vm_fault_relookup(struct faultstate *fs) return (KERN_SUCCESS); } +static bool +vm_fault_can_cow_rename(struct faultstate *fs) +{ + return ( + /* Only one shadow object and no other refs. */ + fs->object->shadow_count == 1 && fs->object->ref_count == 1 && + /* No other ways to look the object up. */ + fs->object->handle == NULL && (fs->object->flags & OBJ_ANON) != 0); +} + static void vm_fault_cow(struct faultstate *fs) { @@ -1008,15 +1018,7 @@ vm_fault_cow(struct faultstate *fs) * object so that it will go out to swap when needed. */ is_first_object_locked = false; - if ( - /* - * Only one shadow object and no other refs. - */ - fs->object->shadow_count == 1 && fs->object->ref_count == 1 && - /* - * No other ways to look the object up - */ - fs->object->handle == NULL && (fs->object->flags & OBJ_ANON) != 0 && + if (vm_fault_can_cow_rename(fs) && /* * We don't chase down the shadow chain and we can acquire locks. */ From nobody Mon Oct 13 00:30:14 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCV5Cvlz6BWg1; Mon, 13 Oct 2025 00:30: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 4clJCV1ykRz49H8; Mon, 13 Oct 2025 00:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xGzxVSN5LSnkuOtQxUJxPZIt5c7qpbw7CgYJcAD3mDE=; b=CpnyqXJMmGKtoNksZW6rukBRpidfRmm41C2HrsdGx4HQXntpR+QFj6FuWPmrWly4MQlS2B gbw3uIVbCeMhgHDk73p7VTKh9cvkCMYiNjuCpDK7WMp7t4s64jxtv5tgNY9dO5NS0MzOpm HOglSTjbUUiLDgRzutFTXE8LZeg8V7p/OGEj4jml9QorAtYsjpY6MDF5mZeoYd913oUVFJ DyUBKc8LSp0WB4ZNW7O/hZ1VZFoJjuNPBRUHkzjC735cFYTZwX2NhBmjY3b2LJRBt2GTLK pTmmmXBu5xaY8njFkwDNGiws0WxsL9wZoyuEYM5bvo4EPByONhmLfRMbWX9yJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xGzxVSN5LSnkuOtQxUJxPZIt5c7qpbw7CgYJcAD3mDE=; b=qyuj3jHAsYSYfDLE2aAZ/+PgRgMkvhREuLZfY7sHQ7tfGrD4jstA3N7a6Fnl4/c1V1S24u IYIlUL50YLGUitzigfXtimQHnXbLj8BCVbhSNZDfVNI3TxKctPN4nszJbyqYIQJRDJTjDB JArxCst+tsEvNfeGrkJ+R7oY+86YQQMmnm0blWCLhUlgCmGKRixdX3ddXLSZssPQIyJW9K 4EqDY4YrDr1iNNKUHS0jRxV9GTKqd0+bW15n1IzWmAAk3JR3dZLBUOGmS3CzROPqy0H+90 SQ8qwIkOKq8vOFkL7A4gfHOVyYBq28AF7ki72Bp6Xa5tDqgMynIEywH9ZtdpJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315414; a=rsa-sha256; cv=none; b=noGNk304hzZlzTxmXidIpJXYqZy/zH6aQsETqFS4o4dcTFF3cuMSmDZrBpPuJ8dI404/wQ 0miC5YqZf6EeB3dKPi00sZiTSIkzXJWGjhi+uQFEenpjQypxaDZoqKvL2enZDlw/7815wz n0rQKKj2YBkjXub7W9C1R+GszAYISolXyOEzEbz/AhP7O5EDWjJw6LtlRa3Um3bLpPYD57 Z9ZbZpQXwuhRfSfA7hfZADw9MJkmhh0M5VexbFOnGESPOvMrmAxDRCditZvJhWAlLNRMw0 pSwABQk5AvTq4euZuNZHHiA6GURA+P7kldGDNvsigIKGHbwFgkDD2ibP1KXb2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCV1Sr8zkNt; Mon, 13 Oct 2025 00:30: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 59D0UEbl046552; Mon, 13 Oct 2025 00:30:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0UEcH046545; Mon, 13 Oct 2025 00:30:14 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:14 GMT Message-Id: <202510130030.59D0UEcH046545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d1cdb4a087e6 - stable/14 - vm_fault: assert that first_m is xbusy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d1cdb4a087e69e1515a855a928ced8a18f9b75f9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d1cdb4a087e69e1515a855a928ced8a18f9b75f9 commit d1cdb4a087e69e1515a855a928ced8a18f9b75f9 Author: Konstantin Belousov AuthorDate: 2025-08-05 15:46:56 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:46 +0000 vm_fault: assert that first_m is xbusy (cherry picked from commit a38483fa2b3a26414d3409b12dd35ac406c44cea) --- sys/vm/vm_fault.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index f6e75629864e..aad112a652ed 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1785,6 +1785,11 @@ found: /* * A valid page has been found and busied. The object lock * must no longer be held if the page was busied. + * + * Regardless of the busy state of fs.m, fs.first_m is always + * exclusively busied after the first iteration of the loop + * calling vm_fault_object(). This is an ordering point for + * the parallel faults occuring in on the same page. */ vm_page_assert_busied(fs.m); VM_OBJECT_ASSERT_UNLOCKED(fs.object); @@ -1887,6 +1892,9 @@ found: (*fs.m_hold) = fs.m; vm_page_wire(fs.m); } + + KASSERT(fs.first_object == fs.object || vm_page_xbusied(fs.first_m), + ("first_m must be xbusy")); if (vm_page_xbusied(fs.m)) vm_page_xunbusy(fs.m); else From nobody Mon Oct 13 00:30:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCT6PNnz6BWg0; Mon, 13 Oct 2025 00:30: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 4clJCT1TtVz49Bf; Mon, 13 Oct 2025 00:30:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vISPoWGQOuOFpF5JnLp+NqhGqj8hrAUoihUqt+YGi+E=; b=MAc/HClJes9ydeDkIP6GjYoGLrhLtSZzPC4Y8NAmfSQhVS9mR0Auc0WqekBWacLVz8gZw+ 0fN+/uDrC/bfRgmJzk9/jsiooDKg55L1/4RdHZe+hMYV/taYpNrsiKFfTrhJ4dgRwGUKu2 UdCu/OjN84eQbHahI1ksJDktpVdj3M/aqGwRmQ7R2qnx3fbEGyLpVRu9IGnwoEZmUEhK/c hUT7fqgNv8s5rtj8pM80HmXsm3i6aoGb+RjjHKxUUJKb+jhK4mFbNUkSKTSIQuohB8uV5m jUMYvV7rEFR0+lPZ4hpnJAo1foNH7sW+U7LO55LcaxrHQc8jimozlrEItFBeaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vISPoWGQOuOFpF5JnLp+NqhGqj8hrAUoihUqt+YGi+E=; b=CuI2QzZKjhNxJx9JWJTIG5NgRusNEpuPpb9OistmKdfE0Y1slf0b2irB6zyi8vmv6V/ypo ImNgPAwTMSeBeKqdqPzkDVc0Gu+IwlEtbuTpzNC5ZhmmS261QMAWvewVl91uyrl9leWbpZ v7GnslvC617wA22WcsAk60nwhfWaDZ8U5mX6LVI25TP2dcG7pCkW23+9EJHEuzEG9cg829 mnYnXwAxdeULA0HECudH40u1AhlGyTSlUjUq2hUyKcotPoDsKzjMGRuYWF8MHWIixz5b52 RFSQ+Y2yrWqCw0BUhRHjFNhLWYGkTeTkbW8rolyBe66yrTo8Y5lw2evjRDhc3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315413; a=rsa-sha256; cv=none; b=f798y45SJvHy/hRfPRtVJ9f2quZzWJQ/dzOjyzkcGGX3Wh22D2LGV2dVuHWHTUFzTjAW7h LMynVSNJECyoLulMMxrhLhIrFrlbQTL7mcDUdTHKlbmvDx4KBwqA/s0LACjR7qt+eat+FJ TLbem92+N6Y/vOy9D7Op3PufvANZuPZY3/ee/iZahgdmS01tDgiTRXNyNWtdDnmHFzDZ1h p3/Dxjo6wuuDJ3LVliaq/ntm60s3XVY2aSmSLFSk2ya8V1T5Y/wb30LZZXiRE0RpTEbg4N avGvH3RWOwoJ21i50bTfcYgMnouPZfVmrT9udgqC1Ly8+7n8krZBpB3gPD0s3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCT0yRhzjsS; Mon, 13 Oct 2025 00:30: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 59D0UDkC045882; Mon, 13 Oct 2025 00:30:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0UDVd045875; Mon, 13 Oct 2025 00:30:13 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:13 GMT Message-Id: <202510130030.59D0UDVd045875@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 94ea60483bcc - stable/14 - vm_fault: try to only share-busy page for soft faults List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 94ea60483bcc0681e351901d1e466547a275a6da Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=94ea60483bcc0681e351901d1e466547a275a6da commit 94ea60483bcc0681e351901d1e466547a275a6da Author: Konstantin Belousov AuthorDate: 2025-07-23 10:44:29 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:45 +0000 vm_fault: try to only share-busy page for soft faults (cherry picked from commit 149674bbac5842ac883414a6c1e75d829c70d42b) --- sys/vm/vm_fault.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 93 insertions(+), 15 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 9ba96ab888d6..f6e75629864e 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -203,7 +203,10 @@ vm_fault_page_release(vm_page_t *mp) * pageout while optimizing fault restarts. */ vm_page_deactivate(m); - vm_page_xunbusy(m); + if (vm_page_xbusied(m)) + vm_page_xunbusy(m); + else + vm_page_sunbusy(m); *mp = NULL; } } @@ -334,6 +337,13 @@ vm_fault_dirty(struct faultstate *fs, vm_page_t m) } +static bool +vm_fault_is_read(const struct faultstate *fs) +{ + return ((fs->prot & VM_PROT_WRITE) == 0 && + (fs->fault_type & (VM_PROT_COPY | VM_PROT_WRITE)) == 0); +} + /* * Unlocks fs.first_object and fs.map on success. */ @@ -1004,7 +1014,7 @@ vm_fault_can_cow_rename(struct faultstate *fs) static void vm_fault_cow(struct faultstate *fs) { - bool is_first_object_locked; + bool is_first_object_locked, rename_cow; KASSERT(vm_fault_might_be_cow(fs), ("source and target COW objects are identical")); @@ -1018,13 +1028,29 @@ vm_fault_cow(struct faultstate *fs) * object so that it will go out to swap when needed. */ is_first_object_locked = false; - if (vm_fault_can_cow_rename(fs) && - /* - * We don't chase down the shadow chain and we can acquire locks. - */ - (is_first_object_locked = VM_OBJECT_TRYWLOCK(fs->first_object)) && - fs->object == fs->first_object->backing_object && - VM_OBJECT_TRYWLOCK(fs->object)) { + rename_cow = false; + + if (vm_fault_can_cow_rename(fs) && vm_page_xbusied(fs->m)) { + /* + * Check that we don't chase down the shadow chain and + * we can acquire locks. Recheck the conditions for + * rename after the shadow chain is stable after the + * object locking. + */ + is_first_object_locked = VM_OBJECT_TRYWLOCK(fs->first_object); + if (is_first_object_locked && + fs->object == fs->first_object->backing_object) { + if (VM_OBJECT_TRYWLOCK(fs->object)) { + rename_cow = vm_fault_can_cow_rename(fs); + if (!rename_cow) + VM_OBJECT_WUNLOCK(fs->object); + } + } + } + + if (rename_cow) { + vm_page_assert_xbusied(fs->m); + /* * Remove but keep xbusy for replace. fs->m is moved into * fs->first_object and left busy while fs->first_m is @@ -1081,8 +1107,12 @@ vm_fault_cow(struct faultstate *fs) * address space. If OBJ_ONEMAPPING is set after the check, * removing mappings will at worse trigger some unnecessary page * faults. + * + * In the fs->m shared busy case, the xbusy state of + * fs->first_m prevents new mappings of fs->m from + * being created because a parallel fault on this + * shadow chain should wait for xbusy on fs->first_m. */ - vm_page_assert_xbusied(fs->m_cow); if ((fs->first_object->flags & OBJ_ONEMAPPING) == 0) pmap_remove_all(fs->m_cow); } @@ -1475,6 +1505,51 @@ vm_fault_object(struct faultstate *fs, int *behindp, int *aheadp) */ fs->m = vm_page_lookup(fs->object, fs->pindex); if (fs->m != NULL) { + /* + * If the found page is valid, will be either shadowed + * or mapped read-only, and will not be renamed for + * COW, then busy it in shared mode. This allows + * other faults needing this page to proceed in + * parallel. + * + * Unlocked check for validity, rechecked after busy + * is obtained. + */ + if (vm_page_all_valid(fs->m) && + /* + * No write permissions for the new fs->m mapping, + * or the first object has only one mapping, so + * other writeable COW mappings of fs->m cannot + * appear under us. + */ + (vm_fault_is_read(fs) || vm_fault_might_be_cow(fs)) && + /* + * fs->m cannot be renamed from object to + * first_object. These conditions will be + * re-checked with proper synchronization in + * vm_fault_cow(). + */ + (!vm_fault_can_cow_rename(fs) || + fs->object != fs->first_object->backing_object)) { + if (!vm_page_trysbusy(fs->m)) { + vm_fault_busy_sleep(fs, VM_ALLOC_SBUSY); + return (FAULT_RESTART); + } + + /* + * Now make sure that racily checked + * conditions are still valid. + */ + if (__predict_true(vm_page_all_valid(fs->m) && + (vm_fault_is_read(fs) || + vm_fault_might_be_cow(fs)))) { + VM_OBJECT_UNLOCK(fs->object); + return (FAULT_SOFT); + } + + vm_page_sunbusy(fs->m); + } + if (!vm_page_tryxbusy(fs->m)) { vm_fault_busy_sleep(fs, 0); return (FAULT_RESTART); @@ -1708,10 +1783,10 @@ RetryFault: found: /* - * A valid page has been found and exclusively busied. The - * object lock must no longer be held. + * A valid page has been found and busied. The object lock + * must no longer be held if the page was busied. */ - vm_page_assert_xbusied(fs.m); + vm_page_assert_busied(fs.m); VM_OBJECT_ASSERT_UNLOCKED(fs.object); /* @@ -1780,7 +1855,7 @@ found: * Page must be completely valid or it is not fit to * map into user space. vm_pager_get_pages() ensures this. */ - vm_page_assert_xbusied(fs.m); + vm_page_assert_busied(fs.m); KASSERT(vm_page_all_valid(fs.m), ("vm_fault: page %p partially invalid", fs.m)); @@ -1812,7 +1887,10 @@ found: (*fs.m_hold) = fs.m; vm_page_wire(fs.m); } - vm_page_xunbusy(fs.m); + if (vm_page_xbusied(fs.m)) + vm_page_xunbusy(fs.m); + else + vm_page_sunbusy(fs.m); fs.m = NULL; /* From nobody Mon Oct 13 00:30:15 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJCW3tf8z6BX2s; Mon, 13 Oct 2025 00:30: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 4clJCW2Pxcz49Kj; Mon, 13 Oct 2025 00:30:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6lPH01/exVEKha5/248S7SCCnQn4IhoLFcDPFGo9ukE=; b=mfpgX3bJMgl6jykmW8yxR6QFP07mvK87VnAHyPQzMSoIA9r7ak2H7ntdjPaUBsORgES5FB Gja2N1b178iUi5xzjcGZp0Vm7G2mRyHBK4eZkOLfSaoDueIxYg46f2StLEe0tP2Ne71jhf FGEa1UjxsQ47hUmYRrEp+PwVQZ4FVVwZKWVf0cn67OMo+RoRBo0rllvgLh3GthKimvBHZX W6UeOfhqfq7JgAcZaGV3qorIsulATMAoJ58xeP3/BCCVNpDMLRLBs+omNGvZ15Uo81/gUX PL5Z46CKR2LM1biBYduzSlseoAj6pT9HS/W1EpYTO8o6Q3rBYSynqxSabh6DPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6lPH01/exVEKha5/248S7SCCnQn4IhoLFcDPFGo9ukE=; b=ROXZ9IAMy0UF4z/6pdoSCYCLi6HdKxnr/w6uLlcNBJcmra+pKv9rmiM3DJT2Z46NCTMIHJ 8jcVRtc36Gry72W20xVpfEW06YiwRqjA+w8Itv7aqBnFVflJsgUFq5aUabWyrFxTbyDTSd mS6BO4RTt57cc9WESi4z+7N8I0oWB4TLs8Xm7g0Yu6xAYHD9rQ140Dz2rYrtQNHlCAPkOX cf5J3TG5duQPfJURNIEVLJvaLEFHyCQfdompTwyBkEJRoce0QL/9+LlYkwVA3PrT7wwyrW BTMrcT1SxqAIiRuSi+X+yrdqO0JxNiInQmOdngmX7l/CsFVceETP7fYn9OKPlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315415; a=rsa-sha256; cv=none; b=OG+E3swu0ljwxxQqK5SASKaCF1W8H19y5EbuEUfKOZPWkMjgJeyQNMKwt0e95fjFVkMdoB rE2KyErtoOEBaPjkMwdcptS2pVAzDgX5k3y/taBr9Ch/oOjHHS3V62ouluvZ/UWqqxtqoB m5cuWUITt8+yZzkRRBljD3sm0L7HmRgPabCcVOgvgtEdn2o6X04Q7Fb9IasFHLliRMDHka RYzhLzrH++mYw5RmeQjrQxPyzkM3ZTJ9gtWhMFUDvZgthb0fQhfhmhHnwUH2WjDYi0S1pe PT/NuDESEus+3rFmru2jDvdr14oUZqrgZ8Uv7/xGQRaZkBbqc6+f9+Ap8FSnTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJCW1zSjzjvr; Mon, 13 Oct 2025 00:30: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 59D0UFoE047234; Mon, 13 Oct 2025 00:30:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0UFtZ047223; Mon, 13 Oct 2025 00:30:15 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:15 GMT Message-Id: <202510130030.59D0UFtZ047223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0c7c1c27ea9e - stable/14 - vm_fault_busy_sleep(): update comment after addition of allocflags arg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c7c1c27ea9eed8aefa236daa13eabb5bd050cfc Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0c7c1c27ea9eed8aefa236daa13eabb5bd050cfc commit 0c7c1c27ea9eed8aefa236daa13eabb5bd050cfc Author: Konstantin Belousov AuthorDate: 2025-09-15 00:52:47 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:46 +0000 vm_fault_busy_sleep(): update comment after addition of allocflags arg (cherry picked from commit f1b656f14464c2e3ec4ab2eeade3b00dce4bd459) --- sys/vm/vm_fault.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index aad112a652ed..9f7176eebabb 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1440,11 +1440,10 @@ vm_fault_getpages(struct faultstate *fs, int *behindp, int *aheadp) * and we could end up trying to pagein and pageout the same page * simultaneously. * - * We can theoretically allow the busy case on a read fault if the page - * is marked valid, but since such pages are typically already pmap'd, - * putting that special case in might be more effort then it is worth. - * We cannot under any circumstances mess around with a shared busied - * page except, perhaps, to pmap it. + * We allow the busy case on a read fault if the page is valid. We + * cannot under any circumstances mess around with a shared busied + * page except, perhaps, to pmap it. This is controlled by the + * VM_ALLOC_SBUSY bit in the allocflags argument. */ static void vm_fault_busy_sleep(struct faultstate *fs, int allocflags) From nobody Mon Oct 13 00:32:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clJG24xNvz6BX4H; Mon, 13 Oct 2025 00:32: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 4clJG23pnyz3DNN; Mon, 13 Oct 2025 00:32:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ur9SWKqZnmWkzHN3h+mBvAvFzOk2d5ZNriGzwZCWkg0=; b=P2Yfh1AU9pKeIvKR6W7Zuk3vOV+Uz2OLIsNBVw9YI0JGVfG6hHhjt+jPjwsAQBVivyXS2y nABKt1ZetAhgLCTFVDKWpfFSHypiW8KHCOeC/u8ad3aI/r4mSQpBMg4CdjkJl0FZpxE4XS rS4XCnbTN1B+TtOC3mPOVFcXUWl34iwCTtwyCd0jQDfRoRh9SGcB0TeNMh/I96KxP3rOxR sqJRgmoCsH4yhBJKsf/gt4iee66Q4p+OCequ+UWvt6M1b1arqvp12u0hno27hiOHk8QX2P 67KrI8TDY2Zzh1WJgP0j1txTg0RtR1uuLEJw84taM5oA7d3C3Q8dsSxSygQhSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760315546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ur9SWKqZnmWkzHN3h+mBvAvFzOk2d5ZNriGzwZCWkg0=; b=ObiwOiAhC3WrNYEsSgz3djimTmHRfFPTXw7mFc3pgVYAjeyuvPkfVoShxEQJyZRXZGcera S7QtGyYfyfLb4UjlAvltsPfH3+/vRIZbcLLu/29cV9x//QTTN4+i9rn7C44ZOZ4wNPYeip RW0Zd6kmrlrkMRQ9VzrPLMZqtUINBfAgJkSH+WZId8hPwFzuXcyODrA7Ppwj8GOo0ydaK+ VnCx/yjoYQRF//+21IM4o8qinS7RZNVWNFnkFy8p2ymQ85QaNnhctClaJgukM+LBl1yM65 UoaPWKaL7RuXqQzAVyl71ocEn5e+t2ouYoT6DXvAhwcpY+8GWLkEOZDtyOvwXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760315546; a=rsa-sha256; cv=none; b=saHw5P2BRVxSZD/Udl+cjVJM+9u6PMy/oIf5e4JKUTUMjXJ32x37GIdgu0rLwRJQqwBW8O aJ5cRUXkL2h7S744Zkw1Vf6Fu+B2/FDEX8GnB3XdhSB/liF6mm408OsdSuBYpScesMDg39 9L2pbyjproSsgMJC8T9CITXGlOfxOMi/G/z3KYdn3+ow5QE+VoIRZ1j7Oxa6DjZ6ebvpTU IFaS3r2jI+3r6x+49cs7vyqVaLPVi4Ul1aoANXd4XxaJeuQRQ9OicE0semBqKwqOqilkCS h2PO5BkK92N2hCsERUrtnVkqW4Iakh1dzjbzz8zrMwGu0yFDsqJbCQC3BI1RYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clJG23DXMzkmN; Mon, 13 Oct 2025 00:32: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 59D0WQFE056293; Mon, 13 Oct 2025 00:32:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0WQTg056290; Mon, 13 Oct 2025 00:32:26 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:32:26 GMT Message-Id: <202510130032.59D0WQTg056290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: a7fc4e326c8d - stable/15 - rpc.tlsservd.c: Pin max threads at 1 for now List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a7fc4e326c8db7b5429b616e0446aac1a041d239 Auto-Submitted: auto-generated The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a7fc4e326c8db7b5429b616e0446aac1a041d239 commit a7fc4e326c8db7b5429b616e0446aac1a041d239 Author: Rick Macklem AuthorDate: 2025-10-10 23:29:25 +0000 Commit: Rick Macklem CommitDate: 2025-10-13 00:29:26 +0000 rpc.tlsservd.c: Pin max threads at 1 for now PR#289734 reports a crash in tcp_use_close() when the rpc.tlsservd daemon is being used. Although I have no, as yet, had time to track down/fix the race, it turns out setting rpctls_maxthreads to 1 avoids the problem. This patch pins rpctls_maxthreads to 1 to avoid the problem, until there is a proper fix. PR: 289734 (cherry picked from commit 7a289fe3cd5c6de7ddbe394b7700b20b0bafdb3e) --- usr.sbin/rpc.tlsservd/rpc.tlsservd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c index f07385a2baa7..fb0501b2db4c 100644 --- a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c +++ b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c @@ -168,7 +168,12 @@ main(int argc, char **argv) rpctls_verbose = false; ncpu = (u_int)sysconf(_SC_NPROCESSORS_ONLN); +#ifdef notnow rpctls_maxthreads = ncpu > 1 ? ncpu / 2 : 1; +#else + /* XXX For now, until fixed properly!! */ + rpctls_maxthreads = 1; +#endif while ((ch = getopt_long(argc, argv, "2C:D:dhl:N:n:mp:r:uvWw", longopts, NULL)) != -1) { @@ -199,6 +204,8 @@ main(int argc, char **argv) if (rpctls_maxthreads < 1 || rpctls_maxthreads > ncpu) errx(1, "maximum threads must be between 1 and " "number of CPUs (%d)", ncpu); + /* XXX For now, until fixed properly!! */ + rpctls_maxthreads = 1; break; case 'n': hostname[0] = '@'; From nobody Mon Oct 13 01:19:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 01:26:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clKRy6NmQz6Bbmv; Mon, 13 Oct 2025 01:26: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 4clKRy5WfLz3JqD; Mon, 13 Oct 2025 01:26:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760318766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YvR1R6ODUTNn+Ap4DjwQBMz8fJtpoALck6mnA+4A3j0=; b=pppBBnunr9CpZio9bEF79Ecr+m7ZIPoTedZ3MTRBBAKIopcddtIKgwYg+UVk9/B2cyoX0O DxONwxLD6eUJvf5+1RuFlaKM7f/HIOYaCxWQ1taFJ6pWwqM83903vy4g0XpiGhOwDeWlKS krMdFfcfNY9CrHlQCBmTQGoal5uF/wqpV4S6XBF/De5Xti9KERGvhDotxcT0oPBbTj8waC WYKOXVN2qiPnGZrRBy+UCnxHbbbztkmTCPvua5tfPNnQ3UAf4IZLkXctfXXRVCaxs+bOB1 F3WdbdtXFi5DnsB9Mo3NeHyzMur3KugKwpq4xdI6hU0Ycl9OyNU/fTrT2YfEpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760318766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YvR1R6ODUTNn+Ap4DjwQBMz8fJtpoALck6mnA+4A3j0=; b=mR+NCqTg2xnZ+3vxO6EYAWoQD5efL/ywHX8rd9kZjr8EFNmt3xBF9zIl8hH/i4YxHBzWbu Yr1plgiY4SqqNlB6TG6WSNGCNXGs/OjVEkGpds3wg1Yupsa33wiorQeLEUBQP4mGstXCe4 05zFyg+X67/es/ORBNGZNFkE++hSTFHiato4n0M3DUFIXCWj5aSrJirV4ngsCbBKyNk6yZ NMg8izHWTGFeUFOGQ2wltYLjGlvhGnDaNpiM5wXJRDypyIIvGDhsVvOyZdgHb9ZkIHVX+X yNQ2IB74eaTZY6WeLkLHnOLIE5womc3BuE/piZnArr9pN74g7pSzfp4P+tY+MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760318766; a=rsa-sha256; cv=none; b=y2Hg3bYT64Cn12CVYuyT5BAZfqmcFy6WKvBlxaHtH0ZwEb06Fmo6I2Gqdg6Lx8jHCT7pIt PP95nehtIbrNI/uk9b2FZW5h8jpqGKOk05ksXijS9rIXCcoisOEd1V2+D7lRHO/c5EyNDv PpZSPqSvcLW4EHYnlKMUksSmLYoCgUGL7lfzVnv8KKt7vqSC5+06x3h+K3mw3FsQpiuonP YY7dhMgEZDXf162tEqB8qfAuoq8W6OXpGRzaasqZ6BR1q2sxVtoSi9O7T2n58+ZXzNwxjA SbuezRRnOqklB8RdiREa4yO2Ro9TqiOorUrvA0+fIa4OzdmTaf0RxdP07u610Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clKRy55jLzm17; Mon, 13 Oct 2025 01:26: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 59D1Q6RZ052337; Mon, 13 Oct 2025 01:26:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D1Q6Q1052335; Mon, 13 Oct 2025 01:26:06 GMT (envelope-from git) Date: Mon, 13 Oct 2025 01:26:06 GMT Message-Id: <202510130126.59D1Q6Q1052335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: c904188d3515 - releng/15.0 - rpc.tlsservd.c: Pin max threads at 1 for now List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: c904188d35154b291c837603ed332eab694d3bb6 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=c904188d35154b291c837603ed332eab694d3bb6 commit c904188d35154b291c837603ed332eab694d3bb6 Author: Rick Macklem AuthorDate: 2025-10-10 23:29:25 +0000 Commit: Colin Percival CommitDate: 2025-10-13 01:25:42 +0000 rpc.tlsservd.c: Pin max threads at 1 for now PR#289734 reports a crash in tcp_use_close() when the rpc.tlsservd daemon is being used. Although I have no, as yet, had time to track down/fix the race, it turns out setting rpctls_maxthreads to 1 avoids the problem. This patch pins rpctls_maxthreads to 1 to avoid the problem, until there is a proper fix. Approved by: re (cperciva) PR: 289734 (cherry picked from commit 7a289fe3cd5c6de7ddbe394b7700b20b0bafdb3e) (cherry picked from commit a7fc4e326c8db7b5429b616e0446aac1a041d239) --- usr.sbin/rpc.tlsservd/rpc.tlsservd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c index f07385a2baa7..fb0501b2db4c 100644 --- a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c +++ b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c @@ -168,7 +168,12 @@ main(int argc, char **argv) rpctls_verbose = false; ncpu = (u_int)sysconf(_SC_NPROCESSORS_ONLN); +#ifdef notnow rpctls_maxthreads = ncpu > 1 ? ncpu / 2 : 1; +#else + /* XXX For now, until fixed properly!! */ + rpctls_maxthreads = 1; +#endif while ((ch = getopt_long(argc, argv, "2C:D:dhl:N:n:mp:r:uvWw", longopts, NULL)) != -1) { @@ -199,6 +204,8 @@ main(int argc, char **argv) if (rpctls_maxthreads < 1 || rpctls_maxthreads > ncpu) errx(1, "maximum threads must be between 1 and " "number of CPUs (%d)", ncpu); + /* XXX For now, until fixed properly!! */ + rpctls_maxthreads = 1; break; case 'n': hostname[0] = '@'; From nobody Mon Oct 13 05:18:08 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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:08:45 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clRk533d8z6C03p; Mon, 13 Oct 2025 06:08: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 4clRk52XmGz3lcg; Mon, 13 Oct 2025 06:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760335725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJ/XgdXMnz/1y9OMkqTM+qvyelkNmckEg3zRjY8dpdg=; b=IP+1z28B32zwA+lA7IZMAePRLmnfkdrnedIn6A0nIOz+z10ZF/ynvckn57/DV8HUgCYePW pEROFoxAqaJiW6DP5SMImLgiKCcB9GK5mkmJnPC7f3GwG+NxAeW1XgzMoD7OSUoRuznM59 dQ2mdZIAmqxsesYmapGTSQW1aV8E/FFi0d+SFQuRb6SiGc55zORd00nCu3106Bh9jPGpSH kyN63DnxMx+p/SkNfmYBdt/EXrCkXuuOO7fogJAaiwmAFBoultNQE57iCqQGuhUfAmjCmx o3gnPBabO8Vv7e523GNvTFS21YIzxxWVPugJLbabdgD/wqKsDcnDS7g3yULjOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760335725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJ/XgdXMnz/1y9OMkqTM+qvyelkNmckEg3zRjY8dpdg=; b=huJzX9PNhivsz9l7ovmFUJtJOdIP32AE+G3JhdIAsxqzcsli0dm83RC0MVX1EtZ2kdCWQx 6GD7IcN9RxcqBbjfzFY+gbB0XgbFSZFIPXgNWfjHPa8BIfUWXOdSp98rZKP0c5gD/ffVfj 5OmliGpUq8Yaza0DzYDjNy5E3jmfdS7StNISPDEQPY/Jw585Jy7GlDxooVwIwAjYZtLMjN uLgWh3W79T2OEiWZHDD2ihcinVzBoglZzcTaO3ZPTjaFTtKdK0ALOUrhFYYJ7tLWZBs95t IZBvzrR2vIjnAq3GHOIZj6T4AIKax54jYTBZizG/j0DNFTAwiBQ/5Pltne4I5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760335725; a=rsa-sha256; cv=none; b=GTVrCoftNp8NOpKQiNb9A3JPQV8q+TW48le4csA1suA7O6V3FT4CPEiGZZYlyvB7YRzPE1 bYarbLtd2+gP92oWSc7S71AL5/ezUCleoEVcRlbVhRdlc2OlVrP/v4pMJCDXgmk6uctJTV 18jPuvbYaV3G+++s55cTpKoCbK1XyobTzFO4aNvwxhn0eMx81Sf61h7xgtyiNaWTJ4Tba3 FdhVyXpBsnX7Wgqc/IyO4EpfL6zUFoh6R682T255cuXmZRzIFivzvtAFeR0JYMz0QBQZGk SVY6cVbEWKwRKdb43be5bbwThVTrVjXosNB+YVqQfFFet4htUrG1UrBCktWRQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clRk51gwtzvPW; Mon, 13 Oct 2025 06:08: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 59D68j6c080441; Mon, 13 Oct 2025 06:08:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D68j8C080438; Mon, 13 Oct 2025 06:08:45 GMT (envelope-from git) Date: Mon, 13 Oct 2025 06:08:45 GMT Message-Id: <202510130608.59D68j8C080438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: f139a644d3ee - stable/15 - MFC: libbz2: add pkg-config file (bzip2.pc) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f139a644d3ee01667480ff6d698757d3e3689794 Auto-Submitted: auto-generated The branch stable/15 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=f139a644d3ee01667480ff6d698757d3e3689794 commit f139a644d3ee01667480ff6d698757d3e3689794 Author: Xin LI AuthorDate: 2025-10-10 05:35:54 +0000 Commit: Xin LI CommitDate: 2025-10-13 06:08:29 +0000 MFC: libbz2: add pkg-config file (bzip2.pc) Add generation of a bzip2.pc file for use with pkg-config and create a basic template as bzip2.pc.in. This allows other software to easily locate and link against libbz2 using standard pkg-config mechanisms instead of manual compiler and linker flags. The version number is extracted automatically from bzlib.h to keep it consistent with the library sources. Tested: pkg-config --exists --print-errors "bzip2 >= 1.0.9" (fail, expected) pkg-config --exists --print-errors "bzip2 >= 1.0" (succeeded) pkg-config --libs bzip2 (-lbz2) pkg-config --cflags bzip2 () (cherry picked from commit 586319793368cbc664b48187bda60d27e171753a) --- lib/libbz2/Makefile | 13 +++++++++++++ lib/libbz2/bzip2.pc.in | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile index d773f202dd67..2aedbaed4328 100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@ -13,4 +13,17 @@ CFLAGS+= -I${BZ2DIR} WARNS?= 3 +BZIP2_VERSION!= sed -n '/bzip2\/libbzip2 version /{s/.*version //;s/ of.*//p;q;}' ${BZ2DIR}/bzlib.h + +bzip2.pc: bzip2.pc.in + sed -e 's,@prefix@,/usr,g ; \ + s,@exec_prefix@,$${prefix},g ; \ + s,@libdir@,${LIBDIR},g ; \ + s,@sharedlibdir@,${SHLIBDIR},g ; \ + s,@includedir@,${INCLUDEDIR},g ; \ + s,@VERSION@,${BZIP2_VERSION},g ;' \ + ${.ALLSRC} > ${.TARGET} + +PCFILES= bzip2.pc + .include diff --git a/lib/libbz2/bzip2.pc.in b/lib/libbz2/bzip2.pc.in new file mode 100644 index 000000000000..d91c9931a58a --- /dev/null +++ b/lib/libbz2/bzip2.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +sharedlibdir=@sharedlibdir@ +includedir=@includedir@ + +Name: bzip2 +Description: bzip2 compression library +Version: @VERSION@ +Libs: -L${libdir} -lbz2 +Cflags: -I${includedir} From nobody Mon Oct 13 06:09:11 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clRkb4kdDz6Bymx; Mon, 13 Oct 2025 06:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clRkb4Df5z3ln8; Mon, 13 Oct 2025 06:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760335751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0QdBompqpZuHbOD8diIZemCNUFz9je2UF+Q/s6FnZbA=; b=AtZGHEVuc9Kaiotnc6yN6e/3ETtagKZ7XKJIsOZGPeIwPYwwKtIGEQ3uM0OznsYjPWutfH TboJ16aLWNysDSfD5SIFON9aF3wZ0ZX7D7byG/DjEtOVKjNGYHEBFPpg+BZBPr/MYtRvaO 57GGGNdWXbMxRrzvjMVfbrQrG3M1jQ93IO6X+67A2+xMTtbIRcHIscFtX4e4RRq3i+NJqT wlt6oMJCNSOam7VRFQvIoCz94WYJqTFStrSYyWG7QV9E3oGXwl/hhg0PdHWRDGgM+xH7HZ BaMs5lga2Au0HQKLQhITdmQyKvfPrFiFkegq3xaW+d9S8E0KygJLvHgAjRhG7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760335751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0QdBompqpZuHbOD8diIZemCNUFz9je2UF+Q/s6FnZbA=; b=r1aJRQ/dQlC/4I8L+ZEo3RDsMFLEpSXyjYcNoX6NhoN5LFLGCMD5nMfrFJ7AvRbiJ+3eR1 3MkM+ire+5OYCk0sptflvRQnev2rzzUMIkLWDxFOSnTIbARqtKxSpzLexfoMmAOJ+S7RtL nQWrfUw/1rRJV4MajfR+6f0mbJS8uKwXiW6nPj0myaWKdVV0nOsjiVPBny2WzI6d+jHAy+ UkfGqASuctH+cJdDClZ9LI87QKFu4HpAO+O9SGKvocYt9S7gisDxFOuzhhwu3Je1DjXc8L T4bw71sxaEpQS8B7mFuDJ7G3RHNZGkJ25RUgRI+GW3KHl7cZ0hLBQp3vXny9Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760335751; a=rsa-sha256; cv=none; b=MBJh0q8UyDMIOQqDVo4foy7QBw23QmTz+cr2WKHadjw1pfIRtOO+zd+Ts2gA4u469/qoI0 ybhEFdOsYP6ZtwoIrpfkZDhOBzisaNQ29Bf41yRyS2kewxzKiJ3UQhZYxzppXsqbmNQn9C zpWRPU46QVSItjU7hVPV1IxDvboCq8/3FVpDQHIpSCOZhsURWr5qY7rc1aZ+UpW6LJBK2p 4nrJxRxXNU0LUaKHC07owNwYxqLUEPTDVMOYBaq0tMgOhjxP30jPkZNwHeT0s7PwNGA65x zeKJISqFIENB9KYMg0sKwE0uRL0dilas4FVWCQ6+yiSvOiFEVUbkfGQQYERLzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clRkb3r15zvBy; Mon, 13 Oct 2025 06:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59D69B55080712; Mon, 13 Oct 2025 06:09:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D69Bif080709; Mon, 13 Oct 2025 06:09:11 GMT (envelope-from git) Date: Mon, 13 Oct 2025 06:09:11 GMT Message-Id: <202510130609.59D69Bif080709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: e1ea6b7b70cf - stable/14 - MFC: libbz2: add pkg-config file (bzip2.pc) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e1ea6b7b70cf5204979f6c6112ad54c0036a9f7e Auto-Submitted: auto-generated The branch stable/14 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=e1ea6b7b70cf5204979f6c6112ad54c0036a9f7e commit e1ea6b7b70cf5204979f6c6112ad54c0036a9f7e Author: Xin LI AuthorDate: 2025-10-10 05:35:54 +0000 Commit: Xin LI CommitDate: 2025-10-13 06:09:06 +0000 MFC: libbz2: add pkg-config file (bzip2.pc) Add generation of a bzip2.pc file for use with pkg-config and create a basic template as bzip2.pc.in. This allows other software to easily locate and link against libbz2 using standard pkg-config mechanisms instead of manual compiler and linker flags. The version number is extracted automatically from bzlib.h to keep it consistent with the library sources. Tested: pkg-config --exists --print-errors "bzip2 >= 1.0.9" (fail, expected) pkg-config --exists --print-errors "bzip2 >= 1.0" (succeeded) pkg-config --libs bzip2 (-lbz2) pkg-config --cflags bzip2 () (cherry picked from commit 586319793368cbc664b48187bda60d27e171753a) --- lib/libbz2/Makefile | 13 +++++++++++++ lib/libbz2/bzip2.pc.in | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile index 832ec15487b8..3f52b3df6f92 100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@ -12,4 +12,17 @@ CFLAGS+= -I${BZ2DIR} WARNS?= 3 +BZIP2_VERSION!= sed -n '/bzip2\/libbzip2 version /{s/.*version //;s/ of.*//p;q;}' ${BZ2DIR}/bzlib.h + +bzip2.pc: bzip2.pc.in + sed -e 's,@prefix@,/usr,g ; \ + s,@exec_prefix@,$${prefix},g ; \ + s,@libdir@,${LIBDIR},g ; \ + s,@sharedlibdir@,${SHLIBDIR},g ; \ + s,@includedir@,${INCLUDEDIR},g ; \ + s,@VERSION@,${BZIP2_VERSION},g ;' \ + ${.ALLSRC} > ${.TARGET} + +PCFILES= bzip2.pc + .include diff --git a/lib/libbz2/bzip2.pc.in b/lib/libbz2/bzip2.pc.in new file mode 100644 index 000000000000..d91c9931a58a --- /dev/null +++ b/lib/libbz2/bzip2.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +sharedlibdir=@sharedlibdir@ +includedir=@includedir@ + +Name: bzip2 +Description: bzip2 compression library +Version: @VERSION@ +Libs: -L${libdir} -lbz2 +Cflags: -I${includedir} From nobody Mon Oct 13 06:17:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 06:50:34 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clSfL2kdQz6C3gC; Mon, 13 Oct 2025 06:50: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 4clSfL26Vxz3LrB; Mon, 13 Oct 2025 06:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760338234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5mKXkcVlIYAbdspUtjrv3wie6MGI9y2zstz3WIPHpLA=; b=klCUBwVORhQ0PwzAW8p0k+fz2G0/eKBduDRchaX0Eim102k8UDPCqr3EmkhEltka+jWxyO cLau77ApIQn8iJOZABT2fcHeJozmTqcpV0nGxccaJxSGr5wVQVMwHGfeVisVLLWD91iXkG 1LfI5EmG4aII0nMXUrcOD+nSiV1UQOBnCsCGu8nHgjjOWeLzbMxWFBL/sFxrJhQUFIN5Ag P4OOAWAbTfFtChBp2Izy8Ot2w2ddTKXRt/B2q2SVrvpe9ydDnQtY2EdLNks23bPPdob1XI mQNbsGaZYjPaUMb/5DjvIXvr75z1BCz1vFSjVVu9YGFuBPwYN2CdN6JySxFzEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760338234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5mKXkcVlIYAbdspUtjrv3wie6MGI9y2zstz3WIPHpLA=; b=CjQg65vdHHHV/ibfQ5P1nEtxCwiJXDhqCiXgEDI6RoDJww8sPCpSj8yrWFrVMr1g4k39DK X2l/ts/xd0uTQt1k9/x77PcorLYEVi8U1FG41Nev7OjUbif/oVe8SojZmBDwLy/5m91i8a 9k+ZbXE7M+ZuB2RhtEgmMW8lsFbE1vP/ORdfz24OwCPhCaZJt/rOxskYwG4/fu65Ethi6C JgH7R5UX2Fkz2/6MHkRueK9U/O+6sylUQFKC9Gf8KBBiya7FAuCZ59oXPecj0dCCKgZADL w3borBydonAALwBWp+SYRKCaM68SQNCIyZ9sSwGQtIZTvqoaBrgyxbmTwUyXWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760338234; a=rsa-sha256; cv=none; b=ajVaVnN7U7Mx/ouRI+OJYHKKrsJH5pbkjJFbUh2B/XCB/uJSsiMfQdzuYdHrkwE17aMNGw HyPLMoV2LHS0o1PCJ8s2znJSGWQIikS4Q1mEeuedQc/+4sOI/dENOdzsc79sUrsg6kilC8 /XVnM+mN6ovlH4u8EbowLTH1vvDkvBfRqmZ20Ia7iETugffhENyGCXV+Hts8YaN1vIXcfv xi/ookAnILX+xjpl4pjpCjGDZGlFSAlwGZ24lGusdKW8tbkvi2vSdI/Kdns7pTEmtx7UIk A0L3MYqHaMtf5s9154+dE7rNkLaUB7DGFaGcVLmzOp+mUGPlJ+v11Q+IDp3ruA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clSfL1cp6zwGR; Mon, 13 Oct 2025 06:50: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 59D6oYsK078901; Mon, 13 Oct 2025 06:50:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D6oYug078898; Mon, 13 Oct 2025 06:50:34 GMT (envelope-from git) Date: Mon, 13 Oct 2025 06:50:34 GMT Message-Id: <202510130650.59D6oYug078898@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: dced18c7703d - stable/15 - libbluetooth: Move to the bluetooth-lib package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: dced18c7703d256a9975bb7143d107f0f07dfd17 Auto-Submitted: auto-generated The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=dced18c7703d256a9975bb7143d107f0f07dfd17 commit dced18c7703d256a9975bb7143d107f0f07dfd17 Author: Lexi Winter AuthorDate: 2025-10-12 15:28:20 +0000 Commit: Lexi Winter CommitDate: 2025-10-13 06:32:57 +0000 libbluetooth: Move to the bluetooth-lib package Move the library, but not any of the runtime. This allows executables to link against libbluetooth without having to pull in the entire BT stack. MFC after: 3 days Reviewed by: dch, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53016 (cherry picked from commit 426891e0f8f1cfae0263ba81ea55f46c547d7762) --- lib/libbluetooth/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libbluetooth/Makefile b/lib/libbluetooth/Makefile index a6ac291a0bf8..b935bdf3fc78 100644 --- a/lib/libbluetooth/Makefile +++ b/lib/libbluetooth/Makefile @@ -1,6 +1,8 @@ # $Id: Makefile,v 1.5 2003/07/22 18:38:04 max Exp $ PACKAGE= bluetooth +LIB_PACKAGE= + CONFS= hosts protocols CONFSDIR= /etc/bluetooth CONFSMODE_protocols= 444 From nobody Mon Oct 13 06:50:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clSfM4gc9z6C468; Mon, 13 Oct 2025 06:50: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 4clSfM382fz3Lfq; Mon, 13 Oct 2025 06:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760338235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hP/VWUi76Gda6WgaWgTg+RMWFMgOSif84vI3wYR/zO4=; b=QUmiTq7ac8ih8I56rLTvgHCSX7ZHLFJ5hETQiZwOczGKaAJ6QM9m82WmWseFcdpUTqmCTj emAEKhvTixpIW32Vo8J9TqAnX2LJh325DvnJtq+YfxCAyW9j4ITffyLsX3Au5Yu9fdVgAq B9vtgWuvx/QqWh/FICsfZM6r181TKjuDlfrdwczFiHzIHX1Xa2CPlzbe4HuimWfUh3DG7t Vv378QJP5N/WmDuZ9SYzUseTkmTjwwl35PoIW/T0kn2DIuJRp+gDaha0EwB+Bn5gangNUT 4tV2U9P8q5jMzEn4e0Kj5D8gZ4Tff+EPHxusZq/4NvGxtePq2NZQSL7athbQEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760338235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hP/VWUi76Gda6WgaWgTg+RMWFMgOSif84vI3wYR/zO4=; b=iJRoHXFibvFeyUPVJT4Qifm8obSnVJdq5Hcu9AklfEx3M1CCMzA+BOA7TJVyKuDWNgmSD+ fvdVrP1LNW86lLaQD45U+cxDLRu+drUzCgQlErbvPw39qmNTputd8GZk12y27Q+fneUe+I YwS4ODwmB9d79yY9QPLPlcBpzDxDi3qoTluV3XKi5uMqpbf0iio9AKMLSl4o1vgAQVGZE0 m10LNYYi4YJNT/z9zIF2yuVVeyPoATNwWIIQK1LOsHqGqDmfxFgk7H3g+LzOkx3Xc/MGAi aDPvSQX3Z+RPtxm94ha2eS27MaRRHdRmcg0bbfh84loE9KMrgg6l4Fh+cL/qKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760338235; a=rsa-sha256; cv=none; b=n4SfHTY0iWgL3rei28VHhHTVy7muVMSQlEq9+H6RLWoPXnbiWd8HQF73RAck7rS2Mmjavy +B+jIoanK3lcbMH9aSZGQbpjoNJf28jSzpoCNd3wVQ5sF7yJUBLizT4sS238o0J5G+jOXb ERWDMhH4QfQuZ0bzrmLRYvtUSWTulPa62ua8cyVhX/3Z6m5CszYqrza1Lxno4xBf4ZoF3z 8qO+9juPI/E5PuAvWhyfbVCUudcuiuCaf9mWm5dMh33u7MLaRJMYtaKovDxG/NFvyNt0vN sbosWesi58c/Qn9xv8UatGT+KdWCpwBM201awXF81YL2y4Fg/ckDqYAHZwv8Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clSfM2Tv0zwC1; Mon, 13 Oct 2025 06:50: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 59D6oZ3J078935; Mon, 13 Oct 2025 06:50:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D6oZhi078932; Mon, 13 Oct 2025 06:50:35 GMT (envelope-from git) Date: Mon, 13 Oct 2025 06:50:35 GMT Message-Id: <202510130650.59D6oZhi078932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: 861225fbe31b - stable/15 - virtual_oss: Move plugins to the sound package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 861225fbe31b86922d7f9fcfa1d280bde50f862e Auto-Submitted: auto-generated The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=861225fbe31b86922d7f9fcfa1d280bde50f862e commit 861225fbe31b86922d7f9fcfa1d280bde50f862e Author: Lexi Winter AuthorDate: 2025-10-12 15:29:17 +0000 Commit: Lexi Winter CommitDate: 2025-10-13 06:33:56 +0000 virtual_oss: Move plugins to the sound package This is the correct place for them, and also issues an incorrect dependency from utilities to sound. Fixes: 1b806e607f52 ("packages: Add a sound package") MFC after: 3 days Reviewed by: christos, dch Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53015 (cherry picked from commit 419dcdc2c981306b0ded44580977d2e053719b14) --- lib/virtual_oss/Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/virtual_oss/Makefile.inc b/lib/virtual_oss/Makefile.inc index 45c8e0b1fdfc..877465a5c548 100644 --- a/lib/virtual_oss/Makefile.inc +++ b/lib/virtual_oss/Makefile.inc @@ -1,3 +1,5 @@ +PACKAGE= sound + .include "../Makefile.inc" LDFLAGS+= -L${.OBJDIR:H:H}/libsamplerate From nobody Mon Oct 13 06:50:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clSfN6xFnz6C46F; Mon, 13 Oct 2025 06:50: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 4clSfN3yNrz3Lj4; Mon, 13 Oct 2025 06:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760338236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2iys0lpsdYBkeJ8VZpS9GARZJu6JRx8DDI6COikuOzc=; b=v3ncUryhIOmhvzB+GHiZQVCzo2dOXKsLXRwnLEuGvSHxGFOt0eD4yhvWoqp/Vl+0+ZJGvh sgp7OihU9Sx02vWD2GklI6QJPG+AOhaiSmM+ysWKmnjOktsUIW/NBjCdXmv9HxhZBS9mUX 40CKQ2RLgYCeNoTnc55pTbK4rp7CAcBM/UF++CmWStM+1W2/AAPtCmn4nm7jig9fAm8vLP k2J3/X8S37B1dOapHiqwRGwEkuVzrvYzEkN8P7YAF/ffNi0+Fyg3BUkyUD7CLsQAZcawYy MvwnAp2wvLvOjIw5AANUplH1hUAwFOycrf48NPS/LLQAu2nMlCZf5QxZ949ynw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760338236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2iys0lpsdYBkeJ8VZpS9GARZJu6JRx8DDI6COikuOzc=; b=AzeOgSTGJv79eqdSsMlA1eMDynvvp+ZQpHpIE71pF5cRwbyhBxrgKS5ShqpMKJ9/ZavwhV tnyz+XdrlSI0erwT3Y5kYGwP//fyvW/cvra5YmcWjQjovB10yIk9PZG1mHiv90pH0y9SS4 rHpC8PVJf1mmGLIsjL1lcWHVMrnumjabMn36nMvRdRlhpuibtAI2mxV77t3rdCJ1Zr9lum 66EoC73UmGknf8jn6oLiNwSj6gvnK/bL0yC0g+BuY/pTfdK0Z0X/kA4wHOk2tZreJCHD35 7lcXITiok9OOx5EYzIgWR+hZUxYIwmRxekKC0mqLXHnHdx8k60u+OPVAjZEgAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760338236; a=rsa-sha256; cv=none; b=akS0ZM4Eh/LTYsZM3iMGu2nwRzo3uDSexk+rMHxhRlKrQTVdhEQSvCfinZesf9T8rqw0FQ aE/LITnpm1mCDig4qMf6ODJT4fGzTQYf7KlrBhW0tG3n4be+t6v1w0A9f+8yTUhAXJZyB2 wEhTrge0d1qRgLaQCwwSjduHp3oRSNkMJZcnPgpxST+YpZDhr8pNp8alyj1O1FCfijAIwt K9Pz1eBKnHkobSpEG5NyUVRJ1tCcnUE8Bvh8o2h0kWp/oorj0vqFYiXRslrk/icMgvlZ0F pnikxX4H9EkT7IOsnM06da10Oza42655pv3VI7SM3MLS4IbNPxPTgOrhAQurMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clSfN3Qx9zvy2; Mon, 13 Oct 2025 06:50: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 59D6oalh078972; Mon, 13 Oct 2025 06:50:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D6oam9078969; Mon, 13 Oct 2025 06:50:36 GMT (envelope-from git) Date: Mon, 13 Oct 2025 06:50:36 GMT Message-Id: <202510130650.59D6oam9078969@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: 663a53d8e795 - stable/15 - release/packages/ucl: Fix typos List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 663a53d8e795ff8502908da0be4c4df3cee41c33 Auto-Submitted: auto-generated The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=663a53d8e795ff8502908da0be4c4df3cee41c33 commit 663a53d8e795ff8502908da0be4c4df3cee41c33 Author: Lexi Winter AuthorDate: 2025-10-12 15:53:43 +0000 Commit: Lexi Winter CommitDate: 2025-10-13 06:34:08 +0000 release/packages/ucl: Fix typos MFC after: 3 days Sponsored by: https://www.patreon.com/bsdivy (cherry picked from commit 039eba16f969a3ebc6c169fa61880a33d2a95090) --- release/packages/ucl/acpi-all.ucl | 2 +- release/packages/ucl/audit-all.ucl | 2 +- release/packages/ucl/libbegemot-all.ucl | 4 ++-- release/packages/ucl/libbsdstat-all.ucl | 2 +- release/packages/ucl/mandoc-all.ucl | 2 +- release/packages/ucl/yp-all.ucl | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/release/packages/ucl/acpi-all.ucl b/release/packages/ucl/acpi-all.ucl index 9e75822a8a04..9b63b825bd60 100644 --- a/release/packages/ucl/acpi-all.ucl +++ b/release/packages/ucl/acpi-all.ucl @@ -23,7 +23,7 @@ ACPI is a hardware standard allowing the operating system to monitor various hardware devices and system state. For example, ACPI can report whether the system is on AC or battery power. -This packages provides several utilities that can be used to interact with the +This package provides several utilities that can be used to interact with the ACPI implementation in the kernel: * The /etc/rc.d/power_profile service can be used to change system performance diff --git a/release/packages/ucl/audit-all.ucl b/release/packages/ucl/audit-all.ucl index 3324795d8d9c..0ff79f7c6b73 100644 --- a/release/packages/ucl/audit-all.ucl +++ b/release/packages/ucl/audit-all.ucl @@ -39,7 +39,7 @@ The audit facility implements the de facto industry standard BSM API, file formats, and command line interface, first found in the Solaris operating system. -This packages provides the auditing daemon auditd(8) and various utilities +This package provides the auditing daemon auditd(8) and various utilities used to manage the auditing system and work with audit data. EOD diff --git a/release/packages/ucl/libbegemot-all.ucl b/release/packages/ucl/libbegemot-all.ucl index 812e94f72eaf..5bead26f69f8 100644 --- a/release/packages/ucl/libbegemot-all.ucl +++ b/release/packages/ucl/libbegemot-all.ucl @@ -41,8 +41,8 @@ calls are however clumsy to use and the usage of one of these calls is probably not portable to other systems - not all systems support both calls. The rpoll(3) family of functions is designed to overcome these restrictions. -They support the well known and understood technique of event driven programing -and, in addition to select(2) and poll(2) also support timers. +They support the well known and understood technique of event driven +programming and, in addition to select(2) and poll(2) also support timers. EOD annotations { diff --git a/release/packages/ucl/libbsdstat-all.ucl b/release/packages/ucl/libbsdstat-all.ucl index 144d4200fed9..56efee79a334 100644 --- a/release/packages/ucl/libbsdstat-all.ucl +++ b/release/packages/ucl/libbsdstat-all.ucl @@ -19,7 +19,7 @@ comment = "Periodic statistics library" desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: 53fcc7f9b0de - stable/15 - bridge.4: Fix the synopsis for -ifuntagged List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 53fcc7f9b0de48449ff3c80140448dd620f44214 Auto-Submitted: auto-generated The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=53fcc7f9b0de48449ff3c80140448dd620f44214 commit 53fcc7f9b0de48449ff3c80140448dd620f44214 Author: Lexi Winter AuthorDate: 2025-10-13 05:57:57 +0000 Commit: Lexi Winter CommitDate: 2025-10-13 06:34:24 +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 (cherry picked from commit dc978c5cb55b75d292c7ef32564f5c376685234b) --- 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 c4184ba61ee4..bf9a032d8c58 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 @@ -2769,7 +2769,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 07:07:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clT1c3Ydyz6C5HN; Mon, 13 Oct 2025 07:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clT1c2n0Mz3Qc6; Mon, 13 Oct 2025 07:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760339236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdwawFqwdo91pp4oxY/bH6RDcxRFNQ6soEEcz0s6TLY=; b=Lgl9/T8PpG2YmuJBYglJ/Qmb5TmCZ5XXxxuwsVb+RRplZKxJrPG6eFBFi2STEl40YPhU5v ACRiRpDIiX1du1uOyKJRXFWcMzrVe80jMjoKsmWZOFpb1zGDQCSpDBaHjXwjbfBWY388vC CCwasB1nv95GBNbBWZsJZxlkf8JM28Lnn2gCZocC3O2uRUTPGKsivEEy5J2NgnfDt27VW6 fXtq07t6o5kAPG9eKZKrzETSm91cAGjh8WPTYAVc8IK0pS/V6xWXfDIVaSG0iMVZztPB76 aAP3TVy91idkQ9NRNEh1esv6tXHhcNTBXI4UEJGj+Fl6tBfQkTLm7lS6fu/cZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760339236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdwawFqwdo91pp4oxY/bH6RDcxRFNQ6soEEcz0s6TLY=; b=lkp8+W3VzQgjQpQqU3WoBVGha/fOChEpEOvIGM53q8/zY3gNkJeW/SIIV1GwavcE8ycF/B nwjoGkpO3/0wLMukkQKNJk9/cRkCIj8FBShdg/SYOGtlGrn6w+pF4y2M+/pI4MikE0gvE1 a/JONFn/y3k7SjWqltjTWs2TQAAFZvpuZggdst+v8uxDdaFjYI+Pp+O8wERtkBckDwVJh3 9hffxFWToiAIUBY/EHeW5d2RcoKUZ2PsHw2Kmp/nVT9fXjciRrOJ330Esxjq7u3z0Pkwf1 CeuLXbcSOkzYBg5Af/RshmA7nuhtVcc3p2QkzbZRD7TRdnd/3rASZDUF6Jk0fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760339236; a=rsa-sha256; cv=none; b=T8zPAtQXfNByh1behNYQSe9x3FULsRIqAr3PTpr5CNWEddZ2V4RCJAS4tz8ELqVZw5uJai bdy0GzTekFJ75T8Qp+7KMD93TR88m8gfBULFiOya/G0qV8anogCjrPs24rluf8iSNhM9Wl MTZGZ/KTVQdy0rHZXJJtWnVeDgTZ8e/Att/HgrBBCbzmMUZwjDoVyg3BaidTvs1zGaGe8h 8/Uj7CmppF6tg431YArqRnyjPGIwBECm9YZ+2NExY2SnlXCxJFgqCbwDEOxbdAP0tBCZa7 M88b2rUYPtEktyTtoFD7oAQdEH3RxVqXVmdl0uMRyVsmhJZV8YTT/tXftrzy1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clT1c2M3mzx3K; Mon, 13 Oct 2025 07:07: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 59D77Ggq008057; Mon, 13 Oct 2025 07:07:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D77GIF008054; Mon, 13 Oct 2025 07:07:16 GMT (envelope-from git) Date: Mon, 13 Oct 2025 07:07:16 GMT Message-Id: <202510130707.59D77GIF008054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 0fa9385d10c5 - releng/15.0 - bridge.4: Fix the synopsis for -ifuntagged List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 0fa9385d10c530cccb36aef602840a7c0a094513 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0fa9385d10c530cccb36aef602840a7c0a094513 commit 0fa9385d10c530cccb36aef602840a7c0a094513 Author: Lexi Winter AuthorDate: 2025-10-13 05:57:57 +0000 Commit: Colin Percival CommitDate: 2025-10-13 07:06:21 +0000 bridge.4: Fix the synopsis for -ifuntagged This command doesn't accept a vlan-id. Approved by: re (cperciva) 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 (cherry picked from commit dc978c5cb55b75d292c7ef32564f5c376685234b) (cherry picked from commit 53fcc7f9b0de48449ff3c80140448dd620f44214) --- 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 c4184ba61ee4..bf9a032d8c58 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 @@ -2769,7 +2769,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 07:07:17 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clT1d61wJz6C59J; Mon, 13 Oct 2025 07:07: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 4clT1d3jZYz3Qw9; Mon, 13 Oct 2025 07:07:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760339237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hg/4+zixhSv5QpateL/Teyq2nEalKPDoyQj6fa0jK5I=; b=vlvKDruOWw18QxiYnILW5qTU7LZWwgmUnEGyY731L9Vj7ujA5qVi0zCwWtT5smEXZHDW80 0SeWPKhYDcM10Qo+dw7F9mkuwHDEy1XMRUPBXxUg9I/amY6eOXJbY8hDxiFEjRDNICU3WG 6zUVpA0wW4fBefZEJKMez751kVU0UXqX1bRrDAYPclJrUNejMITOnd//tuLGKvZ5vPPb8m vMiu1HhRvZqq5f1tsfpUodRYaXyn2BrmSnBThxAmwUNENE3So6JDxnmlKiIybyKjnCqEJO 12Rkd2yiW8G+8i7wO354lGUSMXYmg5iAiblpkUu4Hlytop5FAa/hSl0A/JZ1Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760339237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hg/4+zixhSv5QpateL/Teyq2nEalKPDoyQj6fa0jK5I=; b=qK9iOhhU8vhB46Q49inzKoHfhsYgj0fhydOIGHGah/ggmrNFOewpG9YQDLO8+pD3numLh1 9FX+EzP8Tf+FYnpX0kT77HdlMD28XwOMRcBTBhzJ3wyYS6aoqJTKx4R5wwDV4cEU2znYMD VGOhLGxU0p+ocxw3NmHV8U3SXY86nWLJZYpdKlZk/ZVB9gAGS+/jamIU3mQaVJgK//zFCy xbatSDDMI/5ptDHXi+gsrIklt+ZoLHTIgMn2jzjRGS++zFM/x87URC64srTwhYJm2Upi95 oQMCDC0htKloj6LBMOHdO04NzyU3XszJSuIdvQOjCajac4p08PoZgTpaRX8J4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760339237; a=rsa-sha256; cv=none; b=Y6O3B7uLfv0zH9IrneB/BOtLhE7m1yCcaCHV95CSAl6CDF8I2lpfNH8kTK3CEc4FR27THF ag0mQRuxFlYdOYVs5gAPf9C/jrjUEnjr8QpZXdgMP9pwIQQ6otYayll9NNEF7R6wmFPsA6 rwAL3+dcmAM7hTS7QF1COFgU+39uTgzbFZ+0RpY8mXxSUeEhynCABKstfpAYLpUoJr53lx FO0WSYFIoRJPj0nkZKrJwMDD1KuXP+onXOcqdV8rT76fVK5BYm7q2nFRhnG3Hm2XRXRfa9 AkpGQTnOCUgNX0Z7UMBYYxTJQmqV3wT2rmfxk2FYXuumzq+ZYAygWusU7YAddw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clT1d3GZfzwm4; Mon, 13 Oct 2025 07:07: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 59D77He2008089; Mon, 13 Oct 2025 07:07:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D77H4q008086; Mon, 13 Oct 2025 07:07:17 GMT (envelope-from git) Date: Mon, 13 Oct 2025 07:07:17 GMT Message-Id: <202510130707.59D77H4q008086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: fde09c830088 - releng/15.0 - release/packages/ucl: Fix typos List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: fde09c830088ba4fabdb5f05f608e04e60d83f11 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fde09c830088ba4fabdb5f05f608e04e60d83f11 commit fde09c830088ba4fabdb5f05f608e04e60d83f11 Author: Lexi Winter AuthorDate: 2025-10-12 15:53:43 +0000 Commit: Colin Percival CommitDate: 2025-10-13 07:06:29 +0000 release/packages/ucl: Fix typos Approved by: re (cperciva) MFC after: 3 days Sponsored by: https://www.patreon.com/bsdivy (cherry picked from commit 039eba16f969a3ebc6c169fa61880a33d2a95090) (cherry picked from commit 663a53d8e795ff8502908da0be4c4df3cee41c33) --- release/packages/ucl/acpi-all.ucl | 2 +- release/packages/ucl/audit-all.ucl | 2 +- release/packages/ucl/libbegemot-all.ucl | 4 ++-- release/packages/ucl/libbsdstat-all.ucl | 2 +- release/packages/ucl/mandoc-all.ucl | 2 +- release/packages/ucl/yp-all.ucl | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/release/packages/ucl/acpi-all.ucl b/release/packages/ucl/acpi-all.ucl index 9e75822a8a04..9b63b825bd60 100644 --- a/release/packages/ucl/acpi-all.ucl +++ b/release/packages/ucl/acpi-all.ucl @@ -23,7 +23,7 @@ ACPI is a hardware standard allowing the operating system to monitor various hardware devices and system state. For example, ACPI can report whether the system is on AC or battery power. -This packages provides several utilities that can be used to interact with the +This package provides several utilities that can be used to interact with the ACPI implementation in the kernel: * The /etc/rc.d/power_profile service can be used to change system performance diff --git a/release/packages/ucl/audit-all.ucl b/release/packages/ucl/audit-all.ucl index 3324795d8d9c..0ff79f7c6b73 100644 --- a/release/packages/ucl/audit-all.ucl +++ b/release/packages/ucl/audit-all.ucl @@ -39,7 +39,7 @@ The audit facility implements the de facto industry standard BSM API, file formats, and command line interface, first found in the Solaris operating system. -This packages provides the auditing daemon auditd(8) and various utilities +This package provides the auditing daemon auditd(8) and various utilities used to manage the auditing system and work with audit data. EOD diff --git a/release/packages/ucl/libbegemot-all.ucl b/release/packages/ucl/libbegemot-all.ucl index 812e94f72eaf..5bead26f69f8 100644 --- a/release/packages/ucl/libbegemot-all.ucl +++ b/release/packages/ucl/libbegemot-all.ucl @@ -41,8 +41,8 @@ calls are however clumsy to use and the usage of one of these calls is probably not portable to other systems - not all systems support both calls. The rpoll(3) family of functions is designed to overcome these restrictions. -They support the well known and understood technique of event driven programing -and, in addition to select(2) and poll(2) also support timers. +They support the well known and understood technique of event driven +programming and, in addition to select(2) and poll(2) also support timers. EOD annotations { diff --git a/release/packages/ucl/libbsdstat-all.ucl b/release/packages/ucl/libbsdstat-all.ucl index 144d4200fed9..56efee79a334 100644 --- a/release/packages/ucl/libbsdstat-all.ucl +++ b/release/packages/ucl/libbsdstat-all.ucl @@ -19,7 +19,7 @@ comment = "Periodic statistics library" desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e74f3a9494cb - releng/15.0 - virtual_oss: Move plugins to the sound package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: e74f3a9494cb54f3a5c80e439af72c76cb14b94c Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e74f3a9494cb54f3a5c80e439af72c76cb14b94c commit e74f3a9494cb54f3a5c80e439af72c76cb14b94c Author: Lexi Winter AuthorDate: 2025-10-12 15:29:17 +0000 Commit: Colin Percival CommitDate: 2025-10-13 07:06:44 +0000 virtual_oss: Move plugins to the sound package This is the correct place for them, and also issues an incorrect dependency from utilities to sound. Approved by: re (cperciva) Fixes: 1b806e607f52 ("packages: Add a sound package") MFC after: 3 days Reviewed by: christos, dch Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53015 (cherry picked from commit 419dcdc2c981306b0ded44580977d2e053719b14) (cherry picked from commit 861225fbe31b86922d7f9fcfa1d280bde50f862e) --- lib/virtual_oss/Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/virtual_oss/Makefile.inc b/lib/virtual_oss/Makefile.inc index 45c8e0b1fdfc..877465a5c548 100644 --- a/lib/virtual_oss/Makefile.inc +++ b/lib/virtual_oss/Makefile.inc @@ -1,3 +1,5 @@ +PACKAGE= sound + .include "../Makefile.inc" LDFLAGS+= -L${.OBJDIR:H:H}/libsamplerate From nobody Mon Oct 13 07:07:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clT1h5nF6z6C5LF; Mon, 13 Oct 2025 07:07: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 4clT1g58V5z3QfM; Mon, 13 Oct 2025 07:07:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760339239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZBlag4JGu4Z7yabI0J/jUhS0vTgA3FuvjewtM2ap34=; b=oEfTrmnG1JlszdI2U0o8se0IK5V/hF8dtfnKFhsyWj4QsoCjMoA8QbQ+rGjxwjb2CmyVH0 s7pP875BqXUhJe/wSr7WFK28RxO0khKqPe6PsEpAgg3vybn64cN6Wh3Dv2xUQ6FTWblpfG LAa7Ly2wBsl60ldTk/md/AefnrTG0Y8GMb60hoZOFddFXlXT+fwv+rhicZsGnKa4jF8mG+ bjKPWJopPAJNrOjpa7ZOaVu6oTLSL7VOM1ZoGlK7JToalyoIJ7Jifdc32uKClAduJXYV3i zTGrtTbZrVK0/GryWKL0TwifhE1qJUdS6ejwVeXumLLnZJPnPMH+nJfnR/A6Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760339239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZBlag4JGu4Z7yabI0J/jUhS0vTgA3FuvjewtM2ap34=; b=Z2wui6h/SNsE5tEvLv1TDT+kXIu2bsc3phEL+sKi6s/fFJGa/v7KWUpPANTZjy9BKtebSh kWYi3/uL+oNL6Ea0UohBZf7sxUzAOgf7RCFd917+tIAMR6JTzh8uDG0IBRax92ATirY0po BemE8/rFs05ZFifSGZ9ZRLSZn+dT8ZHql9G9geEWU6YR/7FvW399rSYgPwdG0/q/GGWE6u F1h/+eAH4gAVpOkEk/hReJgbLzO4f8eRy2sZhGI3aX4ZsqJKp1wZsFyQDfRZflfW2iFYGT fsSQx954tu0xYkfXeFtzgzh1SMV/1wfHl9D774hpBCZ32gLeb1LN4J/idab7Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760339239; a=rsa-sha256; cv=none; b=xAjxUH2HALfiAGDII3GWY192UIA4yc9rJ4nl9BcdF1q6zWzXDYnN6Qwm99fYW2jwj/GczN AuXZ4XZSzcNGI4NmID9WzZmts+lfE6MNbg02uV+soW53VghHwLd52Au8nkkJMOEwrLsr8W udcBpxf4V/vZFZU1dBjw362Bq5vud2uc1nN+1yk4kKwWgYd5WXzvWs987dxTn03f2Ow9hu tIi4HNUG63tmVCu1KKkiVWX1WX8JSNz0UlX6GNsRZVnqcdQiq0JhRMi9U4coEGIevblAfF /e5xuW/2r2OdMoU8pAjrvM6p57HUjGiVxP9kGssixHUnEmIuyo3fWqQo0NFFQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clT1g4dQ1zwHb; Mon, 13 Oct 2025 07:07: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 59D77JkC008156; Mon, 13 Oct 2025 07:07:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D77JPq008153; Mon, 13 Oct 2025 07:07:19 GMT (envelope-from git) Date: Mon, 13 Oct 2025 07:07:19 GMT Message-Id: <202510130707.59D77JPq008153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: ab0d79d53721 - releng/15.0 - libbluetooth: Move to the bluetooth-lib package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: ab0d79d5372194a1563b033cbc81dac4aba5ae09 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=ab0d79d5372194a1563b033cbc81dac4aba5ae09 commit ab0d79d5372194a1563b033cbc81dac4aba5ae09 Author: Lexi Winter AuthorDate: 2025-10-12 15:28:20 +0000 Commit: Colin Percival CommitDate: 2025-10-13 07:06:47 +0000 libbluetooth: Move to the bluetooth-lib package Move the library, but not any of the runtime. This allows executables to link against libbluetooth without having to pull in the entire BT stack. Approved by: re (cperciva) MFC after: 3 days Reviewed by: dch, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53016 (cherry picked from commit 426891e0f8f1cfae0263ba81ea55f46c547d7762) (cherry picked from commit dced18c7703d256a9975bb7143d107f0f07dfd17) --- lib/libbluetooth/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libbluetooth/Makefile b/lib/libbluetooth/Makefile index a6ac291a0bf8..b935bdf3fc78 100644 --- a/lib/libbluetooth/Makefile +++ b/lib/libbluetooth/Makefile @@ -1,6 +1,8 @@ # $Id: Makefile,v 1.5 2003/07/22 18:38:04 max Exp $ PACKAGE= bluetooth +LIB_PACKAGE= + CONFS= hosts protocols CONFSDIR= /etc/bluetooth CONFSMODE_protocols= 444 From nobody Mon Oct 13 10:13:41 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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:56 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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:57 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 15:28:54 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clh8Q3xkWz6Bwvx; Mon, 13 Oct 2025 15:28: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 4clh8Q2vjzz3pZT; Mon, 13 Oct 2025 15:28:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760369334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c08zRSFQ0sdRnq3AxGHzxE7VKpNNOMZULBA9VcsrIa8=; b=ffnk331u1jtIksxSvDsmarItr25PxF/zW72qs4+Gvc4ADHhNMp0Rxzti74fAyZBC7aT6Dv nDpyzHxZ+m0NfNwqpGWhFOZJyK0SN2kje4m6KH/ce4jeQ+xAgopfsdkldQmM7Pne+/+F4v 5xOYXC02gDajfETEqkB4i+964MxFSkg8Y6VBcVPD1u5Ki+dpwfYKRYTD+LjSjH8ubteMpC 90SQDUX7vQ/cUpcmSH0rN89zsKPP1EO8/Y+TSzBF5JLIDkBKtIACN1Y1DKPwTRW2OM/Z14 PgulE5ffrs37o4q/Dfw1VI9OquiUxZIBIYSSFoTn4V/LQ40CtSf6ggmJiRDk2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760369334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c08zRSFQ0sdRnq3AxGHzxE7VKpNNOMZULBA9VcsrIa8=; b=hK8YT09EJdqSH8c04DzJpo7mg+Af0BKwx8RLsoP3RZ4aIoNBtfcinR7VkseF8LOojRiGXc hjVjnQL3G+yT+MmVsmxOMSP/giA1J4+yqeX+utQyAuOCL1ggcC5lR4AcC/TWCpzeT32qoy ly4yWKHNb8ntfUFyWIUgqYOaNyCiqg60BPp0d0xqRJ/qEmGwPjgmjJ+AyvEsn/j7BaGCs0 HiXVWpZ14JLfQ7DCYQ2LDWBKdPUc9ARWevf0Ik99Soo2H0Eokctey7YUP0jl08pytDrhZs NAiiwAF1d6vT5uHu0gi4VkARplxzEUhNwLNA5Ao7rODlFDp5wZoLBinPNWi0eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760369334; a=rsa-sha256; cv=none; b=W98VqQ8fxb17M3SsyMeVAvRMAKzSRsoQl5KDkUD8pPahCrgvt958nm2hZQuTBDSeqbN72l TkMr8vFw4NGjl8p1NXs4CDF18ONANgYxkgbpbLUvfgDZhXFfwKpoLh/ercPLryBCpzigaL xat7sTCxhGS9g89nhTcMICJj01sE3Gw++r9/48kVpGrujfshM13m815iILDNrJGUxmnKwt l+gIEcJ3+44oz5AoHn7ky4vBTnu2Zkjw09Dt1ZwvfvUpE2yCwGUTE34s29wjK7C33e1UAK 273zA8gLAhtXLTabIlOPHYFjCGRLaxw+LqSPyXuYm5uM+chV/BnEKQGfDV1WIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clh8Q2MWxz1BlJ; Mon, 13 Oct 2025 15:28: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 59DFSs9Z050725; Mon, 13 Oct 2025 15:28:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DFSs8F050722; Mon, 13 Oct 2025 15:28:54 GMT (envelope-from git) Date: Mon, 13 Oct 2025 15:28:54 GMT Message-Id: <202510131528.59DFSs8F050722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 573cb59c35de - releng/15.0 - MFC: libbz2: add pkg-config file (bzip2.pc) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 573cb59c35deb4e9dd720c736d7984773fd1068d Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=573cb59c35deb4e9dd720c736d7984773fd1068d commit 573cb59c35deb4e9dd720c736d7984773fd1068d Author: Xin LI AuthorDate: 2025-10-10 05:35:54 +0000 Commit: Colin Percival CommitDate: 2025-10-13 15:28:24 +0000 MFC: libbz2: add pkg-config file (bzip2.pc) Add generation of a bzip2.pc file for use with pkg-config and create a basic template as bzip2.pc.in. This allows other software to easily locate and link against libbz2 using standard pkg-config mechanisms instead of manual compiler and linker flags. The version number is extracted automatically from bzlib.h to keep it consistent with the library sources. Approved by: re (cperciva) Tested: pkg-config --exists --print-errors "bzip2 >= 1.0.9" (fail, expected) pkg-config --exists --print-errors "bzip2 >= 1.0" (succeeded) pkg-config --libs bzip2 (-lbz2) pkg-config --cflags bzip2 () (cherry picked from commit 586319793368cbc664b48187bda60d27e171753a) (cherry picked from commit f139a644d3ee01667480ff6d698757d3e3689794) --- lib/libbz2/Makefile | 13 +++++++++++++ lib/libbz2/bzip2.pc.in | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile index d773f202dd67..2aedbaed4328 100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@ -13,4 +13,17 @@ CFLAGS+= -I${BZ2DIR} WARNS?= 3 +BZIP2_VERSION!= sed -n '/bzip2\/libbzip2 version /{s/.*version //;s/ of.*//p;q;}' ${BZ2DIR}/bzlib.h + +bzip2.pc: bzip2.pc.in + sed -e 's,@prefix@,/usr,g ; \ + s,@exec_prefix@,$${prefix},g ; \ + s,@libdir@,${LIBDIR},g ; \ + s,@sharedlibdir@,${SHLIBDIR},g ; \ + s,@includedir@,${INCLUDEDIR},g ; \ + s,@VERSION@,${BZIP2_VERSION},g ;' \ + ${.ALLSRC} > ${.TARGET} + +PCFILES= bzip2.pc + .include diff --git a/lib/libbz2/bzip2.pc.in b/lib/libbz2/bzip2.pc.in new file mode 100644 index 000000000000..d91c9931a58a --- /dev/null +++ b/lib/libbz2/bzip2.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +sharedlibdir=@sharedlibdir@ +includedir=@includedir@ + +Name: bzip2 +Description: bzip2 compression library +Version: @VERSION@ +Libs: -L${libdir} -lbz2 +Cflags: -I${includedir} From nobody Mon Oct 13 16:08:03 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 18:32:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clmD23sT1z6CB0t; Mon, 13 Oct 2025 18:32: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 4clmD233x5z3DHJ; Mon, 13 Oct 2025 18:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760380338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rUvflG+cCRv2AfzLI9R/E/K6xwN6ROwmDmzoh3OnSD8=; b=V42ESnpn+x9jxFSqjG6nwM6uto0neCs8l3UD7NxN/ICGAO8zXN3LE78uvTUz9FjfVv873O VCZ+0sFRHYwmvsN4rrO799LQpVrw6LZIrcrCjaCuL/pnDdY451rbrbdx2kPPamEtUw66Wg JGeWSeXOdq+TGoUgTGrig8kzSEoUcfm8edP8zETyX9z38kD+xP6gVeHJhCa8bALVbfUxIB nhVugKyaMcPgeOGOqqqyiPsHvfyfRZM1ta/WqPLWNAGzRxqksezzIGAdQw/+IuZJySc3vQ IbsVtx+1QCZCHd1ETpi5ZvWyfqzyliZcM/1BGDMjFtjh7wu9S4xMg3ZqisZ59Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760380338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rUvflG+cCRv2AfzLI9R/E/K6xwN6ROwmDmzoh3OnSD8=; b=H7qTZyMAXr79GJ7V/ZnRnAxGPx5g1iqvgXDl0XB+pqPCmmFlZ3+glOenO2+rQbtVpVoIDH NaNuOFYkImr/bsmxVtl/KIfOmsZe7ywwMXkZ7tdrigMB5TSqvMsgLUlUulfMlWT6yQQ/Zz jISGsszfB9CryMYeGX8dnnCxwCqUuCx3/QusiwABp15Hc4EZehXxdBqKDB+aBBM9pJbPwl qOfBTk7n8f63haJHpzdf1BJI5QOfGVasnnr7OPvqsBEC7nhzSXFAQCWIFmlaFeMz3s2kYB /sCjdmpqqUVx7d4NX1nCldmbD8MYzyM5w+QS3dq8fQJNK4j8IIFAaJE26nwGHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760380338; a=rsa-sha256; cv=none; b=Kn/ZOojmFj5LHuRmlrB7BGXRx0e+dt25YopXGa+RBfwhjN98/rbT4iKsju5SCLmTSf4BYK o1xajaALmBNms77kKcFftnbmoh5Z4eJWQwVxXb3DyUg43VmTYTVaaA1Gd8Kr2gJIw8jXr0 8pfcj76swlitQX/uYRcwWmQOZUD59kMW03RcqpEQNidqPVL0q+aRQJFCdjoqgE46tdg34+ 30SyYYAOwnmP0tXcdw9Rphx+suDBrD8VgGJXz03869lJIBbWWUSu12HMbpXI2XOMVRPnL4 b++0MW8IijyFxP1RwHyoSKbvBqzTNNp+GwCZbnxktsC9lmQFtSOIZgpQRDD/Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clmD22gZFz3Zj; Mon, 13 Oct 2025 18:32: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 59DIWIpO005413; Mon, 13 Oct 2025 18:32:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59DIWIEo005410; Mon, 13 Oct 2025 18:32:18 GMT (envelope-from git) Date: Mon, 13 Oct 2025 18:32:18 GMT Message-Id: <202510131832.59DIWIEo005410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: 3b5ec539beef - stable/15 - Makefile.inc1: Build source packages before sets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 3b5ec539beefb82dd3210f51c0e2e0759b20dad8 Auto-Submitted: auto-generated The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=3b5ec539beefb82dd3210f51c0e2e0759b20dad8 commit 3b5ec539beefb82dd3210f51c0e2e0759b20dad8 Author: Lexi Winter AuthorDate: 2025-10-13 18:30:31 +0000 Commit: Lexi Winter CommitDate: 2025-10-13 18:32:06 +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 (cherry picked from commit ea5685ba79fc9309698ef72cf48bc1f0c91ad3dd) --- Makefile.inc1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index cd3e3f007c3b..d530ca4e9584 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2107,6 +2107,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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 00:57:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clwmW3jfJz6CfJf; Tue, 14 Oct 2025 00:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clwmW3VC8z3vT0; Tue, 14 Oct 2025 00:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwRGuIQjEYM0ZEHdAmB5jeaCuwWI+P+bo/gdPbYHBMQ=; b=hABVOkZQpAlEdqpFlyeQ1/5QZKc58hKjpxIaZVlcTQ+Rua9MLuMVS8F+zXRcU/q9kKN9yV A67xNSiTS2jcJOyFX45s6+p3Ua52qpaWXIO0T69kHInOLji8btWs2kBloMQmDJxKLj3709 8C9MVExUnrodUt+3yArTFU0hbUwEcDZGAMUV1IRYEZaNJZi8+RNse3D4IhIhtX0t48eg8y Ed3f4iYq1liu5jX+6Phq0rhUjOzOF6w8nlQQaDPSeTQ5ImuUv2r9ZRtiS5TseNEIyfdtXL 8lXo6Wo5OEvyDNLfk+tvIp0lRiLdPwxV+4EbTeQMn8aJ1X5LYYl2kUuWodvUMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwRGuIQjEYM0ZEHdAmB5jeaCuwWI+P+bo/gdPbYHBMQ=; b=ZGvZpVKLLA7R/pu9KPAKhLHITeBU5wMi191ZV1TBvXtxQJwVQxKeA/9v96HuOfMb93snhC /ZqplgWD2Vtxo7B8U47zZ2Q+sq0z36XxSWFqpvkTglu9dO8IDwpT5/BLKmjVM1Int0faUO J8rS2dzhvUcWwJ5lL5kOjn15w8eTgHhi0LLU8K1DvZUoXp43tjJ94cDEez4ZYd+uqq5nZS 2bGY/ljmfb6vi0J1BI3pFJdkW6h9/fN30AJcI0KtY8WRz6qxzKpz0Nm+zSaILwBdJvqsDf Qg+OXDbZ5fEB74XgY318Hp9MFVMa/itla+5bNq5jIANpAClFVJt6XK7ZAWOl5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760403451; a=rsa-sha256; cv=none; b=mTtOibC6iQ/oDHukM5CKzf8qgNIZ3q7w7bUEYxfgmU5i60XwjOePBmuhd4gwf/ilKu1VAL wdhlP6ID4CS4pkhjmb80bEwgmaG/mGxYPT0Upu8HbOCOi+TaTtBoYXcj8l9b7gwu0E2lBp yGgoDLlMCNWyAqmS7EC8JtXSBGCtCvd6lPk/EKpVA4nrmN06OYIMtNNoOMAKU9KWQv3ynF esCGu9arxN/3H7U7h6SgMKrSaoUy+LMCvKsEVmiey9fnrAxcG5upVKKUO+lAuPQoutvn9I xcBJ1v3h0zhobEWl9BluFqGVatUerSu0EuimDiLALpldPXaHtacsTh19iiFE5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clwmW2tfxzVVM; Tue, 14 Oct 2025 00:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59E0vVUd021525; Tue, 14 Oct 2025 00:57:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E0vVkr021522; Tue, 14 Oct 2025 00:57:31 GMT (envelope-from git) Date: Tue, 14 Oct 2025 00:57:31 GMT Message-Id: <202510140057.59E0vVkr021522@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 1a08326c6f50 - stable/15 - MFV: Import blocklist 2025-04-28 (8aa81bf) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1a08326c6f503db5f0fb9201cdf55379bbe576e8 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=1a08326c6f503db5f0fb9201cdf55379bbe576e8 commit 1a08326c6f503db5f0fb9201cdf55379bbe576e8 Author: Jose Luis Duran AuthorDate: 2025-10-12 17:01:03 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-14 00:51:43 +0000 MFV: Import blocklist 2025-04-28 (8aa81bf) Merge commit '70f30afd4e9af5a51ee324d97e4d8c5f2124ec15' Breaking changes: - Upstream commit 24932b6 ("blocklistd: log the conf file line number with bad protocol errors") breaks backward database compatibility. An error will be displayed: Key size mismatch 296 != 288 A new and compatible database, with the new name, will be created when the service starts (committed separately). - Upstream commit ddf6d71 ("implement BLOCKLIST_BAD_USER as a "one-count" failure") introduced BLOCKLIST_BAD_USER with a one-count failure mechanism. BLOCKLIST_AUTH_FAIL was implemented with a two-count failure mechanism. Since we utilize BLOCKLIST_AUTH_FAIL, the number of failed attempts now doubles towards the maximum limit (nfails). This commit will be reverted separately. Changes: https://github.com/zoulasc/blocklist/compare/7093cd9...8aa81bf Approved by: emaste (mentor) MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D52869 (cherry picked from commit 48e64ca13d4f36795ac718911b805e3e9a726f1b) --- contrib/blocklist/Makefile | 2 +- contrib/blocklist/Makefile.inc | 7 +- contrib/blocklist/README | 52 ++-- contrib/blocklist/TODO | 49 +++- contrib/blocklist/bin/Makefile | 12 +- .../bin/{blacklistctl.8 => blocklistctl.8} | 69 +++++- .../bin/{blacklistctl.c => blocklistctl.c} | 9 +- .../blocklist/bin/{blacklistd.8 => blocklistd.8} | 75 +++--- .../blocklist/bin/{blacklistd.c => blocklistd.c} | 48 ++-- .../bin/{blacklistd.conf.5 => blocklistd.conf.5} | 82 ++++--- contrib/blocklist/bin/conf.c | 200 ++++++++++++--- contrib/blocklist/bin/conf.h | 3 +- contrib/blocklist/bin/internal.c | 8 +- contrib/blocklist/bin/internal.h | 8 +- contrib/blocklist/bin/run.c | 9 +- contrib/blocklist/bin/run.h | 2 +- contrib/blocklist/bin/state.c | 6 +- contrib/blocklist/bin/state.h | 2 +- contrib/blocklist/bin/support.c | 11 +- contrib/blocklist/bin/support.h | 7 +- contrib/blocklist/diff/ftpd.diff | 12 +- contrib/blocklist/diff/named.diff | 12 +- contrib/blocklist/diff/postfix.diff | 98 ++++++++ contrib/blocklist/diff/proftpd.diff | 20 +- contrib/blocklist/diff/ssh.diff | 14 +- contrib/blocklist/etc/Makefile | 10 +- .../etc/{blacklistd.conf => blocklistd.conf} | 7 +- contrib/blocklist/etc/ipf.conf | 45 ++++ contrib/blocklist/etc/npf.conf | 4 +- contrib/blocklist/etc/rc.d/Makefile | 4 +- .../blocklist/etc/rc.d/{blacklistd => blocklistd} | 20 +- contrib/blocklist/include/Makefile | 4 +- contrib/blocklist/include/bl.h | 11 +- .../blocklist/include/{blacklist.h => blocklist.h} | 44 ++-- contrib/blocklist/lib/Makefile | 20 +- contrib/blocklist/lib/bl.c | 112 +++++---- contrib/blocklist/lib/{blacklist.c => blocklist.c} | 49 ++-- .../lib/{libblacklist.3 => libblocklist.3} | 124 +++++----- contrib/blocklist/lib/shlib_version | 2 +- contrib/blocklist/libexec/Makefile | 4 +- contrib/blocklist/libexec/blacklistd-helper | 134 ---------- contrib/blocklist/libexec/blocklistd-helper | 272 +++++++++++++++++++++ contrib/blocklist/port/Makefile.am | 42 ++-- contrib/blocklist/port/_strtoi.h | 2 +- contrib/blocklist/port/configure.ac | 12 +- contrib/blocklist/port/fgetln.c | 2 +- contrib/blocklist/port/fparseln.c | 6 +- contrib/blocklist/port/pidfile.c | 6 +- contrib/blocklist/port/popenve.c | 6 +- contrib/blocklist/port/port.h | 32 ++- contrib/blocklist/port/sockaddr_snprintf.c | 6 +- contrib/blocklist/port/strlcat.c | 7 +- contrib/blocklist/port/strlcpy.c | 7 +- contrib/blocklist/port/strtoi.c | 6 +- contrib/blocklist/port/vsyslog_r.c | 13 + contrib/blocklist/test/Makefile | 2 +- contrib/blocklist/test/cltest.c | 6 +- contrib/blocklist/test/srvtest.c | 42 +++- 58 files changed, 1293 insertions(+), 587 deletions(-) diff --git a/contrib/blocklist/Makefile b/contrib/blocklist/Makefile index da4411d0ca75..899746d01431 100644 --- a/contrib/blocklist/Makefile +++ b/contrib/blocklist/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2015/01/22 17:49:41 christos Exp $ +# $NetBSD: Makefile,v 1.1.1.1 2020/06/15 01:52:52 christos Exp $ SUBDIR = lib .WAIT include bin etc libexec diff --git a/contrib/blocklist/Makefile.inc b/contrib/blocklist/Makefile.inc index 85c82783cd35..b22d4a801240 100644 --- a/contrib/blocklist/Makefile.inc +++ b/contrib/blocklist/Makefile.inc @@ -1,10 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.3 2015/01/23 03:57:22 christos Exp $ +# $NetBSD: Makefile.inc,v 1.3 2025/02/11 17:48:30 christos Exp $ WARNS=6 .if !defined(LIB) -LDADD+= -lblacklist -DPADD+= ${LIBBLACKLIST} +LDADD+= -lblocklist +DPADD+= ${LIBBLOCKLIST} .endif CPPFLAGS+= -I${.CURDIR}/../include CPPFLAGS+=-DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_UTIL_H -DHAVE_DB_H +CPPFLAGS+=-DHAVE_SYS_CDEFS_H diff --git a/contrib/blocklist/README b/contrib/blocklist/README index 7da3317a77fe..4b34138e01ec 100644 --- a/contrib/blocklist/README +++ b/contrib/blocklist/README @@ -1,21 +1,21 @@ -# $NetBSD: README,v 1.8 2017/04/13 17:59:34 christos Exp $ +# $NetBSD: README,v 1.3 2024/02/09 00:53:30 wiz Exp $ This package contains library that can be used by network daemons to communicate with a packet filter via a daemon to enforce opening and closing ports dynamically based on policy. -The interface to the packet filter is in libexec/blacklistd-helper +The interface to the packet filter is in libexec/blocklistd-helper (this is currently designed for npf) and the configuration file -(inspired from inetd.conf) is in etc/blacklistd.conf. +(inspired from inetd.conf) is in etc/blocklistd.conf. -On NetBSD you can find an example npf.conf and blacklistd.conf in -/usr/share/examples/blacklistd; you need to adjust the interface +On NetBSD you can find an example npf.conf and blocklistd.conf in +/usr/share/examples/blocklistd; you need to adjust the interface in npf.conf and copy both files to /etc; then you just enable -blacklistd=YES in /etc/rc.conf, start it up, and you are all set. +blocklistd=YES in /etc/rc.conf, start it up, and you are all set. -There is also a startup file in etc/rc.d/blacklistd +There is also a startup file in etc/rc.d/blocklistd -Patches to various daemons to add blacklisting capabilitiers are in the +Patches to various daemons to add blocklisting capabilities are in the "diff" directory: - OpenSSH: diff/ssh.diff [tcp socket example] - Bind: diff/named.diff [both tcp and udp] @@ -23,21 +23,21 @@ Patches to various daemons to add blacklisting capabilitiers are in the These patches have been applied to NetBSD-current. -The network daemon (for example sshd) communicates to blacklistd, via -a unix socket like syslog. The library calls are simple and everything +The network daemon (for example sshd) communicates to blocklistd, via +a Unix socket like syslog. The library calls are simple and everything is handled by the library. In the simplest form the only thing the daemon needs to do is to call: - blacklist(action, acceptedfd, message); + blocklist(action, acceptedfd, message); Where: - action = 0 -> successful login clear blacklist state + action = 0 -> successful login clear blocklist state 1 -> failed login, add to the failed count acceptedfd -> the file descriptor where the server is connected to the remote client. It is used to determine the listening socket, and the remote address. This allows any program to - contact the blacklist daemon, since the verification + contact the blocklist daemon, since the verification if the program has access to the listening socket is done by virtue that the port number is retrieved from the kernel. @@ -46,13 +46,13 @@ Where: Unfortunately there is no way to get information about the "peer" from a udp socket, because there is no connection and that information is kept with the server. In that case the daemon can provide the -peer information to blacklistd via: +peer information to blocklistd via: - blacklist_sa(action, acceptedfd, sockaddr, sockaddr_len, message); + blocklist_sa(action, acceptedfd, sockaddr, sockaddr_len, message); The configuration file contains entries of the form: -# Blacklist rule +# Blocklist rule # host/Port type protocol owner name nfail disable 192.168.1.1:ssh stream tcp * -int 10 1m 8.8.8.8:ssh stream tcp * -ext 6 60m @@ -60,18 +60,18 @@ ssh stream tcp6 * * 6 60m http stream tcp * * 6 60m Here note that owner is * because the connection is done from the -child ssh socket which runs with user privs. We treat ipv4 connections +child ssh socket which runs with user privs. We treat IPv4 connections differently by maintaining two different rules one for the external interface and one from the internal We also register for both tcp and tcp6 since those are different listening sockets and addresses; -we don't bother with ipv6 and separate rules. We use nfail = 6, +we don't bother with IPv6 and separate rules. We use nfail = 6, because ssh allows 3 password attempts per connection, and this will let us have 2 connections before blocking. Finally we block for an hour; we could block forever too by specifying * in the duration column. -blacklistd and the library use syslog(3) to report errors. The -blacklist filter state is persisted automatically in /var/db/blacklistd.db +blocklistd and the library use syslog(3) to report errors. The +blocklist filter state is persisted automatically in /var/db/blocklistd.db so that if the daemon is restarted, it remembers what connections is currently handling. To start from a fresh state (if you restart npf too for example), you can use -f. To watch the daemon at work, @@ -80,27 +80,27 @@ you can use -d. The current control file is designed for npf, and it uses the dynamic rule feature. You need to create a dynamic rule in your /etc/npf.conf on the group referring to the interface you want to block -called blacklistd as follows: +called blocklistd as follows: ext_if=bge0 int_if=sk0 group "external" on $ext_if { ... - ruleset "blacklistd-ext" - ruleset "blacklistd" + ruleset "blocklistd-ext" + ruleset "blocklistd" ... } group "internal" on $int_if { ... - ruleset "blacklistd-int" + ruleset "blocklistd-int" ... } -You can use 'blacklistctl dump -a' to list all the current entries +You can use 'blocklistctl dump -a' to list all the current entries in the database; the ones that have nfail / where urrent ->= otal, should have an id assosiated with them; this means that +>= otal, should have an id associated with them; this means that there is a packet filter rule added for that entry. For npf, you can examine the packet filter dynamic rule entries using 'npfctl rule list'. The number of current entries can exceed diff --git a/contrib/blocklist/TODO b/contrib/blocklist/TODO index 9925020d54bb..d67111bd5139 100644 --- a/contrib/blocklist/TODO +++ b/contrib/blocklist/TODO @@ -1,4 +1,4 @@ -# $NetBSD: TODO,v 1.7 2015/01/23 21:34:01 christos Exp $ +# $NetBSD: TODO,v 1.3 2025/02/05 20:22:26 christos Exp $ - don't poll periodically, find the next timeout - use the socket also for commands? Or separate socket? @@ -17,5 +17,48 @@ -n block unblock -- do we need an api in blacklistctl to perform maintenance -- fix the blacklistctl output to be more user friendly +- do we need an api in blocklistctl to perform maintenance +- fix the blocklistctl output to be more user friendly + +- figure out some way to do distributed operation securely (perhaps with + a helper daemon that authenticates local sockets and then communicates + local DB changes to the central server over a secure channel -- + perhaps blocklistd-helper can have a back-end that can send updates to + a central server) + +- add "blocklistd -l" to enable filter logging on all rules by default + +- add some new options in the config file + + "/all" - block both TCP and UDP (on the proto field?) + + "/log" - enable filter logging (if not the default) (on the name field?) + "/nolog"- disable filter logging (if not the default) (on the name field?) + + The latter two probably require a new parameter for blocklistd-helper. + +- "blocklistd -f" should (also?) be a blocklistctl function!?!?! + +- if blocklistd was started with '-r' then a SIGHUP should also do a + "control flush $rulename" and then re-add all the filter rules? + +- should/could /etc/rc.conf.d/ipfilter be created with the following? + + reload_postcmd=blocklistd_reload + start_postcmd=blocklistd_start + stop_precmd=blocklistd_stop + blocklistd_reload () + { + /etc/rc.d/blocklistd reload # IFF SIGHUP does flush/re-add + # /etc/rc.d/blocklistd restart + } + blocklistd_stop () + { + /etc/rc.d/blocklistd stop + } + blocklistd_start () + { + /etc/rc.d/blocklistd start + } + + or is there a better way? diff --git a/contrib/blocklist/bin/Makefile b/contrib/blocklist/bin/Makefile index 280c72fd3af1..1856e2524f3c 100644 --- a/contrib/blocklist/bin/Makefile +++ b/contrib/blocklist/bin/Makefile @@ -1,12 +1,12 @@ -# $NetBSD: Makefile,v 1.11 2015/01/27 19:40:36 christos Exp $ +# $NetBSD: Makefile,v 1.1.1.1 2020/06/15 01:52:52 christos Exp $ BINDIR=/sbin -PROGS=blacklistd blacklistctl -MAN.blacklistd=blacklistd.8 blacklistd.conf.5 -MAN.blacklistctl=blacklistctl.8 -SRCS.blacklistd = blacklistd.c conf.c run.c state.c support.c internal.c -SRCS.blacklistctl = blacklistctl.c conf.c state.c support.c internal.c +PROGS=blocklistd blocklistctl +MAN.blocklistd=blocklistd.8 blocklistd.conf.5 +MAN.blocklistctl=blocklistctl.8 +SRCS.blocklistd = blocklistd.c conf.c run.c state.c support.c internal.c +SRCS.blocklistctl = blocklistctl.c conf.c state.c support.c internal.c DBG=-g LDADD+=-lutil diff --git a/contrib/blocklist/bin/blacklistctl.8 b/contrib/blocklist/bin/blocklistctl.8 similarity index 59% rename from contrib/blocklist/bin/blacklistctl.8 rename to contrib/blocklist/bin/blocklistctl.8 index 7c6521117745..a98c16374f19 100644 --- a/contrib/blocklist/bin/blacklistctl.8 +++ b/contrib/blocklist/bin/blocklistctl.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistctl.8,v 1.9 2016/06/08 12:48:37 wiz Exp $ +.\" $NetBSD: blocklistctl.8,v 1.4 2025/02/07 01:35:38 kre Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,27 +27,43 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 7, 2016 -.Dt BLACKLISTCTL 8 +.Dd January 27, 2025 +.Dt BLOCKLISTCTL 8 .Os .Sh NAME -.Nm blacklistctl -.Nd display and change the state of blacklistd +.Nm blocklistctl +.Nd display and change the state of the blocklistd database .Sh SYNOPSIS .Nm .Cm dump .Op Fl abdnrw +.Op Fl D Ar dbname .Sh DESCRIPTION .Nm -is a program used to display the state of -.Xr blacklistd 8 +is a program used to display and change the state of the +.Xr blocklistd 8 +database. +The following sub-commands are supported: +.Ss dump .Pp -The following options are available: +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 embryonic ones. +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 blocklistd +database file to use. +The default is +.Pa /var/db/blocklistd.db . .It Fl d Increase debugging level. .It Fl n @@ -59,18 +75,47 @@ 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 +.Xr blocklistd 8 .Sh NOTES Sometimes the reported number of failed attempts can exceed the number of attempts that -.Xr blacklistd 8 +.Xr blocklistd 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 +.Xr blocklistd 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 diff --git a/contrib/blocklist/bin/blacklistctl.c b/contrib/blocklist/bin/blocklistctl.c similarity index 94% rename from contrib/blocklist/bin/blacklistctl.c rename to contrib/blocklist/bin/blocklistctl.c index 89b72921caf5..8c75e0430c61 100644 --- a/contrib/blocklist/bin/blacklistctl.c +++ b/contrib/blocklist/bin/blocklistctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistctl.c,v 1.23 2018/05/24 19:21:01 christos Exp $ */ +/* $NetBSD: blocklistctl.c,v 1.4 2025/02/11 17:48:30 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,8 +32,10 @@ #include "config.h" #endif +#ifdef HAVE_SYS_CDEFS_H #include -__RCSID("$NetBSD: blacklistctl.c,v 1.23 2018/05/24 19:21:01 christos Exp $"); +#endif +__RCSID("$NetBSD: blocklistctl.c,v 1.4 2025/02/11 17:48:30 christos Exp $"); #include #include @@ -63,7 +65,8 @@ usage(int c) warnx("Missing/unknown command"); else if (c != '?') warnx("Unknown option `%c'", (char)c); - fprintf(stderr, "Usage: %s dump [-abdnrw]\n", getprogname()); + fprintf(stderr, + "Usage: %s dump [-abdnrw] [-D dbname]\n", getprogname()); exit(EXIT_FAILURE); } diff --git a/contrib/blocklist/bin/blacklistd.8 b/contrib/blocklist/bin/blocklistd.8 similarity index 85% rename from contrib/blocklist/bin/blacklistd.8 rename to contrib/blocklist/bin/blocklistd.8 index 82e1f15f61c9..e0b9fb482cbd 100644 --- a/contrib/blocklist/bin/blacklistd.8 +++ b/contrib/blocklist/bin/blocklistd.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.8,v 1.23 2020/04/21 13:57:12 christos Exp $ +.\" $NetBSD: blocklistd.8,v 1.8 2025/02/25 22:13:34 christos Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,11 +27,11 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 21, 2020 -.Dt BLACKLISTD 8 +.Dd February 25, 2025 +.Dt BLOCKLISTD 8 .Os .Sh NAME -.Nm blacklistd +.Nm blocklistd .Nd block and release ports on demand to avoid DoS abuse .Sh SYNOPSIS .Nm @@ -53,22 +53,35 @@ 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 sockspath +.Ar sockpath or if that is not specified to -.Pa /var/run/blacklistd.sock . +.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 in -.Ar configfile -with syntax specified in -.Xr blacklistd.conf 5 . +This tuple is consulted against entries from the +.Ar configfile , +with the syntax specified in +.Xr blocklistd.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 +file descriptor associated with the connection the client wants to blocklist as well as passing socket credentials. .Pp The file descriptor is used to retrieve information (address and port) @@ -116,7 +129,7 @@ specified by the arguments. The .Ar rulename argument can be set from the command line (default -.Dv blacklistd ) . +.Dv blocklistd ) . 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 @@ -152,8 +165,8 @@ The following options are available: .It Fl C Ar controlprog Use .Ar controlprog -to communicate with the packet filter, usually -.Pa /usr/libexec/blacklistd-helper . +to communicate with the packet filter, instead of the default, which is +.Pa /usr/libexec/blocklistd-helper . The following arguments are passed to the control program: .Bl -tag -width protocol .It action @@ -161,7 +174,7 @@ The action to perform: .Dv add , .Dv rem , or -.Dv flush +.Dv flush ; to add, remove or flush a firewall rule. .It name The rule name. @@ -183,13 +196,17 @@ 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, usually -.Pa /etc/blacklistd.conf . +The name of the configuration file to read. +The default when +.Fl c +is not given is +.Pa /etc/blocklistd.conf . .It Fl D Ar dbfile The Berkeley DB file where .Nm -stores its state, usually -.Pa /var/db/blacklistd.db . +stores its state. +It defaults to +.Pa /var/db/blocklistd.db . .It Fl d Normally, .Nm @@ -203,14 +220,14 @@ are deleted by invoking the control script as: .Bd -literal -offset indent control flush .Ed -.It Fl P Ar sockspathsfile +.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 . +.Dv blocklistd . .It Fl r Re-read the firewall rules from the internal database, then remove and re-add them. @@ -256,19 +273,21 @@ This signal tells 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 +.Bl -tag -width /usr/libexec/blocklistd-helper -compact +.It Pa /usr/libexec/blocklistd-helper Shell script invoked to interface with the packet filter. -.It Pa /etc/blacklistd.conf +.It Pa /etc/blocklistd.conf Configuration file. -.It Pa /var/db/blacklistd.db +.It Pa /var/db/blocklistd.db Database of current connection entries. -.It Pa /var/run/blacklistd.sock +.It Pa /var/run/blocklistd.sock Socket to receive connection notifications. .El .Sh SEE ALSO -.Xr blacklistd.conf 5 , -.Xr blacklistctl 8 , +.Xr blocklistd.conf 5 , +.Xr blocklistctl 8 , +.Xr ipf 8 , +.Xr ipfw 8 , .Xr pfctl 8 , .Xr syslogd 8 .Sh HISTORY diff --git a/contrib/blocklist/bin/blacklistd.c b/contrib/blocklist/bin/blocklistd.c similarity index 91% rename from contrib/blocklist/bin/blacklistd.c rename to contrib/blocklist/bin/blocklistd.c index 714abcbcaf0e..4846b507c8d1 100644 --- a/contrib/blocklist/bin/blacklistd.c +++ b/contrib/blocklist/bin/blocklistd.c @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $ */ +/* $NetBSD: blocklistd.c,v 1.10 2025/03/26 17:09:35 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -31,8 +31,11 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif + +#ifdef HAVE_SYS_CDEFS_H #include -__RCSID("$NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $"); +#endif +__RCSID("$NetBSD: blocklistd.c,v 1.10 2025/03/26 17:09:35 christos Exp $"); #include #include @@ -175,6 +178,8 @@ process(bl_t bl) struct dbinfo dbi; struct timespec ts; + memset(&dbi, 0, sizeof(dbi)); + memset(&c, 0, sizeof(c)); if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); return; @@ -188,10 +193,11 @@ process(bl_t bl) if (getremoteaddress(bi, &rss, &rsl) == -1) goto out; - if (debug) { + if (debug || bi->bi_msg[0]) { sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&rss); - (*lfun)(LOG_DEBUG, "processing type=%d fd=%d remote=%s msg=%s" - " uid=%lu gid=%lu", bi->bi_type, bi->bi_fd, rbuf, + (*lfun)(bi->bi_msg[0] ? LOG_INFO : LOG_DEBUG, + "processing type=%d fd=%d remote=%s msg=%s uid=%lu gid=%lu", + bi->bi_type, bi->bi_fd, rbuf, bi->bi_msg, (unsigned long)bi->bi_uid, (unsigned long)bi->bi_gid); } @@ -216,16 +222,19 @@ process(bl_t bl) 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 the application has signaled abusive behavior, set the + * number of fails to be two less than the configured limit. + * Fall through to the normal BL_ADD and BL_BADUSER processing, + * which will increment the failure count to the threshhold, and + * block the abusive address. */ if (c.c_nfail != -1) - dbi.count = c.c_nfail - 1; + dbi.count = c.c_nfail - 2; /*FALLTHROUGH*/ case BL_ADD: + dbi.count++; /* will become += 2 */ + /*FALLTHROUGH*/ + case BL_BADUSER: dbi.count++; dbi.last = ts.tv_sec; if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { @@ -254,9 +263,6 @@ process(bl_t bl) dbi.count = 0; dbi.last = 0; break; - case BL_BADUSER: - /* ignore for now */ - break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } @@ -334,7 +340,7 @@ static void addfd(struct pollfd **pfdp, bl_t **blp, size_t *nfd, size_t *maxfd, const char *path) { - bl_t bl = bl_create(true, path, vflag ? vdlog : vsyslog); + bl_t bl = bl_create(true, path, vflag ? vdlog : vsyslog_r); if (bl == NULL || !bl_isconnected(bl)) exit(EXIT_FAILURE); if (*nfd >= *maxfd) { @@ -395,15 +401,25 @@ rules_flush(void) static void rules_restore(void) { + DB *db; struct conf c; struct dbinfo dbi; unsigned int f; - for (f = 1; state_iterate(state, &c, &dbi, f) == 1; f = 0) { + db = state_open(dbfile, O_RDONLY, 0); + if (db == NULL) { + (*lfun)(LOG_ERR, "Can't open `%s' to restore state (%m)", + dbfile); + return; + } + for (f = 1; state_iterate(db, &c, &dbi, f) == 1; f = 0) { if (dbi.id[0] == '\0') continue; (void)run_change("add", &c, dbi.id, sizeof(dbi.id)); + state_put(state, &c, &dbi); } + state_close(db); + state_sync(state); } int diff --git a/contrib/blocklist/bin/blacklistd.conf.5 b/contrib/blocklist/bin/blocklistd.conf.5 similarity index 83% rename from contrib/blocklist/bin/blacklistd.conf.5 rename to contrib/blocklist/bin/blocklistd.conf.5 index 70036441eb4b..3a7dbfc07f58 100644 --- a/contrib/blocklist/bin/blacklistd.conf.5 +++ b/contrib/blocklist/bin/blocklistd.conf.5 @@ -1,6 +1,6 @@ -.\" $NetBSD: blacklistd.conf.5,v 1.9 2019/11/06 20:33:30 para Exp $ +.\" $NetBSD: blocklistd.conf.5,v 1.7 2025/02/11 17:47:05 christos Exp $ .\" -.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" Copyright (c) 2015, 2025 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -27,17 +27,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd May 18, 2020 -.Dt BLACKLISTD.CONF 5 +.Dd February 5, 2025 +.Dt BLOCKLISTD.CONF 5 .Os .Sh NAME -.Nm blacklistd.conf -.Nd configuration file format for blacklistd +.Nm blocklistd.conf +.Nd configuration file format for blocklistd .Sh DESCRIPTION The .Nm file contains configuration entries for -.Xr blacklistd 8 +.Xr blocklistd 8 in a fashion similar to .Xr inetd.conf 5 . Only one entry per line is permitted. @@ -48,34 +48,34 @@ Comments are denoted by a at the beginning of a line. .Pp There are two kinds of configuration lines, -.Va local +.Va [local] and -.Va remote . +.Va [remote] . By default, configuration lines are -.Va local , +.Va [local] , i.e. the address specified refers to the addresses on the local machine. To switch to between -.Va local +.Va [local] and -.Va remote +.Va [remote] configuration lines you can specify the stanzas: .Dq [local] and .Dq [remote] . .Pp On -.Va local +.Va [local] and -.Va remote +.Va [remote] lines .Dq * means use the default, or wildcard match. In addition, for -.Va remote +.Va [remote] lines .Dq = means use the values from the matched -.Va local +.Va [local] configuration line. .Pp The first four fields, @@ -85,9 +85,9 @@ The first four fields, and .Va owner are used to match the -.Va local +.Va [local] or -.Va remote +.Va [remote] addresses, whereas the last 3 fields .Va name , .Va nfail , @@ -110,8 +110,8 @@ The 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. +can have multiple addresses in different protocols where the mask has a +different size. .Pp The .Dv mask @@ -143,8 +143,8 @@ The field, is the name of the packet filter rule to be used. If the .Va name -starts with a -.Dq - , +starts with a hyphen +.Pq Dq - , then the default rulename is prepended to the given name. If the .Dv name @@ -160,13 +160,13 @@ field contains the number of failed attempts before access is blocked, defaulting to .Dq * meaning never, and the last field -.Va disable +.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 disable +.Va duration is seconds, but one can specify suffixes for different units, such as .Dq m for minutes @@ -176,28 +176,34 @@ for hours and for days. .Pp Matching is done first by checking the -.Va local +.Va [local] rules individually, in the order of the most specific to the least specific. -If a match is found, then the -.Va remote +If a match is found, then the matching +.Va [remote] rules are applied. The .Va name , .Va nfail , and -.Va disable +.Va duration fields can be altered by the -.Va remote +.Va [remote] rule that matched. .Pp The -.Va remote +.Va [remote] rules can be used for allowing specific addresses, changing the mask -size, the rule that the packet filter uses, the number of failed attempts, -or the block duration. +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 +.Bl -tag -width /etc/blocklistd.conf -compact +.It Pa /etc/blocklistd.conf Configuration file. .El .Sh EXAMPLES @@ -209,13 +215,15 @@ bnx0:ssh * * * * 3 6h [remote] # Never block 1.2.3.4 1.2.3.4:ssh * * * * * * -# For addresses coming from 8.8.0.0/16 block whole /24 networks instead of +# 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 +.Xr blocklistctl 8 , +.Xr blocklistd 8 .Sh HISTORY .Nm first appeared in *** 2790 LINES SKIPPED *** From nobody Tue Oct 14 00:57:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clwmX65P0z6Cf7k; Tue, 14 Oct 2025 00:57: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 4clwmX4TW0z3vLH; Tue, 14 Oct 2025 00:57:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=avv082mq+TMVcgd90z4b7ULaO4CHaccqui1zyKSKpBY=; b=E8wguCGYDeMwdiq6Q7X3B4YG4aDKh3K3K+V3Q2KzZMKYbAtD0Ot/89ie2x+BuXpA3jgluX sJ8BZ9XOuMfXob2mLq2kETIFsovN8nCXNdLOgbdJIURgE58iaYoEGhFpN2gVDNmqL/Do8C gLNdWnSYirpZgLbPf1XoHdHnCMA3cKEKItWrlQXWRGNIzu5GnidEi53qVyXbLAfJjJlEy5 BMu73Wzkl4Jz7F99lLgoapmBqqQ1yM/1bu+4PrESOzGl7Q7PAUfm8TIXHdogjzx8zXqOsM e8EtbKzFkH7lD8PBKyEa5AKK5MY5NNJXMe5J2ymuhckUM8fzdT7Mo2qctvuWVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=avv082mq+TMVcgd90z4b7ULaO4CHaccqui1zyKSKpBY=; b=g9Az4Rt+fx5We1S+0HFd/+yFOURQBB4AnLwbSQ9BO9hHMvwNiODer/wHMLEdCEQUv54j+P Zy9VLIhkkfmj21UeG+0UnSxR6mM6QJSuQV71KPo/Bamr1+0FVMZdJpolnCgLrjcITQnGf0 QPW8gMG5ZdSu0ynpjIDCI9KeVvK9RJ7j3lXZF+hziB9xVPA9uC0Y3qccAg8bh4TOmopSmU qT14a+gLsnFfHmAfShWGCHdtuKBCM5zqL41dL3fesCnvnmhbx5syrXC09h7fkHnKgD22tl DcDnf7WOEmT80I5cVswoMe4b7/fd54Axq8PhhZl8UrE0Y4J+25UuE5hzLXE8WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760403452; a=rsa-sha256; cv=none; b=vrh+M7JjnQ8hpWyUamOoo9+LT8MkKbeL7LQFF6XxOvZq0Mk3Z0ME9/FnxpOwXMXq251CoY GKqkZXM1drQhiwVyJepknmOGdB3u1YnSGPV8mSG8+Tg+Gl7hfuMsUEdWs1h5NGLGOe5GcN sLv2FcvQ3ydhOBhl/bLLaywYB0RScYXSaitQxeSlrI0urZ7XDM3W565LdvC8bBb0ZeDzPd /g5nSz5qHuxyutWmARwNC8gEl4QWcbIwBvwkkyxCY0fon+pFJ/iqnAk2EfODPNiXGBItAX 2AXpGyDTVwVdupb6jdSkpPr9k7iLzbRonBqV1Q63fyXH23KRVPHNNbiEGa9pXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clwmX3r19zVVB; Tue, 14 Oct 2025 00:57: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 59E0vW5a021562; Tue, 14 Oct 2025 00:57:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E0vWb1021559; Tue, 14 Oct 2025 00:57:32 GMT (envelope-from git) Date: Tue, 14 Oct 2025 00:57:32 GMT Message-Id: <202510140057.59E0vWb1021559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: a719ef67e8ed - stable/15 - blocklist: Revert upstream commit ddf6d71 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a719ef67e8ed2cbae5f397d2a4680a02495b79ab Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=a719ef67e8ed2cbae5f397d2a4680a02495b79ab commit a719ef67e8ed2cbae5f397d2a4680a02495b79ab Author: Jose Luis Duran AuthorDate: 2025-10-11 14:15:03 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-14 00:52:47 +0000 blocklist: Revert upstream commit ddf6d71 Upstream commit ddf6d71 ("implement BLOCKLIST_BAD_USER as a "one-count" failure") introduced BLOCKLIST_BAD_USER with a one-count failure mechanism. BLOCKLIST_AUTH_FAIL was implemented with a two-count failure mechanism. Since we have been utilizing BLOCKLIST_AUTH_FAIL, the number of failed attempts now doubles towards the maximum limit (nfails), giving system administrators the impression that the number of failed authentication attempts is inaccurate. Revert this commit until a consensus has been reached. We do not want to introduce yet another breaking change with the renaming of the library. Approved by: emaste (mentor) MFC after: 2 days (cherry picked from commit 4d56eb007b18881becb2107f87bd2a7edca3e6bf) --- contrib/blocklist/bin/blocklistd.c | 18 +++++++++--------- contrib/blocklist/lib/libblocklist.3 | 32 +++++++++++++++++++------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/contrib/blocklist/bin/blocklistd.c b/contrib/blocklist/bin/blocklistd.c index 4846b507c8d1..03a1dbbf056c 100644 --- a/contrib/blocklist/bin/blocklistd.c +++ b/contrib/blocklist/bin/blocklistd.c @@ -222,19 +222,16 @@ process(bl_t bl) switch (bi->bi_type) { case BL_ABUSE: /* - * If the application has signaled abusive behavior, set the - * number of fails to be two less than the configured limit. - * Fall through to the normal BL_ADD and BL_BADUSER processing, - * which will increment the failure count to the threshhold, and - * block the abusive address. + * 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 != -1) - dbi.count = c.c_nfail - 2; + dbi.count = c.c_nfail - 1; /*FALLTHROUGH*/ case BL_ADD: - dbi.count++; /* will become += 2 */ - /*FALLTHROUGH*/ - case BL_BADUSER: dbi.count++; dbi.last = ts.tv_sec; if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { @@ -263,6 +260,9 @@ process(bl_t bl) dbi.count = 0; dbi.last = 0; break; + case BL_BADUSER: + /* ignore for now */ + break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } diff --git a/contrib/blocklist/lib/libblocklist.3 b/contrib/blocklist/lib/libblocklist.3 index 7a016625a047..fd6eb93eb756 100644 --- a/contrib/blocklist/lib/libblocklist.3 +++ b/contrib/blocklist/lib/libblocklist.3 @@ -106,20 +106,26 @@ The .Ar action parameter can take these values: .Bl -tag -width ".Dv BLOCKLIST_ABUSIVE_BEHAVIOR" -.It Va BLOCKLIST_BAD_USER -The sending daemon has determined the username presented for -authentication is invalid. -This is considered as one failure count. -.It Va BLOCKLIST_AUTH_FAIL +.It Dv BLOCKLIST_AUTH_FAIL There was an unsuccessful authentication attempt. -This is considered as two failure counts together. -.It Va BLOCKLIST_ABUSIVE_BEHAVIOR -The sending daemon has detected abusive behavior from the remote system. -This is considered as a total immediate failure. -The remote address will be blocked as soon as possible. -.It Va BLOCKLIST_AUTH_OK -A valid user successfully authenticated. -Any entry for the remote address will be removed as soon as possible. +.It Dv BLOCKLIST_AUTH_OK +A user successfully authenticated. +.It Dv BLOCKLIST_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 BLOCKLIST_BAD_USER +The sending daemon has determined the username +presented for authentication is invalid. +The +.Xr blocklistd 8 +daemon compares the username to a configured list of forbidden +usernames and +blocks the address immediately if a forbidden username matches. +(The +.Dv BLOCKLIST_BAD_USER +support is not currently available.) .El .Pp The From nobody Tue Oct 14 00:57:33 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clwmZ1Nnhz6Cf7n; Tue, 14 Oct 2025 00:57: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 4clwmY6D0Lz3vTK; Tue, 14 Oct 2025 00:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SYEoRmB2eWwW72rV0Iik5942KuAMfyB1h4Xv+4O2Tsk=; b=pwahNlHZ1jLkaH+EdmYnd5Y6230iE/OehJlejOIxa+0OmVsy7B1v35TVYz6hFHaK1yawb4 Qih6Q29IUTHr/urEH2Bj40Evm0Yue8F7E8PJxkusGE+BrHLepxGCBcatipUjPh9VOwr0eU aj87srMcW+8yEIQCQLNlwWwvy9qkUXGfmpBNr1zR62c3hR7hpBX9TSRmD4+ypsca/mpara pMnYOhtwOwQwTdQGEp0yE/S8HmplHWLirPfzRU/JiImlzcqQGsabfzOBfss1YKuc2ED2Q/ bUp6NJLCf0IUet7WobQYPemh6BmlIO4BJtibC/Ak/+sUzL3WUIw/+0c4rfUJ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SYEoRmB2eWwW72rV0Iik5942KuAMfyB1h4Xv+4O2Tsk=; b=trw0r0RTt6iTRbM/1DgedEK+opvF67NeiSKMjpSWSueBBZiJ+QF2XS2+Sy8Jc9enBvxFHe EG0u/ud6+L3d4OlI1/AVFQQGbbU4dZBGtJVtHqI47jsIs7KDsGyPK0l5aOnLmbnO0kdgF/ Khg748BqOkx7m40u7f5ODqnLoGNzwYR8hq8wyGtmoxj7Li6Lqkr26XRz7BvUnVRIopSIFd Mp13wdOwDKEYHOmRAAI+k4Smt0ThEhaKY7HzBDDAw+Wc+P6EAvv4gFX4zpgfg9NSFfzDKS UqZBXLWWMZopW7LDT5+dRX8JaT+GbddXdc+EeK6oaypmlyW2onoFk6+Ibrcj1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760403453; a=rsa-sha256; cv=none; b=jlv5iaRc+vTDut9oO5qtTlCgDJHUxBtpNmsLmTBWbGDhdltC12HUG4ZOMIOgDH2E7dn+5X hdvLYPf3h/nBiyB7UEEle0GWHrQvRlvnoJsZRXHJUwC6Z9v/tXkPFjlmIZTAYje7W/WOd6 FtM8VNYnDUU4054e1BD2M/uwgIZZ5XyPXa4uMsvVVurLU7Qh8go6eLwmmFQuTEyEHD3uuG rsnSD4RPr8sbageQ+Rrxvse5VHz6e/RD7PfnT3BTNH0S76T4G+Us2j5iZY1fSeocdES9v5 wQLtz+omZxQJaoKMW31Y+B2zhVbblbwdjWS3eHOmCR2hpX7XUYvOjmgI8haqHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clwmY4qKvzVC1; Tue, 14 Oct 2025 00:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59E0vXdQ021599; Tue, 14 Oct 2025 00:57:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E0vXQf021596; Tue, 14 Oct 2025 00:57:33 GMT (envelope-from git) Date: Tue, 14 Oct 2025 00:57:33 GMT Message-Id: <202510140057.59E0vXQf021596@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 7f6f2139eef9 - stable/15 - blocklist: Rename blacklist to blocklist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7f6f2139eef9f9fc263977c847c6dbf235a1b1b7 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=7f6f2139eef9f9fc263977c847c6dbf235a1b1b7 commit 7f6f2139eef9f9fc263977c847c6dbf235a1b1b7 Author: Jose Luis Duran AuthorDate: 2025-10-12 17:14:27 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-14 00:53:16 +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 warning - Old firewall rules and anchor names should work, but emitting an ugly warning - Old MK_BLACKLIST* knobs are wired to the new ones Although care has been taken not to break current configurations, this 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 (cherry picked from commit 7238317403b95a8e35cf0bc7cd66fbd78ecbe521) --- 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 => blocklist.c} | 16 +- .../{blacklist_client.h => 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 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. + */ +#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 == 0) + warnx("Missing/unknown command"); + else if (c != '?') + 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 == -1) + return "*"; + snprintf(buf, len, "%d", val); + return buf; +} + +int +main(int argc, char *argv[]) +{ + const char *dbname = _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 = wide = blocked = all = remain = 0; + lfun = dlog; + + if (argc == 1 || strcmp(argv[1], "dump") != 0) + usage(0); + + argc--; + argv++; + + while ((o = getopt(argc, argv, "abD:dnrw")) != -1) + switch (o) { + case 'a': + all = 1; + blocked = 0; + break; + case 'b': + blocked = 1; + break; + case 'D': + dbname = optarg; + break; + case 'd': + debug++; + break; + case 'n': + noheader = 1; + break; + case 'r': + remain = 1; + break; + case 'w': + wide = 1; + break; + default: + usage(o); + } + + db = state_open(dbname, O_RDONLY, 0); + if (db == NULL) + err(EXIT_FAILURE, "Can't open `%s'", dbname); + + clock_gettime(CLOCK_REALTIME, &ts); + wide = 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 = 1; state_iterate(db, &c, &dbi, i) != 0; i = 0) { + char buf[BUFSIZ]; + char mbuf[64], pbuf[64]; + if (!all) { + if (blocked) { + if (c.c_nfail == -1 || dbi.count < c.c_nfail) + continue; + } else { + if (dbi.count >= 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 == -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/blacklistd.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 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. + */ +#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 = _PATH_BLCONF; +static DB *state; +static const char *dbfile = _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 != '?') + 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 = sizeof(*rss); + memset(rss, 0, *rsl); + + if (getpeername(bi->bi_fd, (void *)rss, rsl) != -1) + return 0; + + if (errno != ENOTCONN) { + (*lfun)(LOG_ERR, "getpeername failed (%m)"); + return -1; + } + + if (bi->bi_slen == 0) { + (*lfun)(LOG_ERR, "unconnected socket with no peer in message"); + return -1; + } + + switch (bi->bi_ss.ss_family) { + case AF_INET: + *rsl = sizeof(struct sockaddr_in); + break; + case AF_INET6: + *rsl = 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 != bi->bi_slen) { + (*lfun)(LOG_ERR, "bad client passed socket length %u != %u", + (unsigned)*rsl, (unsigned)bi->bi_slen); + return -1; + } + + memcpy(rss, &bi->bi_ss, *rsl); + +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + if (*rsl != rss->ss_len) { + (*lfun)(LOG_ERR, + "bad client passed socket internal length %u != %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) == -1) { + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + return; + } + + if ((bi = bl_recv(bl)) == NULL) { + (*lfun)(LOG_ERR, "no message (%m)"); + return; + } + + if (getremoteaddress(bi, &rss, &rsl) == -1) + goto out; + + if (debug || bi->bi_msg[0]) { + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&rss); + (*lfun)(bi->bi_msg[0] ? LOG_INFO : LOG_DEBUG, + "processing type=%d fd=%d remote=%s msg=%s uid=%lu gid=%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) == NULL) { + (*lfun)(LOG_DEBUG, "no rule matched"); + goto out; + } + + + if (state_get(state, &c, &dbi) == -1) + goto out; + + if (debug) { + char b1[128], b2[128]; + (*lfun)(LOG_DEBUG, "%s: initial db state for %s: count=%d/%d " + "last=%s now=%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 != -1) + dbi.count = c.c_nfail - 1; + /*FALLTHROUGH*/ + case BL_ADD: + dbi.count++; + dbi.last = ts.tv_sec; + if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { + /* + * No point in re-adding the rule. + * It might exist already due to latency in processing + * and removing the rule is the wrong thing to do as + * it allows a window to attack again. + */ + if (dbi.id[0] == '\0') { + int res = run_change("add", &c, + dbi.id, sizeof(dbi.id)); + if (res == -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 == 0) + goto out; + dbi.count = 0; + dbi.last = 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=%d/%d " + "last=%s now=%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) == -1) + return; + + oifas = ifas; + ifas = 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 = &c.c_ss; + + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + return; + } + +again: + for (n = 0, f = 1; state_iterate(state, &c, &dbi, f) == 1; + f = 0, n++) + { + time_t when = 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=%d duration=%d " + "last=%s " "now=%s", __func__, n, buf, dbi.count, + c.c_duration, fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } + if (c.c_duration == -1 || when >= 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 seconds", + 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 = bl_create(true, path, vflag ? vdlog : vsyslog_r); + if (bl == NULL || !bl_isconnected(bl)) + exit(EXIT_FAILURE); + if (*nfd >= *maxfd) { + *maxfd += 10; + *blp = realloc(*blp, sizeof(**blp) * *maxfd); + if (*blp == NULL) + err(EXIT_FAILURE, "malloc"); + *pfdp = realloc(*pfdp, sizeof(**pfdp) * *maxfd); + if (*pfdp == NULL) + err(EXIT_FAILURE, "malloc"); + } + + (*pfdp)[*nfd].fd = bl_getfd(bl); + (*pfdp)[*nfd].events = POLLIN; + (*blp)[*nfd] = bl; + *nfd += 1; +} + +static void +uniqueadd(struct conf ***listp, size_t *nlist, size_t *mlist, struct conf *c) +{ + struct conf **list = *listp; + + if (c->c_name[0] == '\0') + return; + for (size_t i = 0; i < *nlist; i++) { + if (strcmp(list[i]->c_name, c->c_name) == 0) + return; + } + if (*nlist == *mlist) { + *mlist += 10; + void *p = realloc(*listp, *mlist * sizeof(*list)); + if (p == NULL) + err(EXIT_FAILURE, "Can't allocate for rule list"); + list = *listp = p; + } + list[(*nlist)++] = c; +} + +static void +rules_flush(void) +{ + struct conf **list; + size_t nlist, mlist; + + list = NULL; + mlist = nlist = 0; + for (size_t i = 0; i < rconf.cs_n; i++) + uniqueadd(&list, &nlist, &mlist, &rconf.cs_c[i]); + for (size_t i = 0; i < lconf.cs_n; i++) + uniqueadd(&list, &nlist, &mlist, &lconf.cs_c[i]); + + for (size_t i = 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 = state_open(dbfile, O_RDONLY, 0); + if (db == NULL) { + (*lfun)(LOG_ERR, "Can't open `%s' to restore state (%m)", + dbfile); + return; + } + for (f = 1; state_iterate(db, &c, &dbi, f) == 1; f = 0) { + if (dbi.id[0] == '\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 = NULL; + blsock = NULL; + maxblsock = nblsock = 0; + flush = 0; + restore = 0; + tout = 0; + flags = O_RDWR|O_EXCL|O_CLOEXEC; + while ((c = getopt(argc, argv, "C:c:D:dfP:rR:s:t:v")) != -1) { + switch (c) { + case 'C': + controlprog = optarg; + break; + case 'c': + configfile = optarg; + break; + case 'D': + dbfile = optarg; + break; + case 'd': + debug++; + break; + case 'f': + flush++; + break; + case 'P': + spath = optarg; + break; + case 'R': + rulename = optarg; + break; + case 'r': + restore++; + break; + case 's': + if (nblsock >= maxblsock) { + maxblsock += 10; + void *p = realloc(blsock, + sizeof(*blsock) * maxblsock); + if (p == NULL) + err(EXIT_FAILURE, + "Can't allocate memory for %zu sockets", + maxblsock); + blsock = p; + } + blsock[nblsock++] = optarg; + break; + case 't': + tout = atoi(optarg) * 1000; + break; + case 'v': + vflag++; + break; + default: + usage(c); + } + } + + argc -= 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 = dlog; + if (tout == 0) + tout = 5000; + } else { + if (tout == 0) + tout = 15000; + } + + update_interfaces(); + conf_parse(configfile); + if (flush) { + rules_flush(); + if (!restore) + flags |= O_TRUNC; + } + + struct pollfd *pfd = NULL; + bl_t *bl = NULL; + size_t nfd = 0; + size_t maxfd = 0; + + for (size_t i = 0; i < nblsock; i++) + addfd(&pfd, &bl, &nfd, &maxfd, blsock[i]); + free(blsock); + + if (spath) { + FILE *fp = fopen(spath, "r"); + char *line; + if (fp == NULL) + err(EXIT_FAILURE, "Can't open `%s'", spath); + for (; (line = fparseln(fp, NULL, NULL, NULL, 0)) != NULL; + free(line)) + addfd(&pfd, &bl, &nfd, &maxfd, line); + fclose(fp); + } + if (nfd == 0) + addfd(&pfd, &bl, &nfd, &maxfd, _PATH_BLSOCK); + + state = state_open(dbfile, flags, 0600); + if (state == NULL) + state = state_open(dbfile, flags | O_CREAT, 0600); + if (state == NULL) + return EXIT_FAILURE; + + if (restore) { + if (!flush) + rules_flush(); + rules_restore(); + } + + if (!debug) { + if (daemon(0, 0) == -1) + err(EXIT_FAILURE, "daemon failed"); + if (pidfile(NULL) == -1) + err(EXIT_FAILURE, "Can't create pidfile"); + } + + for (size_t t = 0; !done; t++) { + if (readconf) { + readconf = 0; + conf_parse(configfile); + } + ret = poll(pfd, (nfds_t)nfd, tout); + if (debug) + (*lfun)(LOG_DEBUG, "received %d from poll()", ret); + switch (ret) { + case -1: + if (errno == EINTR) + continue; + (*lfun)(LOG_ERR, "poll (%m)"); + return EXIT_FAILURE; + case 0: + state_sync(state); + break; + default: + for (size_t i = 0; i < nfd; i++) + if (pfd[i].revents & POLLIN) + process(bl[i]); + } + if (t % 100 == 0) + state_sync(state); + if (t % 10000 == 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 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. + */ +#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 = "blacklistd"; +const char *controlprog = _PATH_BLCONTROL; +struct confset lconf, rconf; +struct ifaddrs *ifas; +void (*lfun)(int, const char *, ...) = 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 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. + */ +#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 *, ...) *** 2509 LINES SKIPPED *** From nobody Tue Oct 14 00:57:34 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clwmb0tgrz6CfGG; Tue, 14 Oct 2025 00:57: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 4clwmZ5TtYz3vJM; Tue, 14 Oct 2025 00:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AHKJ6NZA8VqJr78fJCror4iH+a3OPObm16K3Lb/u/MA=; b=XiaTspaZqZS7cN89tM91S9uskN4L0X8jAEEocCFRJcvWAeSDjPBc7r2N9ExSe1MsJ/C/2X w/si675qhyNbvmUH2UGnnvoFc5GrPaHe4JpA+oSeejhsPpGb94akaaTdkyTyXyX0UHxIVK t7UA6vVR+t4ydH9tNV4mbb5+j/OQQMOqqcaMBwD8+ueMAaWhTEqtWuf3lAfIr04Wcloeer Wzjvkq68ZYByvCMIZY+rZ4bPSkf3iXmBYCl84OPX5J6bg76EPxPHm9jpo1K//e0PQP9m3S cVPHHYkWRUuu9PopnpKyr7ZB/xL2BiMCCcfEroemVlV4pJDxhjasl65rBAueNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AHKJ6NZA8VqJr78fJCror4iH+a3OPObm16K3Lb/u/MA=; b=dfQRR8Jer9tu57ZxMckAYoDaimDBkwIWI5Z8CKRdazz5rfcVDlBAamPKw5ohfzW/9rCSst f6FKOHN44yQsUV9AOMoITqrUCV4QasfRVjnWZjRDLhnJWpkeevc9Udu2/s/eJ6i/6+5B9n KefvIngnNDRWIvnRRA107YRcDbC5eMAX/ViD46zKTIhv44sxt932H1x2bh/UY1fkvlU313 yw8s0tENiD6vMnzQLwDKx9Z2Clhf6aHbSNghH4ygqDA/ATWiuUk2/QjFBSa5nAjspIo/35 T/+uEz/7iAEh/3jnFzrZiW+FL/JOUm2Hg42l6VrUw4ehweY7JwymZkcWhJUGTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760403454; a=rsa-sha256; cv=none; b=UrQ8pEOqrJbOHTI9TdI+3dq7yWRsTBErkFyQbutOC+JOyZhvyoG5rfzdcq2M4BZUOCzB/7 If0ZACYVGXfU1N95lALmNFicZoqHkKV66C7zmFXxuYpkKIe/Dm44uJTxPPCrTWjqVhnLjG 2tnvSSTjZPVcyk+vJnqw5rj981/CCNogVKmVQWAyrPDh+aI6BHzL/GDpDWqeHW18dwzxfO 4Cnj7SjIWD4eov10kUB9g3ZUzODsM9o6QELf0elvrEs5RB2xDnLsQ/aHjNsYK89TpaWcPD aTlxDE50Ca0sUJiskbAjDmPODJMn0Ma6TX16nO3SD8U2fd5LjwOui1i3VfWGPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clwmZ55TWzTvS; Tue, 14 Oct 2025 00:57: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 59E0vYdR021640; Tue, 14 Oct 2025 00:57:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E0vYNV021637; Tue, 14 Oct 2025 00:57:34 GMT (envelope-from git) Date: Tue, 14 Oct 2025 00:57:34 GMT Message-Id: <202510140057.59E0vYNV021637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: ba5768504bee - stable/15 - blocklist-helper: Silence a bogus pf warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ba5768504bee39191754fc1aece3927c8936f27c Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=ba5768504bee39191754fc1aece3927c8936f27c commit ba5768504bee39191754fc1aece3927c8936f27c Author: Jose Luis Duran AuthorDate: 2025-10-12 17:16:12 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-14 00:53:40 +0000 blocklist-helper: Silence a bogus pf warning Silence a bogus warning about (an ethernet) anchor not being found. It has been reported as PR 280516. In the meantime, just sweep under the carpet. Approved by: emaste (mentor) MFC after: 2 days (cherry picked from commit 2347ca21d657121670e6e7246c6ac32efc996cac) --- contrib/blocklist/libexec/blocklistd-helper | 2 +- libexec/blocklistd-helper/blacklistd-helper | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/blocklist/libexec/blocklistd-helper b/contrib/blocklist/libexec/blocklistd-helper index f27cde4ed4ea..14a192ee35ce 100755 --- a/contrib/blocklist/libexec/blocklistd-helper +++ b/contrib/blocklist/libexec/blocklistd-helper @@ -258,7 +258,7 @@ flush) pf) # dynamically determine which anchors exist for anchor in $(/sbin/pfctl -a "$2" -s Anchors 2> /dev/null); do - /sbin/pfctl -a "$anchor" -t "port${anchor##*/}" -T flush + /sbin/pfctl -a "$anchor" -t "port${anchor##*/}" -T flush 2> /dev/null /sbin/pfctl -a "$anchor" -F rules done echo OK diff --git a/libexec/blocklistd-helper/blacklistd-helper b/libexec/blocklistd-helper/blacklistd-helper index 4195f070e8ee..92f768e86cdf 100644 --- a/libexec/blocklistd-helper/blacklistd-helper +++ b/libexec/blocklistd-helper/blacklistd-helper @@ -279,7 +279,7 @@ flush) pf) # dynamically determine which anchors exist for anchor in $(/sbin/pfctl -a "$2" -s Anchors 2> /dev/null); do - /sbin/pfctl -a "$anchor" -t "port${anchor##*/}" -T flush + /sbin/pfctl -a "$anchor" -t "port${anchor##*/}" -T flush 2> /dev/null /sbin/pfctl -a "$anchor" -F rules done echo OK From nobody Tue Oct 14 00:57:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clwmc2GC0z6Cf7s; Tue, 14 Oct 2025 00:57: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 4clwmb6chXz3vNw; Tue, 14 Oct 2025 00:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CaOQbPDJsEm6Ufb8MTac9QM4v0XUeH7ZSH9Bd1M7fUo=; b=R1uEX57CgNWzWlScHLFHZAUiZL8ojE17KgT5QvPkUXb90MqaF3zZL+EOpdcDMgtoMw5tas U0i3/PbN3xvMkSDi/v6A87/0NVirHPrn4QLWgspxJk9nJjVR9QcHJ/k0yn3CkjMo9Vdohd PvQAhGi0rauZNkBFz15fVVbwECLluMMLOSxDWj8+icR2LoDqP9/1fhixuCMRUqqvUG9AoS +dPoaJBie/zI8899mEHJHPvZAs3WI2TJGHtJcRpvssOBSExCZS4MqRAwj2OtzDdXeb7mhG pjEdwhkcIPHY+VKBL3GvNBILrholPKjEFEc72swYJb7Q0Gw+7gfO6nGBqHUpZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CaOQbPDJsEm6Ufb8MTac9QM4v0XUeH7ZSH9Bd1M7fUo=; b=RPMyw62szzI2nYS+x8GZdddSfBR3FPYohicVJ+F48lb9pOdnNcwpD99ZWusyT4SJcYTL+B LSeUhLHNTShLb8ExzexRx+JQrnjE0vKn6tCtiiB1TjD284qU//J+pn/o0iKQZz1vnfzE44 4LA6w4gQmXm9AFvI7nEV065PzOjLjZRbHp3yFY5r2FfMWgE/ub9m0GvMB7Rrr5mDlXRI16 3/i8bR9PC2bzCNj1lNmhghhX84cdMly1U/zBTXG6wm/3T8Z4O9Drj0dPI/nOvz5CNpupoj 11c0OaFsvAVZwM0DLwl6xCXyVZDNJyV8I16/fR2qyndyyPUcVSJWa8l3DU2r8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760403456; a=rsa-sha256; cv=none; b=qOuFLs/MZMKWGbdO57Rw9+hVAqBJcoYCaYRVE1N13A/xX3eIJcBymMS7eMTIJ8mmpNGURj +MTaMd82vB6+CK7ReK7YBZXX1ZMm216VxCTuO9VdvLuA+ie7KoS+aOR8RL0D4Y2KfJZpHu wp8SPH/CT4kOym8jSDIwx9qjA/i4Cv+F3TtGeyTVYhGf2mF1LCXIp0ubZG+fetolrRQE8i mfWeSSKRLn9DefLJmBugFbYBPpMyBqtaK2+XOJF1tGR9A1nlqltEB6/bdcL177Lb93vw7+ jrVt3j3UPO4vwtc1Dz1EeNaZxOXeElvSNMRzLt1vZUvsaCSLRLbaHnJWsdacfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clwmb68bbzTvT; Tue, 14 Oct 2025 00:57: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 59E0vZSb021680; Tue, 14 Oct 2025 00:57:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E0vZeR021677; Tue, 14 Oct 2025 00:57:35 GMT (envelope-from git) Date: Tue, 14 Oct 2025 00:57:35 GMT Message-Id: <202510140057.59E0vZeR021677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: f935c0f66f75 - stable/15 - blacklist: Avoid duplicate manual pages in METALOG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f935c0f66f75e882185ed8bc46f39054f2ced4e1 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f935c0f66f75e882185ed8bc46f39054f2ced4e1 commit f935c0f66f75e882185ed8bc46f39054f2ced4e1 Author: Jose Luis Duran AuthorDate: 2025-10-13 00:53:50 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-14 00:54:07 +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 (cherry picked from commit c6240045536548c22ce40d9ef36c1dc52abcfc9c) --- 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 *** 4 LINES SKIPPED *** From nobody Tue Oct 14 00:57:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clwmd1smFz6CfDm; Tue, 14 Oct 2025 00:57: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 4clwmd0DKgz3vZG; Tue, 14 Oct 2025 00:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5DDcIRhGQ2Ly9XBqud0zqvWY2nYfEeAtC2XwcDa1nI=; b=VTNfPVflNRAce7XVDPp7MIOVNYi6zMEyBWcBUFtGLeo1YzIOFlTzINaChxqhg3Tr0FH1cJ wYJ3Jk+hLCxLHvoeAyiGCbmtgjxe9Olxlo0UtHdEsl/7iPJC3sHzhVtXgCrVuog5tiuSJU J76lKTkg+9AxlF6UrXciOiAwwhFd7UyA/WJkLMfDOWL9nx0qxIZsM0pHCuNdfP768B3V1w zUdrt9FeMuOrCIUKspX8ZE78J5rS0MsEh6wcQW0vOgvasaZvTLCtz3W7xkHQt+igb3Fq1g gvbxfnfcmynKJIcelr4SSb38LnaMGg4w/VTUISqxWEsvc56gCHtyI6Ugj01iBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5DDcIRhGQ2Ly9XBqud0zqvWY2nYfEeAtC2XwcDa1nI=; b=QiWhJ5ixgZELi5dyuv26Tuo3Z+r3g8yG5/PsMtr8glOaf7DZAL38KYTN6Q1ApfzIbKqvBd fSuSerpJV+twC1nIxHVqVsgv3Z4zSFpSVrMFgnP2IR+9tZXjjhERHZfNt67WYdf3aKn6m1 bfTuHI54UCWH8BRYe+TxY9TThc4eMYDRf69PgNrHIZi1BzvWXq1Bdz8OQdkqN5ns0Kl26c KsoR+hObSLJCcaPEvMXcZ3RGDaw43znjVYOv5cNdq42FLZ1kozOtZBb1DLo1ds1y9rrDLf 3SfTVU4xgNcmneSwmxFNmtWrYI2daSytCajOpDPGpAoxszUPzGqOt+qReaqXNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760403457; a=rsa-sha256; cv=none; b=Y7xw8NCahc85o4n5ysptsxeZxsJMj5u1JuPdq4tMOVGFoVwNyW+vGCi0Znt/IXuM8cqoLb guk+QIntNOC40B/AbeYI5ETjhtGhqQ/DTxeg0AvcXTxwAQbixwLPFlvtRpg7pN9hRF/ZPm b6yBLuc7+QONh/7QSOOEuWOkTlTf5Q4gvyiOidkWcpTkXkCDVCCkiy14+asFMjPAuV3T1A 0KHZ8Xb4DajRxqi/SKAYt/hPzYuRm389y+Epnjyy4mm+1MSIAm6RYYcZQrPG018umxVSz4 /0sPKEnkfj6WYZYHK/mgXeeoH4fnO192/fZ8iy7SOrXvsWz37KYwXM+AnM99yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clwmc6mM2zVC2; Tue, 14 Oct 2025 00:57: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 59E0vaw5021720; Tue, 14 Oct 2025 00:57:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E0vaGm021717; Tue, 14 Oct 2025 00:57:36 GMT (envelope-from git) Date: Tue, 14 Oct 2025 00:57:36 GMT Message-Id: <202510140057.59E0vaGm021717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: f22ca25404e7 - stable/15 - blocklist: Add an UPDATING entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f22ca25404e795aa08efc35d8cdbb5b44304650f Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f22ca25404e795aa08efc35d8cdbb5b44304650f commit f22ca25404e795aa08efc35d8cdbb5b44304650f Author: Jose Luis Duran AuthorDate: 2025-10-13 14:35:12 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-14 00:54:25 +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 (cherry picked from commit ffa8165009365ff93050626d880f2d1d6aacc31a) --- UPDATING | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPDATING b/UPDATING index 6e893f07df61..4b14159ceb4a 100644 --- a/UPDATING +++ b/UPDATING @@ -17,6 +17,12 @@ and/or ports. can install the ftp/freebsd-ftpd port. pkgbase users should remove the orphaned FreeBSD-ftpd package. +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 Tue Oct 14 00:57:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clwmf43Rhz6Cf9k; Tue, 14 Oct 2025 00:57: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 4clwmf2VnYz3vRb; Tue, 14 Oct 2025 00:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JGEQoKkB73RdaKSDJTd+9ErgoCQzaw7U4uLp8BVxsHU=; b=oTkl3fWD6+/8o3Wo0IOOgnCRRoQzCBqHJ2m3Gz4kGApMpYHAi78J43d4KvHWZX2Boi2nGL loJ9Z/6MH4hUeTdij3sZb0xyGuoexuTMLSz3uvZAL4y1BWuwhgMxbyw6GdqmU+lSxkrM3y kTjsZhrE9mpTzFeZ6wtL8vZ00ZnVGtftS5vk/K73NFx6NlUptGzFvoxTTgqARqNOeFM7To DC8vSgY8wvBN4Mv+63DlFBwEJSX4FupnWkbv8UcG+WetLPzpClzWrs/v3UBUd7FS6ubbKk rODTxShdfEuEo/oGGz0QZQklh4B1EPUCl724mN7plOnK2PkHO8a5/lZEzIBRnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JGEQoKkB73RdaKSDJTd+9ErgoCQzaw7U4uLp8BVxsHU=; b=w+fv3uKs483t7+85aPqXF0b+J6bBbAzSdt03hVKexKm9XgXO8A5XEZZ8LJBpAyUMq/TV2W fM3crkY1XfBZUCjEwaYvk/7/m0UBfkvarbsx8HHdhGdJFsBmkRdFHrjRx3gbPXzk7uaqVr +KHM5bIPBNNYNNBhEbr5ZBCDCVRtwtieDTAhl1Oxxq0/YCb5PEnZDXVV6IAgph4M5lT+Ow atogiTuFr7gPtMas/DjFx4Bq7HpjPtpXjkeWsjY9bQVWM4M1ZKAesOJKWhRlDbI4XwfYDj tTjpNtIZQil7mOR2az5SmyNhMDADPpkfQaPFCxN4mImePp4uueR+VZxI2Nhi9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760403458; a=rsa-sha256; cv=none; b=ReYyDnM3YzBG5g18R/TLNWSZAAD6iK9qcBNQ1XY3KTjYxTM9Xy2U7wChiOBWJy/SNUmSjE quSr0gUZxyMnb0HnEqJoN5gEkGrrCvsE+xb2aIDWzW2MzGiRBYzJuoTfuW97BJBBVhdqgY ebu8WuJjxdIX162frjUY3808Fa8Oek0/4HfAKNRB3gVVTv1CxO3hCTPFajaHdBTcSIB9EU 6PAF+caZNU7qtibVSZsX4yYcMeafdmkGMYGDAytft07kKqGVakX9P19DxyEAuz1efGqNT2 RZXALnBIgjuc/VJNUghypi9Xxnh0dC6YiNboVlzFAPIzSXcAFG04ApRaZFlFIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clwmf0zhrzVC3; Tue, 14 Oct 2025 00:57: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 59E0vcBb021757; Tue, 14 Oct 2025 00:57:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E0vcPC021754; Tue, 14 Oct 2025 00:57:38 GMT (envelope-from git) Date: Tue, 14 Oct 2025 00:57:38 GMT Message-Id: <202510140057.59E0vcPC021754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 06889e177e7e - stable/15 - UPDATING: Fix typo objump should be objdump List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 06889e177e7e218a18a475e4747bc046078ef3c1 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=06889e177e7e218a18a475e4747bc046078ef3c1 commit 06889e177e7e218a18a475e4747bc046078ef3c1 Author: Jose Luis Duran AuthorDate: 2025-10-13 14:50:30 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-14 00:54:38 +0000 UPDATING: Fix typo objump should be objdump Approved by: emaste (mentor) Fixes: 86edb11e7491 ("Always install llvm-objdump as objdump") MFC after: 1 day (cherry picked from commit 376508ef2f794a57606a791166f1ce7f20d3ccaf) --- UPDATING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 4b14159ceb4a..26c2355de1ac 100644 --- a/UPDATING +++ b/UPDATING @@ -690,7 +690,7 @@ and/or ports. 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 Tue Oct 14 00:58:02 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clwn70DZNz6Cf5r; Tue, 14 Oct 2025 00:58: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 4clwn65m6gz3wSk; Tue, 14 Oct 2025 00:58:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k1ylPWkUjhgxD7CVq38lt2jMm8v8XdQYU9cQ0MVt2k0=; b=HXoh608hBTmNTVXqqjF9MP4jOUIvbr+tUJeAR1drKbX38MnOj8bqj10UY+pHG916WdaiU6 qzTtZ1//cH0Xog7T3rMd27jCdFdoXGxc59EbUhRZ6JDIMM0ubEqx9PGLfxAWJzNHlCNSMU lQVoAcNCwaV/R/Ng+tJC2ztF7+gYQNoqwOdKEq7zimhWGYOri2bGbGNJ1h9STm9suBKbPV DW28IJue3vpfT53t3GVuKnrwjL57540LksKcTnhRC1KDc1F8Dy/5/OQaQ8yP9pJj1dKh4Z 9hLv1NFyaPnrjsh1K9oBxWe4GgI5GawgKyWIAKia9sCu8vCbp+YhMF8qOojVhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760403482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k1ylPWkUjhgxD7CVq38lt2jMm8v8XdQYU9cQ0MVt2k0=; b=C68BKXwTqS4aP/SRGGnhF4u7pbMpwvFrL95MrZ3UEnDhjdLUZi4yv2hgP0Lux6AlqiR1Or 2xP8Z7bPZbbyZjgvjcmQSH0pAAICRdQD2MRlUUH+ocpSYrCBKphTvfMIT8LpyOC8DA5RWc /PR01N7vuzSCutcWM9cqA0Jrqlqgw4uF5S2vb8QdcjnKaciYl2tFcxgzmo7pcxGXnuUfVg Hp+y4DhMPTyXyMhxVrsSr6Cww/Jqk4BfQOdd2Hifi4dq8hXw/tYve1WJY7/tjre8deP01u y9/SRBCbusMe5CSM0oDliqPt5EKJaJcHzt1a1zxz9yOCPO8+kmOdDrPq5I4iCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760403482; a=rsa-sha256; cv=none; b=XDfrTsZxzgNex27aDpgyk8ylL2EhqhaUiOFJ0onDYtQNC4LJ6YG97I6xU7NCJi/blMGQx7 cyQnlSrdo2xHhnUI3gXWemxRbLGcYWj6uB+dOC/+ovqfwVdYXcTKGqjHngj0IRJ8+njw+m wTxFM2IfY7beeGYwedvCjyxr9vUQb1zNYzuhlBGQUzt421EVhfreDYN1FhHIRo3oJ8IHmh PLk0yhAjbsPsHfEyzdmkngozB5IucB4i9CUJjhUGjsi/4kDUTDPMFD3dvMe0e0aFw+fybm dm4aQoYCXGJEpXkL4OjmVTer1GMyFnR2vCB7Urd/XRIO+nliSheANc4+rUDUfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clwn65FsWzVVN; Tue, 14 Oct 2025 00:58: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 59E0w2bk022044; Tue, 14 Oct 2025 00:58:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E0w2be022041; Tue, 14 Oct 2025 00:58:02 GMT (envelope-from git) Date: Tue, 14 Oct 2025 00:58:02 GMT Message-Id: <202510140058.59E0w2be022041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 83a1049fcfb6 - stable/14 - UPDATING: Fix typo objump should be objdump List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 83a1049fcfb6cb5a1fd6cbeb4a193c41cd59ae54 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=83a1049fcfb6cb5a1fd6cbeb4a193c41cd59ae54 commit 83a1049fcfb6cb5a1fd6cbeb4a193c41cd59ae54 Author: Jose Luis Duran AuthorDate: 2025-10-13 14:50:30 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-14 00:55:49 +0000 UPDATING: Fix typo objump should be objdump Approved by: emaste (mentor) Fixes: 86edb11e7491 ("Always install llvm-objdump as objdump") MFC after: 1 day (cherry picked from commit 376508ef2f794a57606a791166f1ce7f20d3ccaf) --- UPDATING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 644e17fc55be..5396fa8204c1 100644 --- a/UPDATING +++ b/UPDATING @@ -291,7 +291,7 @@ and/or ports. 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 Tue Oct 14 02:47:53 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clzCt0JGTz6CnW7; Tue, 14 Oct 2025 02:47: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 4clzCs5ByRz3CNJ; Tue, 14 Oct 2025 02:47:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fPCt5xbRRvSNhNfWeQqYn1pmJaVhPKkKaDkzSqXfsa4=; b=VfFxHdWnttUfRfp2mL4ozGxBcUQ2cSzNSBynWR0Zqf9hR6+i/yKGTogvP9paSTvqMjme3p 9PRsGHlK4X11x+vajGb6A310rxXBcTbB2icKwLLNv6cAlAhJkU9m1ES5pz6hLaupZSSals sWBBL0ya75YhIxCm/YtvXnM6onkC4ef8Z14xlRkoYZuv13JIA/KyLagLhLy5DZl2UBpCbN syuxGaYboDiA3lO85gAc3i53rcjB8jmC51XwrwrWZqkpX4+noyvSqBCjRxiY3TEE2sBUeY /+pXdypM/6DZ2XKtoTYynviTAwW7jQT+O8W1IHFl32S3YsHZxKxd6sR98j+FuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fPCt5xbRRvSNhNfWeQqYn1pmJaVhPKkKaDkzSqXfsa4=; b=YyDdKijs9zTygxgPpXXGGYrimeGYpHL+LZPdLQqSiCkJJ4dAqOLljwK2GAxS948H/QHe2s 19pB3zQlfPvJhEuxz6UuKCy0DevSK4nkg/ELjG03LRTM2rr/Pc71/Bdda9uG/rnV6J7c1H nYO0y9IrBszT8qnwesKk9uLSx4RInfxUL5UMkh0r9XatAqy8GdDPxSGjS5oVWQ3cDKb89s fSu3Nn+RWFhg3ikmeRleaW0ZfS5oP6+if6sTw06CjghwuCZTFhvF4g2QcvwdjFahJkEsqV pLBR7FzqO2/NYFFKxA4CzUqDJYTczdt3P5xQvVzs8LLPSiesLvUO08xffr0ZMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760410073; a=rsa-sha256; cv=none; b=OLPhKjU8LkitWSuozUtbeU8luQ/wJZVj6jUXaKRhbS8kepU3CrxpG3/iXuCsDh3WvQxQ4u cL928s76lHuxmmSZKpxG8rFzJNBvMI9ObdIVTuzLH6Iwch5xDddoRpQjtUUBu2HstP1tLk r2zW7qb2hF0ZoAMWE4U+vLRjVTEkpIV/Qytc4k8/i0NUCdTldDd3SL1q98iOnvi1NR2y1C 6ozVxESt+31w4lCPx1DCzIjzyj0X5iltvtL0gycr/9aKicJWzjcqUXsUxfs8z6kzw2x2bJ zGitKn1XdysnNrRrZ1lpUE+h0E2AGLT86DCyiq1k5j/tIPBCcaxTPOLfvqwHUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clzCs4JN4zb2p; Tue, 14 Oct 2025 02:47: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 59E2lr2k029485; Tue, 14 Oct 2025 02:47:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E2lr3j029482; Tue, 14 Oct 2025 02:47:53 GMT (envelope-from git) Date: Tue, 14 Oct 2025 02:47:53 GMT Message-Id: <202510140247.59E2lr3j029482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e01a58798f58 - releng/15.0 - mit-krb5.pc: Add missing -lkrb5profile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: e01a58798f586c955b28db5dfe7bbddcb849f2bf Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e01a58798f586c955b28db5dfe7bbddcb849f2bf commit e01a58798f586c955b28db5dfe7bbddcb849f2bf Author: Igor Ostapenko AuthorDate: 2025-10-11 10:20:44 +0000 Commit: Colin Percival CommitDate: 2025-10-14 02:47:32 +0000 mit-krb5.pc: Add missing -lkrb5profile Fixes the ports that prefer static linking: https://reviews.freebsd.org/D49277 Approved by: re (cperciva) Reviewed by: ivy, dch, cy Sponsored by: SkunkWerks, GmbH Differential Revision: https://reviews.freebsd.org/D52910 (cherry picked from commit 2d9fd2c573c318754e3f36d2549e0e57ce199d60) (cherry picked from commit 771ee17c88106fb07b5035a2f36c36ccafe94edd) --- crypto/krb5/src/build-tools/mit-krb5.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/krb5/src/build-tools/mit-krb5.pc.in b/crypto/krb5/src/build-tools/mit-krb5.pc.in index fdc557785ad4..dca1654c8c9d 100644 --- a/crypto/krb5/src/build-tools/mit-krb5.pc.in +++ b/crypto/krb5/src/build-tools/mit-krb5.pc.in @@ -12,4 +12,4 @@ Description: An implementation of Kerberos network authentication Version: @KRB5_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lkrb5 -lk5crypto @COM_ERR_LIB@ -Libs.private: -lkrb5support +Libs.private: -lkrb5support -lkrb5profile From nobody Tue Oct 14 02:47:54 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clzCt60Hwz6CnTM; Tue, 14 Oct 2025 02:47: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 4clzCt51FJz3CKj; Tue, 14 Oct 2025 02:47:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zl9KeYjSt6h5gkqcL/lHib5iDsR3UTvXurn/m4BBKHI=; b=n/NUt+jamFr5fZBt8EZkERKITVHUaycpEjnfDs2BNkznaYsu6Y1UI6pgDXvjQbJSbv9WRs n76kwDlNQoSH51ZSF43C//i2Lx3q1apreTc1uoKzp7yvHmccJDg28FIaF204ohBy3G5dnK FgA14fOrpqNjIy6bHavd1N3DmwAt/JHxZMKmOrdf7tQtH7GSmErVD3LXdpnOf+uJYoe0N6 R3BueD4T/By/B60FPbU5fk1tK0jg5Emary6Qd+CeNypnZgGSKVIobYU4FuX+3+3lHH+B0t nt9pgJCogSMVQHE4U6bAAQrlUpHSuLb9Q3mRmUJYZmQOSQxZahcRHD49+9EwrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zl9KeYjSt6h5gkqcL/lHib5iDsR3UTvXurn/m4BBKHI=; b=eM1V39+t/CcTMODR2wsVHx6AKsgTn51vD1QsOCbhKr0dzA4YPshZ37n1S+2hCnxfAv2PF3 GDBJMStv3nmgMrtHwdfNE1QCeZhppnvgseIcZlpjN2rukQmu0QDnMNEib71Z0YogmiDteZ ICXio0cqvw2tjc47IP7po0PNGKIOQ0RRs/9uOtW2xA8O2e8ZyI4FyZ7vHiGI2/fQDe0gEa BIMAHf+9dmlpHigslAAO8zJhof3dCGulL1YcTCXoXCEi3PGVpIZWTdAyhWzrzeAG28/Wql ZwKLgPfwzxZ4sWhwa0Ua7q20Upz6h6TNx8hbvFkhUjvRcWqeF9MgscoravI4rQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760410074; a=rsa-sha256; cv=none; b=w4Pq5IqtFgTjtP7pWajgjZEaxwR+pdM4V/CPGsBiYSO7YHdN4ltGSUr0bM4pa/diaSnvlS v38BL77oJLRY/Id6/ddE3l4bWNLhpR4Ux9oLknMIOR0oZuT3onUaUcf+tW+KS+CnoCjx+F g/ek/gAMrEVsBCBoPZhLrJoFH8vGVp4JlBtPMl/NdkxeOkiZwVMzM7PkocJG1hn7IMuDUS plQUW4erdoNHnNiD0dVVlDrKTBMFtrzS1R/ik9Klc8xJW3MJKOiDam6T9fBzzyb4FKjPrR Hts9ibpck8ncfLxWs7oRNqxjfnVPBN+cjb7t2c7DjRRy9XAOyZ+CDTaWrsQTUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clzCt4d5VzZgF; Tue, 14 Oct 2025 02:47: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 59E2lsY3029520; Tue, 14 Oct 2025 02:47:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E2lsEe029517; Tue, 14 Oct 2025 02:47:54 GMT (envelope-from git) Date: Tue, 14 Oct 2025 02:47:54 GMT Message-Id: <202510140247.59E2lsEe029517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f01adba1e2ac - releng/15.0 - Makefile.inc1: Build source packages before sets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: f01adba1e2acb05798238e11971b4b1535231fdb Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f01adba1e2acb05798238e11971b4b1535231fdb commit f01adba1e2acb05798238e11971b4b1535231fdb Author: Lexi Winter AuthorDate: 2025-10-13 18:30:31 +0000 Commit: Colin Percival CommitDate: 2025-10-14 02:47: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. Approved by: re (cperciva) 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 (cherry picked from commit ea5685ba79fc9309698ef72cf48bc1f0c91ad3dd) (cherry picked from commit 3b5ec539beefb82dd3210f51c0e2e0759b20dad8) --- Makefile.inc1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index cd3e3f007c3b..d530ca4e9584 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2107,6 +2107,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 Tue Oct 14 02:52:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 02:54:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clzM93Bb7z6Cp4N; Tue, 14 Oct 2025 02:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clzM92bnwz3FDY; Tue, 14 Oct 2025 02:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7mq4e/xCUM1pu8TYX+ABqblyPJpY1Wfcw9XrvwR2FjY=; b=aAOkL0sLVG97uYD5t7jlNBVuGpebz/5MoChRKw5dshQzWJ+l1AKMsUDqVtoi+QS0MWZ6Ru oClGM4ZTAEYuouaG36alS2v2lgeNSbEUQS6u6HTed6nYTvKD2/vMKw9M35VpZsIYlQZhHZ qUMfK0vWPF6osKy74h8i02Qh0FPuI/sd8tnfHqttKzJg/ZTcAs28yBaYEiYS/eIQkUysS5 Ay9oodqYl0a31R9TRSOwUD/I4QXwCri8Qta3o2yr+LAudBzwsBxeTNSIS7cOsSIdW4IZwB hdt6tSo5+OIK80gVl76Tdtz1IvwLKADxFqBXWmsDPvYXZVJr9hSOdXL7X/FeqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7mq4e/xCUM1pu8TYX+ABqblyPJpY1Wfcw9XrvwR2FjY=; b=Jw0vOUoVW/qmEYFYgM195KZDeVLR1/Ip5wJ+n0weSntSkm11BhsKnRZ7k8lS4Ndbs2vCQo fcQoyAXKzJ86U2D0KVgEMWZNR9oyVdw37CEmgzJnAzMX0XAp26Fwr/GFEZDleu/LScu2XL /BBK0iY+xdKSvcTX+pYCfQxlQ6hbYTs/92u/8jH6DdfhUq5qRnF/xaHcB9t06b+eWdA5zi TjU3mY9amFJadkWYPUZ8jLTYNxOmN64Q1bGpp+0scGXn7HxtEr+s/QR1zvbIipKM2e1ME1 gcYRIWDL+ejSeziWKaqeVcYZx7E8thGhd0O082IQRePavJrC1079CmL0N36jOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760410453; a=rsa-sha256; cv=none; b=FJLsGxr7BKiFWM/BbJE8xKbG15a2VUc7yg7ntgYJTG7noImDJZZADWdv3JpMEr0+SjDKMA 8jsXRfst6zANn8r8r/ZcIQnHjmQycRYjWU8AB3fuxAFKXRJSVqI7GKPUy/10JQIoq3/II9 RDJ84NmPxjNJuc953NOFl5sy0IhPCyE6LawnGt02eQ9nZwiXpKUEIFvAhg59OesLVvEDA4 8vqL4++IcUwP5akAihsKdjMl+afzEqxXD6jWbB4PNS4pCyrzhUJ9khvby64z0qFrMJ+eDT Mt5GXkCOKaJMCdV3/JIpOm9YTfjar42EZQld5x6J2uU4hgtQw8c/XnmMkcpr4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clzM929jrzbNQ; Tue, 14 Oct 2025 02:54: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 59E2sDmS046918; Tue, 14 Oct 2025 02:54:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E2sD15046915; Tue, 14 Oct 2025 02:54:13 GMT (envelope-from git) Date: Tue, 14 Oct 2025 02:54:13 GMT Message-Id: <202510140254.59E2sD15046915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e9010214e9be - stable/15 - EC2: Fix additional files on small+builder AMIs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e9010214e9bebbe6155c9f720551008a785b692c Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e9010214e9bebbe6155c9f720551008a785b692c commit e9010214e9bebbe6155c9f720551008a785b692c Author: Colin Percival AuthorDate: 2025-10-11 17:35:51 +0000 Commit: Colin Percival CommitDate: 2025-10-14 02:54:01 +0000 EC2: Fix additional files on small+builder AMIs The file /usr/local/etc/ssl/cert.pem is not present on "small" and "builder" AMIs, so we don't need to add it to METALOG. Fixes: 2b0ffc0ee48c ("EC2: metalog_add missing files from packages") MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva (cherry picked from commit 8a7ac88aa3991e8c2c19007ac0c36a92fc94bc2d) --- release/tools/ec2-builder.conf | 1 - release/tools/ec2-small.conf | 1 - 2 files changed, 2 deletions(-) diff --git a/release/tools/ec2-builder.conf b/release/tools/ec2-builder.conf index bcea69331be5..3b0344f9eb9a 100644 --- a/release/tools/ec2-builder.conf +++ b/release/tools/ec2-builder.conf @@ -68,7 +68,6 @@ vm_extra_pre_umount() { # Add files from packages which weren't recorded in metalog metalog_add_data ./usr/local/etc/dhclient.conf - metalog_add_data ./usr/local/etc/ssl/cert.pem return 0 } diff --git a/release/tools/ec2-small.conf b/release/tools/ec2-small.conf index f12afec75a4f..6564a59c2cf6 100644 --- a/release/tools/ec2-small.conf +++ b/release/tools/ec2-small.conf @@ -51,7 +51,6 @@ vm_extra_pre_umount() { # Add files from packages which weren't recorded in metalog metalog_add_data ./usr/local/etc/dhclient.conf - metalog_add_data ./usr/local/etc/ssl/cert.pem return 0 } From nobody Tue Oct 14 02:55:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4clzNQ27yjz6Cp8F; Tue, 14 Oct 2025 02:55: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 4clzNQ1Rkcz3FSh; Tue, 14 Oct 2025 02:55:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpneU0DiTnKrGdTtRHK7/OyEMcdn0h/XshPsxncBmRE=; b=alKmCGgoeQDyfSnBbYphYCZyfWPKrfD7u4GDPJFwKieatOSM/COh15QolL3JF2UBUrppyZ ofaOg9DsuBfUxQB/s28qdBEY8rbTKZSCeZqnpA45Qpv9rUhxEYhXl5rBM0rEvLM7a5W9zp pDmQGlfgYZrO0IBhUKEYDSI+n7raSeOHXu7PSuipXzwVgldrXZShS1mamn13Mh8cnMf/yC cPPyyD2rFMwtAee26o4iJ9EQBNgmc9AYDoXnaMnvHmGHFWEJkhSLu8dG8CFtobP+BwOmTR A/zR5e51PuId1dGVK0RfSg26fRWBJ2QFL/vJFx9cPdZyuEF9oo6/+YDJLc+vmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760410518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpneU0DiTnKrGdTtRHK7/OyEMcdn0h/XshPsxncBmRE=; b=GyEkpngndYTPNuqaFJdzjbZvr4dvHV5LuYM5zypl/gGvvIhS9ECL77qcJzjwzn1KsqdRFW yPWL+FhUYzbpEs0ZNXPSXyvvpltRs41dT0oafCXh5ExLjLG2NgeXzwqX1eDoNnTFB9CqJ1 8xkRiDiH5UETsayIDaktOR4zmVmaDQFdTh4GSH3OWROS7Ex5G1+DbS4DIcVs8Mr4f5HwkG 6NUTSEBnokqIr40I/CpWSetNYOJTiyET7B7U9hD4o8q/+doMxWOKhT1aaj+UoiemgNTiSd fhkij8tQJnkPAZ1DXSE4KPosKJz3Nkfbss3/LWqjzVQIx6qmwMjqJ2GaRD9z2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760410518; a=rsa-sha256; cv=none; b=R1ZtRucDVnFS/UiYSld0aQqjqjBY9AZH0Ejgb2FuPl7iqSQwByWGVklimuuWO98NA9N4ec /Jnmijrq0nKm/Ft9xTg4eNZ4vFCbHbE5W5PvtGm5rtLenXcV32grmrz8q3lLtd3UxnmMLl 6niip2l4kl3J/o8UV+jw9vtDSQ5fByvcTxal4fDtZc8YqtXr9xfRyXcycEahvC9YD7Az4Y jgriKHDVN5eZutkroUuGRYX3+KnZYzB4RHfCo5torosKlsPPe2nRc9sVQjHYzwN6L/DQCm 1jmdBcrTPpmpYjV0GAJw3JXsdQiBbNJFjcv+Hl7DaMaIlmgoHR/0OotTN52fzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4clzNQ0z32zb5q; Tue, 14 Oct 2025 02:55: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 59E2tIwi047368; Tue, 14 Oct 2025 02:55:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E2tIJB047365; Tue, 14 Oct 2025 02:55:18 GMT (envelope-from git) Date: Tue, 14 Oct 2025 02:55:18 GMT Message-Id: <202510140255.59E2tIJB047365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 6908a3580702 - releng/15.0 - EC2: Fix additional files on small+builder AMIs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 6908a3580702a446d8420bb93ed95530a98c936b Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6908a3580702a446d8420bb93ed95530a98c936b commit 6908a3580702a446d8420bb93ed95530a98c936b Author: Colin Percival AuthorDate: 2025-10-11 17:35:51 +0000 Commit: Colin Percival CommitDate: 2025-10-14 02:54:24 +0000 EC2: Fix additional files on small+builder AMIs The file /usr/local/etc/ssl/cert.pem is not present on "small" and "builder" AMIs, so we don't need to add it to METALOG. Approved by: re (cperciva) Fixes: 2b0ffc0ee48c ("EC2: metalog_add missing files from packages") MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva (cherry picked from commit 8a7ac88aa3991e8c2c19007ac0c36a92fc94bc2d) (cherry picked from commit e9010214e9bebbe6155c9f720551008a785b692c) --- release/tools/ec2-builder.conf | 1 - release/tools/ec2-small.conf | 1 - 2 files changed, 2 deletions(-) diff --git a/release/tools/ec2-builder.conf b/release/tools/ec2-builder.conf index bcea69331be5..3b0344f9eb9a 100644 --- a/release/tools/ec2-builder.conf +++ b/release/tools/ec2-builder.conf @@ -68,7 +68,6 @@ vm_extra_pre_umount() { # Add files from packages which weren't recorded in metalog metalog_add_data ./usr/local/etc/dhclient.conf - metalog_add_data ./usr/local/etc/ssl/cert.pem return 0 } diff --git a/release/tools/ec2-small.conf b/release/tools/ec2-small.conf index f12afec75a4f..6564a59c2cf6 100644 --- a/release/tools/ec2-small.conf +++ b/release/tools/ec2-small.conf @@ -51,7 +51,6 @@ vm_extra_pre_umount() { # Add files from packages which weren't recorded in metalog metalog_add_data ./usr/local/etc/dhclient.conf - metalog_add_data ./usr/local/etc/ssl/cert.pem return 0 } From nobody Tue Oct 14 04:36:55 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cm1dh0sXBz6BhXR; Tue, 14 Oct 2025 04:36: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 4cm1dh096pz3Prt; Tue, 14 Oct 2025 04:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2NejBrp/i+0KQCe833rd7eesn6RvAlIkz1mUahdu4Us=; b=IyedO3wWBxmd++0ieCYYU/uhD/W840JM0ZFaYe0c2zSvNiynHwi+qnVb1YncIvI5znMhQ5 bgoquCF2VQcY6BE2hLu8R0dgTRirWSRLMAsL1rNMvYOwTb5n6NoR0nuNFiHMh6YYTgWh92 oFTERu1IsNZbOmOXjRua0XAo0cla3qdX1UFhge8d+D+IfBIFMXdADVWR6cSJ9kp444ybrJ l3BYnMJ4DYxhmfkpDSJ4BuBaHgD9Ca/zN9GMGbORX14nFrQCrvr8f3kwvfsuuU7ocFBnf+ Dexn7J8o5u9Hy1LeL9aILkz7Xxtyaf8lmwVhv492M5FrqaoJ85EOBE0AOO9k1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2NejBrp/i+0KQCe833rd7eesn6RvAlIkz1mUahdu4Us=; b=qwilgZSLtf5kqZZt57Z3zRwM0OlV1osoQ1HPTavD1ND6k/QiYFSPKP3WiBMOAewpz2e8AF Mb5WuvDrg/kSPsud4gGJ68hCU61dGdlsINAVM1Aa7nI7iZFzcu30rx59yn0qIpOi1oaxu2 Q80blBYqG0MvY3XfsNpWtlYJTK93Xso/pK6S5Kn0J30PyTlxOZgCYnCX2Qn3CR6dpcN1eX oCgo3kbvNWLiJuGJUrMytuMqqPbfqZkVwC4wiSoCtsazBISJDOsOOHtr8LdYMZsJLoyrzl JjJ7dpZv4WYp3l7+ww5Kbetx4Vo4mbPIBQPx853WXk9kKSB7klX8dBnbO5HQvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760416616; a=rsa-sha256; cv=none; b=lrhB5s/Fji7b19tIVkOhwNQcCmtGYrck2JeyavmCuSGyqBmNXGU4mC7cVMujsBOp/mDfl/ X9libIzeUGD0/1KSSPMhY8i3tEeEESWoswEUjC8sSivWMURBSIZmKCHIEjDvr6/+BSvwHJ rsh4SzDW0xZPZcuzVllBGlptq7R2LJz8K05WHTnY58a+L7wI656czTryv6ZfLcOwzidvtl jNXKsH+LPn2u3X73dJ8qnrRWKXRdX6pUBN5jWG/YBP2TK+GRSbqQRL0I8vUr+I5IUcPsp2 54GinPN5Nl4FOuau3cj0WBCSOmrw/ml6Oig90LpmT2Smr4iwpuJhIg1wtF+kGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cm1dg6F3LzdcZ; Tue, 14 Oct 2025 04:36: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 59E4atkU038055; Tue, 14 Oct 2025 04:36:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E4atsV038052; Tue, 14 Oct 2025 04:36:55 GMT (envelope-from git) Date: Tue, 14 Oct 2025 04:36:55 GMT Message-Id: <202510140436.59E4atsV038052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e2dcc9fc4d2e - releng/15.0 - MFV: Import blocklist 2025-04-28 (8aa81bf) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: e2dcc9fc4d2e6722190cf15bc5bf5dc2e9132ab5 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e2dcc9fc4d2e6722190cf15bc5bf5dc2e9132ab5 commit e2dcc9fc4d2e6722190cf15bc5bf5dc2e9132ab5 Author: Jose Luis Duran AuthorDate: 2025-10-12 17:01:03 +0000 Commit: Colin Percival CommitDate: 2025-10-14 04:36:12 +0000 MFV: Import blocklist 2025-04-28 (8aa81bf) Merge commit '70f30afd4e9af5a51ee324d97e4d8c5f2124ec15' Breaking changes: - Upstream commit 24932b6 ("blocklistd: log the conf file line number with bad protocol errors") breaks backward database compatibility. An error will be displayed: Key size mismatch 296 != 288 A new and compatible database, with the new name, will be created when the service starts (committed separately). - Upstream commit ddf6d71 ("implement BLOCKLIST_BAD_USER as a "one-count" failure") introduced BLOCKLIST_BAD_USER with a one-count failure mechanism. BLOCKLIST_AUTH_FAIL was implemented with a two-count failure mechanism. Since we utilize BLOCKLIST_AUTH_FAIL, the number of failed attempts now doubles towards the maximum limit (nfails). This commit will be reverted separately. Changes: https://github.com/zoulasc/blocklist/compare/7093cd9...8aa81bf Approved by: re (cperciva) Approved by: emaste (mentor) MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D52869 (cherry picked from commit 48e64ca13d4f36795ac718911b805e3e9a726f1b) (cherry picked from commit 1a08326c6f503db5f0fb9201cdf55379bbe576e8) --- contrib/blocklist/Makefile | 2 +- contrib/blocklist/Makefile.inc | 7 +- contrib/blocklist/README | 52 ++-- contrib/blocklist/TODO | 49 +++- contrib/blocklist/bin/Makefile | 12 +- .../bin/{blacklistctl.8 => blocklistctl.8} | 69 +++++- .../bin/{blacklistctl.c => blocklistctl.c} | 9 +- .../blocklist/bin/{blacklistd.8 => blocklistd.8} | 75 +++--- .../blocklist/bin/{blacklistd.c => blocklistd.c} | 48 ++-- .../bin/{blacklistd.conf.5 => blocklistd.conf.5} | 82 ++++--- contrib/blocklist/bin/conf.c | 200 ++++++++++++--- contrib/blocklist/bin/conf.h | 3 +- contrib/blocklist/bin/internal.c | 8 +- contrib/blocklist/bin/internal.h | 8 +- contrib/blocklist/bin/run.c | 9 +- contrib/blocklist/bin/run.h | 2 +- contrib/blocklist/bin/state.c | 6 +- contrib/blocklist/bin/state.h | 2 +- contrib/blocklist/bin/support.c | 11 +- contrib/blocklist/bin/support.h | 7 +- contrib/blocklist/diff/ftpd.diff | 12 +- contrib/blocklist/diff/named.diff | 12 +- contrib/blocklist/diff/postfix.diff | 98 ++++++++ contrib/blocklist/diff/proftpd.diff | 20 +- contrib/blocklist/diff/ssh.diff | 14 +- contrib/blocklist/etc/Makefile | 10 +- .../etc/{blacklistd.conf => blocklistd.conf} | 7 +- contrib/blocklist/etc/ipf.conf | 45 ++++ contrib/blocklist/etc/npf.conf | 4 +- contrib/blocklist/etc/rc.d/Makefile | 4 +- .../blocklist/etc/rc.d/{blacklistd => blocklistd} | 20 +- contrib/blocklist/include/Makefile | 4 +- contrib/blocklist/include/bl.h | 11 +- .../blocklist/include/{blacklist.h => blocklist.h} | 44 ++-- contrib/blocklist/lib/Makefile | 20 +- contrib/blocklist/lib/bl.c | 112 +++++---- contrib/blocklist/lib/{blacklist.c => blocklist.c} | 49 ++-- .../lib/{libblacklist.3 => libblocklist.3} | 124 +++++----- contrib/blocklist/lib/shlib_version | 2 +- contrib/blocklist/libexec/Makefile | 4 +- contrib/blocklist/libexec/blacklistd-helper | 134 ---------- contrib/blocklist/libexec/blocklistd-helper | 272 +++++++++++++++++++++ contrib/blocklist/port/Makefile.am | 42 ++-- contrib/blocklist/port/_strtoi.h | 2 +- contrib/blocklist/port/configure.ac | 12 +- contrib/blocklist/port/fgetln.c | 2 +- contrib/blocklist/port/fparseln.c | 6 +- contrib/blocklist/port/pidfile.c | 6 +- contrib/blocklist/port/popenve.c | 6 +- contrib/blocklist/port/port.h | 32 ++- contrib/blocklist/port/sockaddr_snprintf.c | 6 +- contrib/blocklist/port/strlcat.c | 7 +- contrib/blocklist/port/strlcpy.c | 7 +- contrib/blocklist/port/strtoi.c | 6 +- contrib/blocklist/port/vsyslog_r.c | 13 + contrib/blocklist/test/Makefile | 2 +- contrib/blocklist/test/cltest.c | 6 +- contrib/blocklist/test/srvtest.c | 42 +++- 58 files changed, 1293 insertions(+), 587 deletions(-) diff --git a/contrib/blocklist/Makefile b/contrib/blocklist/Makefile index da4411d0ca75..899746d01431 100644 --- a/contrib/blocklist/Makefile +++ b/contrib/blocklist/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2015/01/22 17:49:41 christos Exp $ +# $NetBSD: Makefile,v 1.1.1.1 2020/06/15 01:52:52 christos Exp $ SUBDIR = lib .WAIT include bin etc libexec diff --git a/contrib/blocklist/Makefile.inc b/contrib/blocklist/Makefile.inc index 85c82783cd35..b22d4a801240 100644 --- a/contrib/blocklist/Makefile.inc +++ b/contrib/blocklist/Makefile.inc @@ -1,10 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.3 2015/01/23 03:57:22 christos Exp $ +# $NetBSD: Makefile.inc,v 1.3 2025/02/11 17:48:30 christos Exp $ WARNS=6 .if !defined(LIB) -LDADD+= -lblacklist -DPADD+= ${LIBBLACKLIST} +LDADD+= -lblocklist +DPADD+= ${LIBBLOCKLIST} .endif CPPFLAGS+= -I${.CURDIR}/../include CPPFLAGS+=-DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_UTIL_H -DHAVE_DB_H +CPPFLAGS+=-DHAVE_SYS_CDEFS_H diff --git a/contrib/blocklist/README b/contrib/blocklist/README index 7da3317a77fe..4b34138e01ec 100644 --- a/contrib/blocklist/README +++ b/contrib/blocklist/README @@ -1,21 +1,21 @@ -# $NetBSD: README,v 1.8 2017/04/13 17:59:34 christos Exp $ +# $NetBSD: README,v 1.3 2024/02/09 00:53:30 wiz Exp $ This package contains library that can be used by network daemons to communicate with a packet filter via a daemon to enforce opening and closing ports dynamically based on policy. -The interface to the packet filter is in libexec/blacklistd-helper +The interface to the packet filter is in libexec/blocklistd-helper (this is currently designed for npf) and the configuration file -(inspired from inetd.conf) is in etc/blacklistd.conf. +(inspired from inetd.conf) is in etc/blocklistd.conf. -On NetBSD you can find an example npf.conf and blacklistd.conf in -/usr/share/examples/blacklistd; you need to adjust the interface +On NetBSD you can find an example npf.conf and blocklistd.conf in +/usr/share/examples/blocklistd; you need to adjust the interface in npf.conf and copy both files to /etc; then you just enable -blacklistd=YES in /etc/rc.conf, start it up, and you are all set. +blocklistd=YES in /etc/rc.conf, start it up, and you are all set. -There is also a startup file in etc/rc.d/blacklistd +There is also a startup file in etc/rc.d/blocklistd -Patches to various daemons to add blacklisting capabilitiers are in the +Patches to various daemons to add blocklisting capabilities are in the "diff" directory: - OpenSSH: diff/ssh.diff [tcp socket example] - Bind: diff/named.diff [both tcp and udp] @@ -23,21 +23,21 @@ Patches to various daemons to add blacklisting capabilitiers are in the These patches have been applied to NetBSD-current. -The network daemon (for example sshd) communicates to blacklistd, via -a unix socket like syslog. The library calls are simple and everything +The network daemon (for example sshd) communicates to blocklistd, via +a Unix socket like syslog. The library calls are simple and everything is handled by the library. In the simplest form the only thing the daemon needs to do is to call: - blacklist(action, acceptedfd, message); + blocklist(action, acceptedfd, message); Where: - action = 0 -> successful login clear blacklist state + action = 0 -> successful login clear blocklist state 1 -> failed login, add to the failed count acceptedfd -> the file descriptor where the server is connected to the remote client. It is used to determine the listening socket, and the remote address. This allows any program to - contact the blacklist daemon, since the verification + contact the blocklist daemon, since the verification if the program has access to the listening socket is done by virtue that the port number is retrieved from the kernel. @@ -46,13 +46,13 @@ Where: Unfortunately there is no way to get information about the "peer" from a udp socket, because there is no connection and that information is kept with the server. In that case the daemon can provide the -peer information to blacklistd via: +peer information to blocklistd via: - blacklist_sa(action, acceptedfd, sockaddr, sockaddr_len, message); + blocklist_sa(action, acceptedfd, sockaddr, sockaddr_len, message); The configuration file contains entries of the form: -# Blacklist rule +# Blocklist rule # host/Port type protocol owner name nfail disable 192.168.1.1:ssh stream tcp * -int 10 1m 8.8.8.8:ssh stream tcp * -ext 6 60m @@ -60,18 +60,18 @@ ssh stream tcp6 * * 6 60m http stream tcp * * 6 60m Here note that owner is * because the connection is done from the -child ssh socket which runs with user privs. We treat ipv4 connections +child ssh socket which runs with user privs. We treat IPv4 connections differently by maintaining two different rules one for the external interface and one from the internal We also register for both tcp and tcp6 since those are different listening sockets and addresses; -we don't bother with ipv6 and separate rules. We use nfail = 6, +we don't bother with IPv6 and separate rules. We use nfail = 6, because ssh allows 3 password attempts per connection, and this will let us have 2 connections before blocking. Finally we block for an hour; we could block forever too by specifying * in the duration column. -blacklistd and the library use syslog(3) to report errors. The -blacklist filter state is persisted automatically in /var/db/blacklistd.db +blocklistd and the library use syslog(3) to report errors. The +blocklist filter state is persisted automatically in /var/db/blocklistd.db so that if the daemon is restarted, it remembers what connections is currently handling. To start from a fresh state (if you restart npf too for example), you can use -f. To watch the daemon at work, @@ -80,27 +80,27 @@ you can use -d. The current control file is designed for npf, and it uses the dynamic rule feature. You need to create a dynamic rule in your /etc/npf.conf on the group referring to the interface you want to block -called blacklistd as follows: +called blocklistd as follows: ext_if=bge0 int_if=sk0 group "external" on $ext_if { ... - ruleset "blacklistd-ext" - ruleset "blacklistd" + ruleset "blocklistd-ext" + ruleset "blocklistd" ... } group "internal" on $int_if { ... - ruleset "blacklistd-int" + ruleset "blocklistd-int" ... } -You can use 'blacklistctl dump -a' to list all the current entries +You can use 'blocklistctl dump -a' to list all the current entries in the database; the ones that have nfail / where urrent ->= otal, should have an id assosiated with them; this means that +>= otal, should have an id associated with them; this means that there is a packet filter rule added for that entry. For npf, you can examine the packet filter dynamic rule entries using 'npfctl rule list'. The number of current entries can exceed diff --git a/contrib/blocklist/TODO b/contrib/blocklist/TODO index 9925020d54bb..d67111bd5139 100644 --- a/contrib/blocklist/TODO +++ b/contrib/blocklist/TODO @@ -1,4 +1,4 @@ -# $NetBSD: TODO,v 1.7 2015/01/23 21:34:01 christos Exp $ +# $NetBSD: TODO,v 1.3 2025/02/05 20:22:26 christos Exp $ - don't poll periodically, find the next timeout - use the socket also for commands? Or separate socket? @@ -17,5 +17,48 @@ -n block unblock -- do we need an api in blacklistctl to perform maintenance -- fix the blacklistctl output to be more user friendly +- do we need an api in blocklistctl to perform maintenance +- fix the blocklistctl output to be more user friendly + +- figure out some way to do distributed operation securely (perhaps with + a helper daemon that authenticates local sockets and then communicates + local DB changes to the central server over a secure channel -- + perhaps blocklistd-helper can have a back-end that can send updates to + a central server) + +- add "blocklistd -l" to enable filter logging on all rules by default + +- add some new options in the config file + + "/all" - block both TCP and UDP (on the proto field?) + + "/log" - enable filter logging (if not the default) (on the name field?) + "/nolog"- disable filter logging (if not the default) (on the name field?) + + The latter two probably require a new parameter for blocklistd-helper. + +- "blocklistd -f" should (also?) be a blocklistctl function!?!?! + +- if blocklistd was started with '-r' then a SIGHUP should also do a + "control flush $rulename" and then re-add all the filter rules? + +- should/could /etc/rc.conf.d/ipfilter be created with the following? + + reload_postcmd=blocklistd_reload + start_postcmd=blocklistd_start + stop_precmd=blocklistd_stop + blocklistd_reload () + { + /etc/rc.d/blocklistd reload # IFF SIGHUP does flush/re-add + # /etc/rc.d/blocklistd restart + } + blocklistd_stop () + { + /etc/rc.d/blocklistd stop + } + blocklistd_start () + { + /etc/rc.d/blocklistd start + } + + or is there a better way? diff --git a/contrib/blocklist/bin/Makefile b/contrib/blocklist/bin/Makefile index 280c72fd3af1..1856e2524f3c 100644 --- a/contrib/blocklist/bin/Makefile +++ b/contrib/blocklist/bin/Makefile @@ -1,12 +1,12 @@ -# $NetBSD: Makefile,v 1.11 2015/01/27 19:40:36 christos Exp $ +# $NetBSD: Makefile,v 1.1.1.1 2020/06/15 01:52:52 christos Exp $ BINDIR=/sbin -PROGS=blacklistd blacklistctl -MAN.blacklistd=blacklistd.8 blacklistd.conf.5 -MAN.blacklistctl=blacklistctl.8 -SRCS.blacklistd = blacklistd.c conf.c run.c state.c support.c internal.c -SRCS.blacklistctl = blacklistctl.c conf.c state.c support.c internal.c +PROGS=blocklistd blocklistctl +MAN.blocklistd=blocklistd.8 blocklistd.conf.5 +MAN.blocklistctl=blocklistctl.8 +SRCS.blocklistd = blocklistd.c conf.c run.c state.c support.c internal.c +SRCS.blocklistctl = blocklistctl.c conf.c state.c support.c internal.c DBG=-g LDADD+=-lutil diff --git a/contrib/blocklist/bin/blacklistctl.8 b/contrib/blocklist/bin/blocklistctl.8 similarity index 59% rename from contrib/blocklist/bin/blacklistctl.8 rename to contrib/blocklist/bin/blocklistctl.8 index 7c6521117745..a98c16374f19 100644 --- a/contrib/blocklist/bin/blacklistctl.8 +++ b/contrib/blocklist/bin/blocklistctl.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistctl.8,v 1.9 2016/06/08 12:48:37 wiz Exp $ +.\" $NetBSD: blocklistctl.8,v 1.4 2025/02/07 01:35:38 kre Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,27 +27,43 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 7, 2016 -.Dt BLACKLISTCTL 8 +.Dd January 27, 2025 +.Dt BLOCKLISTCTL 8 .Os .Sh NAME -.Nm blacklistctl -.Nd display and change the state of blacklistd +.Nm blocklistctl +.Nd display and change the state of the blocklistd database .Sh SYNOPSIS .Nm .Cm dump .Op Fl abdnrw +.Op Fl D Ar dbname .Sh DESCRIPTION .Nm -is a program used to display the state of -.Xr blacklistd 8 +is a program used to display and change the state of the +.Xr blocklistd 8 +database. +The following sub-commands are supported: +.Ss dump .Pp -The following options are available: +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 embryonic ones. +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 blocklistd +database file to use. +The default is +.Pa /var/db/blocklistd.db . .It Fl d Increase debugging level. .It Fl n @@ -59,18 +75,47 @@ 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 +.Xr blocklistd 8 .Sh NOTES Sometimes the reported number of failed attempts can exceed the number of attempts that -.Xr blacklistd 8 +.Xr blocklistd 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 +.Xr blocklistd 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 diff --git a/contrib/blocklist/bin/blacklistctl.c b/contrib/blocklist/bin/blocklistctl.c similarity index 94% rename from contrib/blocklist/bin/blacklistctl.c rename to contrib/blocklist/bin/blocklistctl.c index 89b72921caf5..8c75e0430c61 100644 --- a/contrib/blocklist/bin/blacklistctl.c +++ b/contrib/blocklist/bin/blocklistctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistctl.c,v 1.23 2018/05/24 19:21:01 christos Exp $ */ +/* $NetBSD: blocklistctl.c,v 1.4 2025/02/11 17:48:30 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,8 +32,10 @@ #include "config.h" #endif +#ifdef HAVE_SYS_CDEFS_H #include -__RCSID("$NetBSD: blacklistctl.c,v 1.23 2018/05/24 19:21:01 christos Exp $"); +#endif +__RCSID("$NetBSD: blocklistctl.c,v 1.4 2025/02/11 17:48:30 christos Exp $"); #include #include @@ -63,7 +65,8 @@ usage(int c) warnx("Missing/unknown command"); else if (c != '?') warnx("Unknown option `%c'", (char)c); - fprintf(stderr, "Usage: %s dump [-abdnrw]\n", getprogname()); + fprintf(stderr, + "Usage: %s dump [-abdnrw] [-D dbname]\n", getprogname()); exit(EXIT_FAILURE); } diff --git a/contrib/blocklist/bin/blacklistd.8 b/contrib/blocklist/bin/blocklistd.8 similarity index 85% rename from contrib/blocklist/bin/blacklistd.8 rename to contrib/blocklist/bin/blocklistd.8 index 82e1f15f61c9..e0b9fb482cbd 100644 --- a/contrib/blocklist/bin/blacklistd.8 +++ b/contrib/blocklist/bin/blocklistd.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.8,v 1.23 2020/04/21 13:57:12 christos Exp $ +.\" $NetBSD: blocklistd.8,v 1.8 2025/02/25 22:13:34 christos Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,11 +27,11 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 21, 2020 -.Dt BLACKLISTD 8 +.Dd February 25, 2025 +.Dt BLOCKLISTD 8 .Os .Sh NAME -.Nm blacklistd +.Nm blocklistd .Nd block and release ports on demand to avoid DoS abuse .Sh SYNOPSIS .Nm @@ -53,22 +53,35 @@ 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 sockspath +.Ar sockpath or if that is not specified to -.Pa /var/run/blacklistd.sock . +.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 in -.Ar configfile -with syntax specified in -.Xr blacklistd.conf 5 . +This tuple is consulted against entries from the +.Ar configfile , +with the syntax specified in +.Xr blocklistd.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 +file descriptor associated with the connection the client wants to blocklist as well as passing socket credentials. .Pp The file descriptor is used to retrieve information (address and port) @@ -116,7 +129,7 @@ specified by the arguments. The .Ar rulename argument can be set from the command line (default -.Dv blacklistd ) . +.Dv blocklistd ) . 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 @@ -152,8 +165,8 @@ The following options are available: .It Fl C Ar controlprog Use .Ar controlprog -to communicate with the packet filter, usually -.Pa /usr/libexec/blacklistd-helper . +to communicate with the packet filter, instead of the default, which is +.Pa /usr/libexec/blocklistd-helper . The following arguments are passed to the control program: .Bl -tag -width protocol .It action @@ -161,7 +174,7 @@ The action to perform: .Dv add , .Dv rem , or -.Dv flush +.Dv flush ; to add, remove or flush a firewall rule. .It name The rule name. @@ -183,13 +196,17 @@ 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, usually -.Pa /etc/blacklistd.conf . +The name of the configuration file to read. +The default when +.Fl c +is not given is +.Pa /etc/blocklistd.conf . .It Fl D Ar dbfile The Berkeley DB file where .Nm -stores its state, usually -.Pa /var/db/blacklistd.db . +stores its state. +It defaults to +.Pa /var/db/blocklistd.db . .It Fl d Normally, .Nm @@ -203,14 +220,14 @@ are deleted by invoking the control script as: .Bd -literal -offset indent control flush .Ed -.It Fl P Ar sockspathsfile +.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 . +.Dv blocklistd . .It Fl r Re-read the firewall rules from the internal database, then remove and re-add them. @@ -256,19 +273,21 @@ This signal tells 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 +.Bl -tag -width /usr/libexec/blocklistd-helper -compact +.It Pa /usr/libexec/blocklistd-helper Shell script invoked to interface with the packet filter. -.It Pa /etc/blacklistd.conf +.It Pa /etc/blocklistd.conf Configuration file. -.It Pa /var/db/blacklistd.db +.It Pa /var/db/blocklistd.db Database of current connection entries. -.It Pa /var/run/blacklistd.sock +.It Pa /var/run/blocklistd.sock Socket to receive connection notifications. .El .Sh SEE ALSO -.Xr blacklistd.conf 5 , -.Xr blacklistctl 8 , +.Xr blocklistd.conf 5 , +.Xr blocklistctl 8 , +.Xr ipf 8 , +.Xr ipfw 8 , .Xr pfctl 8 , .Xr syslogd 8 .Sh HISTORY diff --git a/contrib/blocklist/bin/blacklistd.c b/contrib/blocklist/bin/blocklistd.c similarity index 91% rename from contrib/blocklist/bin/blacklistd.c rename to contrib/blocklist/bin/blocklistd.c index 714abcbcaf0e..4846b507c8d1 100644 --- a/contrib/blocklist/bin/blacklistd.c +++ b/contrib/blocklist/bin/blocklistd.c @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $ */ +/* $NetBSD: blocklistd.c,v 1.10 2025/03/26 17:09:35 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -31,8 +31,11 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif + +#ifdef HAVE_SYS_CDEFS_H #include -__RCSID("$NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $"); +#endif +__RCSID("$NetBSD: blocklistd.c,v 1.10 2025/03/26 17:09:35 christos Exp $"); #include #include @@ -175,6 +178,8 @@ process(bl_t bl) struct dbinfo dbi; struct timespec ts; + memset(&dbi, 0, sizeof(dbi)); + memset(&c, 0, sizeof(c)); if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); return; @@ -188,10 +193,11 @@ process(bl_t bl) if (getremoteaddress(bi, &rss, &rsl) == -1) goto out; - if (debug) { + if (debug || bi->bi_msg[0]) { sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&rss); - (*lfun)(LOG_DEBUG, "processing type=%d fd=%d remote=%s msg=%s" - " uid=%lu gid=%lu", bi->bi_type, bi->bi_fd, rbuf, + (*lfun)(bi->bi_msg[0] ? LOG_INFO : LOG_DEBUG, + "processing type=%d fd=%d remote=%s msg=%s uid=%lu gid=%lu", + bi->bi_type, bi->bi_fd, rbuf, bi->bi_msg, (unsigned long)bi->bi_uid, (unsigned long)bi->bi_gid); } @@ -216,16 +222,19 @@ process(bl_t bl) 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 the application has signaled abusive behavior, set the + * number of fails to be two less than the configured limit. + * Fall through to the normal BL_ADD and BL_BADUSER processing, + * which will increment the failure count to the threshhold, and + * block the abusive address. */ if (c.c_nfail != -1) - dbi.count = c.c_nfail - 1; + dbi.count = c.c_nfail - 2; /*FALLTHROUGH*/ case BL_ADD: + dbi.count++; /* will become += 2 */ + /*FALLTHROUGH*/ + case BL_BADUSER: dbi.count++; dbi.last = ts.tv_sec; if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { @@ -254,9 +263,6 @@ process(bl_t bl) dbi.count = 0; dbi.last = 0; break; - case BL_BADUSER: - /* ignore for now */ - break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } @@ -334,7 +340,7 @@ static void addfd(struct pollfd **pfdp, bl_t **blp, size_t *nfd, size_t *maxfd, const char *path) { - bl_t bl = bl_create(true, path, vflag ? vdlog : vsyslog); + bl_t bl = bl_create(true, path, vflag ? vdlog : vsyslog_r); if (bl == NULL || !bl_isconnected(bl)) exit(EXIT_FAILURE); if (*nfd >= *maxfd) { @@ -395,15 +401,25 @@ rules_flush(void) static void rules_restore(void) { + DB *db; struct conf c; struct dbinfo dbi; unsigned int f; - for (f = 1; state_iterate(state, &c, &dbi, f) == 1; f = 0) { + db = state_open(dbfile, O_RDONLY, 0); + if (db == NULL) { + (*lfun)(LOG_ERR, "Can't open `%s' to restore state (%m)", + dbfile); + return; + } + for (f = 1; state_iterate(db, &c, &dbi, f) == 1; f = 0) { if (dbi.id[0] == '\0') continue; (void)run_change("add", &c, dbi.id, sizeof(dbi.id)); + state_put(state, &c, &dbi); } + state_close(db); + state_sync(state); } int diff --git a/contrib/blocklist/bin/blacklistd.conf.5 b/contrib/blocklist/bin/blocklistd.conf.5 similarity index 83% rename from contrib/blocklist/bin/blacklistd.conf.5 rename to contrib/blocklist/bin/blocklistd.conf.5 index 70036441eb4b..3a7dbfc07f58 100644 --- a/contrib/blocklist/bin/blacklistd.conf.5 +++ b/contrib/blocklist/bin/blocklistd.conf.5 @@ -1,6 +1,6 @@ -.\" $NetBSD: blacklistd.conf.5,v 1.9 2019/11/06 20:33:30 para Exp $ +.\" $NetBSD: blocklistd.conf.5,v 1.7 2025/02/11 17:47:05 christos Exp $ .\" -.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" Copyright (c) 2015, 2025 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -27,17 +27,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd May 18, 2020 -.Dt BLACKLISTD.CONF 5 +.Dd February 5, 2025 +.Dt BLOCKLISTD.CONF 5 .Os .Sh NAME -.Nm blacklistd.conf -.Nd configuration file format for blacklistd +.Nm blocklistd.conf +.Nd configuration file format for blocklistd .Sh DESCRIPTION The .Nm file contains configuration entries for -.Xr blacklistd 8 +.Xr blocklistd 8 in a fashion similar to .Xr inetd.conf 5 . Only one entry per line is permitted. @@ -48,34 +48,34 @@ Comments are denoted by a at the beginning of a line. .Pp There are two kinds of configuration lines, -.Va local +.Va [local] and -.Va remote . +.Va [remote] . By default, configuration lines are -.Va local , +.Va [local] , i.e. the address specified refers to the addresses on the local machine. To switch to between -.Va local +.Va [local] and -.Va remote +.Va [remote] configuration lines you can specify the stanzas: .Dq [local] and .Dq [remote] . .Pp On -.Va local +.Va [local] and -.Va remote +.Va [remote] lines .Dq * means use the default, or wildcard match. In addition, for -.Va remote +.Va [remote] lines .Dq = means use the values from the matched -.Va local +.Va [local] configuration line. .Pp The first four fields, @@ -85,9 +85,9 @@ The first four fields, and .Va owner are used to match the -.Va local +.Va [local] or -.Va remote +.Va [remote] addresses, whereas the last 3 fields .Va name , .Va nfail , @@ -110,8 +110,8 @@ The 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. +can have multiple addresses in different protocols where the mask has a +different size. .Pp The .Dv mask @@ -143,8 +143,8 @@ The field, is the name of the packet filter rule to be used. If the .Va name -starts with a -.Dq - , +starts with a hyphen +.Pq Dq - , then the default rulename is prepended to the given name. If the .Dv name @@ -160,13 +160,13 @@ field contains the number of failed attempts before access is blocked, defaulting to .Dq * meaning never, and the last field -.Va disable +.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 disable +.Va duration is seconds, but one can specify suffixes for different units, such as .Dq m for minutes @@ -176,28 +176,34 @@ for hours and for days. .Pp Matching is done first by checking the -.Va local +.Va [local] rules individually, in the order of the most specific to the least specific. -If a match is found, then the -.Va remote +If a match is found, then the matching +.Va [remote] rules are applied. The .Va name , .Va nfail , and -.Va disable +.Va duration fields can be altered by the -.Va remote +.Va [remote] rule that matched. .Pp The -.Va remote +.Va [remote] rules can be used for allowing specific addresses, changing the mask -size, the rule that the packet filter uses, the number of failed attempts, -or the block duration. +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 +.Bl -tag -width /etc/blocklistd.conf -compact +.It Pa /etc/blocklistd.conf Configuration file. .El .Sh EXAMPLES @@ -209,13 +215,15 @@ bnx0:ssh * * * * 3 6h [remote] # Never block 1.2.3.4 1.2.3.4:ssh * * * * * * -# For addresses coming from 8.8.0.0/16 block whole /24 networks instead of +# 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 +.Xr blocklistctl 8 , +.Xr blocklistd 8 .Sh HISTORY *** 2792 LINES SKIPPED *** From nobody Tue Oct 14 04:36:56 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cm1dj2zSRz6BhVQ; Tue, 14 Oct 2025 04:36: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 4cm1dj0TtRz3PxW; Tue, 14 Oct 2025 04:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=73j5Fa3jd/Ip57tBiagQ8Eh/KX0mzHVs3MCFaYg+/Vg=; b=FjEPtFLnQG1emTE1oAlv2EILVurK6I1QvF2MYRN6wJo0SsNxopGHCkOhhV2C283JMWYHVA OLbXnkD6oNHLp6p69IKuWLMNXVfgH5HnblyX9z4ake94ovJxwQZm9IiOQaNiDottZGkIDB hKXuMmgmLl22+WTISKhpjZ99OoPXbHM1zV5CtgO3T26L01tw7HiY/RLk+SL3XbNF6/8ySr SVN5tWSxaWCRIsmAEjHwwEPgLHttcoDVGf1TxoZI+8MmekXH1m5ildihlIuU90F4fqEGE0 5wBGANZlq2aqfNafMPMSXMZtL9nJpihV+Ei+M9ik2edEqFGKHfIZTwsNsWcI0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=73j5Fa3jd/Ip57tBiagQ8Eh/KX0mzHVs3MCFaYg+/Vg=; b=dyOKMEwdgIWQVTC1Gx5bWyXkGDtffOHm7/P8fl5GOoc9HQVMtbBge1eb50EgvyJTgN7JfB cWJ5LwfUfScMAAmTeHHxO7RVE01b9o+mgd07xPpntcqNCFcR6RWALY2ENt76STKnipe17I 0r9cg3EBTC4iaZjkDNX4Sfi8m+K267jaoMmOSiIFNlIyutKUNwbkjNKmq0PGUxpPk5YgbC 78/eDKZJtn3JlivFussmcXovjOP9acuinPpeGPqU05FR0wDUHaiQrlMBrlvno52D8/BbDf KGoLyTUDf7tzb9IC7RgsCgJtjayiJKVkm/2nMP8Qk1E/KQ0lpYaNvphloDmzJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760416617; a=rsa-sha256; cv=none; b=AA3KdmWrLchzOmyjwxV6z2Fi/65s5I1IdFI0nfin3YUAAAGdi5SraxNJtDFlyzzlamKGNA uko8/wj0bkRsgPsAyFd/8GtwcrZ22IbAsopCQQDRkC61sSIgobiBg3zfeit9zuW8+QiSIF O8/MQrHv3szztyCQLIxkO2BiSZFy796TSOQB9Dc0e203zx2YxWetPPxt2+BrH6xa+QSF53 7G8cqmnqWshburEOW1gAdTOHGfi/V+XyHisjN4GCAMIyI0bE/r8Nhr4HUn7YVz3Okyryra FhSlOc6+4vetsm5qbaFIxWeu2u+lOLnenBSDN8lJORS5Cm9TX9BNVHiqCxzO/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 4cm1dj05CpzdXY; Tue, 14 Oct 2025 04:36: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 59E4auJ9038090; Tue, 14 Oct 2025 04:36:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E4auCd038087; Tue, 14 Oct 2025 04:36:56 GMT (envelope-from git) Date: Tue, 14 Oct 2025 04:36:56 GMT Message-Id: <202510140436.59E4auCd038087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 803c373304ff - releng/15.0 - blocklist: Revert upstream commit ddf6d71 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 803c373304ff607b84a17c8b020dccf3f558bead Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=803c373304ff607b84a17c8b020dccf3f558bead commit 803c373304ff607b84a17c8b020dccf3f558bead Author: Jose Luis Duran AuthorDate: 2025-10-11 14:15:03 +0000 Commit: Colin Percival CommitDate: 2025-10-14 04:36:31 +0000 blocklist: Revert upstream commit ddf6d71 Upstream commit ddf6d71 ("implement BLOCKLIST_BAD_USER as a "one-count" failure") introduced BLOCKLIST_BAD_USER with a one-count failure mechanism. BLOCKLIST_AUTH_FAIL was implemented with a two-count failure mechanism. Since we have been utilizing BLOCKLIST_AUTH_FAIL, the number of failed attempts now doubles towards the maximum limit (nfails), giving system administrators the impression that the number of failed authentication attempts is inaccurate. Revert this commit until a consensus has been reached. We do not want to introduce yet another breaking change with the renaming of the library. Approved by: re (cperciva) Approved by: emaste (mentor) MFC after: 2 days (cherry picked from commit 4d56eb007b18881becb2107f87bd2a7edca3e6bf) (cherry picked from commit a719ef67e8ed2cbae5f397d2a4680a02495b79ab) --- contrib/blocklist/bin/blocklistd.c | 18 +++++++++--------- contrib/blocklist/lib/libblocklist.3 | 32 +++++++++++++++++++------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/contrib/blocklist/bin/blocklistd.c b/contrib/blocklist/bin/blocklistd.c index 4846b507c8d1..03a1dbbf056c 100644 --- a/contrib/blocklist/bin/blocklistd.c +++ b/contrib/blocklist/bin/blocklistd.c @@ -222,19 +222,16 @@ process(bl_t bl) switch (bi->bi_type) { case BL_ABUSE: /* - * If the application has signaled abusive behavior, set the - * number of fails to be two less than the configured limit. - * Fall through to the normal BL_ADD and BL_BADUSER processing, - * which will increment the failure count to the threshhold, and - * block the abusive address. + * 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 != -1) - dbi.count = c.c_nfail - 2; + dbi.count = c.c_nfail - 1; /*FALLTHROUGH*/ case BL_ADD: - dbi.count++; /* will become += 2 */ - /*FALLTHROUGH*/ - case BL_BADUSER: dbi.count++; dbi.last = ts.tv_sec; if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { @@ -263,6 +260,9 @@ process(bl_t bl) dbi.count = 0; dbi.last = 0; break; + case BL_BADUSER: + /* ignore for now */ + break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } diff --git a/contrib/blocklist/lib/libblocklist.3 b/contrib/blocklist/lib/libblocklist.3 index 7a016625a047..fd6eb93eb756 100644 --- a/contrib/blocklist/lib/libblocklist.3 +++ b/contrib/blocklist/lib/libblocklist.3 @@ -106,20 +106,26 @@ The .Ar action parameter can take these values: .Bl -tag -width ".Dv BLOCKLIST_ABUSIVE_BEHAVIOR" -.It Va BLOCKLIST_BAD_USER -The sending daemon has determined the username presented for -authentication is invalid. -This is considered as one failure count. -.It Va BLOCKLIST_AUTH_FAIL +.It Dv BLOCKLIST_AUTH_FAIL There was an unsuccessful authentication attempt. -This is considered as two failure counts together. -.It Va BLOCKLIST_ABUSIVE_BEHAVIOR -The sending daemon has detected abusive behavior from the remote system. -This is considered as a total immediate failure. -The remote address will be blocked as soon as possible. -.It Va BLOCKLIST_AUTH_OK -A valid user successfully authenticated. -Any entry for the remote address will be removed as soon as possible. +.It Dv BLOCKLIST_AUTH_OK +A user successfully authenticated. +.It Dv BLOCKLIST_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 BLOCKLIST_BAD_USER +The sending daemon has determined the username +presented for authentication is invalid. +The +.Xr blocklistd 8 +daemon compares the username to a configured list of forbidden +usernames and +blocks the address immediately if a forbidden username matches. +(The +.Dv BLOCKLIST_BAD_USER +support is not currently available.) .El .Pp The From nobody Tue Oct 14 04:36:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cm1dl1rPdz6BhVT; Tue, 14 Oct 2025 04:36: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 4cm1dk5bfJz3Q3Z; Tue, 14 Oct 2025 04:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MoiKLxOnYN5RNwhM+65M0PQ4ZqYe94prHma8JwtztMo=; b=sbcls/19/A1cLSJZSAa0Kg6nC40LSyGQ8TmuUxAzzZo+2kFatiOqDU9c1DYEKaVa7N6P/n jAA1kCgMN4qRhJt4H4cm2f1svxWs+Ldn4IPbhKhjb74UYLOhb+QtjSLMKmtygl5y36KQKb Pg/mZCWhOLcK9ltkbGPgLzh1qOyNiDSNJV9LyobGKRXyGZl+08vlZ/MaAKYIPmTq/wH4Pt 4boL5yQfpXw+8d6kyTyfKUFkSTDAIDXa1FM4ImPUOOTBSmKJkCtXw7M0nlBzS7fiiEuGIN jUOM9ySgLpl8fGemTyfitzXy9jhJd+5yr9J+moTGNxU+iEFWcuGgVIANHFlOpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MoiKLxOnYN5RNwhM+65M0PQ4ZqYe94prHma8JwtztMo=; b=L7kvXKrh8Gr91gzfr/haEBny2CcopotihiAPwnIpWvXxpMSXLaxZWztt81rCVhQznvRrEC BorZiRdNm/TxRjhLxIRdGIasG9mde0cNPWrASZiYIkMvEP/MHZLieeGqai5wt6ww3Rgg2H Surghn3UT9e8VNFgX7SnoJuIFTJBfHS1x9qKPjhJYTeSu58MmEz5Bs25NjdB8Ud+f1hC1K vVx/FmxwPkWQqm55ua9qbHXYczlJ0C5BRP6U1HTHEWS2hLEQ2D6LYKpoUZSIK8snyLEdhD VtKY1cmUzws0ZZl3m4sfL5cyDh+6qYjJcCV7Uuu9J07GpfGteywh59IgWNfn1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760416618; a=rsa-sha256; cv=none; b=sgk0QN9UK0k2plK/XI+N2JkMLUtNDrtwU9+GfldxcjMmKRCZzeP9Hl/ZctDKjNjty4NYPP bw4hGGGWD7LH7B5+1mDQWLPnGJpXmKkS0CtoHIU/OIEGX2NxhdjRkeAaelbSQjAju9r9Aw gx4wYJm0dNml5xICZXg+Am8hcwqAvr80KrxrU7RJXy8XPMrs2Lt+w+/pNGszNt+HrCR6nJ j2+7FGs7VTIK2FTSvmBR+nmiih6M8qs/r2mrCAbk1DwQPIfOFb2xKgmE6POlt/lhPCeW46 53o4j27QUzqJ2SiaYcxV8Ir3AGYet7KoP9ol+wBa8Oh6xAI9YDrwcZgFklsAjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cm1dk1MJxzdcb; Tue, 14 Oct 2025 04:36: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 59E4awbw038124; Tue, 14 Oct 2025 04:36:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E4awON038121; Tue, 14 Oct 2025 04:36:58 GMT (envelope-from git) Date: Tue, 14 Oct 2025 04:36:58 GMT Message-Id: <202510140436.59E4awON038121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 2b6eb6561253 - releng/15.0 - blocklist: Rename blacklist to blocklist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 2b6eb65612539f7a9ee94899b310d18e3ae894a3 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2b6eb65612539f7a9ee94899b310d18e3ae894a3 commit 2b6eb65612539f7a9ee94899b310d18e3ae894a3 Author: Jose Luis Duran AuthorDate: 2025-10-12 17:14:27 +0000 Commit: Colin Percival CommitDate: 2025-10-14 04:36:35 +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 warning - Old firewall rules and anchor names should work, but emitting an ugly warning - Old MK_BLACKLIST* knobs are wired to the new ones Although care has been taken not to break current configurations, this is a large patch containing mostly duplicated code. If issues arise, it will be swiftly reverted. Approved by: re (cperciva) Reviewed by: ivy (pkgbase) Approved by: emaste (mentor) MFC after: 2 days Relnotes: yes (cherry picked from commit 7238317403b95a8e35cf0bc7cd66fbd78ecbe521) (cherry picked from commit 7f6f2139eef9f9fc263977c847c6dbf235a1b1b7) --- 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 => blocklist.c} | 16 +- .../{blacklist_client.h => 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 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. + */ +#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 == 0) + warnx("Missing/unknown command"); + else if (c != '?') + 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 == -1) + return "*"; + snprintf(buf, len, "%d", val); + return buf; +} + +int +main(int argc, char *argv[]) +{ + const char *dbname = _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 = wide = blocked = all = remain = 0; + lfun = dlog; + + if (argc == 1 || strcmp(argv[1], "dump") != 0) + usage(0); + + argc--; + argv++; + + while ((o = getopt(argc, argv, "abD:dnrw")) != -1) + switch (o) { + case 'a': + all = 1; + blocked = 0; + break; + case 'b': + blocked = 1; + break; + case 'D': + dbname = optarg; + break; + case 'd': + debug++; + break; + case 'n': + noheader = 1; + break; + case 'r': + remain = 1; + break; + case 'w': + wide = 1; + break; + default: + usage(o); + } + + db = state_open(dbname, O_RDONLY, 0); + if (db == NULL) + err(EXIT_FAILURE, "Can't open `%s'", dbname); + + clock_gettime(CLOCK_REALTIME, &ts); + wide = 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 = 1; state_iterate(db, &c, &dbi, i) != 0; i = 0) { + char buf[BUFSIZ]; + char mbuf[64], pbuf[64]; + if (!all) { + if (blocked) { + if (c.c_nfail == -1 || dbi.count < c.c_nfail) + continue; + } else { + if (dbi.count >= 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 == -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/blacklistd.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 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. + */ +#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 = _PATH_BLCONF; +static DB *state; +static const char *dbfile = _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 != '?') + 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 = sizeof(*rss); + memset(rss, 0, *rsl); + + if (getpeername(bi->bi_fd, (void *)rss, rsl) != -1) + return 0; + + if (errno != ENOTCONN) { + (*lfun)(LOG_ERR, "getpeername failed (%m)"); + return -1; + } + + if (bi->bi_slen == 0) { + (*lfun)(LOG_ERR, "unconnected socket with no peer in message"); + return -1; + } + + switch (bi->bi_ss.ss_family) { + case AF_INET: + *rsl = sizeof(struct sockaddr_in); + break; + case AF_INET6: + *rsl = 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 != bi->bi_slen) { + (*lfun)(LOG_ERR, "bad client passed socket length %u != %u", + (unsigned)*rsl, (unsigned)bi->bi_slen); + return -1; + } + + memcpy(rss, &bi->bi_ss, *rsl); + +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + if (*rsl != rss->ss_len) { + (*lfun)(LOG_ERR, + "bad client passed socket internal length %u != %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) == -1) { + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + return; + } + + if ((bi = bl_recv(bl)) == NULL) { + (*lfun)(LOG_ERR, "no message (%m)"); + return; + } + + if (getremoteaddress(bi, &rss, &rsl) == -1) + goto out; + + if (debug || bi->bi_msg[0]) { + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&rss); + (*lfun)(bi->bi_msg[0] ? LOG_INFO : LOG_DEBUG, + "processing type=%d fd=%d remote=%s msg=%s uid=%lu gid=%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) == NULL) { + (*lfun)(LOG_DEBUG, "no rule matched"); + goto out; + } + + + if (state_get(state, &c, &dbi) == -1) + goto out; + + if (debug) { + char b1[128], b2[128]; + (*lfun)(LOG_DEBUG, "%s: initial db state for %s: count=%d/%d " + "last=%s now=%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 != -1) + dbi.count = c.c_nfail - 1; + /*FALLTHROUGH*/ + case BL_ADD: + dbi.count++; + dbi.last = ts.tv_sec; + if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { + /* + * No point in re-adding the rule. + * It might exist already due to latency in processing + * and removing the rule is the wrong thing to do as + * it allows a window to attack again. + */ + if (dbi.id[0] == '\0') { + int res = run_change("add", &c, + dbi.id, sizeof(dbi.id)); + if (res == -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 == 0) + goto out; + dbi.count = 0; + dbi.last = 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=%d/%d " + "last=%s now=%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) == -1) + return; + + oifas = ifas; + ifas = 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 = &c.c_ss; + + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + return; + } + +again: + for (n = 0, f = 1; state_iterate(state, &c, &dbi, f) == 1; + f = 0, n++) + { + time_t when = 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=%d duration=%d " + "last=%s " "now=%s", __func__, n, buf, dbi.count, + c.c_duration, fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } + if (c.c_duration == -1 || when >= 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 seconds", + 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 = bl_create(true, path, vflag ? vdlog : vsyslog_r); + if (bl == NULL || !bl_isconnected(bl)) + exit(EXIT_FAILURE); + if (*nfd >= *maxfd) { + *maxfd += 10; + *blp = realloc(*blp, sizeof(**blp) * *maxfd); + if (*blp == NULL) + err(EXIT_FAILURE, "malloc"); + *pfdp = realloc(*pfdp, sizeof(**pfdp) * *maxfd); + if (*pfdp == NULL) + err(EXIT_FAILURE, "malloc"); + } + + (*pfdp)[*nfd].fd = bl_getfd(bl); + (*pfdp)[*nfd].events = POLLIN; + (*blp)[*nfd] = bl; + *nfd += 1; +} + +static void +uniqueadd(struct conf ***listp, size_t *nlist, size_t *mlist, struct conf *c) +{ + struct conf **list = *listp; + + if (c->c_name[0] == '\0') + return; + for (size_t i = 0; i < *nlist; i++) { + if (strcmp(list[i]->c_name, c->c_name) == 0) + return; + } + if (*nlist == *mlist) { + *mlist += 10; + void *p = realloc(*listp, *mlist * sizeof(*list)); + if (p == NULL) + err(EXIT_FAILURE, "Can't allocate for rule list"); + list = *listp = p; + } + list[(*nlist)++] = c; +} + +static void +rules_flush(void) +{ + struct conf **list; + size_t nlist, mlist; + + list = NULL; + mlist = nlist = 0; + for (size_t i = 0; i < rconf.cs_n; i++) + uniqueadd(&list, &nlist, &mlist, &rconf.cs_c[i]); + for (size_t i = 0; i < lconf.cs_n; i++) + uniqueadd(&list, &nlist, &mlist, &lconf.cs_c[i]); + + for (size_t i = 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 = state_open(dbfile, O_RDONLY, 0); + if (db == NULL) { + (*lfun)(LOG_ERR, "Can't open `%s' to restore state (%m)", + dbfile); + return; + } + for (f = 1; state_iterate(db, &c, &dbi, f) == 1; f = 0) { + if (dbi.id[0] == '\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 = NULL; + blsock = NULL; + maxblsock = nblsock = 0; + flush = 0; + restore = 0; + tout = 0; + flags = O_RDWR|O_EXCL|O_CLOEXEC; + while ((c = getopt(argc, argv, "C:c:D:dfP:rR:s:t:v")) != -1) { + switch (c) { + case 'C': + controlprog = optarg; + break; + case 'c': + configfile = optarg; + break; + case 'D': + dbfile = optarg; + break; + case 'd': + debug++; + break; + case 'f': + flush++; + break; + case 'P': + spath = optarg; + break; + case 'R': + rulename = optarg; + break; + case 'r': + restore++; + break; + case 's': + if (nblsock >= maxblsock) { + maxblsock += 10; + void *p = realloc(blsock, + sizeof(*blsock) * maxblsock); + if (p == NULL) + err(EXIT_FAILURE, + "Can't allocate memory for %zu sockets", + maxblsock); + blsock = p; + } + blsock[nblsock++] = optarg; + break; + case 't': + tout = atoi(optarg) * 1000; + break; + case 'v': + vflag++; + break; + default: + usage(c); + } + } + + argc -= 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 = dlog; + if (tout == 0) + tout = 5000; + } else { + if (tout == 0) + tout = 15000; + } + + update_interfaces(); + conf_parse(configfile); + if (flush) { + rules_flush(); + if (!restore) + flags |= O_TRUNC; + } + + struct pollfd *pfd = NULL; + bl_t *bl = NULL; + size_t nfd = 0; + size_t maxfd = 0; + + for (size_t i = 0; i < nblsock; i++) + addfd(&pfd, &bl, &nfd, &maxfd, blsock[i]); + free(blsock); + + if (spath) { + FILE *fp = fopen(spath, "r"); + char *line; + if (fp == NULL) + err(EXIT_FAILURE, "Can't open `%s'", spath); + for (; (line = fparseln(fp, NULL, NULL, NULL, 0)) != NULL; + free(line)) + addfd(&pfd, &bl, &nfd, &maxfd, line); + fclose(fp); + } + if (nfd == 0) + addfd(&pfd, &bl, &nfd, &maxfd, _PATH_BLSOCK); + + state = state_open(dbfile, flags, 0600); + if (state == NULL) + state = state_open(dbfile, flags | O_CREAT, 0600); + if (state == NULL) + return EXIT_FAILURE; + + if (restore) { + if (!flush) + rules_flush(); + rules_restore(); + } + + if (!debug) { + if (daemon(0, 0) == -1) + err(EXIT_FAILURE, "daemon failed"); + if (pidfile(NULL) == -1) + err(EXIT_FAILURE, "Can't create pidfile"); + } + + for (size_t t = 0; !done; t++) { + if (readconf) { + readconf = 0; + conf_parse(configfile); + } + ret = poll(pfd, (nfds_t)nfd, tout); + if (debug) + (*lfun)(LOG_DEBUG, "received %d from poll()", ret); + switch (ret) { + case -1: + if (errno == EINTR) + continue; + (*lfun)(LOG_ERR, "poll (%m)"); + return EXIT_FAILURE; + case 0: + state_sync(state); + break; + default: + for (size_t i = 0; i < nfd; i++) + if (pfd[i].revents & POLLIN) + process(bl[i]); + } + if (t % 100 == 0) + state_sync(state); + if (t % 10000 == 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 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. + */ +#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 = "blacklistd"; +const char *controlprog = _PATH_BLCONTROL; +struct confset lconf, rconf; +struct ifaddrs *ifas; +void (*lfun)(int, const char *, ...) = 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 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. + */ +#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 *** 2511 LINES SKIPPED *** From nobody Tue Oct 14 04:36:59 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cm1dl5Ctlz6BhZv; Tue, 14 Oct 2025 04:36: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 4cm1dl3yTCz3QF2; Tue, 14 Oct 2025 04:36:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeO8/eMlsecJ8Quboo9ZcNgFaqQCUs13zFRxUr6bCxU=; b=hi7+ux+hgFNvTuxPWV86sTHbBFblpRYYQR8BzMvdNL+vd0x+QM961EZtR37q50yW31zkdB eYLJASTmOWgcf5JpJoMPUqT3Zel5SgGhj5hLB8GkeXK53gsBePuOYEbcRSKd0QZRWk4Ord j2w83LhDthgCtDcZiu/EB3JBu+c5Xk2O3o8vwtPD2CCYOt2Mr5ZT0cmngeTdzm0N3Of6eB JIV0R5uxtG+3HYO7WjbqaQj2Hg24HwnbKb8ZCzxFNxIBkUmCIG1UKdid4+ttX5BIvEN4LV VHO8xermM3Ekf7tqkpGUYEA4xhfFuoKiPgASfVIq2yFcvJyDh1AM2x78v4KTwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeO8/eMlsecJ8Quboo9ZcNgFaqQCUs13zFRxUr6bCxU=; b=dZhtTXym7jJtvoxpU+PlbD6YSOZl3gnneRDAnclV/U/42yfTqRzwRc/pjH5nD+b6gFseWq ys1V/Hc1D64D4vioYRW7yorWNkHRPyeswYaEAgU0l1iYNAxoVjSjgGTwFFa7cVLWrO75K8 qd4knyRnHpw7jRSxpDK/mpbmYB3iandmnV4EV8S3EJ1S4wsGK2PInm/yVTokUmt/RDWVRd oCHqCAo1hSrs/8G7w21fb/f0Sd6P/O2gOdyyhjCESQ4OvuVzBfnYvg/+msHQs9HMTZdK57 bw2aXwdsSMW9zfELu9hlGeO2X88lRYgPDlMxFr79CfmSzZgWGhsqjlhW0DwiQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760416619; a=rsa-sha256; cv=none; b=lvRzpSVFw5rbY9QkvYN9uzdCesJi9NfgsMlpcJ+vJ0zmOWgYayGeHSuRU6TbgAXWe2JPq9 oHRbmd79VUSqJO8/mPGFNypQdRkw8weyRZ8fvjnlsHTk0EwyVx5FRHS8mg1Ri9VBDSNEhu aEDk/j6+fFmBG8eaDUemO/kpIjvAAROsQo6Q+wfYKm94zh5mFnklRc8nwI+lfrpWZD17vr DkBP7YizKLH2agjQ9SaVzpoyJrCo1Qr4FQQPOS1WdNz/JkHJbW8zTt0O4lAE5E0XYjYoEm ncQBUb2lW/tNytTSV0erVrtnrwli1Z+bEtEj6aNepfMUYO6dJDYrjNQtBC46LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cm1dl2N8NzdZM; Tue, 14 Oct 2025 04:36: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 59E4axZ9038159; Tue, 14 Oct 2025 04:36:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E4axqx038156; Tue, 14 Oct 2025 04:36:59 GMT (envelope-from git) Date: Tue, 14 Oct 2025 04:36:59 GMT Message-Id: <202510140436.59E4axqx038156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f315a3512c70 - releng/15.0 - blocklist-helper: Silence a bogus pf warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: f315a3512c709afc2a59584791f29ebd7e9e047d Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f315a3512c709afc2a59584791f29ebd7e9e047d commit f315a3512c709afc2a59584791f29ebd7e9e047d Author: Jose Luis Duran AuthorDate: 2025-10-12 17:16:12 +0000 Commit: Colin Percival CommitDate: 2025-10-14 04:36:39 +0000 blocklist-helper: Silence a bogus pf warning Silence a bogus warning about (an ethernet) anchor not being found. It has been reported as PR 280516. In the meantime, just sweep under the carpet. Approved by: re (cperciva) Approved by: emaste (mentor) MFC after: 2 days (cherry picked from commit 2347ca21d657121670e6e7246c6ac32efc996cac) (cherry picked from commit ba5768504bee39191754fc1aece3927c8936f27c) --- contrib/blocklist/libexec/blocklistd-helper | 2 +- libexec/blocklistd-helper/blacklistd-helper | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/blocklist/libexec/blocklistd-helper b/contrib/blocklist/libexec/blocklistd-helper index f27cde4ed4ea..14a192ee35ce 100755 --- a/contrib/blocklist/libexec/blocklistd-helper +++ b/contrib/blocklist/libexec/blocklistd-helper @@ -258,7 +258,7 @@ flush) pf) # dynamically determine which anchors exist for anchor in $(/sbin/pfctl -a "$2" -s Anchors 2> /dev/null); do - /sbin/pfctl -a "$anchor" -t "port${anchor##*/}" -T flush + /sbin/pfctl -a "$anchor" -t "port${anchor##*/}" -T flush 2> /dev/null /sbin/pfctl -a "$anchor" -F rules done echo OK diff --git a/libexec/blocklistd-helper/blacklistd-helper b/libexec/blocklistd-helper/blacklistd-helper index 4195f070e8ee..92f768e86cdf 100644 --- a/libexec/blocklistd-helper/blacklistd-helper +++ b/libexec/blocklistd-helper/blacklistd-helper @@ -279,7 +279,7 @@ flush) pf) # dynamically determine which anchors exist for anchor in $(/sbin/pfctl -a "$2" -s Anchors 2> /dev/null); do - /sbin/pfctl -a "$anchor" -t "port${anchor##*/}" -T flush + /sbin/pfctl -a "$anchor" -t "port${anchor##*/}" -T flush 2> /dev/null /sbin/pfctl -a "$anchor" -F rules done echo OK From nobody Tue Oct 14 04:37:00 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cm1dm431Fz6BhBM; Tue, 14 Oct 2025 04:37: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 4cm1dm3TP7z3Q3t; Tue, 14 Oct 2025 04:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4afukLQ9RkRazTWfuBPQKJpacRSAlkx29x3CwLA8jA=; b=p8ZuC7gbUxpXAof2SPeLVPBfak9Fb8C1ma0mq84ir7jJVSX0CXon8kihVEwgAjlUeLqyze Ddc9KJh3gm39xvMfAtasdJAQ4l8/2QFIXcsg/nvjGG5JCv+zi6hmB83NmpizZxxpxpta3F 2O+LZZHLYwo7RLwpIapjFeMQpyBIqIA5mR6DZjTVQfpTO2RNserHM4mehnwLR5WpwGxOs4 IKxvCAL0TWa+rnafGoBL/RIh7sWwqMIdBrlg/HskkLYxObL9g36YSvStiophvXDhhSSRHL lcHpoyS6ZRQpDHHPO9RaVbXKRNYR83pCq8xoSQ4IhHwb/UpTY0OzDeUeKplwbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4afukLQ9RkRazTWfuBPQKJpacRSAlkx29x3CwLA8jA=; b=nrIdmiMObCIh04/O2PJRXIhKGS2wQ+RESZgkMryj9qNfqNl4Bk/02RgbczrsGSC831R103 /XMo3dtlnI4BQ/uLN8AzKyWPmS9aNKMzif4Z/qP6vNOj6NN5YDZSywWjzvIPlt/2pOBKfy xCPbOhACEPrPLh+wd1ZeEJcXK4KktNrzbmqYD0GANGYkLCi/5/r2XQPryve02QFMaEEilj dCztmk45M3n26HDSWPqXPJGVA80qmbF3DsKJbSkCzCNgFmFSnPdqGZ1as5Je00pwUkzq2k doQMC3wyMVVfqJTanlceQfStPT8ybA0oa5fGh2dAOJDHqzv7OKelluDlZFD4Yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760416620; a=rsa-sha256; cv=none; b=TsPtVxQ1+CGx91E5QWGMjt9L+b5rrqLPsVpsdspmAT40PjFasd5khN2EPcqoN7CroiEWc1 jGwkbHj3l1j1chUCLw9kI0DrqQEEGH8CB7DyNwqC8FxztHgUVebgmB/54GVAsFmFl/QkUT 9W1092/qZyTHs4/cBTPQFzjF7Z65JWqlvWA+Zv8m5r5p8dOjsriYEcz8v+aLLPTCsioWxy 0gAi1nX+XgnToYl3pGAUYNf59uki/ikO7JZVacbfj2dt6eI4nKNx8c57qYgv6uw1SC0cOv j9toYyzmK2O/zmNA49M6u+pIJ53u8ZKgD/JHY0hL1+Ari9XG9UBn7H0J51QwPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cm1dm349CzdXZ; Tue, 14 Oct 2025 04:37: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 59E4b0rC038201; Tue, 14 Oct 2025 04:37:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E4b05u038198; Tue, 14 Oct 2025 04:37:00 GMT (envelope-from git) Date: Tue, 14 Oct 2025 04:37:00 GMT Message-Id: <202510140437.59E4b05u038198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 621d4b1d01d5 - releng/15.0 - blacklist: Avoid duplicate manual pages in METALOG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 621d4b1d01d55567de08ccec98120be5be7d257b Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=621d4b1d01d55567de08ccec98120be5be7d257b commit 621d4b1d01d55567de08ccec98120be5be7d257b Author: Jose Luis Duran AuthorDate: 2025-10-13 00:53:50 +0000 Commit: Colin Percival CommitDate: 2025-10-14 04:36:42 +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: re (cperciva) Approved by: emaste (mentor) Fixes: 7238317403b9 ("blocklist: Rename blacklist to blocklist") MFC after: 2 days (cherry picked from commit c6240045536548c22ce40d9ef36c1dc52abcfc9c) (cherry picked from commit f935c0f66f75e882185ed8bc46f39054f2ced4e1) --- 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 *** 6 LINES SKIPPED *** From nobody Tue Oct 14 04:37:01 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cm1dn6P0rz6Bh5c; Tue, 14 Oct 2025 04:37: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 4cm1dn5Szgz3Q48; Tue, 14 Oct 2025 04:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZxOHH4WQR1iGARKexi9NcyWwfnH0UVilW6S+XO09+Q=; b=rGm5d4V7HLUG1ZXF7Wi+OzWe6YLSGs/wrecT8PVw3KDp3b8s9V96aU7IwjUElVIIJpEVk+ 7ET8Bkpm/6ZMT/r4dJEs5DIyXNJJERp3dgj9jKvkcTgmaZogtjVZawQt4cugC8kjbwHmaB knCNCCR/l0KTVOVQ8LbyceWv3dsL8OAM2XpaI39HAgNDjZd5A2y6du2aJK9OCTsFTT7i8/ JE2hO2KRiuDhsq8CRYa7RNeMW4/98yi5JUY8G6Et0CgJ/kpXj2y0XYRkwCl3i/C+ruUCyg iHa5EzRJkoOsvelTEh2yR0qKWU+fA9G9l9sdP/6BzGL48s5WZBmKwBOQCOjVkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760416621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZxOHH4WQR1iGARKexi9NcyWwfnH0UVilW6S+XO09+Q=; b=NsZc64ZRY2bUXsMQPFpBTLAeQci7nfq88tog8dY88oPvfUvESpI6qwqFTLKjEcnvTWqq6+ /fjOBpD8Y+U6zYITgMVRrf8jqw8htHToYgwLMu+gvx6MXngYo5ra7YgdD0I/Vw2lrxzNFj 80Q9ZDMEJN6OxInmKp0B5WDBA4Yoqmnpjt/2OAI3ISYqU5oeX0UgyYas2GacoVahUtA323 BZnjNNjUH6Z7nPaYkNB4Yk+bBlxn8R9XpcqxTS2U5rzAo7SIkULYQHRwgbccoT70/fxHyZ 53xdvdbzoNmeosiD4ueiWzPkJeqYWK7KwKJ6c1AdAnyhur3wNonJhTzU7OnEQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760416621; a=rsa-sha256; cv=none; b=BIeN19Em6pjqStfAjXNotW/cQ7zWUpcx4LTy+0TkvgRTyNBnpicqSN8zE/N/SXFDvvkCqd bfjC1ZeTdFJ9DcszQEX/+9tr+CjWtOvbDf/H9eXoDjk0BEvcoRqfShqpZEZY5w2YfRRYKh KkMYl0bvzAuUDUohWvkK8eCH4ZZHrV7Gsd6AL9PA1rt3cFAlvAxxmrhYsPlLb/ELs9t+cb GGcbS3hMA5OwVArD1xuU6as3qhDkE3+TOgydAeTjpjBe7aS/CczwA8uWiGjGzy0hw4aB5s npzJMYhKZFBmi52B+mSfFI/LqjP0ibB7Oo7Z/62NITR84S0M9TZ8Z96cZUxF2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cm1dn3gvrzdZN; Tue, 14 Oct 2025 04:37: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 59E4b1l1038239; Tue, 14 Oct 2025 04:37:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59E4b1pQ038236; Tue, 14 Oct 2025 04:37:01 GMT (envelope-from git) Date: Tue, 14 Oct 2025 04:37:01 GMT Message-Id: <202510140437.59E4b1pQ038236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: bf591ddc87aa - releng/15.0 - blocklist: Add an UPDATING entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: bf591ddc87aa0fdc0fff279fbef3d3570ea56666 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bf591ddc87aa0fdc0fff279fbef3d3570ea56666 commit bf591ddc87aa0fdc0fff279fbef3d3570ea56666 Author: Jose Luis Duran AuthorDate: 2025-10-13 14:35:12 +0000 Commit: Colin Percival CommitDate: 2025-10-14 04:36:45 +0000 blocklist: Add an UPDATING entry Add an UPDATING entry about the renaming of blocklist. Approved by: re (cperciva) Approved by: emaste (mentor) Fixes: 7238317403b9 ("blocklist: Rename blacklist to blocklist") MFC after: 1 day (cherry picked from commit ffa8165009365ff93050626d880f2d1d6aacc31a) (cherry picked from commit f22ca25404e795aa08efc35d8cdbb5b44304650f) --- UPDATING | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPDATING b/UPDATING index 6e893f07df61..4b14159ceb4a 100644 --- a/UPDATING +++ b/UPDATING @@ -17,6 +17,12 @@ and/or ports. can install the ftp/freebsd-ftpd port. pkgbase users should remove the orphaned FreeBSD-ftpd package. +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 Tue Oct 14 08:14:55 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:54 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:22:53 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:57:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:16:16 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmGV83N1Zz6CWF0; Tue, 14 Oct 2025 14: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 4cmGV82tz9z3XQn; Tue, 14 Oct 2025 14: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=1760451376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NWSx4KCArHqAvBT+5ZA/NJOX+hR4d1WPGSZv0fzn+pc=; b=MAEkpYKPzre31rFw/qvH9NJOOjrcsx+5LSnAF5aBqShY/icWFQI0HW9D4jhb7FRCQ6xx/K iMvOMyL535rbJ/tzAB6bbZ2IMQNvCV3BqL0Kvd/yCna9VdszB9OAjOrf1Eu2xarvoax477 HVX71IsNm5Yo6sH8tD3zoMBaIrakMzo7xNl3OAv0mdafWMIG7NLI1M8BaNd+Ew7TIW9DmY y7MCo64E2LdrgDC2a+mDK38PqKiSzdc+mqnxgNN2rTgXminI5bJSJQMwED+XeaNG4ciXol 4Rl+GLtzk9oOJ/l+ufSK8y5/JG+u9rIAy3VIFNiu9xkTYSJntLvRouN/hIORHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760451376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NWSx4KCArHqAvBT+5ZA/NJOX+hR4d1WPGSZv0fzn+pc=; b=KPhQnVRRzzBXZiion/WafvYTDy1xGvL5KPCXbtck7/tiKESUhK261+l6/X9lcE0xtWu+XO 2SDyQf6CY7GwsO2dl2eiLse3bP5D7/pdcg08WSdMVD82MPmgC+SqXVFmcFbUit6DRh25hy 2axBM90ZsZZDJrcFpNJ9/zqCnWi5NcEVb8iBV6XNrQ+YOYNqK+M7I4OHpjtXzZXpxKMvXj 9SjABMlYKHOWOiPzpkeTePjyvZu66+wBi2Oom/MMpvEZ4TG97QbFbgXJfAiDmO2D6XkSrc mBaxMkBNsayLzQZY1AGSHdcWQvU0WD4lFhEPbCsq6EJ3q/pEHOGYmMSBe4vhbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760451376; a=rsa-sha256; cv=none; b=cmJmQghVfTzBB/Qgth+nr1BS1B393U/bpliXmFtNwFirEDx5nfZD0W1qxaUGBjD2J0UKDl TTH7I5pDcfDlCcD6+GB6wpFOkh5WEiUMkwcBhLg1j0PNIuNdZDsj408uSOYZFyv/mg8+g2 2HcU5GXJ4M5borBF46/9DUiXkJPVwCTmW5UFdgrWhTX1k1CTtxOHCrONKnPgGmUcAGE1uz ll5xo7Hdi1MKhsyaQXTbNlvdc6BvbypLq77ZTGMZOO/smFeVOtR6M70unhaLUra8lPjSIz OunEWcqVIIomE9bjSYuqUn44Tlt9u5Dzb5C58tXqp00hH9A/SOqMGcAyQ4xYQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmGV82VDjzwDs; Tue, 14 Oct 2025 14: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 59EEGGP3028160; Tue, 14 Oct 2025 14: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 59EEGGs5028157; Tue, 14 Oct 2025 14:16:16 GMT (envelope-from git) Date: Tue, 14 Oct 2025 14:16:16 GMT Message-Id: <202510141416.59EEGGs5028157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: d06e31d4a762 - stable/13 - libm: remainder: make sure x is zero List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d06e31d4a7622b535d903a1b84ce59e211ca2b18 Auto-Submitted: auto-generated The branch stable/13 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=d06e31d4a7622b535d903a1b84ce59e211ca2b18 commit d06e31d4a7622b535d903a1b84ce59e211ca2b18 Author: Ahmad Khalifa AuthorDate: 2025-10-10 09:30:52 +0000 Commit: Ahmad Khalifa CommitDate: 2025-10-14 14:01:59 +0000 libm: remainder: make sure x is zero Make sure the entirety of x is zero before flipping the sign bit. Otherwise the sign would be wrong for small values of x when x is negative and |n*y| > |x| Reported by: alfredo PR: 251091 Reviewed by: kargl MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53023 (cherry picked from commit 25cca51ed294890d20a3c0290814cd26875db686) --- lib/msun/src/e_remainder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msun/src/e_remainder.c b/lib/msun/src/e_remainder.c index bd1ce8950619..5b71088911a2 100644 --- a/lib/msun/src/e_remainder.c +++ b/lib/msun/src/e_remainder.c @@ -66,8 +66,8 @@ remainder(double x, double p) if(x>=p_half) x -= p; } } - GET_HIGH_WORD(hx,x); - if ((hx&0x7fffffff)==0) hx = 0; + EXTRACT_WORDS(hx, lx, x); + if (((hx&0x7fffffff)|lx) == 0) hx = 0; SET_HIGH_WORD(x,hx^sx); return x; } From nobody Tue Oct 14 14:16:17 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmGV966QZz6CWMk; Tue, 14 Oct 2025 14:16: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 4cmGV948Mlz3XJS; Tue, 14 Oct 2025 14:16:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760451377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LzBN+bB7wuIvKpx0Lh608KUykJ1SrMu5dCTowGe4uuM=; b=owVpP5J6kknGHBgZL6aIyGflprkYGkf/I86q9ejZMAtyvS7L/Tj5QenODDJHlH5ukwuAh0 ot8DCY20K9V4LBMde+53ZzyG+RkQZpY35ot7a3DQon9cQb1YiuqdCmk+TfSogurygq6DAB Xfq32zRCf0AWtAstD6wxWgT5hVhoYIWFyrULniQagaVM/0kjEtyZvIjsOJ6y+wak4mOtQt dWMvZbfWpnaRcNBqhmkYY4s/2rPEVfKAokZk6UoCX23NJdOziSBlJMZyao9zm6bI6lyp54 7thqqzpSUf/+nWSCOTcjOKDPcCHp45a4pny8ddog2WDqIbg/mAx3hPRCycnoEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760451377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LzBN+bB7wuIvKpx0Lh608KUykJ1SrMu5dCTowGe4uuM=; b=T5ddj37b6agtC76kRdV716jEyRz6IVs+umKZ/4s6FXiiygO5we9xHsapFrSa2Mu+7PJDaW BqMoorOHzpaEbGUZ8yRl4ZZh/fAOei5Beg4NpR1xQcKU4vWdVC+LuyxIYma38Z3HyXvQbv eqKS42nahFZd06w8BbiLxvllC1e5QpVp2Joy0/Wij8uFqQtGP1ZxiDmchMK90lp0p8egsa IG7ADc6qAr6BxT742sm028DCaUXV3tVW9T1rH+ryCKfqxK+BXIUzO046d1wlfHw9t5fjuK TVfZUjhZni2Kj1//1jXiBPSjzNGqycfodRV6E7iUdzn0zHeDuClMS5TdIa7U1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760451377; a=rsa-sha256; cv=none; b=tycmvqaJjjS1+S3cPp+s+JR7BHnvhfCZndDdncwAYE3P6mXeLLkP3dAHGGOwo4qXaVylrA i0AAjRMgw00A2B1484C0ouMFQQbEy73nEyM2Kb76RiRhCUyFisy9mb13s+lhhtgADul3t1 vZ/v2fo818sN4qNFk00WHiLwIfgO62Oe5QC60S4ahAr7s1jfd15FopH2SBfzQsjcd7bxpV X+KGb5qBy2RX9bNUnrXkU9FGhNufWVvsPiqHHMrAMXn7dIiitw/DF3+duct/Cb5m0oIDc3 7l/Aa5/hKG/j4RTlRTCFdHaEu1D7wx4VfqW8FqKafJCdtlQVld4NC/Xn9gSZ8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmGV93Yy2zvtK; Tue, 14 Oct 2025 14:16: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 59EEGHm4028210; Tue, 14 Oct 2025 14:16:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EEGHJW028207; Tue, 14 Oct 2025 14:16:17 GMT (envelope-from git) Date: Tue, 14 Oct 2025 14:16:17 GMT Message-Id: <202510141416.59EEGHJW028207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: 439909c48b0e - stable/14 - libm: remainder: make sure x is zero List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 439909c48b0e8b0e8dda03b9a359b73dcabb546e Auto-Submitted: auto-generated The branch stable/14 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=439909c48b0e8b0e8dda03b9a359b73dcabb546e commit 439909c48b0e8b0e8dda03b9a359b73dcabb546e Author: Ahmad Khalifa AuthorDate: 2025-10-10 09:30:52 +0000 Commit: Ahmad Khalifa CommitDate: 2025-10-14 14:00:19 +0000 libm: remainder: make sure x is zero Make sure the entirety of x is zero before flipping the sign bit. Otherwise the sign would be wrong for small values of x when x is negative and |n*y| > |x| Reported by: alfredo PR: 251091 Reviewed by: kargl MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53023 (cherry picked from commit 25cca51ed294890d20a3c0290814cd26875db686) --- lib/msun/src/e_remainder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msun/src/e_remainder.c b/lib/msun/src/e_remainder.c index 406f12c14c2f..057da0e3d990 100644 --- a/lib/msun/src/e_remainder.c +++ b/lib/msun/src/e_remainder.c @@ -65,8 +65,8 @@ remainder(double x, double p) if(x>=p_half) x -= p; } } - GET_HIGH_WORD(hx,x); - if ((hx&0x7fffffff)==0) hx = 0; + EXTRACT_WORDS(hx, lx, x); + if (((hx&0x7fffffff)|lx) == 0) hx = 0; SET_HIGH_WORD(x,hx^sx); return x; } From nobody Tue Oct 14 14:16:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmGVC0Vqrz6CWKk; Tue, 14 Oct 2025 14:16: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 4cmGVB516xz3XGL; Tue, 14 Oct 2025 14:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760451378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ld+KEh5dOk95GHS0IwWB6Ix76Yofh4XUoIAIr1KFVw=; b=qz70R6YEfRAi5vNfprIj3GoLGYcl45S/Rq41WMgOqYGJSiF0MY12XKHfD25dfKR8pL2RsC hGwd0RubZ4eWkxthV4bBB/bMf9igoQux8RK6webpsuYe1R4QSENIVSibh1rdohf8tcSFll DQCHFrtI1AkCZ8OC2chFchuOqjQ5gRga4HIkn1URRh+QpiN5atv6zk2mvxwFCgDnIIdkEd SFDaGRtI508PbK+tgmS5iF9gELh9+a+cGTv8DVGZicKl6Rs3DQJ6APC7+Fi7YKjeLXiSn+ 5xztUIoRjG8gdjr+rmCLUg88erBcds8vEMmwxjTTm7I/9ZafAOM0mV6wuFq05g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760451378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ld+KEh5dOk95GHS0IwWB6Ix76Yofh4XUoIAIr1KFVw=; b=Uc7QW9/VibuNJiAZwfZISFiZ4g4vXWOfe7AZZ/LkXJDlpYsSofjTOCSuo2TsabqhhAKgqM vBxra6hMPvJY4qQQWyg2KNDeEvEeYMfs34nZVq0MFc9cv/km2eZvDTky73kgb+rZfuwBMq XmWNwZHAfy55/UA3ObLWUCLhekxLHG14VHMyFLnifZHX/92Kpsjrp9Mo4kMPbHTNYqAne7 pQCYCwW4GTX9yYz6JOjiJJyPFrYo+1ciTYPzYT8w9tXvIN6Gl1wK5xzAE9hbnt5uXINmrt U/j6yNnS3FeGl3QVAke5obpEGQhL2SKjXuAuhocfueNMuFZJ9xu8s5RsTmaS8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760451378; a=rsa-sha256; cv=none; b=v8tPxJ9b+Wgr7nWvm4aYWxG/unv0qrwYfYnEFe5T29c+akVbeSd9P+u3XPnUxYPqNl+2qd rEtpf3umYZGoxPO4vsdh/SlMNoY8Ik29Yqx7ZLSuaTbdV3dDsBH+Xk4St3TM+txntYNkpc esVH6kFVKK8UfzagEOhPkPSVBhAr8yoxsXVkBK+h7i0beDqavdvmFOoTmACx2Oh/S6zP5c bpByO2vxUIuILJhlHqF3eRr6bGsItUeD6ejTkiUNN5htcTFQypJ2EwEEChYVZl3Oqbosn7 f+haRBOefS3Om/ybeG/xh/d8X4s6FzsKHrXP0fn/mjTgNHnSUWHEaGnNVxtOcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmGVB4cPGzwPM; Tue, 14 Oct 2025 14:16: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 59EEGIrw028256; Tue, 14 Oct 2025 14:16:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EEGIYX028253; Tue, 14 Oct 2025 14:16:18 GMT (envelope-from git) Date: Tue, 14 Oct 2025 14:16:18 GMT Message-Id: <202510141416.59EEGIYX028253@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: 583e976d6d09 - stable/15 - libm: remainder: make sure x is zero List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 583e976d6d09770a6299a19603d4f0dbaa562cac Auto-Submitted: auto-generated The branch stable/15 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=583e976d6d09770a6299a19603d4f0dbaa562cac commit 583e976d6d09770a6299a19603d4f0dbaa562cac Author: Ahmad Khalifa AuthorDate: 2025-10-10 09:30:52 +0000 Commit: Ahmad Khalifa CommitDate: 2025-10-14 13:42:31 +0000 libm: remainder: make sure x is zero Make sure the entirety of x is zero before flipping the sign bit. Otherwise the sign would be wrong for small values of x when x is negative and |n*y| > |x| Reported by: alfredo PR: 251091 Reviewed by: kargl MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53023 (cherry picked from commit 25cca51ed294890d20a3c0290814cd26875db686) --- lib/msun/src/e_remainder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msun/src/e_remainder.c b/lib/msun/src/e_remainder.c index a5fb7141d01a..cc6cd320073e 100644 --- a/lib/msun/src/e_remainder.c +++ b/lib/msun/src/e_remainder.c @@ -64,8 +64,8 @@ remainder(double x, double p) if(x>=p_half) x -= p; } } - GET_HIGH_WORD(hx,x); - if ((hx&0x7fffffff)==0) hx = 0; + EXTRACT_WORDS(hx, lx, x); + if (((hx&0x7fffffff)|lx) == 0) hx = 0; SET_HIGH_WORD(x,hx^sx); return x; } From nobody Tue Oct 14 14:47:11 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 15:01:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmHTt3HSnz6CZH4; Tue, 14 Oct 2025 15: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 4cmHTt2LLbz3g28; Tue, 14 Oct 2025 15: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=1760454066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kYB0lHDlxDnRVYnjFGLn2tYoFNeBhfzFtjwpyXw6Njg=; b=b8eszHHBtDGPEPH6bnJ9Z2qf9Uu+k/K9WfGox5YoQDIVxbQaR3EYjR+HrfKC4yQFViFJh0 RFvi2Xk8dLoN4ky7WqTH5RchGLBg9o+BPGqrcQUo1XJNaD3ut/s0XojSGADgyT1rGB3rG1 f7S78qVV4Iuj4/sIWnL3O3S+V1/1fqBVqtI2rChmQUeRV3NeZNko8DYWZFThQNrW7plXtr UM+WXhmhprtaC+I306kQOn9aB5waSiMfTvZZo12vEEcu1TrPgXmioZ6idT3HJ1WHDZLK7t L8WkyJu5LvXoY56EFBIwPw5a21QfjkjLoquyXVWiKYVIHqNsrpF9UlANYWTTmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760454066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kYB0lHDlxDnRVYnjFGLn2tYoFNeBhfzFtjwpyXw6Njg=; b=J7xWoaw1/67AU5/Mf+dIsZ4j1iUvJzwDAumTnMM+bPijEaUlIUMIk/UaQ4VcPaa2zXOh+s spICTTr3AOdQ9MvIh8ZsMa0jsImFCLG+dguCnxT+zELcpALEYPci/nnBYqSTQtYR/lYB9I bbGefXe8JszgKdB7rwKj/mZ3Z8BT0WjE66xlBWS8TMeSJr7g0B+TpixRyWpLwLTbzor7SE bumpmHkcYCXIWs5dlJuXouBz/7V/gu0GnY1lUHSylfKxfboDRpbjA//tvwJdY+/gYjNS+N P2XQDuZqZmIWRz7xRzYbOav63iRgJnnagmuppH+nlNDKMxxBjjQQxG2oLX4RWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760454066; a=rsa-sha256; cv=none; b=Nefd12kbJZHf1e802s6Wx4jxlUCBkzdvtPmKIp2VDgr3fXnclmTl3025/FNibKjziOxVB/ ZUO21Vq7Qhv/iCpQaEw6I2JxmvMM4IHLbYBj7FiIpDrsmWG5IZQ52G2nXqc39FeOQ39Cv0 EXqPtON9Z/aMq3R3R/AjblyIwN9R01w0ZbpP6X6dcuU31pc3aRY/8bft66OC05pQouAMlI qybhW5rnWrD6IGppRDe8fWSPgcnoWcncoYbgLDJCQUUzd1dfQN8gNyGA4zNnAp6309R91w +zAiOjcTdx1FzLJKMLGRMgybrvblLyGyDGVm1P/yam1iK8GkEZ30GOoeDuNzog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmHTt1gKvzxN2; Tue, 14 Oct 2025 15: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 59EF16O7019252; Tue, 14 Oct 2025 15: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 59EF16of019249; Tue, 14 Oct 2025 15:01:06 GMT (envelope-from git) Date: Tue, 14 Oct 2025 15:01:06 GMT Message-Id: <202510141501.59EF16of019249@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: dbd1e3229643 - stable/15 - bsdinstall: Tweak pkgbase/dist set labels List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: dbd1e32296437c9b2e3fb73400e59fda4adc3e64 Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dbd1e32296437c9b2e3fb73400e59fda4adc3e64 commit dbd1e32296437c9b2e3fb73400e59fda4adc3e64 Author: Ed Maste AuthorDate: 2025-10-09 17:01:36 +0000 Commit: Ed Maste CommitDate: 2025-10-14 15:00:58 +0000 bsdinstall: Tweak pkgbase/dist set labels Have the button labels refer to the artifact type directly (distribution sets / packages), and use "Tech Preview" as packaged base is no longer experimental. Reviewed by: ivy, cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52999 (cherry picked from commit abd9424590ba37ac10e92723ad6428f0448024c1) --- usr.sbin/bsdinstall/scripts/auto | 4 ++-- usr.sbin/bsdinstall/scripts/jail | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 61d52065af2a..8058b1a41dbf 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -209,9 +209,9 @@ if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST ]; then PKGBASE=yes else bsddialog --backtitle "$OSNAME Installer" --title "Select Installation Type" \ - --yes-label "Traditional" --no-label "Packages (Experimental)" --yesno \ + --yes-label "Distribution Sets" --no-label "Packages (Tech Preview)" --yesno \ $PKGBASE_DEFAULT_BUTTON \ - "Would you like to install the base system using traditional distribution sets or packages (experimental)?" 0 0 + "Would you like to install the base system using traditional distribution sets or packages (technology preview)?" 0 0 if [ $? -eq 1 ]; then PKGBASE=yes fi diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index f2c7ef2b37de..3b1b2ee98fff 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -175,8 +175,8 @@ fi if [ ! "$nonInteractive" == "YES" ]; then bsddialog --backtitle "$OSNAME Installer" --title "Select Installation Type" \ - --yes-label "Traditional" --no-label "Packages (Experimental)" --yesno \ - "Would you like to install the base system using traditional distribution sets or packages (experimental)?" 0 0 + --yes-label "Distribution Sets" --no-label "Packages (Tech Preview)" --yesno \ + "Would you like to install the base system using traditional distribution sets or packages (technology preview)?" 0 0 if [ $? -eq 1 ]; then PKGBASE=yes fi From nobody Tue Oct 14 15:01:24 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmHVF2KFsz6CZYw; Tue, 14 Oct 2025 15:01: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 4cmHVD6VLFz3gDw; Tue, 14 Oct 2025 15:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760454084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pyrcdkjaMIFpR3GLcfjyUHtxypd7/pkWlfUaF3iH+40=; b=pdmFIYtm1XUwfpoDanftneYFWdhqOa9iu1joTB0ZnbJBEuBqFp104x3icHe3h4xTbko0To WWyWg35UJIvwvDj4rkwx6wuvF/iHlaob2ym4X4ohcUnMnbKfZRIyLmWthDvuo49mUuEHrr wuvS8tLKELzqLDhnrNCej4c5hIEm6HjMAZrijLZZhwkF9Z9BDnzxRj3ro/R4T6+xeP5ZrL A0UY07tmW9+02m/TiLRh8HC47rr+nFHxrf/iu4AIkXstS6o2mDQgjau9kIOZFsrHFeG03M jcvGb3a878bIW5BKKfcs+vSHIFcjFqkGc52gvzQOmf3hWqaraZ2xiSD0BHQWNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760454084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pyrcdkjaMIFpR3GLcfjyUHtxypd7/pkWlfUaF3iH+40=; b=gv98A+iC5RJ/uechnOyfBqKslVHml56pZcdqeLDliXw/aAu+OYTkllzD7+EmsykCIuQig0 qOHZIzOo8ARzaCjLuGyY9Dw6lTjfVF7QENSBbOsia5QP7/ClST4WzhVLQeNC3psXtrj/Vc ko0EIqEjw+anx0/ewOtGQA+7L9dQ3dcWgN6dGl8e8dtPuHBJUb5rDsnwCe3Ow+wpDVjl+Q QJA9WCAsQc6IYh5v/By7m7OUz79mktpAjzIQZmv/TZP/9X0O37cF5+59X4o1CvRv7Ua+b0 xBTQcuykpksgDirKDuub8w1Z2BBegIO8Nf2ZQNlkAvcoebSmw1eIG0i3gjEocg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760454084; a=rsa-sha256; cv=none; b=HzF5UwOPYDB5TG+t1360ZThyD1N+cvGmIDqvkCobAqJH6fjoeSZJXg8vFRbTT9DzR/mqTu DO1WmhED/6jX5AT4coK9hyL3C+jhSwxBsKAyTddF9pHwnlVjn3kkR3R2wBf/0JTNbd4XJr vcsW24tFQrwY6uSgn32l9WuLVG4kJYb2D7+mp1off6u0ynoGm8gGjW0zsGORttu+AaaSpK /JWrng9VuhCFoImpZNTsAWeM4JifCI+8JcPBKP/CJCtOs2Pvrvc6Jr9hmylbiL+RlxkeOl Bjpui7oV0pibPxqnv1ULOmXrRCI8Zda540np6IvwOJJM9+iK8X0Izq5FhMB2DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmHVD62rvzxPq; Tue, 14 Oct 2025 15:01: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 59EF1OUU020314; Tue, 14 Oct 2025 15:01:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EF1OO4020311; Tue, 14 Oct 2025 15:01:24 GMT (envelope-from git) Date: Tue, 14 Oct 2025 15:01:24 GMT Message-Id: <202510141501.59EF1OO4020311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: eb895ad4c47e - stable/15 - Revert ".cirrus.yml: Reenable CI with pre-commit CI scripts" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: eb895ad4c47e0f3ee77dff638159e21dee1c501a Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=eb895ad4c47e0f3ee77dff638159e21dee1c501a commit eb895ad4c47e0f3ee77dff638159e21dee1c501a Author: Ed Maste AuthorDate: 2025-09-19 14:09:48 +0000 Commit: Ed Maste CommitDate: 2025-10-14 15:00:58 +0000 Revert ".cirrus.yml: Reenable CI with pre-commit CI scripts" This reverts commit 676d64ee8327851063d92d0dd6a4ceee6b3a25e6. These tests take a combined 3h to run and are consuming our montly Cirrus-CI credits in short order, before failing. In the PR markj reports that the failure appeared somewhere between: good: da64f6e047b5f6cd9b9e8450d19072cb0b6e44d0 bad: b197d2abcb6895d78bc9df8404e374397aa44748 Unfortunately, even after we find the offending commit and have a fix we still do not have sufficient monthly compute credit. Disable these tests for now, pending a solution to both issues. PR: 289696 Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D52618 (cherry picked from commit 2b8bfdcad1f46076eaf40938634538fbcb13cb1c) --- .cirrus.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 9ed08d750e2f..84efa04f1ccb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -194,11 +194,13 @@ precommit_task: matrix: - name: amd64 smoke test using internal ci systems only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*' + trigger_type: manual env: TARGET: amd64 TARGET_ARCH: amd64 - name: aarch64 smoke test using internal ci systems only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*' + trigger_type: manual env: TARGET: arm64 TARGET_ARCH: aarch64 From nobody Tue Oct 14 18:41:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 20:46:46 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmR8k2nQtz6C2rF; Tue, 14 Oct 2025 20:46: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 4cmR8k1wJVz3HvY; Tue, 14 Oct 2025 20:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760474806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0QEXPacIufgb7xM/jHWW57ZSYUNIXUbzLqXlDVvleKA=; b=s5Lnu3+b9xpUCvdIM5h2B5ftOlJCpvK57JETdO/up/VRfmiobwn+WuNCVLFhaHq46j3UT7 npkIgnSPIy2AvrOeWyLOKE0uo+PTluRGfnQd4jSsquaAc8Q6Mt7r3SbP87Y7R4Ts2Tdrw9 KSEftWn/2OB2r5Frgu4+mDOzAADRCeCzgWXaMzG0xDJCfUvQ7EM+DGRVJ0rekseNU+xCpd 1mdlFrRQdxZU++chEq40e3B1gbgT7MedtVEehthhmeoYmoFXtwbj1vJzSyUYIW67p7dmWA AUlLOV/0sekL5IwIj1NP3vmctGgObrAo+zT0P+h9W06WqVr0UlcpMZJ4IaJJvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760474806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0QEXPacIufgb7xM/jHWW57ZSYUNIXUbzLqXlDVvleKA=; b=gA5H+zq+XO0puM9eHMTEXPIG59uwem/UKB5j3sHPtqV3RmRbCUF2OQtZLVaga+tdeLDDoM lDX1mDA1RHAoiCfgP/3qBddOb16OvQzZPqK/Muz1fuZ744uHJ+j+dqy7LYX2GLoEk8p9aa Kmvx8qRnFeiirfQPjaqSlxozoNH95DSw8C2W2Ay3st1XwISf9OBSwHRcs4p+WOQmMXyJJJ s2ZskCqpMIAtO24eSzqlsehM9nTYff9QWZAGgcRcIL5+qxQziBP8bhcJqHv6W6tmG2I77Y lVmgKpQvbVwLqHJS3aehK5EcPNohaBfmOkBrBza/+94lPoV/fIZWYP+ymjafYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760474806; a=rsa-sha256; cv=none; b=mw5lRxP/mJax9gKhQsBve9rEV+xU5FuC1obMzdVtmatuLjwafKStQNOS6bvtGpSQM5WHc4 qxEkS8zmW8ELVo7hsI9KM5+/1rgoz9YV5sIOOfl3Jwpfb4+fkokIb18LmAgP/GqSDwY3Gc fJnl2trq17iXkCTmMoQi7b9rlZEQs4s589L1slq9aCzBijzqAIXswAvtQtiHBiEG5e9zQH osxhS2dfK5fNWZbWgzZrf0cAFqQs4HU+Ykd9++fpmDLvXb+TJ0NuO9Lm5t/0zWgvVvMDvd ipt3NTzCrMC2ycg4R5WKr/28+Mfr1JCW6QFCLLGP+edQjCAKctPkblUaxbqmPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmR8k1JqRz17BS; Tue, 14 Oct 2025 20:46: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 59EKkkuM066228; Tue, 14 Oct 2025 20:46:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EKkkEW066225; Tue, 14 Oct 2025 20:46:46 GMT (envelope-from git) Date: Tue, 14 Oct 2025 20:46:46 GMT Message-Id: <202510142046.59EKkkEW066225@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 3dac4b92ec99 - stable/15 - sockstat: improve indentation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 3dac4b92ec992fc85d148bf7d2d2deb1dbc5c827 Auto-Submitted: auto-generated The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3dac4b92ec992fc85d148bf7d2d2deb1dbc5c827 commit 3dac4b92ec992fc85d148bf7d2d2deb1dbc5c827 Author: Michael Tuexen AuthorDate: 2025-10-07 02:04:35 +0000 Commit: Michael Tuexen CommitDate: 2025-10-14 06:51:32 +0000 sockstat: improve indentation No functional changes intended. Sponsored by: Netflix, Inc. (cherry picked from commit ab837a2eed6d7562d538ac5f90b3b2776a9f0f5f) --- usr.bin/sockstat/main.c | 123 ++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index 3b989c4283e4..a917672120d5 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -1230,40 +1230,40 @@ calculate_sock_column_widths(struct col_widths *cw, struct sock *s) { .socket = s->splice_socket }); if (sp != NULL) { len = formataddr(&sp->laddr->address, - NULL, 0); + NULL, 0); cw->splice_address = MAX( - cw->splice_address, len); + cw->splice_address, len); } } } if (opt_i) { - if (s->proto == IPPROTO_TCP || s->proto == IPPROTO_UDP) - { + if (s->proto == IPPROTO_TCP || + s->proto == IPPROTO_UDP) { len = snprintf(NULL, 0, - "%" PRIu64, s->inp_gencnt); + "%" PRIu64, s->inp_gencnt); cw->inp_gencnt = MAX(cw->inp_gencnt, len); } } if (opt_U) { if (faddr != NULL && - ((s->proto == IPPROTO_SCTP && - s->state != SCTP_CLOSED && - s->state != SCTP_BOUND && - s->state != SCTP_LISTEN) || - (s->proto == IPPROTO_TCP && - s->state != TCPS_CLOSED && - s->state != TCPS_LISTEN))) { + ((s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) || + (s->proto == IPPROTO_TCP && + s->state != TCPS_CLOSED && + s->state != TCPS_LISTEN))) { len = snprintf(NULL, 0, "%u", - ntohs(faddr->encaps_port)); + ntohs(faddr->encaps_port)); cw->encaps = MAX(cw->encaps, len); } } if (opt_s) { if (faddr != NULL && - s->proto == IPPROTO_SCTP && - s->state != SCTP_CLOSED && - s->state != SCTP_BOUND && - s->state != SCTP_LISTEN) { + s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) { len = strlen(sctp_path_state(faddr->state)); cw->path_state = MAX(cw->path_state, len); } @@ -1271,21 +1271,22 @@ calculate_sock_column_widths(struct col_widths *cw, struct sock *s) if (first) { if (opt_s) { if (s->proto == IPPROTO_SCTP || - s->proto == IPPROTO_TCP) { + s->proto == IPPROTO_TCP) { switch (s->proto) { case IPPROTO_SCTP: len = strlen( sctp_conn_state(s->state)); cw->conn_state = MAX( - cw->conn_state, len); + cw->conn_state, len); break; case IPPROTO_TCP: if (s->state >= 0 && s->state < TCP_NSTATES) { - len = strlen( - tcpstates[s->state]); - cw->conn_state = MAX( - cw->conn_state, len); + len = strlen( + tcpstates[s->state]); + cw->conn_state = MAX( + cw->conn_state, + len); } break; } @@ -1462,8 +1463,8 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) cw->splice_address, buf); } if (opt_i) { - if (s->proto == IPPROTO_TCP || s->proto == IPPROTO_UDP) - { + if (s->proto == IPPROTO_TCP || + s->proto == IPPROTO_UDP) { snprintf(buf, bufsize, "%" PRIu64, s->inp_gencnt); xo_emit(" {:id/%*s}", cw->inp_gencnt, buf); @@ -1472,29 +1473,29 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) } if (opt_U) { if (faddr != NULL && - ((s->proto == IPPROTO_SCTP && - s->state != SCTP_CLOSED && - s->state != SCTP_BOUND && - s->state != SCTP_LISTEN) || - (s->proto == IPPROTO_TCP && - s->state != TCPS_CLOSED && - s->state != TCPS_LISTEN))) { + ((s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) || + (s->proto == IPPROTO_TCP && + s->state != TCPS_CLOSED && + s->state != TCPS_LISTEN))) { xo_emit(" {:encaps/%*u}", cw->encaps, - ntohs(faddr->encaps_port)); + ntohs(faddr->encaps_port)); } else if (!is_xo_style_encoding) xo_emit(" {:encaps/%*s}", cw->encaps, "??"); } if (opt_s) { if (faddr != NULL && - s->proto == IPPROTO_SCTP && - s->state != SCTP_CLOSED && - s->state != SCTP_BOUND && - s->state != SCTP_LISTEN) { + s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) { xo_emit(" {:path-state/%-*s}", cw->path_state, - sctp_path_state(faddr->state)); + sctp_path_state(faddr->state)); } else if (!is_xo_style_encoding) xo_emit(" {:path-state/%-*s}", cw->path_state, - "??"); + "??"); } if (first) { if (opt_s) { @@ -1503,40 +1504,40 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) switch (s->proto) { case IPPROTO_SCTP: xo_emit(" {:conn-state/%-*s}", - cw->conn_state, - sctp_conn_state(s->state)); + cw->conn_state, + sctp_conn_state(s->state)); break; case IPPROTO_TCP: if (s->state >= 0 && - s->state < TCP_NSTATES) + s->state < TCP_NSTATES) xo_emit(" {:conn-state/%-*s}", - cw->conn_state, - tcpstates[s->state]); + cw->conn_state, + tcpstates[s->state]); else if (!is_xo_style_encoding) xo_emit(" {:conn-state/%-*s}", - cw->conn_state, "??"); + cw->conn_state, "??"); break; } } else if (!is_xo_style_encoding) xo_emit(" {:conn-state/%-*s}", - cw->conn_state, "??"); + cw->conn_state, "??"); } if (opt_b) { if (s->proto == IPPROTO_TCP) xo_emit(" {:bblog-state/%-*s}", - cw->bblog_state, - bblog_state(s->bblog_state)); + cw->bblog_state, + bblog_state(s->bblog_state)); else if (!is_xo_style_encoding) xo_emit(" {:bblog-state/%-*s}", - cw->bblog_state, "??"); + cw->bblog_state, "??"); } if (opt_S) { if (s->proto == IPPROTO_TCP) xo_emit(" {:stack/%-*s}", - cw->stack, s->stack); + cw->stack, s->stack); else if (!is_xo_style_encoding) xo_emit(" {:stack/%-*s}", - cw->stack, "??"); + cw->stack, "??"); } if (opt_C) { if (s->proto == IPPROTO_TCP) @@ -1551,8 +1552,8 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) faddr = faddr->next; if (!is_xo_style_encoding && (laddr != NULL || faddr != NULL)) xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" - " {:fd/%*s}", cw->user, "??", cw->command, "??", - cw->pid, "??", cw->fd, "??"); + " {:fd/%*s}", cw->user, "??", cw->command, "??", + cw->pid, "??", cw->fd, "??"); first = false; } xo_emit("\n"); @@ -1613,7 +1614,7 @@ display(void) xo_emit(" {T:/%*s}", cw.fib, "FIB"); if (opt_I) xo_emit(" {T:/%-*s}", cw.splice_address, - "SPLICE ADDRESS"); + "SPLICE ADDRESS"); if (opt_i) xo_emit(" {T:/%*s}", cw.inp_gencnt, "ID"); if (opt_U) @@ -1644,15 +1645,15 @@ display(void) if (opt_n || (pwd = cap_getpwuid(cappwd, xf->xf_uid)) == NULL) xo_emit("{:user/%-*lu}", cw.user, - (u_long)xf->xf_uid); + (u_long)xf->xf_uid); else xo_emit("{:user/%-*s}", cw.user, pwd->pw_name); if (!is_xo_style_encoding) xo_emit(" {:command/%-*.10s}", cw.command, - getprocname(xf->xf_pid)); + getprocname(xf->xf_pid)); else xo_emit(" {:command/%-*s}", cw.command, - getprocname(xf->xf_pid)); + getprocname(xf->xf_pid)); xo_emit(" {:pid/%*lu}", cw.pid, (u_long)xf->xf_pid); xo_emit(" {:fd/%*d}", cw.fd, xf->xf_fd); display_sock(s, &cw, buf, bufsize); @@ -1667,8 +1668,8 @@ display(void) xo_open_instance("socket"); if (!is_xo_style_encoding) xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" - " {:fd/%*s}", cw.user, "??", cw.command, "??", - cw.pid, "??", cw.fd, "??"); + " {:fd/%*s}", cw.user, "??", cw.command, "??", + cw.pid, "??", cw.fd, "??"); display_sock(s, &cw, buf, bufsize); xo_close_instance("socket"); } @@ -1680,8 +1681,8 @@ display(void) xo_open_instance("socket"); if (!is_xo_style_encoding) xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" - " {:fd/%*s}", cw.user, "??", cw.command, "??", - cw.pid, "??", cw.fd, "??"); + " {:fd/%*s}", cw.user, "??", cw.command, "??", + cw.pid, "??", cw.fd, "??"); display_sock(s, &cw, buf, bufsize); xo_close_instance("socket"); } From nobody Tue Oct 14 20:47:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmRB02TCWz6C2rQ; Tue, 14 Oct 2025 20:47: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 4cmRB01yfdz3JWR; Tue, 14 Oct 2025 20:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760474872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cX2LWYkgiws+/nn2FmzsIs8vMZpY8ucvNA1AJRdNIsI=; b=YaN6A1MSq4g2njFOEPw5bqjU3HiVMTPnIbmoRmPH4Tvenhif6+4cy239CyyBnlSWbavKeX YXG7BFUSKZhOtMoYn9E4i5MrvNLUaBJGEwdofMB8f8Fo8YL9YRuH7cIPUgbtUgYPd49XbZ W+PUAJm/TvUHnwc3YjPwUv51+LKqQFq91fTCz8J93ipo2O/8uFnIkB2ib4XIW9poTeadSV 24i79CmbOh5a0xGQv+lMi209/oYd652fx3yvEAlqYk8tvZLSbe1Bhx128R1IMVlOX6f7Tx fE1CdRJKjQ7OM804fi1MOuVmj3bBn3RxW5XIAWAK/qOayYBYStd73UpNAomJ5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760474872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cX2LWYkgiws+/nn2FmzsIs8vMZpY8ucvNA1AJRdNIsI=; b=kBUNtnaydrB6dL4Bnm2YhpAcTaKJsLizGQbMlQgxNOY4x1fbTfqUkrP4SwjYQjGE+9Ept7 y5Vg23hu66xvX4yyGMjyC8CyW6PxRkbJV+lKtQtA3anMVgNWXLPuiLVpiL6yKIH2A0maT/ mhZDiMLDUb/gufFOSPMqIZ3wmf4RKBL4fDnA/LxsXDvx3LPa/6/DqfQG31pc3zS4ZfkABw 7uq5CnSxQpwkoDCSBEGdY89m0Ryg9qylC+a7k6fLVtNjzbuuZZl2ScCkM9dQ2szjzu+Uq7 OMxhlCHE83QJhI66BCzmvthAy94CTzkptyxPdp9VcQ13sz2uu1mP6VgfSYXGNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760474872; a=rsa-sha256; cv=none; b=b0qxc7OC+3pfe0iXvtytbOIv7XXQ2zcjpSy2mORMgDyptIRqRAUbRx9KXeKth6Z3yBl8Xe MfvnFL3FkK4btyaBm1Vk3wnFv+P/7Gsob9nULhIOzUjM0yY06nMFRHgO62JgFnqJeEw8na tK4tz3dt5R4eFzFw+jzkhUHmNczCv0qXRsh4KJLJn4Iot0gdlyhmtGbXP+/YG3A/0gaRSG tQkSV8O3KPUbETE7wFQlUIm6qOigLy97driYNOggp9H89jLmRwPhDGJVnPhe9RNxtV2L4a 4sYaLBCa3plKiGTdzGBH5W225Mq4rvy17m3ufo+PygnCcfpFZTjx5I55ex1Vug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmRB01Qmkz17Q2; Tue, 14 Oct 2025 20:47: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 59EKlqN3066670; Tue, 14 Oct 2025 20:47:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EKlq3w066667; Tue, 14 Oct 2025 20:47:52 GMT (envelope-from git) Date: Tue, 14 Oct 2025 20:47:52 GMT Message-Id: <202510142047.59EKlq3w066667@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 7e567f51ff59 - stable/15 - sockstat: improve output formatting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 7e567f51ff59d169b5fd0bc350d0c7dfc9fc2609 Auto-Submitted: auto-generated The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=7e567f51ff59d169b5fd0bc350d0c7dfc9fc2609 commit 7e567f51ff59d169b5fd0bc350d0c7dfc9fc2609 Author: Michael Tuexen AuthorDate: 2025-10-09 19:10:53 +0000 Commit: Michael Tuexen CommitDate: 2025-10-14 06:52:38 +0000 sockstat: improve output formatting Fix the format when the output for a socket spans multiple lines. Reviewed by: rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52984 (cherry picked from commit 98b2a2265f5ee47bd932347699e6117df2f41488) --- usr.bin/sockstat/main.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index a917672120d5..f0eb83eb3e9f 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -1545,18 +1545,30 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) else if (!is_xo_style_encoding) xo_emit(" {:cc/%-*s}", cw->cc, "??"); } + } else if (!is_xo_style_encoding) { + if (opt_s) + xo_emit(" {:conn-state/%-*s}", cw->conn_state, + "??"); + if (opt_b) + xo_emit(" {:bblog-state/%-*s}", cw->bblog_state, + "??"); + if (opt_S) + xo_emit(" {:stack/%-*s}", cw->stack, "??"); + if (opt_C) + xo_emit(" {:cc/%-*s}", cw->cc, "??"); } if (laddr != NULL) laddr = laddr->next; if (faddr != NULL) faddr = faddr->next; + xo_emit("\n"); if (!is_xo_style_encoding && (laddr != NULL || faddr != NULL)) xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" - " {:fd/%*s}", cw->user, "??", cw->command, "??", - cw->pid, "??", cw->fd, "??"); + " {:fd/%*s} {:proto/%-*s}", cw->user, "??", + cw->command, "??", cw->pid, "??", cw->fd, "??", + cw->proto, "??"); first = false; } - xo_emit("\n"); } static void From nobody Tue Oct 14 21:32:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 00:48:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmXWh0d1jz6CNnF; Wed, 15 Oct 2025 00:48: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 4cmXWg6GhJz3lZJ; Wed, 15 Oct 2025 00:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760489311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBoDdTr/Hn9TDXutsz1MhK3ztwcpSpPW8P1qKpeJwM8=; b=hFaU7PXRhYlx44vVckK9cDcfHk+OvTfQemitKjZRtBxpm9ATjFjC0MinmM5yJ3ePpxZO9t GGMST5/1wbU8aYiQnBaVlzKe2sQ9Rjykn9hDJdCyOYSTJ0wKt5o5yAIbljb0L8dDy1SFU7 4Z4W9zior/L0atQBL3ZR+1pA3V5jvN2JaSx/YViU1/+ILxAE2uslpq6R4RkKHIr53QC7dY OsWo6FgT7ie/6mLKvClBENH91+61iEJJh5/6AvfpOQdvmi7f6Ks1A67Tnur7G5En2kWKty sWu5+hcWLyD4+0Rr54x6HwMckazgjBX1unFShgqa+2tRhcaGle1Y/oztwFsMsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760489311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBoDdTr/Hn9TDXutsz1MhK3ztwcpSpPW8P1qKpeJwM8=; b=PwASzGgAxeOCV7Xk2wTKe75dsFrvTuCcqmOvVrDO6nJQqGp8CwzqyELtFwyfGgR/Y7a76Q eOUL3yJbsP4Q9K68SfdHtMc0xJu74yNEuJOKB33Z2II7DPMZybkRtcpn+Gj4TFqKy0dzQx haUtyG8A6AZAopQTWCGWgCgG8RGDjRqzNY1DV5YxCWArJ4/ixlptObhbVMCgO59Ce2LrZJ DnDm5buXAhzDAPH8pDaqGzoBbYz9jmCK/a5DAWH//gskijCYL0n3mrdC2LX5ywaW832T27 ZC2YI68uv1+X0IorbHUVOkJbYmhX18m6aDkqts8mfHO903uJjzPg8joHE+4Vnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760489311; a=rsa-sha256; cv=none; b=sj7XY9O2+M1YXtTcqGp+gHII8K9ONwT+v3AKOKp0ivZDs2RZgvVITsTu/T9SyYdAa9WPh2 5IqK8aSBT6Ne1M1Ase8oFC4864FEwJ4aQM9M+foeW4E7w3QGS488IxAAKvG/AKsJM7GA+4 MPexDdqrHOY4GkiIbpnCCq7qQK2cIV2TkkNqyOv+sH74v7ec3VWTESrs6Mz85P+/fIPbBQ cPYI7TS4JyDT5+kVlnKPLE0fV+k4LWhZ90yHh0chGVAJdRfmcosljwOyeRF78Lk+e1an/N O5p92vAmjyfdx98FP8dknNlisj9cM/yNaZe57Kpl/lbLhwbiu7Wyd75lZj2nDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmXWg5sN4z1Qk; Wed, 15 Oct 2025 00:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59F0mVT5017403; Wed, 15 Oct 2025 00:48:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F0mVD4017399; Wed, 15 Oct 2025 00:48:31 GMT (envelope-from git) Date: Wed, 15 Oct 2025 00:48:31 GMT Message-Id: <202510150048.59F0mVD4017399@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2ef79b0524b5 - stable/15 - Cirrus-CI: Build packages in parallel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2ef79b0524b516792f1ebb1c623999ef2ec06408 Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2ef79b0524b516792f1ebb1c623999ef2ec06408 commit 2ef79b0524b516792f1ebb1c623999ef2ec06408 Author: Ed Maste AuthorDate: 2025-10-02 14:39:11 +0000 Commit: Ed Maste CommitDate: 2025-10-15 00:47:10 +0000 Cirrus-CI: Build packages in parallel Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52857 (cherry picked from commit e2796f0359afad522113c25d720fa30677a044ab) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 5aaf7ac897d2..d99449e44a4f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -160,7 +160,7 @@ task: - su user -c "make -j$(nproc) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel" package_script: - - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes packages" + - su user -c "make -j$(nproc) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes packages" package_check_script: - su user -c "/usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/$(pwd -P)/${TARGET}.${TARGET_ARCH}/worldstage/METALOG" From nobody Wed Oct 15 00:48:29 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmXWf0YTYz6CNnB; Wed, 15 Oct 2025 00:48: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 4cmXWd63p4z3lc6; Wed, 15 Oct 2025 00:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760489309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Skf7mUBfuY09gFM/GYV3Pp48UyyPXkYGbRXSxWZKug=; b=D7VFpY85UMYQ6+ks0lwbAYIs7GhLXrzC7ASJiU3yzgTHojeAFmzpUzqTn9WHvVRASbZ4/I lBotDww0lOVHfjXGGU99/fmHOQKPNv6+vvWmrGSXv/xcb8eGE6iFgVNLNtjbFkQ+zC6jyu 6d+Rke8PYPA5iFC60gbTS4+zKG7jwHM9Fv3VLjgNOv3e0OaL7JkbEcetJabioUIEHJ4J5p IAG0m3i9Hb3RhMa2CfPq0ntDlN661I00lQtFoDz8N6GyOIH3Dp7LSIWayWkafdmf4zI6p0 tnWTIEbDCAAs2Zj9pN1QVQP1uuw0qxv1vdn6O8EH922ZCuwOF/dC3dPlHA79UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760489309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Skf7mUBfuY09gFM/GYV3Pp48UyyPXkYGbRXSxWZKug=; b=CN4RjpRSo0n7ins2ajM2fVnHOe9W8NF6qGimc3AgAmur8l9Ryq8dm0NcAF9GLYYcjd/ILS 6xdm0MWXDBa9yrUQErwoWnmum1nvpv21fKE+puTKBdsKkOuemrKrJyGUzarHoviAoVWggd GOZ56euW9ick3OXC9I2y/I+Puah6U/bWKcA4XfuTXmD4ext3H9Yn7Lgnrzu4XWddg9FYDR xaxKzbPmkZpix5nq8Ecq0n43G12wpwcaz0BpiZkW8Njcl60CioV+i3khFezPLCglce1Tl4 +/I11sUpook6s3KT9oFxkr6R+5bdQUYqse0d9Wv5LWDI+MO+o0CnlbXZyZxw6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760489309; a=rsa-sha256; cv=none; b=DjUSId0a/PtezI/7Wsdojup/flC/e0/PtKE+IHUlyRzsvwqmVMe72wa6XHVvW87lg6MXA7 oGHJZypaxaHSXJI2t+GM9PcrPH+oQlKSB1pBv76w8JBGeACrvMGpW5mwv7i4ZCNQJ9kQjm 2yV+YFpwOfWzlCBeJnngkTIWdgFbNwSGkYWQ1VRft8rIH4XsoYCX7z776Zz4tuL6aNRWwb ZEEtJEB/m6le2Q7G9xc31r4tV5FzBNAykUOKdKIQPE7cVrcof1LCD8R5RZAD69N1tzxgiF cOD98w+fLCerv0JylnJDEsjJX7DOwnwSQJiv5dc0mFIAwIP1Aqm4x1Ve0Yl4ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmXWd5Ksnz1Zb; Wed, 15 Oct 2025 00:48: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 59F0mTvp017327; Wed, 15 Oct 2025 00:48:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F0mTVE017324; Wed, 15 Oct 2025 00:48:29 GMT (envelope-from git) Date: Wed, 15 Oct 2025 00:48:29 GMT Message-Id: <202510150048.59F0mTVE017324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 608043e6d029 - stable/15 - Cirrus-CI: Bump to FreeBSD 14.3 image List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 608043e6d029a00170a0a80d52fa9afdf209c692 Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=608043e6d029a00170a0a80d52fa9afdf209c692 commit 608043e6d029a00170a0a80d52fa9afdf209c692 Author: Ed Maste AuthorDate: 2025-10-04 13:10:09 +0000 Commit: Ed Maste CommitDate: 2025-10-15 00:47:10 +0000 Cirrus-CI: Bump to FreeBSD 14.3 image Sponsored by: The FreeBSD Foundation (cherry picked from commit cca9295dd6adc4245fbeeefbe05c13c52d089bd7) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 84efa04f1ccb..d48946ac8505 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,7 +4,7 @@ compute_engine_instance: # gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images platform: freebsd image_project: freebsd-org-cloud-dev - image: freebsd-14-2-release-amd64-ufs + image: freebsd-14-3-release-amd64-ufs cpu: 8 memory: 8G disk: 40 From nobody Wed Oct 15 00:48:30 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmXWf6XP2z6CNq4; Wed, 15 Oct 2025 00:48: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 4cmXWf50Mnz3llT; Wed, 15 Oct 2025 00:48:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760489310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=35sr2CWRW5OQ6lXZWpYrjT6vw3ujlucSbBLQ5wO35SE=; b=uV/sIQ1RBXeIxUmQLFF5TzMoonYgMUnfxMcHJ/1n/6JYl9e4zIPV+3m77U0G30QSVF+YDW hdX9OlBNqBhK1DARavtodTFkn1LbOgrRLYMyZriIroUMUrR5yOsMCUffBjm4WQp0bkdaMk yz3pD5NKiH/adGuhm/+qj9XW+k49J9LLVyyAmEizvV8mppIWWOU8XsMygEDsEiQs2xznGj VwH0XRTUaqFqrFsTlaKR+RrFn5WoL+ePO8ZW0tLFrnVdA6UqNBlRLvWhHzAVqYVWNCCe72 8WzRUcFglbaXcaL5T6MbbjgT8shqDGrPEN0nzWUbnQWO8lHiCRQBWCxlKRPyTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760489310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=35sr2CWRW5OQ6lXZWpYrjT6vw3ujlucSbBLQ5wO35SE=; b=DQwrcHcUXlJgRvbLrHMzEH0Uml9uwBg2FLfaWya8EoaSmvg9KBJjqwqWT3gYg6FqwQMZHr grcvh47MC4g2WMXltbfAsIGqFLdmdlZicNSaLuyRsPp575p03VRu8w08UYGq2FRYXW+UXX gRD48XFRANN+a6SycVWy510gYelekuJJYW5uvCC0ElTXUMUswNsQcJQlw2yorIqYN3V8YC TO99uAGcLawpG3+wYceFaYYnF6aDMinFqlltNmOtBptH/ydjZ6LWOdT1jpWtZS8ioXRWKU mZmuUk7L4A2WNOcH+elJi4pBPRaJDBFsvftFgtynXUGQ8pbhv0cV5F2CI9k2eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760489310; a=rsa-sha256; cv=none; b=r9gtgpjNS3NnnbDT4YHRSZBrLmlhN2uiknnbqQN2/xr7J4fGxBi/bfarCUW8sPb1f2IdpL o7EFbgRhFi+a4QqNWCNo9IIejs15Y41aKJqUAeOKA4bHwGjLVfA3T1NG+hzV/w57p57q3G dRppFieTk8HF9q3xftdZLDk0M8T29dl4vckEQRlnwPSD1KipqJ+5Wugdn2HO9M9zuut2aA y9SGRsju8h8JR8rMaZlR4gLubnb6p0sSYei6tqHH3d9qmj/UHtHX4tJSvJqTpZIdkM4NlS p/equLC81B75oJ3wm/9hnpM2Vm8kgzAzTpWk9DH1Eu/4t3lmJleQSA5hY4cmLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmXWf4cCmz1p3; Wed, 15 Oct 2025 00:48: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 59F0mUZn017366; Wed, 15 Oct 2025 00:48:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F0mU1J017363; Wed, 15 Oct 2025 00:48:30 GMT (envelope-from git) Date: Wed, 15 Oct 2025 00:48:30 GMT Message-Id: <202510150048.59F0mU1J017363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f283515a1015 - stable/15 - Cirrus-CI: Use nproc instead of sysctl -n hw.ncpu List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f283515a1015b5e02dee2b3f4504e7a5ca1a5cfe Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f283515a1015b5e02dee2b3f4504e7a5ca1a5cfe commit f283515a1015b5e02dee2b3f4504e7a5ca1a5cfe Author: Ed Maste AuthorDate: 2025-10-02 14:37:19 +0000 Commit: Ed Maste CommitDate: 2025-10-15 00:47:10 +0000 Cirrus-CI: Use nproc instead of sysctl -n hw.ncpu It is available on all supproted FreeBSD versions. Sponsored by: The FreeBSD Foundation (cherry picked from commit 5bba547a678beb280bf4080375f45b04ceb44fc5) --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index d48946ac8505..5aaf7ac897d2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -154,10 +154,10 @@ task: - su user -c "git config --global --add safe.directory $(pwd -P)" build_world_script: - - su user -c "make -j$(sysctl -n hw.ncpu) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld" + - su user -c "make -j$(nproc) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld" build_kernel_script: - - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel" + - su user -c "make -j$(nproc) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel" package_script: - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes packages" From nobody Wed Oct 15 00:48:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmXWj3Cdkz6CNdq; Wed, 15 Oct 2025 00:48: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 4cmXWh6g98z3lRj; Wed, 15 Oct 2025 00:48:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760489313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVPO916foto9hV6iFqfDVG3xO8F0gk9JyytxL1NoJV4=; b=ejiidfcbXjy9mY58oQdMrfaMBPkGppR26Dbf9PQhKAzuU6N5ORnIFjxIZTzndEmRkEKCZD XPfiVryl3i1FTU4OGOBEISpYfJSv7OdU9EYvgP9U3rWBi+OkeikbWQPM/FH+h4vSv7NkBj 6MD3BkjVKdl+itX+9Yi9DxpUeUSMd2w/opxhNS2vMVUULMoIu7Euec+ElpFCAXFzKeStbi 6x2IWUMSbRG+oCsyjFKrt6+HA3ffAO0q77VgzwROrVDHSJgnEuVD7ufM2FGjIo3h+zt0lZ UOET/Hv41r6phic1GoKkzqsPgrjhQJRacUo95PboLR2V9HFzqIYgXydVtCPBlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760489312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVPO916foto9hV6iFqfDVG3xO8F0gk9JyytxL1NoJV4=; b=hxSxK7hMNCc3XxJKyxjWinY+g+IZcRTHXa8nI/bxo5CykHFU0nZaC/EZgTeLen9o8LgRde 1t7MRpKiFDyuDewbeFCkkt70F8wRwx20k8wTIv46d+qO8yz3Wqk8ESm06Fjsq9VQvWpMhb WZd3+loZ63grDSjA36T0Fx/jKGH5gkVWvzaJh0meFCIqHBsZWMYlfADuYLoUL9OFE9WJyQ aOoV6+3sZFMpm7V91Bp3P7nZkq2PzRaPgAbZBnM/RNGzCJYZg6BjyvsbK1f9mkAccwXgS8 ubVEO0o+E0n/7f4jOvtm3FF+Zi4VQuRBIgvRQOVCp37+EDQtmhxqjX/vwH5LDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760489313; a=rsa-sha256; cv=none; b=ZD2OgM/vFik3B2F5BFIzxtraOxwIi7Wspjm/1Y8YhFxuw3P3yJYEqs4LGHjxV2aUYxbvqY j3vorY7w4/e0YkT4yBQVyw0nvWOC68ZMjrhvnfVH6Sum2AVpeDdsMJd3DyDg8DSsAaBal/ gGNiyi1kLAKSsZaWaNqZxklal4DvfBcm2kQntOlvGMDPpISyjSUWyu2R4V9z5euDHvzzLk QDMwgUuYETstCrbDCR2yE2ZX9xfww8pW3O7s2KKts2cELBvWcAzPWh/xgvFyfEDhSQA1Ca VvKvAFPWdqCPvjw6WgNoYpsnNQBTDKCAjveLvQdkWX5clXGLuqV32bu1+03PXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmXWh6GWdz1v0; Wed, 15 Oct 2025 00:48: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 59F0mWDn017438; Wed, 15 Oct 2025 00:48:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F0mWZw017435; Wed, 15 Oct 2025 00:48:32 GMT (envelope-from git) Date: Wed, 15 Oct 2025 00:48:32 GMT Message-Id: <202510150048.59F0mWZw017435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ba89a061d0ba - stable/15 - Cirrus-CI: Switch back to tzst packages, but use level 1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ba89a061d0bae42c4367bc5408b8c51fd63a2715 Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ba89a061d0bae42c4367bc5408b8c51fd63a2715 commit ba89a061d0bae42c4367bc5408b8c51fd63a2715 Author: Ed Maste AuthorDate: 2025-10-02 14:39:43 +0000 Commit: Ed Maste CommitDate: 2025-10-15 00:47:10 +0000 Cirrus-CI: Switch back to tzst packages, but use level 1 We previously used `PKG_FORMAT: tar` to avoid spending a lot of time in zstd compression. Instead just set PKG_LEVEL to compression level 1, which still produces packages that are much smaller than uncompressed tarballs with only a small penalty in build time. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52858 (cherry picked from commit ae5914c0e4478fd35ef9db3f32665b60e04d5a6f) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index d99449e44a4f..b5c96820c192 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,7 +10,7 @@ compute_engine_instance: disk: 40 env: - PKG_FORMAT: tar + PKG_LEVEL: 1 task: matrix: From nobody Wed Oct 15 01:11:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmY1p1RQdz6CPnv; Wed, 15 Oct 2025 01:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmY1p0nw8z3nVg; Wed, 15 Oct 2025 01:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760490670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=efUWEbmGaV+6I7ZhwVaVIEc0dZ3Ew7AMAxIOlQoVDCA=; b=tKRiFMhSZ0s5AfUXnk6pGNOfaLhnPRmwczyEr/X7VMzB9qOT3odaaa8fcXQW9q7K1Jt3YB 2zOrTMK4RRFUu8fP9YD+jyWwVN3vIxdLQbz7frOocMbXYJiq9S6UA0vocpgHjjTp+zHYAO PrhK3s1DgJ58qAo9Zd433StuPDpDyFwZoyu9ceYRQjty5/a/ZHtwEZdIk0jwsM4x2IkOZU dwMfegGopcC8ZzUW60m3BfpJCOA/nTa0PDolZSQIq95pyrfi7AcSN01rYel+HXNbo5uCpD COGgc3A+Zc4A7Qou8k3hhaUi/vLVXGenjLv9xxZGSVZyTL3GoYdoIUE9CsQruw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760490670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=efUWEbmGaV+6I7ZhwVaVIEc0dZ3Ew7AMAxIOlQoVDCA=; b=Ezj21Eh3a7YZ1DUiN20kmndLsIBV97JkN8ieXWeAPBLDVFV2wmnYnL7V9g0s9S9rYwBAE5 +ahKfT8VrHSnOoZ1mpVPxQv3UUQgDQUDPpfpRLYilpLM2RxQPjP6PwV8t9CI4GvZ9O3Zei OTVWpQHaYIPNNtjY4Nm/O9scUarBApGhOmg9lC8X/j/iZEfW7fhCfNaBrfgYyquqBkvHFg f0nHbGuxJOmEC678Z3vaMbP0ggq7/ZFdDIPlAjpkXaml3dttcwUO8l+oergxz4rPyGmqzT UT/MkbXt0lTZkM8kCboqXCTI2imOO6/0QVeFFo/UQFaQgdwJY/Z3BgKmRzCm/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760490670; a=rsa-sha256; cv=none; b=j3JNcynJtr8wVqFEzypV5GKhmzeNhI2Qr6+3iYrGTxi2stKKzy4+DNqgtrrno9laR2gxmZ T6fVQesOza3Hg5R7osMwEwTKqnMGbIPE36qg0muHxAtFefDTl9dP3Fjft5mQV/58DtPebW dnY6ZnCE6Uw6DX0lgx+aTNdagIwA81XjVTTdz55+7ybGgvqEKFyy1baIjcPmlGwbrB9Hw+ aA4N71brG8vFUAAqIthah3E7mAGGXSZbrS/BeGX//BTA4hKi+kjbDbIpEhyJFJ82DKBxS1 3d5Xa9jya+ngPQYCdq4zmV/O/Yp9ATmD3fzL42SeoQOaGjRgIsE4q8Dkq5e8Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmY1p0PSbz2Lx; Wed, 15 Oct 2025 01:11: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 59F1B9dh065878; Wed, 15 Oct 2025 01:11:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F1B9ks065875; Wed, 15 Oct 2025 01:11:09 GMT (envelope-from git) Date: Wed, 15 Oct 2025 01:11:09 GMT Message-Id: <202510150111.59F1B9ks065875@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ac19e85c60ac - stable/14 - Cirrus-CI: Use nproc instead of sysctl -n hw.ncpu List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ac19e85c60accb4673b5bae93840346c08a2b635 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ac19e85c60accb4673b5bae93840346c08a2b635 commit ac19e85c60accb4673b5bae93840346c08a2b635 Author: Ed Maste AuthorDate: 2025-10-02 14:37:19 +0000 Commit: Ed Maste CommitDate: 2025-10-15 01:10:57 +0000 Cirrus-CI: Use nproc instead of sysctl -n hw.ncpu It is available on all supproted FreeBSD versions. Sponsored by: The FreeBSD Foundation (cherry picked from commit 5bba547a678beb280bf4080375f45b04ceb44fc5) (cherry picked from commit f283515a1015b5e02dee2b3f4504e7a5ca1a5cfe) --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index f8f2fdde9a9a..80a4ae57b696 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -154,10 +154,10 @@ task: - su user -c "git config --global --add safe.directory $(pwd -P)" build_world_script: - - su user -c "make -j$(sysctl -n hw.ncpu) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld" + - su user -c "make -j$(nproc) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld" build_kernel_script: - - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel" + - su user -c "make -j$(nproc) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel" package_script: - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes packages" From nobody Wed Oct 15 02:12:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmZNL5MdJz6CTpk; Wed, 15 Oct 2025 02:12: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 4cmZNL4qZhz3tSf; Wed, 15 Oct 2025 02:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760494338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=si1c9Mn8rXn0VlxaSwrfI8g1Gn9tzn5keckfSVEjFiU=; b=WbyhCvbMouXUaM2dpz319izAkwvsG4lAvsEP+wLBcVfCFikhItQdu3+CyfJUKq8whaXMqw xkuzo07fWJv7sbYEoMShnNwgQ7mi3rMVzbbUw+Uba8JlnD3O6WULM6ausBECqAkVksfT7R +xpewInWDHCEdX3QaAhi1C2Jq1+OFFZSYAsLqWsJ0xaRD99RX8PpZKpRH9NmeyXU1e8Zzm KXrOgGB5tnao5d2cX+B0NH/iNwciR8SkymfiZkLdpMIdTEms8XDDw691gLrdI6cGZz9krC QQnYCymVRqIUWBcQNptXiCqNIi8gYjxrjrt8UQbOwAlDmQCCPn05DWvatGBlJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760494338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=si1c9Mn8rXn0VlxaSwrfI8g1Gn9tzn5keckfSVEjFiU=; b=yZNBL0PTEmjacKKhWLP1iAV3eRJ/dovXsA6VLgSvtyd/PIQGma1pSh8y1t8Y3Yej+or4yf oH37GyvfrLT9+2kQfE8j2fD4EDjZ3tguqbwgWvb6WZvVnCx8TCxzJqI8F/lh2xKO0oZn95 vtOPr7gzwa5anOtFmDTitGYUTGO/ARN6Pl+/V1S8NTzu+94TIbojyB30dPwDdPoKWIaWR6 aZrVWABb0DYZkMhdloeZJrcxv5IYoqfymxaufbYFzeGDieyMbsZwqFsB7vN81q7DvX+dh/ TSN8WbQMsJI2gmQMrjrjv4JG5cZn1bX206LXHnAhbfyVubFOtrXrzV04bCHCCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760494338; a=rsa-sha256; cv=none; b=hryXnEM6pCqaMie3I453QI11dFCEiYUduGoDTzHpSYVDZN4W0vTksEbx+aqGO0iurgydeS r/4msoL7kkl434HuC2GRnr76zxzLDXlotg5/y0g1WgWyM7q0YELLVtxsBP1Bwq+k5hnF4Q 50Opkw+pHE5CYXmejJSPlA4fuxK7hd8s9/cyFVgKVDI1TbIchAQ5KppZYlcH4GObBR2wsh /EmZK9Mz8ETNgp0bdOljF8r8AzrywGBHfxCyUSItcnnYqr7IUwywa3eHfTkw15USKEPNkp c5DecPLI8524L8Y4UY/ojxUYW18Dop/KilMdHRCg/bT9Xl+r6kb3j7OQzUlpjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmZNL4P5tz44W; Wed, 15 Oct 2025 02:12: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 59F2CIKs083493; Wed, 15 Oct 2025 02:12:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F2CIOG083490; Wed, 15 Oct 2025 02:12:18 GMT (envelope-from git) Date: Wed, 15 Oct 2025 02:12:18 GMT Message-Id: <202510150212.59F2CIOG083490@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: f43e19db6cea - stable/15 - vfs offset: fix assertion failure in face of racing ffofset and setfl locking List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f43e19db6cea0a7dd7bf51f3fe2227d466ea5a80 Auto-Submitted: auto-generated The branch stable/15 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f43e19db6cea0a7dd7bf51f3fe2227d466ea5a80 commit f43e19db6cea0a7dd7bf51f3fe2227d466ea5a80 Author: Mateusz Guzik AuthorDate: 2025-10-05 17:03:54 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-15 02:12:05 +0000 vfs offset: fix assertion failure in face of racing ffofset and setfl locking Both use the same 16 bit var to store their locked and waiters bits, then this in file_v_unlock: state = atomic_load_16(flagsp); if ((state & lock_wait_bit) == 0 && atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) return; can fail if for example foffset is being unlocked while setfl is getting locked. Afterwards the code assumes there are blocked waiters on foffset. Reviewed by: kib, markj Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D52915 --- sys/kern/vfs_vnops.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index f81c2033d95e..e27692ccb1a3 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -806,9 +806,12 @@ file_v_lock(struct file *fp, short lock_bit, short lock_wait_bit) flagsp = &fp->f_vflags; state = atomic_load_16(flagsp); - if ((state & lock_bit) == 0 && - atomic_cmpset_acq_16(flagsp, state, state | lock_bit)) - return; + for (;;) { + if ((state & lock_bit) != 0) + break; + if (atomic_fcmpset_acq_16(flagsp, &state, state | lock_bit)) + return; + } sleepq_lock(flagsp); state = atomic_load_16(flagsp); @@ -842,9 +845,12 @@ file_v_unlock(struct file *fp, short lock_bit, short lock_wait_bit) flagsp = &fp->f_vflags; state = atomic_load_16(flagsp); - if ((state & lock_wait_bit) == 0 && - atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) - return; + for (;;) { + if ((state & lock_wait_bit) != 0) + break; + if (atomic_fcmpset_rel_16(flagsp, &state, state & ~lock_bit)) + return; + } sleepq_lock(flagsp); MPASS((*flagsp & lock_bit) != 0); From nobody Wed Oct 15 02:12:46 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmZNv0DsFz6CTs2; Wed, 15 Oct 2025 02:12: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 4cmZNt6ktDz3tr9; Wed, 15 Oct 2025 02:12:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760494367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R3U3XWIe939EjcVTRNK4gPNQB2CHgO30rVr9MwfS8Jg=; b=hflXKoXSKkv8RMBrBWZsZM8Uguclv3wmCb/dNXdxRLSRJLhEWv3CIuulalTqzgwmwMw1Sp 9gMoqKI2TGwau/tqFC2mr/QPt3E4N35bDphOP8XLxh8MMWp2NRBS0nZg9PNg+TcZb2SgFu c7w3hQbkzk9+voBNymVJj012RO9ncBNrMgzAeWQC+1DPoULcOYjqcT+0GS372ALns5Ilks imBS6cSg3mUijE4jhp35aaXSZSfniOZTgNQmjvQZnkqYArotjcGAh+sGUONLTb78vPyo9W dc1Wf7Aw4FDltIsM+CO4kdEBEg75UNv+gOjacZZdjcwnoIhk08P+3S9ryrw7Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760494367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R3U3XWIe939EjcVTRNK4gPNQB2CHgO30rVr9MwfS8Jg=; b=mulcFVoS3AVn6XT72KuyeYtboOvulLNLOXHZPA0BzBALBBg2ckuCUf4/pOnhT/hnI7iJNr ACnrGPxt6HuawZ5+Glf1UFuWsA3gBGy2V95opDszylZILk57eEmIzfMffuo1MG3Y9r4Lv7 VNPW4uPZ2LbH1OriTeuk0y1CtNR04DOBZgdqBTLl5SFRVElIinByRIi7WpSscic6/qNFcN ayqxYzIidzkqU5JQk5t4Lk0d+Bf3wuNx2P191a+jCII4tl8B00ij7W8C/NVPM1LtWdkjRs 6MASvaTnmMPFhHU0y4EKqHd04FbITbLwZsIsUcBp+IiQRSwca+OHMzqXbh2Jnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760494367; a=rsa-sha256; cv=none; b=T8lAxbEPfF6xng8VkQuIQt0GYj6pLyNQaqGXt/5t+ahDdQNlPv8hGES3jZl7ZEet967OCX urkejEybgKiwcf9KGP7hP7Njc7I4a93gDZGCKmP8ozZFOLU8P9CjcXYzV5MaOa7+uR0F6/ +OPRjflVg7mnL59pSqljY1XC3eRXWRKk3tMU46xvMNOIwLGg4nmRoDainlq2OadeIGiIlj DGnfxPKFrOHMDx7Lj0aT57Z4IMhf3Npf2nfb3ZGcQW9Z4gLOmcuiXpHNaZW0t7kj/WysCq ieI57jcEvI7njK5HM0pwWgu+TAWsfVxoI8VJpTAvIYn4yZ4Kb2sXefNDRol6VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmZNt6GDzz3GS; Wed, 15 Oct 2025 02:12: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 59F2Ckcx085988; Wed, 15 Oct 2025 02:12:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F2Cko1085985; Wed, 15 Oct 2025 02:12:46 GMT (envelope-from git) Date: Wed, 15 Oct 2025 02:12:46 GMT Message-Id: <202510150212.59F2Cko1085985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 57bf745be964 - stable/14 - vfs offset: fix assertion failure in face of racing ffofset and setfl locking List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 57bf745be96462355350fa18ec1dadfa9f04a10d Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=57bf745be96462355350fa18ec1dadfa9f04a10d commit 57bf745be96462355350fa18ec1dadfa9f04a10d Author: Mateusz Guzik AuthorDate: 2025-10-05 17:03:54 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-15 02:12:32 +0000 vfs offset: fix assertion failure in face of racing ffofset and setfl locking Both use the same 16 bit var to store their locked and waiters bits, then this in file_v_unlock: state = atomic_load_16(flagsp); if ((state & lock_wait_bit) == 0 && atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) return; can fail if for example foffset is being unlocked while setfl is getting locked. Afterwards the code assumes there are blocked waiters on foffset. Reviewed by: kib, markj Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D52915 --- sys/kern/vfs_vnops.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 5b25e2680ee4..4d1df41cf588 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -767,9 +767,12 @@ file_v_lock(struct file *fp, short lock_bit, short lock_wait_bit) flagsp = &fp->f_vflags; state = atomic_load_16(flagsp); - if ((state & lock_bit) == 0 && - atomic_cmpset_acq_16(flagsp, state, state | lock_bit)) - return; + for (;;) { + if ((state & lock_bit) != 0) + break; + if (atomic_fcmpset_acq_16(flagsp, &state, state | lock_bit)) + return; + } sleepq_lock(flagsp); state = atomic_load_16(flagsp); @@ -803,9 +806,12 @@ file_v_unlock(struct file *fp, short lock_bit, short lock_wait_bit) flagsp = &fp->f_vflags; state = atomic_load_16(flagsp); - if ((state & lock_wait_bit) == 0 && - atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) - return; + for (;;) { + if ((state & lock_wait_bit) != 0) + break; + if (atomic_fcmpset_rel_16(flagsp, &state, state & ~lock_bit)) + return; + } sleepq_lock(flagsp); MPASS((*flagsp & lock_bit) != 0); From nobody Wed Oct 15 05:57:29 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmgNB1wkcz6Cm92; Wed, 15 Oct 2025 05:57: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 4cmgNB1MYFz3HbG; Wed, 15 Oct 2025 05:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760507850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lN5UcdLhcu8EkuOWN0CntqomebNa787JLConSA+BiGg=; b=J4Eyzrj3G/+v3H1tvC+mjmQJYEcOQUJdCVAm6uJzgnYLsMZr7njBqGMyqK3Mqta3FrwW8a I30v1jKls9m9avdQ3vPDseFFoyP/5VzGVcDyDzvGij2DewPDyRYCHT/wue/9SVTPeHwRpX A4xJqDCkYdEAV9vvA872/JlhVn/h4IB8aAero54VnjK4CvGdAAP10w0x+MpHas2XEhIoRU iOzrcwM8ZLEvCQcbbuCKpIQrTwaiSNtmRGzUpyrXLlvWlkpdWlM7r1brH5lkRfivb6QbJ2 78XbtxYeb2FjTYWqRjIJ8TBSYE3a8Nbet0uKp8/lnlxBn4jFQlvCtyNU/EF+sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760507850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lN5UcdLhcu8EkuOWN0CntqomebNa787JLConSA+BiGg=; b=BNBo9iceQlWmnQFRc1bZpJkWPLEumjQ5zoGV7awEOtDZVMqZTCGFpYD9nVo1bZsgGlw/Bd Ey1UVFptodd4S+MfeYjLf3l5XeFktNBzGTrbOkS9G3/G4XoQuSzoDVDe9bb3nK/hsSJzzV Axq16T+ltuQFYhHlJdGQZd+dEJ5rDfJ4SEgVg/G5+GtokVKwicPcLPy1LvEbFXEybXvKKL 8eb2J6UCG6vI8l8hCPmCeJxjzV33P7oYZXrDgViyeeCOeNOS0DG5kT/qhID7psELnqISjU G/Y0e/wlSqenDBkYyrO3Q9a56gBneYJig323D6ihCORMdEJ6fq1Xud0XLzx+4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760507850; a=rsa-sha256; cv=none; b=b6yfW48HEHSMT9ioN1s9tIk4EPNW7+bipNFFA/0ILt86pp1Y68z2MdN5GGf1hls5IsLhKv Gsfhd4yZ25E02d52J0CJvmLSF6SnCoTCsLsOgfjCYQhpfC8WwlK/LijkXTNEtO6p6aPzLR up3wO5ivjEv1go5yQ0VWljy4aSqyM7qckuGN2YRcARgJbeQ4i6Y6ARsStY/JOlIW+tXqYR BJ4bMFEDnSjjxPzbGEqEE0HXLtJ5q2vPLjS+Z/6gXYnUyGyZ7J844FE+/negKVhWGinmcf o/66LvvOb+nm3Y9JQCBGvzIHmyXV8vlsqND09+yMfXj5/Nggy+6ODIcsz2RxMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmgNB0wNnz9Wl; Wed, 15 Oct 2025 05:57: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 59F5vTUk002800; Wed, 15 Oct 2025 05:57:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F5vT4N002797; Wed, 15 Oct 2025 05:57:29 GMT (envelope-from git) Date: Wed, 15 Oct 2025 05:57:29 GMT Message-Id: <202510150557.59F5vT4N002797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: ad2ca1c5c179 - stable/15 - vmimage.subr: Sort METALOG before running makefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ad2ca1c5c17935d8601b3ee48f705e1e5ede57bc Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=ad2ca1c5c17935d8601b3ee48f705e1e5ede57bc commit ad2ca1c5c17935d8601b3ee48f705e1e5ede57bc Author: Colin Percival AuthorDate: 2025-10-12 04:32:29 +0000 Commit: Colin Percival CommitDate: 2025-10-15 05:57:20 +0000 vmimage.subr: Sort METALOG before running makefs When creating VM images from pkgbase, the METALOG may not be in order; in particular, files may be listed before the directories which contain them. This causes makefs to create directories with 000 permissions. Interestingly, such VM images boot just fine, since root ignores those permissions; the first sign of trouble was sshd refusing logins with an error message which said absolutely nothing about /etc/ having incorrect permissions or being unable to read files inside it. Immediately prior to running makefs, sort the METALOG file. While we're here, uniquify as well; this does not guarantee that we do not have duplicate paths, but if there are duplicate paths with different settings something else has gone wrong and we don't really have any good way of solving the problem anyway. Reviewed by: ivy Hint from: imp MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53046 (cherry picked from commit 0cc81b375ea43c7e853b109d00c72c8c3b3df993) --- release/tools/vmimage.subr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 15c4dd53e70b..c3c917dcd642 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -290,6 +290,11 @@ buildfs() { cat ${DESTDIR}/METALOG.pkg >> ${DESTDIR}/METALOG fi + # Sort METALOG file; makefs produces directories with 000 permissions + # if their contents are seen before the directories themselves. + env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted + mv ${DESTDIR}/METALOG.sorted ${DESTDIR}/METALOG + case "${VMFS}" in ufs) cd ${DESTDIR} && ${MAKEFS} ${MAKEFSARGS} -o label=rootfs -o version=2 -o softupdates=1 \ From nobody Wed Oct 15 06:08:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmgdH3HpFz6Cmwp; Wed, 15 Oct 2025 06:08: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 4cmgdH2YVDz3Jdn; Wed, 15 Oct 2025 06:08:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760508531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+aQWRQe9vcJ68I6/T1c4s9VnWKPzyczSOTljbt18Ewg=; b=yYKa2qiGDiRLX1bdjGGXexNqD0b7DzU5flaKEYKTnhxcVP+grsZvPDvfTOZhN6irlrLl2x 1OLWGipQNqkv+dW6nsqu3qK0jv7Sqxov6WOaF0aDwt9iVohuYTIPmMrjtCavesX+efo8jt POZ9aq+5YJhcRQp6QWnhSiYyKSNsItZxNzEciBY0KJoNBxaNeM13BzM/ZLth/SfpX5Wvqq egYWRI2HoZMSQawgd+MApyagdYUfjKS/6YA82KNzIonmtItjUrBvrkGD1ksvHSdSTHVGg2 spvgcKYKVBdvGzoFL0+/EfjCmuBWlMmanV9WUfKVuteq0A3fQXvBC0Cf5GMpRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760508531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+aQWRQe9vcJ68I6/T1c4s9VnWKPzyczSOTljbt18Ewg=; b=Jb4XECc4cVjLR3+b716HaRSw025K9gNJRukafzfBXrK4+jMHJ5OlbmahYQ6i0srJh+0h34 J0gUsxBQsSaumHpX3tVy/ywfeh/aUQsecnhrWvsSlwhNJmZbkkCa4u9ez6mBY9Z44PDZFB Q9xvMYbYfOujLEXkLIoDyQU+h/mqXAoM8/+ICrMVRJNuc0z5WEGSJP2LNm+GxfjDevsTIu jceHju13oe0hmydqeQLc7cYx05Gx7W8pt33tGzSIqPxfS77pemvcggCizhm5DpqY2KNoXl un83sOF+RLptztzGuo91snyAC7wryB//5xK6a+v4a2OMUp7wTheQxLss/n44OA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760508531; a=rsa-sha256; cv=none; b=Fw3eFPpSmjzHbaw1H0tDldVwpUJdjxunu+5AYoODhdCqsN/bDKHqH/wKgE5clr75iby9dz 18B8rh98QP3Stpv6gJNN9ahltGnLTG2Ezce7vZQrmsc2h+N1c4UWlj96YU6Oe3Z73DaX3Q Kh3DxX3ZPdiESGtSaF43eML5fNwf8TIAKTCWpDoad0waEtk0IlMwYhcSj9czdZwNky62Fo aJna9YlyGXIYMUlxs9cW9TpkGbEymH+RNHVXrD+2kvwjeMDcC7sD5ybV9dbCbq6glmB9DH IhliE4QEfmqIRAGkrHq5vVlltv9aJdWIQkiUP46jetj+DEQJlAPV2t434qRdvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmgdH26qhz9mD; Wed, 15 Oct 2025 06:08: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 59F68p0b023188; Wed, 15 Oct 2025 06:08:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F68pAb023185; Wed, 15 Oct 2025 06:08:51 GMT (envelope-from git) Date: Wed, 15 Oct 2025 06:08:51 GMT Message-Id: <202510150608.59F68pAb023185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 9bea2657c453 - releng/15.0 - vfs offset: fix assertion failure in face of racing ffofset and setfl locking List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 9bea2657c4538f234709a97010f05e2b776c87a6 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=9bea2657c4538f234709a97010f05e2b776c87a6 commit 9bea2657c4538f234709a97010f05e2b776c87a6 Author: Mateusz Guzik AuthorDate: 2025-10-05 17:03:54 +0000 Commit: Colin Percival CommitDate: 2025-10-15 06:08:01 +0000 vfs offset: fix assertion failure in face of racing ffofset and setfl locking Both use the same 16 bit var to store their locked and waiters bits, then this in file_v_unlock: state = atomic_load_16(flagsp); if ((state & lock_wait_bit) == 0 && atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) return; can fail if for example foffset is being unlocked while setfl is getting locked. Afterwards the code assumes there are blocked waiters on foffset. Approved by: re (cperciva) Reviewed by: kib, markj Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D52915 (cherry picked from commit f43e19db6cea0a7dd7bf51f3fe2227d466ea5a80) --- sys/kern/vfs_vnops.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index f81c2033d95e..e27692ccb1a3 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -806,9 +806,12 @@ file_v_lock(struct file *fp, short lock_bit, short lock_wait_bit) flagsp = &fp->f_vflags; state = atomic_load_16(flagsp); - if ((state & lock_bit) == 0 && - atomic_cmpset_acq_16(flagsp, state, state | lock_bit)) - return; + for (;;) { + if ((state & lock_bit) != 0) + break; + if (atomic_fcmpset_acq_16(flagsp, &state, state | lock_bit)) + return; + } sleepq_lock(flagsp); state = atomic_load_16(flagsp); @@ -842,9 +845,12 @@ file_v_unlock(struct file *fp, short lock_bit, short lock_wait_bit) flagsp = &fp->f_vflags; state = atomic_load_16(flagsp); - if ((state & lock_wait_bit) == 0 && - atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit)) - return; + for (;;) { + if ((state & lock_wait_bit) != 0) + break; + if (atomic_fcmpset_rel_16(flagsp, &state, state & ~lock_bit)) + return; + } sleepq_lock(flagsp); MPASS((*flagsp & lock_bit) != 0); From nobody Wed Oct 15 06:08:52 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmgdJ4pqzz6CmnV; Wed, 15 Oct 2025 06:08: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 4cmgdJ3FBZz3JgT; Wed, 15 Oct 2025 06:08:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760508532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4t9aqHXXQDTMdB1gM/6q9s2241yC0sQ5dJb/KbvNP7k=; b=mv5PHawUcBOP4wRx82edXsIPiYdngOcu8V4CG0otaxvgBcly8vcjBI/tcuWLv+zDSm177+ 9dr62TfAtUPiCllsdzNI+qxMZ6m/Vz4bZX1CuDV8Sp2vPHrG4FIlAQ3QMNjXxIS0NBxFrj a4xkIkZ2VXhNHgitmd08+kM4xP2VZpQeUun8AX3bkvyChddH4b5fgac6uP2wCAoMRJg2+C EFUf2Oupe3hGU4NAtWoltPSiWOd8vQml+X0r6rCGdi5Fv/muvGr8ZULv26GWlU4AkcbtfR 5xQwIdOLCjO6b25yIVGB3gdCgUgGQYzPo3ObVbDBYbd3s00p82cKjvbt3ZTOHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760508532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4t9aqHXXQDTMdB1gM/6q9s2241yC0sQ5dJb/KbvNP7k=; b=YveVyOCoHXZHRcnwUAmR5S9+115ATrsKYeSWLADI2yOozFcz2rHJbmX84nAHYlcZ+McWe/ Y4ZliDnfxFN0l1kkRa0m3L82y1+U/fGvne30XuoNv9cgpDdOMIkS1Xl7IUemHxuV8LTVCA M9xVj5/jpRn1w32EQ3Pl7YWiLOmRNWQ0+xuSmqKSD9bF2aLQI0mzLvZiqKPRjxl9psUd6c kGb3SJfvQARc8UT8RhHnnblLzWHQh11lBfPXiOQkVMbF+MOoMG1ZGwnH1abHBwzq85QvJi baLWRzxxQiyKJiFy4Mj+CHJMUF2dyvV+DdfHxdD23/5+Hk9gSQTyx0a/TElVNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760508532; a=rsa-sha256; cv=none; b=tPpUeHen17EDKVZaIgHOphVati5gSmshXFY15b8NFKNG+jVUEqg4w9JE2TVp4il7uAnFMr 7aOaF8cLDps9nJRN0oMRM4uCcB6QXf7LePbufQqcrv108HZfZO1wY/qOkGzqT7aNH23sFe 95V4NmuIJSYCT0vDXNodLQcFYB93bmJZSS0XRORoRswwv6X6sf35AJGLGAFuzL9HZLHyuq yZhbXNS0lrlnTMXOjJ8tNdwW8lo0jAg+mX7XlZHuGWBS/+iSZJNCdtalmVi5SMWh0lAPOd eBaE+Tl4DgvN13col3ZH+3DQdifJIDxICNMxc24sAVGkAvopJ9yj4rN4xY4JUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmgdJ2mQzzB7d; Wed, 15 Oct 2025 06:08: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 59F68qJl023228; Wed, 15 Oct 2025 06:08:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F68qK5023225; Wed, 15 Oct 2025 06:08:52 GMT (envelope-from git) Date: Wed, 15 Oct 2025 06:08:52 GMT Message-Id: <202510150608.59F68qK5023225@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 72e948cff17b - releng/15.0 - sockstat: improve indentation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 72e948cff17b5063cf89025c1cb30dcd2e3929d9 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=72e948cff17b5063cf89025c1cb30dcd2e3929d9 commit 72e948cff17b5063cf89025c1cb30dcd2e3929d9 Author: Michael Tuexen AuthorDate: 2025-10-07 02:04:35 +0000 Commit: Colin Percival CommitDate: 2025-10-15 06:08:05 +0000 sockstat: improve indentation No functional changes intended. Approved by: re (cperciva) Sponsored by: Netflix, Inc. (cherry picked from commit ab837a2eed6d7562d538ac5f90b3b2776a9f0f5f) (cherry picked from commit 3dac4b92ec992fc85d148bf7d2d2deb1dbc5c827) --- usr.bin/sockstat/main.c | 123 ++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index 3b989c4283e4..a917672120d5 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -1230,40 +1230,40 @@ calculate_sock_column_widths(struct col_widths *cw, struct sock *s) { .socket = s->splice_socket }); if (sp != NULL) { len = formataddr(&sp->laddr->address, - NULL, 0); + NULL, 0); cw->splice_address = MAX( - cw->splice_address, len); + cw->splice_address, len); } } } if (opt_i) { - if (s->proto == IPPROTO_TCP || s->proto == IPPROTO_UDP) - { + if (s->proto == IPPROTO_TCP || + s->proto == IPPROTO_UDP) { len = snprintf(NULL, 0, - "%" PRIu64, s->inp_gencnt); + "%" PRIu64, s->inp_gencnt); cw->inp_gencnt = MAX(cw->inp_gencnt, len); } } if (opt_U) { if (faddr != NULL && - ((s->proto == IPPROTO_SCTP && - s->state != SCTP_CLOSED && - s->state != SCTP_BOUND && - s->state != SCTP_LISTEN) || - (s->proto == IPPROTO_TCP && - s->state != TCPS_CLOSED && - s->state != TCPS_LISTEN))) { + ((s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) || + (s->proto == IPPROTO_TCP && + s->state != TCPS_CLOSED && + s->state != TCPS_LISTEN))) { len = snprintf(NULL, 0, "%u", - ntohs(faddr->encaps_port)); + ntohs(faddr->encaps_port)); cw->encaps = MAX(cw->encaps, len); } } if (opt_s) { if (faddr != NULL && - s->proto == IPPROTO_SCTP && - s->state != SCTP_CLOSED && - s->state != SCTP_BOUND && - s->state != SCTP_LISTEN) { + s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) { len = strlen(sctp_path_state(faddr->state)); cw->path_state = MAX(cw->path_state, len); } @@ -1271,21 +1271,22 @@ calculate_sock_column_widths(struct col_widths *cw, struct sock *s) if (first) { if (opt_s) { if (s->proto == IPPROTO_SCTP || - s->proto == IPPROTO_TCP) { + s->proto == IPPROTO_TCP) { switch (s->proto) { case IPPROTO_SCTP: len = strlen( sctp_conn_state(s->state)); cw->conn_state = MAX( - cw->conn_state, len); + cw->conn_state, len); break; case IPPROTO_TCP: if (s->state >= 0 && s->state < TCP_NSTATES) { - len = strlen( - tcpstates[s->state]); - cw->conn_state = MAX( - cw->conn_state, len); + len = strlen( + tcpstates[s->state]); + cw->conn_state = MAX( + cw->conn_state, + len); } break; } @@ -1462,8 +1463,8 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) cw->splice_address, buf); } if (opt_i) { - if (s->proto == IPPROTO_TCP || s->proto == IPPROTO_UDP) - { + if (s->proto == IPPROTO_TCP || + s->proto == IPPROTO_UDP) { snprintf(buf, bufsize, "%" PRIu64, s->inp_gencnt); xo_emit(" {:id/%*s}", cw->inp_gencnt, buf); @@ -1472,29 +1473,29 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) } if (opt_U) { if (faddr != NULL && - ((s->proto == IPPROTO_SCTP && - s->state != SCTP_CLOSED && - s->state != SCTP_BOUND && - s->state != SCTP_LISTEN) || - (s->proto == IPPROTO_TCP && - s->state != TCPS_CLOSED && - s->state != TCPS_LISTEN))) { + ((s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) || + (s->proto == IPPROTO_TCP && + s->state != TCPS_CLOSED && + s->state != TCPS_LISTEN))) { xo_emit(" {:encaps/%*u}", cw->encaps, - ntohs(faddr->encaps_port)); + ntohs(faddr->encaps_port)); } else if (!is_xo_style_encoding) xo_emit(" {:encaps/%*s}", cw->encaps, "??"); } if (opt_s) { if (faddr != NULL && - s->proto == IPPROTO_SCTP && - s->state != SCTP_CLOSED && - s->state != SCTP_BOUND && - s->state != SCTP_LISTEN) { + s->proto == IPPROTO_SCTP && + s->state != SCTP_CLOSED && + s->state != SCTP_BOUND && + s->state != SCTP_LISTEN) { xo_emit(" {:path-state/%-*s}", cw->path_state, - sctp_path_state(faddr->state)); + sctp_path_state(faddr->state)); } else if (!is_xo_style_encoding) xo_emit(" {:path-state/%-*s}", cw->path_state, - "??"); + "??"); } if (first) { if (opt_s) { @@ -1503,40 +1504,40 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) switch (s->proto) { case IPPROTO_SCTP: xo_emit(" {:conn-state/%-*s}", - cw->conn_state, - sctp_conn_state(s->state)); + cw->conn_state, + sctp_conn_state(s->state)); break; case IPPROTO_TCP: if (s->state >= 0 && - s->state < TCP_NSTATES) + s->state < TCP_NSTATES) xo_emit(" {:conn-state/%-*s}", - cw->conn_state, - tcpstates[s->state]); + cw->conn_state, + tcpstates[s->state]); else if (!is_xo_style_encoding) xo_emit(" {:conn-state/%-*s}", - cw->conn_state, "??"); + cw->conn_state, "??"); break; } } else if (!is_xo_style_encoding) xo_emit(" {:conn-state/%-*s}", - cw->conn_state, "??"); + cw->conn_state, "??"); } if (opt_b) { if (s->proto == IPPROTO_TCP) xo_emit(" {:bblog-state/%-*s}", - cw->bblog_state, - bblog_state(s->bblog_state)); + cw->bblog_state, + bblog_state(s->bblog_state)); else if (!is_xo_style_encoding) xo_emit(" {:bblog-state/%-*s}", - cw->bblog_state, "??"); + cw->bblog_state, "??"); } if (opt_S) { if (s->proto == IPPROTO_TCP) xo_emit(" {:stack/%-*s}", - cw->stack, s->stack); + cw->stack, s->stack); else if (!is_xo_style_encoding) xo_emit(" {:stack/%-*s}", - cw->stack, "??"); + cw->stack, "??"); } if (opt_C) { if (s->proto == IPPROTO_TCP) @@ -1551,8 +1552,8 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) faddr = faddr->next; if (!is_xo_style_encoding && (laddr != NULL || faddr != NULL)) xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" - " {:fd/%*s}", cw->user, "??", cw->command, "??", - cw->pid, "??", cw->fd, "??"); + " {:fd/%*s}", cw->user, "??", cw->command, "??", + cw->pid, "??", cw->fd, "??"); first = false; } xo_emit("\n"); @@ -1613,7 +1614,7 @@ display(void) xo_emit(" {T:/%*s}", cw.fib, "FIB"); if (opt_I) xo_emit(" {T:/%-*s}", cw.splice_address, - "SPLICE ADDRESS"); + "SPLICE ADDRESS"); if (opt_i) xo_emit(" {T:/%*s}", cw.inp_gencnt, "ID"); if (opt_U) @@ -1644,15 +1645,15 @@ display(void) if (opt_n || (pwd = cap_getpwuid(cappwd, xf->xf_uid)) == NULL) xo_emit("{:user/%-*lu}", cw.user, - (u_long)xf->xf_uid); + (u_long)xf->xf_uid); else xo_emit("{:user/%-*s}", cw.user, pwd->pw_name); if (!is_xo_style_encoding) xo_emit(" {:command/%-*.10s}", cw.command, - getprocname(xf->xf_pid)); + getprocname(xf->xf_pid)); else xo_emit(" {:command/%-*s}", cw.command, - getprocname(xf->xf_pid)); + getprocname(xf->xf_pid)); xo_emit(" {:pid/%*lu}", cw.pid, (u_long)xf->xf_pid); xo_emit(" {:fd/%*d}", cw.fd, xf->xf_fd); display_sock(s, &cw, buf, bufsize); @@ -1667,8 +1668,8 @@ display(void) xo_open_instance("socket"); if (!is_xo_style_encoding) xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" - " {:fd/%*s}", cw.user, "??", cw.command, "??", - cw.pid, "??", cw.fd, "??"); + " {:fd/%*s}", cw.user, "??", cw.command, "??", + cw.pid, "??", cw.fd, "??"); display_sock(s, &cw, buf, bufsize); xo_close_instance("socket"); } @@ -1680,8 +1681,8 @@ display(void) xo_open_instance("socket"); if (!is_xo_style_encoding) xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" - " {:fd/%*s}", cw.user, "??", cw.command, "??", - cw.pid, "??", cw.fd, "??"); + " {:fd/%*s}", cw.user, "??", cw.command, "??", + cw.pid, "??", cw.fd, "??"); display_sock(s, &cw, buf, bufsize); xo_close_instance("socket"); } From nobody Wed Oct 15 06:08:53 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmgdL3Nt7z6Cn7C; Wed, 15 Oct 2025 06:08: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 4cmgdK4KJ8z3JvM; Wed, 15 Oct 2025 06:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760508533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gaSgPrJFuDhRmkpo13g4gHlp6Cw9znM/RsRJBUS6Qac=; b=BBKPJWrCdo4W3w2kOMk8FNYtKV1w8doNXWAMsyqFS/GVKoqtNGr9bkSG3TY8BCoYwop7SX B3nZ+BqpBtKDAFmfaUlbEklJ7Ney0DcxBaPGlYuiaS3K9dQQsdSTfCCHwI4TDiD8WqUaRi u+vcl61+swX42q6Km1JBIG0Riso1Q9PxHAynmK19iGX5lR5ohnpkWYMFhiWlhDVvKNiqPC rZCkqCnk+TbigjoM63v4FTCnWnKNw4YJFNMTDIiAbO8fNuiv4VGY1YsPH7HidmopwZPy59 HLUyiotPhSs8AK/ZSxVmop/jIUPsVd+pYBVRitZJvj37Z/AMo+vPUkrpwkAekw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760508533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gaSgPrJFuDhRmkpo13g4gHlp6Cw9znM/RsRJBUS6Qac=; b=C/oWsCXbThLNWPP+GxAZlIHCJPI4TDqUd/tjNDsmpeq3m9yajaVuyLgy7Iwzr0tSqToaen 2Es0/PkL6FhYYbWlP4++a5zk6xvGfLsb5s5uTXGmU+Bwix6B/cMajOkoebIuZviW+n6yuT dF7jzQR4akGmoMC6QpJ6Bwz+xySv59+TLKRNqWcc+tC4GQo96FmntP4Zp3w33YTW5ZLVLY jQdGqdPeK9U9CVcwJjyHeB8cHd0DrBxyorr7FYNh7AJutDJITrhLVb4BmhTeYzbCKtbByk C2HLMcuvjqupM6n5Hsvfp7CIqtGFU1+yzFB/z4Wg2jul8crrp2oD8IqGckn+9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760508533; a=rsa-sha256; cv=none; b=lNyyCKUxX4T3GPyAExKsgdwFvTp/LJM6VFSm2D7y8wsid684zRkepssLU/cUhvmqbPD2+J 42LViWtdZpjAT9nkpf62BX61O5mYOxILziR8ZHZ7gT8stg3vON/9Re17GfNKHU/HtTxXoC Phf9J64kjnq2Vp1keZhyfOdRtMTg76aZQF00HilCI/yjUB6bpBnpFHeWsd+YbYKszhT44C KLL8rQl/QWQ3n5PB4hQbBJwayTWZmunPZrrcpR4eiD19BivF/KMgMUP2U/EsOtAxC9zd52 b1DAnP8NSSA8jApG9HQW+XU6Uvtgg1jRsJwT+nDDPh2uvXIwFs/jBygljNy1bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmgdK3jsKz9ZK; Wed, 15 Oct 2025 06:08: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 59F68rck023263; Wed, 15 Oct 2025 06:08:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F68riK023260; Wed, 15 Oct 2025 06:08:53 GMT (envelope-from git) Date: Wed, 15 Oct 2025 06:08:53 GMT Message-Id: <202510150608.59F68riK023260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a9ffe497c864 - releng/15.0 - sockstat: improve output formatting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: a9ffe497c864775e4979a7190ad3feb7884aec66 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a9ffe497c864775e4979a7190ad3feb7884aec66 commit a9ffe497c864775e4979a7190ad3feb7884aec66 Author: Michael Tuexen AuthorDate: 2025-10-09 19:10:53 +0000 Commit: Colin Percival CommitDate: 2025-10-15 06:08:09 +0000 sockstat: improve output formatting Fix the format when the output for a socket spans multiple lines. Approved by: re (cperciva) Reviewed by: rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52984 (cherry picked from commit 98b2a2265f5ee47bd932347699e6117df2f41488) (cherry picked from commit 7e567f51ff59d169b5fd0bc350d0c7dfc9fc2609) --- usr.bin/sockstat/main.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index a917672120d5..f0eb83eb3e9f 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -1545,18 +1545,30 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) else if (!is_xo_style_encoding) xo_emit(" {:cc/%-*s}", cw->cc, "??"); } + } else if (!is_xo_style_encoding) { + if (opt_s) + xo_emit(" {:conn-state/%-*s}", cw->conn_state, + "??"); + if (opt_b) + xo_emit(" {:bblog-state/%-*s}", cw->bblog_state, + "??"); + if (opt_S) + xo_emit(" {:stack/%-*s}", cw->stack, "??"); + if (opt_C) + xo_emit(" {:cc/%-*s}", cw->cc, "??"); } if (laddr != NULL) laddr = laddr->next; if (faddr != NULL) faddr = faddr->next; + xo_emit("\n"); if (!is_xo_style_encoding && (laddr != NULL || faddr != NULL)) xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" - " {:fd/%*s}", cw->user, "??", cw->command, "??", - cw->pid, "??", cw->fd, "??"); + " {:fd/%*s} {:proto/%-*s}", cw->user, "??", + cw->command, "??", cw->pid, "??", cw->fd, "??", + cw->proto, "??"); first = false; } - xo_emit("\n"); } static void From nobody Wed Oct 15 06:08:54 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmgdM29rYz6CmnY; Wed, 15 Oct 2025 06:08: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 4cmgdL5lWZz3JfM; Wed, 15 Oct 2025 06:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760508534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1iUv6qihaZHCJO4uoJ6/K7szpVxNHg6/cM0iCnbTu6Q=; b=CbQX4FXy/xyyQIBAUwVXi1MaO4nChc6RkKlMF3Y91VhUtTPLJ0a2KEmW7FqBzG1DMPZEvk WiL+XSZHk3cBLlsRBrSIXhsXbsQ6eo7BgpTh4bUymUSBoiPGXQCGnIS7bHhtiOauin1Iye 1E0HP7RShPuy0NpQVvFJSEJOpmRlvmbCJbDmHOm4Q/6Iu8deS0z+Oy1ny+HYRaMr69iAQ4 5dzpqbX1nW2LLsXDSHNWfMdLfpM8AuKhbce//Kz67OVlo9Qs7m+L3/ds3Pqj+Fe0Npbfhs 9uVac3i4/2p3D8NPE5PMm2/F+OWud1OZteO+bbcDwJ98nHnZuRTWQlct9zS/CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760508534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1iUv6qihaZHCJO4uoJ6/K7szpVxNHg6/cM0iCnbTu6Q=; b=RkNvAhrjx1xg6DznVy2Uddm5mwXeyWX4uYsmun33UG6Z4CmcJllV9uKidaEABLxE5l0XrI to7fEYA8fxEiJpVxhDoaK9t6uYYFWI4SkCyOfGruQ3PXZ5m2VkmUvOt6AXb/c7yA5Q0QDr YUnL48gqbFJ2cmjVnkb77gXUS8rMRcBJdcs6n4LD68rTdgScUqKXXE7LMV53RVsyuzi95y ngc1cH4UcFSNmS34I1sym+BLlQdDmOFq684HpbB9EIRNi9FHmhFmiTUBSzJbguH8OZKcDK Xk2k+jl2bdsCgEDw5rChb+kqSjktynRZE9Q0v7m4hKXI2vHTmemaHwxmpgE4Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760508534; a=rsa-sha256; cv=none; b=qooQXX6kdFVPQT6lEGaeqeY75vpg1WFbAblQJt/uz0gYY9EcnqnYtXtw/Bh8w+O+29MD8f TY+PYkRMyctZykU9tuWUqWzANyT2F4L2fQCD/kFPDkyzTIM1CmgW20FLJVa12t7wUPeGH0 7TNjlf+LBa04V2YpqRwlZtD1P5wF/OZx+g9ewWELdYs8A9Qh8vP/4KX730u2sdI7nngyY7 Ok3a3d9ElvrBOL1iBdqP4JkjgNwrvlPOupqji8Aw/UjraDNEgOr7+Ri/u3oDlkvpxxYdp3 Z1zztckd94N2MKLCPEJDSJBF4iGQoyhuBoA6kTi00uL8sEds6VKV9E6LDg8MIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmgdL4fwLzBJq; Wed, 15 Oct 2025 06:08: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 59F68sPf023298; Wed, 15 Oct 2025 06:08:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F68sNU023295; Wed, 15 Oct 2025 06:08:54 GMT (envelope-from git) Date: Wed, 15 Oct 2025 06:08:54 GMT Message-Id: <202510150608.59F68sNU023295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f6751f1fc5a9 - releng/15.0 - vmimage.subr: Sort METALOG before running makefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: f6751f1fc5a941a787503d6faf63a8bbd4403653 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f6751f1fc5a941a787503d6faf63a8bbd4403653 commit f6751f1fc5a941a787503d6faf63a8bbd4403653 Author: Colin Percival AuthorDate: 2025-10-12 04:32:29 +0000 Commit: Colin Percival CommitDate: 2025-10-15 06:08:12 +0000 vmimage.subr: Sort METALOG before running makefs When creating VM images from pkgbase, the METALOG may not be in order; in particular, files may be listed before the directories which contain them. This causes makefs to create directories with 000 permissions. Interestingly, such VM images boot just fine, since root ignores those permissions; the first sign of trouble was sshd refusing logins with an error message which said absolutely nothing about /etc/ having incorrect permissions or being unable to read files inside it. Immediately prior to running makefs, sort the METALOG file. While we're here, uniquify as well; this does not guarantee that we do not have duplicate paths, but if there are duplicate paths with different settings something else has gone wrong and we don't really have any good way of solving the problem anyway. Approved by: re (cperciva) Reviewed by: ivy Hint from: imp MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53046 (cherry picked from commit 0cc81b375ea43c7e853b109d00c72c8c3b3df993) (cherry picked from commit ad2ca1c5c17935d8601b3ee48f705e1e5ede57bc) --- release/tools/vmimage.subr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 15c4dd53e70b..c3c917dcd642 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -290,6 +290,11 @@ buildfs() { cat ${DESTDIR}/METALOG.pkg >> ${DESTDIR}/METALOG fi + # Sort METALOG file; makefs produces directories with 000 permissions + # if their contents are seen before the directories themselves. + env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted + mv ${DESTDIR}/METALOG.sorted ${DESTDIR}/METALOG + case "${VMFS}" in ufs) cd ${DESTDIR} && ${MAKEFS} ${MAKEFSARGS} -o label=rootfs -o version=2 -o softupdates=1 \ From nobody Wed Oct 15 07:25:24 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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:28:27 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmr3J2Gkmz6CJ82 for ; Wed, 15 Oct 2025 12:28: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 4cmr3J0xN8z43BL; Wed, 15 Oct 2025 12:28:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760531308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FNCsadFILlO4CJIuQPdedRD+msvfX0ifx/EGEF4oWVM=; b=Cury3zl+AcyRRllZdBShNnUDT5UlXYqv+zG/FL06idOrxk6NZZK+B2KccutmCis7Sck/4C bn+r3NA6bTuaaioivMUkspG0hG4J2GW0HqfdUOoCjILGqzrG2TnUpsrK5RbmRHgGOMYY2V TH9QQrX9HIQFEgWZyb3qeYEHek7Jyz8EVbjwQtNGHdIHrqKQiFF1w4c71nm0+M5n61RFzM ksFMEtI04s50BDSuqEe9Gs9NcFHCTPKkOHBqKzWwz7DmfgmJ3Hdc0jJGyHIHNSA5MDMsOa WHiN8BzMGJNX45Ze3UokfaymEvtZypMf9TKzuoTHiMpiCp38jfsh4zpqBPVcng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760531308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FNCsadFILlO4CJIuQPdedRD+msvfX0ifx/EGEF4oWVM=; b=rzHEndSarCsfVXvNe/1wuWTzyBbQdp2EfwOtYZStqLcYfLPexWA15IJRfKR2XEeQj/02Ib wG8Q/TXEJ9y55C/n93NYYQIGWcV465JDvCk5nZ9Fcd90C2KC5AffTiPtQDo9xhBZYgmFhE 5LwVayOfD84wBuxIF8SwGjNtBcCPXSXQsMkR4r8QuYpyhERHUih+ZRQgGprW0DP60TaYQX 7IXgy15HcXcJgcvhagmFWBvY+CbLuc/3IEkJH2SgqgEqfOssuVs5rUa73hEZHYI6Gp8RLt NPXgNZMWagQeGvSp5lbo5EnuEIj4oOtKDrGZ7YmOeGAST4Ab8e6d4gQPcU+sIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760531308; a=rsa-sha256; cv=none; b=jv9Ej0qJD9Y+8GLbXXxq2bYj+NhgJYZSPTPPCg5oWDCuiA3P4GDFIF27QkpNxJtBblUeQZ uelk9aOKn9rH7mEIIrQ2mPXItlBelKkiMNyNVyI2F5n6mpvSG0hfTdvADfPS8EEykXfKUa iAZ4EoxuKVKs5TPvywFAwYlnDJstfjAoMGoKSdu+vrh/Znc1pgfDwsU7pXguLCfDc4VzFa icE0PB17SaxCdMnIDjadu1pRiCToUR3gpUixyT8wV+dHfJrFHQGvdIrqfUDYmz92eInuW+ RsWRqCGEMAb707ArnWsMx9LN8EmAo/DBlXr70Z+SqJ/pfRDf9rYRcBRKayCLRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmr3H6MqjzfZT; Wed, 15 Oct 2025 12:28: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 59FCSRWG038105; Wed, 15 Oct 2025 12:28:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FCSR9W038102; Wed, 15 Oct 2025 12:28:27 GMT (envelope-from git) Date: Wed, 15 Oct 2025 12:28:27 GMT Message-Id: <202510151228.59FCSR9W038102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: d9edb8da6381 - internal/admin - admin: Release jlduran from mentorship List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: d9edb8da6381a3f01b8e72a76bc7ecc894df8777 Auto-Submitted: auto-generated The branch internal/admin has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d9edb8da6381a3f01b8e72a76bc7ecc894df8777 commit d9edb8da6381a3f01b8e72a76bc7ecc894df8777 Author: Ed Maste AuthorDate: 2025-10-15 12:27:33 +0000 Commit: Ed Maste CommitDate: 2025-10-15 12:27:49 +0000 admin: Release jlduran from mentorship Approved by: srcmgr (implicit) --- mentors | 1 - 1 file changed, 1 deletion(-) diff --git a/mentors b/mentors index ee0cbda6379c..4797a26effbb 100644 --- a/mentors +++ b/mentors @@ -15,7 +15,6 @@ brd allanjude Co-mentor: bapt bryanv grehan def oshogbo jaeyoon imp -jlduran emaste jrhall imp kgalazka erj Co-mentor: kbowling khorben philip From nobody Wed Oct 15 12:34:15 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 12:59:02 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmrkZ3jYvz6CLll; Wed, 15 Oct 2025 12:59: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 4cmrkZ32m1z3CKt; Wed, 15 Oct 2025 12:59:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760533142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHDs7fPSkNImwmvlnqO8PKrPhLpBZ8vvChhboUWH3Ew=; b=oL71lUiQajwlTZ7+WUIZ/7FDDOmtfYE//FzBlaE5At5x1XtwwexOil6th+YUYWxxA1Mruw 4fRnv/Hp88k3FK8FOfr7r0+kADO8iDXl+9s1oM8XB6p31tP2es3Dme1zc04juREIdvj+Ac ULmzLsudR9ytD9ZFCYmHXKA5Xk81YJIjLFnzmqF/y2Pxs+NRax2+IcNcQjQOzHBzRegVpx C7KMs8OD7ZazLTRf0QllRuxr+UU18W/Tp77bSwPz2X2mUHTfbZeFBQK8/vpTadlyl17goP d6YW3PtLpBWDeHLHw5ZXMI58FvRTG4OBA2r/oaBGcnRFCXe7pXjw0kUN9v6m7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760533142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHDs7fPSkNImwmvlnqO8PKrPhLpBZ8vvChhboUWH3Ew=; b=FP+kBDmajhqEVsER5ZNqvgHV2uDjdEHhOdciz9k9auvy5VhNCXH5cFYx1l0k9uk8F6RHpm 7eTAX6Z3OuC7oloFQWDUMJksFZVJoc/z/ZIqXF80ZuxEjrX85rahIwL4p2jZe0I6/QYYKv b9Y7N+9WFPlFJ2EHiXyP+xCeMw410BDshEIvRktDSij97+c3s9FsrwMLIry/Jgt4lMnCFm R+XyfRGs5dqJNuzxM/OTz7SjnpFjZmyVyPkzHEmeEemsM74BXSORz/dXxaAeb90i21+LvV SYLWdZ+Tc0veRKP/38ZXp48WsLL+6t+R3NhOPzG5mbCQ2oqjIoGZSLc/AiggZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760533142; a=rsa-sha256; cv=none; b=yIrBvyUZMuEoQRTGX7sMXoqQM8/LiZ2uzxnY4mdRQEvcCkZCInN0UjrfwxYpsJfkF1nQOx Des9ZDtyNfJ1/jICyByfnTbluFuZVFC3Sz95DkHdBcD4LBreHuSLlSruRzL3T8wOv7gg39 R4g4Ey/x8qF+n++eaqZybZ+dIclk8FcmLpToBZoIf050zRY0VlCb9cZ6AaYErCl7WAsTjl JGBv9G+EvFbcUMbbCg57uKcIqtL9P/wK/F5/l8lVh43whGePFzR7RHmx70+SnfwZAclynU +hcmRDMVXwI6ZU94LfkFDYlS7PTOWezPlLRicrYM0fXLEeEPd39rbbOIHjFELQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmrkZ2YK5zgKj; Wed, 15 Oct 2025 12:59: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 59FCx2ig094716; Wed, 15 Oct 2025 12:59:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FCx2jv094713; Wed, 15 Oct 2025 12:59:02 GMT (envelope-from git) Date: Wed, 15 Oct 2025 12:59:02 GMT Message-Id: <202510151259.59FCx2jv094713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: f1b0e00d56a8 - stable/15 - packages: Rename unbound to local-unbound List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: f1b0e00d56a8b01be86ff41a05cb6916727cee8a Auto-Submitted: auto-generated The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=f1b0e00d56a8b01be86ff41a05cb6916727cee8a commit f1b0e00d56a8b01be86ff41a05cb6916727cee8a Author: Lexi Winter AuthorDate: 2025-10-15 11:00:35 +0000 Commit: Lexi Winter CommitDate: 2025-10-15 12:55:50 +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 (cherry picked from commit bf84861460f9287fe9cf66b2cd22fefe8e242a28) --- 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 26c2355de1ac..6310ef5828c1 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,14 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +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. + 20251001: The deprecated ftpd(8) has been removed. Users who still need ftpd can install the ftp/freebsd-ftpd port. pkgbase users should remove 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-branches@FreeBSD.org From: Lexi Winter Subject: git: 9dab0e61a921 - stable/15 - ncurses: Add an ncurses-lib package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 9dab0e61a921b5f3c4db2e0e2b440aeb6a803e42 Auto-Submitted: auto-generated The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=9dab0e61a921b5f3c4db2e0e2b440aeb6a803e42 commit 9dab0e61a921b5f3c4db2e0e2b440aeb6a803e42 Author: Lexi Winter AuthorDate: 2025-10-15 12:28:43 +0000 Commit: Lexi Winter CommitDate: 2025-10-15 12:56:08 +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 (cherry picked from commit bde703e8b6ab3acc73bbb20f1ebe26221f33e9f1) --- 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:26:08 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsKr4Svbz6CNqY; Wed, 15 Oct 2025 13:26: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 4cmsKr3tkVz3K6m; Wed, 15 Oct 2025 13:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0p1uheLuj0MO5xqLpu9Q0/10xQF2AJHGv/2iTjfplE=; b=mPTXgxJ4gZ0vzg+Ba29a4GH6WSHnB2vVU+QBD7e7MvOV0v5UPzZOCvn7mEafRY+Sf5zW6N kz9CuUYB/Yx6PfqZniKDy8Cl50x5ykkM/coR4uZ41KRAEoWY5duFPwC/kPNBv0AazO0HEq /KHrBpg+l34ke1xhPDI5l5ErI7jWatMXZLByeVwsi8yrXeC/BB3i9+yLeY/j90aY05esnK 8BLE8HEoPSPgJPeG+rO3gMN9TiSF+H50X7gVqeehRRCHtdMHtA4a+9VR+GahAeruUiEE1i ljmDiNLgxttKZcxMFc4xIYNxHROuBiLHm6RH/TasPp0hpQEIrvcdlvtwh6SjYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0p1uheLuj0MO5xqLpu9Q0/10xQF2AJHGv/2iTjfplE=; b=DZJAMxGgPszJ3kxCgdU7MAmezeZt+wCBwJCyaFc5kcki5B8lt5yF5XUIpQHKJlCiLhd5ah Nje5X2KpZFILA0xSJ+AZ3avyBmCuWBBWZnEjQRho2lqxKopp2JDHrtk6URxrYXM9GSHo7Q qAudW24U8a3LcrLicoGFjJfMNarDesTCYZIefy5YWzeMBJceO4cmNubPMid3GgWtE4DeR5 RowFKMVSczJcKOHk0Cs86cictibRDocmHTm3N91ExiVRM/zTcKTJuPNxaWqIvcoYgW2GH8 U2lm1WsmHHkkXaISLdBscy3UYp2M3YvqL7wXmwOBrsfIZWggYXbO6BW/tAs/jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534768; a=rsa-sha256; cv=none; b=GPhDnqPCHRF+/PxdkBLUO9uOOwBDQhLnV/J4B8C53XAAzaqguEX99Q1SPlyE3w2UWinIcY sdYSNTWTItZWjRmV8EOnP4tbPOzbmSDN7xxpCUconQnJY8bFESlQOS5G+fdx3Rvyq4YbHy T9NOCqlfzWgkYmlgz+VSVW7wlaH5uU2ETYc0AJzGONiBjsL1s2QwerGgSPD6+oz0cpbgAo 8o1k3+wuOCd7ESASYDV+9sU0Bem4qC9qJr63DZQ1bzGyblS+p/H8KUqdaAqdbSKd0bYIWu /WONpA9Tx3VOwz9g5twwg2FNSRkrhVU6CYPtsmn0gRRhQjEvFT3fyXBQqAfD+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 4cmsKr3147zgk8; Wed, 15 Oct 2025 13:26: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 59FDQ8mJ050691; Wed, 15 Oct 2025 13:26:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQ8t7050688; Wed, 15 Oct 2025 13:26:08 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:08 GMT Message-Id: <202510151326.59FDQ8t7050688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c3005b65b2c1 - stable/14 - pw: pw_mkdb(3) does not set errno List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c3005b65b2c14ed082bf2d558990c7346bc82b5a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c3005b65b2c14ed082bf2d558990c7346bc82b5a commit c3005b65b2c14ed082bf2d558990c7346bc82b5a Author: Mark Johnston AuthorDate: 2025-10-08 12:47:15 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:24:45 +0000 pw: pw_mkdb(3) does not set errno MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. (cherry picked from commit b464c7a75e30e6149906458075b7eaf0841c7222) --- usr.sbin/pw/pwupd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c index 89c1553c8c92..845a607ab1cb 100644 --- a/usr.sbin/pw/pwupd.c +++ b/usr.sbin/pw/pwupd.c @@ -119,7 +119,7 @@ pw_update(struct passwd * pwd, char const * user) */ if (pw_mkdb(pw != NULL ? pw->pw_name : NULL) == -1) { pw_fini(); - err(1, "pw_mkdb()"); + errx(1, "pw_mkdb()"); } free(pw); pw_fini(); From nobody Wed Oct 15 13:26:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsKs4Q13z6CNyf; Wed, 15 Oct 2025 13:26: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 4cmsKs3tgMz3KCd; Wed, 15 Oct 2025 13:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Qgalozvp/ctmhiFXNtG1wvCMwTMzVb/KA0+EsFraAI=; b=uQzCkJSTaF/e1eUN7PKKVRpQ26BXRU2/1Klv8Ew00FCVlZRUeh5mhJqiufMi4/lLROu/rY +F3q7DySTQhwxGE6rjXeeb9lyK4qs5yUBE9kDzXdM5TkWzssPEl/DIMrMtresFqy4Jxurq /G91Yrz89QSfRmt4YvVBcMbL8qzBaAosK+S3E5uMB322lY1L027toZcstg/kaizrk/EbYU JWU0I4rxg56EVttBHLNbLay2O6S7momDjVfIs1HVddfM64kqTrCfh6M3VzI2WPRYJE+nSA dx7lpQcneIr2J82UhQdxmnjequCscx/19l1kkIM6Yx8anLxZ5osERI0gmRKm6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Qgalozvp/ctmhiFXNtG1wvCMwTMzVb/KA0+EsFraAI=; b=IxacvaqsY9AUkKOp36hpeZID5YTe3B9+l7WjlASBI6ve2myRRWPe6YO3hBIn7TCPUeW7mW JFZ9Ca63Nrfzec/MdDctrNPMISE8SUtfVqGoQLJosmxbViVZySSqS5ZlxKh3r2xSc2GOdU UGRGOwlOwNqmE/WIEH9qR+uJetSff6lUpvKfH8GipUSeq/hc68xSwld3X+TFohSa4NYGlg CC9gpzNcyBhdWbb+mAdvSQW1XKMlxgWhgq7fROGwk5Qo7HSBobcOLKb2ANMzm6JBtIfxpd MfamcKKoAYMRpRMqRk2ycuVd5Ad/OD01g/VgRZyNoGrLxWAfcKQt16umt2JuCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534769; a=rsa-sha256; cv=none; b=fvPB1CXvNiwvnzruqTXa7JrHqgD0wtH2dEIanR24LtJPD2TIhpoyJhAvIK8goj2oZ6Fmp/ 6xGKy4G0E+CsySpS0svmB04OFTykooeZOrcZmx93yZeYTdFsp0kJuG+pBWCqJhTxwLvoXx iW0mTe6jviKz41jM3Vv14m25WsF7Bw//D65e7HoGVE18CY8Dk5P/Mr+VRx7968FVipKGjY wXob6Dd+awmJ+bs/k2YQh1j/0roIZEYYu4Luwsd5srzCxEtX3TOeLCdEWK+taLkakjcLBK QvP4DSEY49spENDIybMQiBy+I2UL7AjJoH1PwzVps1sppHQgQlS+8AdOC01DzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmsKs3R79zgdc; Wed, 15 Oct 2025 13:26: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 59FDQ9Sn050723; Wed, 15 Oct 2025 13:26:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQ91h050720; Wed, 15 Oct 2025 13:26:09 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:09 GMT Message-Id: <202510151326.59FDQ91h050720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: af51f41346ad - stable/14 - qat: enable qat driver for 402xx device List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: af51f41346ad885e1ffe0d14b325c88cc65ac0cc Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=af51f41346ad885e1ffe0d14b325c88cc65ac0cc commit af51f41346ad885e1ffe0d14b325c88cc65ac0cc Author: Hareshx Sankar Raj AuthorDate: 2025-09-04 18:21:36 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:25:11 +0000 qat: enable qat driver for 402xx device Enabled qat driver support for 402xx device with ID 0x4944/0x4945. This is an additional device supported under the existing qat_4xxx driver. Firmwares specific to the 402xx device are added. Signed-off-by: Hareshx Sankar Raj Relnotes: yes Sponsored by: Intel Corporation MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D52488 (cherry picked from commit 7fbd362c091b2b384d14c3ed5af9234bb2eff9c2) --- sys/contrib/dev/qat/qat_402xx.bin | Bin 0 -> 665360 bytes sys/contrib/dev/qat/qat_402xx_mmp.bin | Bin 0 -> 150084 bytes sys/dev/qat/include/common/adf_accel_devices.h | 4 ++ sys/dev/qat/qat_api/include/icp_sal_versions.h | 2 +- sys/dev/qat/qat_common/qat_uclo.c | 1 + sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c | 58 +++++++++++++++++++------ sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h | 6 +++ sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c | 15 ++++--- sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c | 15 ++++--- sys/modules/qatfw/qat_4xxx/Makefile | 5 ++- 10 files changed, 78 insertions(+), 28 deletions(-) diff --git a/sys/contrib/dev/qat/qat_402xx.bin b/sys/contrib/dev/qat/qat_402xx.bin new file mode 100644 index 000000000000..74151547edce Binary files /dev/null and b/sys/contrib/dev/qat/qat_402xx.bin differ diff --git a/sys/contrib/dev/qat/qat_402xx_mmp.bin b/sys/contrib/dev/qat/qat_402xx_mmp.bin new file mode 100644 index 000000000000..6404eb009d2f Binary files /dev/null and b/sys/contrib/dev/qat/qat_402xx_mmp.bin differ diff --git a/sys/dev/qat/include/common/adf_accel_devices.h b/sys/dev/qat/include/common/adf_accel_devices.h index c09aee8ea4bd..eeffc6a9132c 100644 --- a/sys/dev/qat/include/common/adf_accel_devices.h +++ b/sys/dev/qat/include/common/adf_accel_devices.h @@ -39,12 +39,16 @@ #define ADF_4XXXIOV_PCI_DEVICE_ID 0x4941 #define ADF_401XX_PCI_DEVICE_ID 0x4942 #define ADF_401XXIOV_PCI_DEVICE_ID 0x4943 +#define ADF_402XX_PCI_DEVICE_ID 0x4944 +#define ADF_402XXIOV_PCI_DEVICE_ID 0x4945 #define IS_QAT_GEN3(ID) ({ (ID == ADF_C4XXX_PCI_DEVICE_ID); }) static inline bool IS_QAT_GEN4(const unsigned int id) { return (id == ADF_4XXX_PCI_DEVICE_ID || id == ADF_401XX_PCI_DEVICE_ID || + id == ADF_402XX_PCI_DEVICE_ID || + id == ADF_402XXIOV_PCI_DEVICE_ID || id == ADF_4XXXIOV_PCI_DEVICE_ID || id == ADF_401XXIOV_PCI_DEVICE_ID); } diff --git a/sys/dev/qat/qat_api/include/icp_sal_versions.h b/sys/dev/qat/qat_api/include/icp_sal_versions.h index 03bcef4fcbbb..0eb227ade09c 100644 --- a/sys/dev/qat/qat_api/include/icp_sal_versions.h +++ b/sys/dev/qat/qat_api/include/icp_sal_versions.h @@ -26,7 +26,7 @@ /* Part name and number of the accelerator device */ #define SAL_INFO2_DRIVER_SW_VERSION_MAJ_NUMBER 3 -#define SAL_INFO2_DRIVER_SW_VERSION_MIN_NUMBER 15 +#define SAL_INFO2_DRIVER_SW_VERSION_MIN_NUMBER 16 #define SAL_INFO2_DRIVER_SW_VERSION_PATCH_NUMBER 0 /** diff --git a/sys/dev/qat/qat_common/qat_uclo.c b/sys/dev/qat/qat_common/qat_uclo.c index 54e8e8eb7421..b17020286d24 100644 --- a/sys/dev/qat/qat_common/qat_uclo.c +++ b/sys/dev/qat/qat_common/qat_uclo.c @@ -892,6 +892,7 @@ qat_uclo_get_dev_type(struct icp_qat_fw_loader_handle *handle) return ICP_QAT_AC_C4XXX_DEV_TYPE; case ADF_4XXX_PCI_DEVICE_ID: case ADF_401XX_PCI_DEVICE_ID: + case ADF_402XX_PCI_DEVICE_ID: return ICP_QAT_AC_4XXX_A_DEV_TYPE; default: pr_err("QAT: unsupported device 0x%x\n", diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c index d730efd5952b..49e1e1859e78 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c @@ -536,8 +536,8 @@ adf_exit_accel_units(struct adf_accel_dev *accel_dev) } static const char * -get_obj_name(struct adf_accel_dev *accel_dev, - enum adf_accel_unit_services service) +get_obj_name_4xxx(struct adf_accel_dev *accel_dev, + enum adf_accel_unit_services service) { switch (service) { case ADF_ACCEL_ASYM: @@ -553,6 +553,24 @@ get_obj_name(struct adf_accel_dev *accel_dev, } } +static const char * +get_obj_name_402xx(struct adf_accel_dev *accel_dev, + enum adf_accel_unit_services service) +{ + switch (service) { + case ADF_ACCEL_ASYM: + return ADF_402XX_ASYM_OBJ; + case ADF_ACCEL_CRYPTO: + return ADF_402XX_SYM_OBJ; + case ADF_ACCEL_COMPRESSION: + return ADF_402XX_DC_OBJ; + case ADF_ACCEL_ADMIN: + return ADF_402XX_ADMIN_OBJ; + default: + return NULL; + } +} + static uint32_t get_objs_num(struct adf_accel_dev *accel_dev) { @@ -982,8 +1000,23 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->clock_frequency = ADF_4XXX_AE_FREQ; hw_data->get_sku = get_sku; hw_data->heartbeat_ctr_num = ADF_NUM_HB_CNT_PER_AE; - hw_data->fw_name = ADF_4XXX_FW; - hw_data->fw_mmp_name = ADF_4XXX_MMP; + switch (id) { + case ADF_402XX_PCI_DEVICE_ID: + hw_data->fw_name = ADF_402XX_FW; + hw_data->fw_mmp_name = ADF_402XX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; + break; + case ADF_401XX_PCI_DEVICE_ID: + hw_data->fw_name = ADF_4XXX_FW; + hw_data->fw_mmp_name = ADF_4XXX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_401XX_ASYM_AE_MASK; + break; + + default: + hw_data->fw_name = ADF_4XXX_FW; + hw_data->fw_mmp_name = ADF_4XXX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; + } hw_data->init_admin_comms = adf_init_admin_comms; hw_data->exit_admin_comms = adf_exit_admin_comms; hw_data->send_admin_init = adf_4xxx_send_admin_init; @@ -1002,7 +1035,13 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->get_ring_svc_map_data = get_ring_svc_map_data; hw_data->admin_ae_mask = ADF_4XXX_ADMIN_AE_MASK; hw_data->get_objs_num = get_objs_num; - hw_data->get_obj_name = get_obj_name; + switch (id) { + case ADF_402XX_PCI_DEVICE_ID: + hw_data->get_obj_name = get_obj_name_402xx; + break; + default: + hw_data->get_obj_name = get_obj_name_4xxx; + } hw_data->get_obj_cfg_ae_mask = get_obj_cfg_ae_mask; hw_data->get_service_type = adf_4xxx_get_service_type; hw_data->set_msix_rttable = set_msix_default_rttable; @@ -1022,15 +1061,6 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->query_storage_cap = 1; hw_data->ring_pair_reset = adf_gen4_ring_pair_reset; - switch (id) { - case ADF_401XX_PCI_DEVICE_ID: - hw_data->asym_ae_active_thd_mask = DEFAULT_401XX_ASYM_AE_MASK; - break; - case ADF_4XXX_PCI_DEVICE_ID: - default: - hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; - } - adf_gen4_init_hw_csr_info(&hw_data->csr_info); adf_gen4_init_pf_pfvf_ops(&hw_data->csr_info.pfvf_ops); } diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h index c35ebbcadcd7..fa7249dca596 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h @@ -87,6 +87,12 @@ #define ADF_4XXX_SYM_OBJ "qat_4xxx_sym.bin" #define ADF_4XXX_ASYM_OBJ "qat_4xxx_asym.bin" #define ADF_4XXX_ADMIN_OBJ "qat_4xxx_admin.bin" +#define ADF_402XX_FW "qat_402xx_fw" +#define ADF_402XX_MMP "qat_402xx_mmp_fw" +#define ADF_402XX_DC_OBJ "qat_402xx_dc.bin" +#define ADF_402XX_SYM_OBJ "qat_402xx_sym.bin" +#define ADF_402XX_ASYM_OBJ "qat_402xx_asym.bin" +#define ADF_402XX_ADMIN_OBJ "qat_402xx_admin.bin" /* Only 3 types of images can be loaded including the admin image */ #define ADF_4XXX_MAX_OBJ 3 diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c index cb534dd03b86..f9ad39fa45f0 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c @@ -22,12 +22,14 @@ static MALLOC_DEFINE(M_QAT_4XXX, "qat_4xxx", "qat_4xxx"); PCI_VENDOR_ID_INTEL, device_id \ } -static const struct pci_device_id adf_pci_tbl[] = - { ADF_SYSTEM_DEVICE(ADF_4XXX_PCI_DEVICE_ID), - ADF_SYSTEM_DEVICE(ADF_401XX_PCI_DEVICE_ID), - { - 0, - } }; +static const struct pci_device_id adf_pci_tbl[] = { + ADF_SYSTEM_DEVICE(ADF_4XXX_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_401XX_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_402XX_PCI_DEVICE_ID), + { + 0, + } +}; static int adf_probe(device_t dev) @@ -135,6 +137,7 @@ adf_cleanup_accel(struct adf_accel_dev *accel_dev) switch (pci_get_device(accel_pci_dev->pci_dev)) { case ADF_4XXX_PCI_DEVICE_ID: case ADF_401XX_PCI_DEVICE_ID: + case ADF_402XX_PCI_DEVICE_ID: adf_clean_hw_data_4xxx(accel_dev->hw_device); break; default: diff --git a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c index 2bbccb4d6b17..dbe40835ccbf 100644 --- a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c @@ -22,12 +22,14 @@ static MALLOC_DEFINE(M_QAT_4XXXVF, "qat_4xxxvf", "qat_4xxxvf"); PCI_VENDOR_ID_INTEL, device_id \ } -static const struct pci_device_id adf_pci_tbl[] = - { ADF_SYSTEM_DEVICE(ADF_4XXXIOV_PCI_DEVICE_ID), - ADF_SYSTEM_DEVICE(ADF_401XXIOV_PCI_DEVICE_ID), - { - 0, - } }; +static const struct pci_device_id adf_pci_tbl[] = { + ADF_SYSTEM_DEVICE(ADF_4XXXIOV_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_401XXIOV_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_402XXIOV_PCI_DEVICE_ID), + { + 0, + } +}; static int adf_probe(device_t dev) @@ -76,6 +78,7 @@ adf_cleanup_accel(struct adf_accel_dev *accel_dev) switch (pci_get_device(accel_pci_dev->pci_dev)) { case ADF_4XXXIOV_PCI_DEVICE_ID: case ADF_401XXIOV_PCI_DEVICE_ID: + case ADF_402XXIOV_PCI_DEVICE_ID: adf_clean_hw_data_4xxxiov(accel_dev->hw_device); break; default: diff --git a/sys/modules/qatfw/qat_4xxx/Makefile b/sys/modules/qatfw/qat_4xxx/Makefile index fb7171bcaf45..f6f19d6cbe32 100644 --- a/sys/modules/qatfw/qat_4xxx/Makefile +++ b/sys/modules/qatfw/qat_4xxx/Makefile @@ -4,6 +4,9 @@ KMOD= qat_4xxx_fw -FIRMWS= qat_4xxx.bin:qat_4xxx_fw:111 qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111 +FIRMWS= qat_4xxx.bin:qat_4xxx_fw:111 \ + qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111 \ + qat_402xx.bin:qat_402xx_fw:111 \ + qat_402xx_mmp.bin:qat_402xx_mmp_fw:111 .include From nobody Wed Oct 15 13:26:10 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsKv0N0Lz6CNwN; Wed, 15 Oct 2025 13:26: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 4cmsKt5Vqhz3K9g; Wed, 15 Oct 2025 13:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WlZ/3hghYAZ1TRK/+yOKEu9RySNNV/kyEwUAicytNg=; b=XVnQSrPzBLX42Ij10PCsOSRAEjjelY1EF7D4xgj6hooK+Dud9yph0Oo9b2aLgjGmldb57x 8gmo2UfQQbIhImrDgVdgRoh7gFOCfcUidwk7T8VK64j+AV5RwhVsMhaBenFNHO8sFPV7pE xYV6kfrPqHfw6/0oTPT5WPK2Qg7XUinoPxzgd7kq3lhv07N4saWOOca2rSPayNAYZVL0ru VxgSVV3YL7Df0Hkqe7p2Rv2mvNUlCti/y0T1HuBeobw+4S7oIBN0cHPHzMKUl2CoLMW5x9 Sry/drYibiCs22xzlwFLQrWoIHhzYR6H01BgCSClxQllPXQry1PqxV3dGUHB0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WlZ/3hghYAZ1TRK/+yOKEu9RySNNV/kyEwUAicytNg=; b=mQCdOYKMjk8KPSUrZYu+vnCNekQoMIdP4GMp6pwzEgD9SyWNfKrlxsu/A7MATlUXXkgfvr T3FhagMK0s9oS6Je4bJggrcq5n3/3CsppjfJv8FpXstSc9IFFugkwKyMY42PdoaoTJkI2b gBstU6KHilKGH4GNEyJTF9p7Kq1aRUKAMNof0heyoc2fL/CZc7WYffaG+SG5GUJ/jPr3va ho1C7FFKuDcI9vTxZzOqgSdUmyHsC+GAe+bCVJxVQ+DXFLsfstJ5UelI9Byx1mGQCeU8qy lP7luaJwzvMK/BTBJ7cDdrLfPlG3iuOnKw40BIDCSooeSlvumjERv8mh24Y2WQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534770; a=rsa-sha256; cv=none; b=ykvUj1UMoAL+hGFCh0qeu6vbLeFbmqN0X6olJHHf9T3uL9WpQiFB9jApttN6xylSYZ9Bop Zvn8GTUbalQgY0nCpczGn83J7dMGF+zsNMkdmsg4gSzi6FlSUp9Ver7g2Fjg2SkGY8MvyE lB20bNvRhXWFR4GVYz0NeqdRvW3Hoznt82hQgbglveKdXN5ekAOFotc4Dhs3R5GlO7VEfS 2VRCg/Y2P/8dqBFR7MWNNFeOljN0MsBLcGCJ/XxtCu69QL3SNaGCBWu1wwww3jUS989Add anATCE5kxA+hvRmLb0jRM2dsY3hOGMzpPuo6OiS8G6rG3362R7oNPqR64dr+WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmsKt4l4jzgdd; Wed, 15 Oct 2025 13:26: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 59FDQAgE050755; Wed, 15 Oct 2025 13:26:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQA8V050752; Wed, 15 Oct 2025 13:26:10 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:10 GMT Message-Id: <202510151326.59FDQA8V050752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d2d987b67919 - stable/14 - cryptocheck: Be friendlier when testing software crypto backends List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d2d987b67919044955d851a5072d1b74131bf39f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d2d987b67919044955d851a5072d1b74131bf39f commit d2d987b67919044955d851a5072d1b74131bf39f Author: Mark Johnston AuthorDate: 2025-10-08 15:24:12 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:25:18 +0000 cryptocheck: Be friendlier when testing software crypto backends - Fail loudly if we can't change the kern.crypto.allow_soft sysctl. - Add more drivers to the list. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52490 (cherry picked from commit e63bf6aa523eb9a865b7ce34d01e75a13818b367) --- tools/tools/crypto/cryptocheck.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index 6506671455ac..46a364b0453c 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -362,9 +362,11 @@ enable_user_soft(void) size_t cursize = sizeof(curstate); if (sysctlbyname(CRYPT_SOFT_ALLOW, &curstate, &cursize, - &on, sizeof(on)) == 0) { + &on, sizeof(on)) == 0) { if (curstate == 0) atexit(reset_user_soft); + } else { + err(1, "sysctl(%s)", CRYPT_SOFT_ALLOW); } } @@ -373,7 +375,10 @@ crlookup(const char *devname) { struct crypt_find_op find; - if (strncmp(devname, "soft", 4) == 0) { + if (strncmp(devname, "soft", 4) == 0 || + strncmp(devname, "ossl", 4) == 0 || + strncmp(devname, "aesni", 5) == 0 || + strncmp(devname, "armv8crypto", 11) == 0) { enable_user_soft(); return CRYPTO_FLAG_SOFTWARE; } From nobody Wed Oct 15 13:26:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsLP39mJz6CNlQ; Wed, 15 Oct 2025 13:26:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmsLP2WjMz3KmS; Wed, 15 Oct 2025 13:26:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SmgigluXds5tc67JJ9/2IWQc+CPHejpO/NmgEFvr0rQ=; b=nsJuxQB/EXSTeo9ThYF3cDOxyyfymUxEecDUmTFsTaKvxsUlFUI+R3uBpiQEtWQp8VGSRJ 990MK6XHXCpQDlHF34KiWL5sEAGQcz8wu21ACMgs9LgEs9qvJcSNeYD0S6L4LIbKBwhAb0 m4kn2wtVy6Y5HsgII9XUGpAIsF2hiCeTVbgrS4cRJ0dyRjkJ6ErweDMncsnAgd9sl66wtz pVKV5g6N7bwjXCrBa5JbOiJCi6PdjzFyMXIw3Ix4uo6S8G3BZ+AhPYP+eHdKff50R5x1jA GUsGV1CmOdYTAMXRYUiGqrAlieRiqffZ4MG8/AeFr6BfWB3SlpOC7/XNB4nidQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SmgigluXds5tc67JJ9/2IWQc+CPHejpO/NmgEFvr0rQ=; b=spdQS4Vutq9Sibk+ToWj7tJ+vgaMtr8xL6KzVTv8GOtqyY8I7Sfhl35ebi1k9fhkUhNWZm rbLsmQF43gV1q3KOguYCWL26qi4/QbIFH/oDOI05h6+NUsD/GKrGHqT4qrTeRDr75EFtf6 B+T6oM8azcBQUwVg4qZFZdixUspqc0cKH7BQTD/HcsDNQDiotT0znGWsf0C5mnkzwPrxCn wpcB4/HlhagrcQmUiLQLDZCckyBSs0WwpxZYK/PHd+HXu67MlktDyjjCWP5mXCeQ0Nlc9Z zQLZUIh8q/kNJEyZqhRZD7cEm42Uyt2bMJta8nt7EzgA7VhQbkxJJiY/L+kuXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534797; a=rsa-sha256; cv=none; b=j5qc8zJ5R2QZww987XUrcBEoVxoXrfQ13oTS88I865YI4siJZ5YU83iBpKkhXSX9aGWge7 hKNDaZfCzNhWmfQMV23p5mPYo0N7Cqfl055xkaNeq6jfdrZ1YTPFy/HoeQd//HeSulObQA 7KOnNvJ4Ox9CtHFgrOY2+Bs3t9CCdVEIcB2Mvr+hKd9669ZuT3c4/zvXWdhWQdK2G6uKnJ CjunHIUJTul3w7oN7nfKrlTkwu9+7dakg4F3eKuqVi9d7Uk81E2Vh18odbZmci6E17A3vB NAsctqiWei3Mlx77GvBaI6G8P08+5llB7+5awNNzxJq3yGMOiormNoFS5Ve/mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmsLP1z9Kzh8m; Wed, 15 Oct 2025 13:26: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 59FDQbVA051017; Wed, 15 Oct 2025 13:26:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQbws051014; Wed, 15 Oct 2025 13:26:37 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:37 GMT Message-Id: <202510151326.59FDQbws051014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8e957b78e684 - stable/15 - rc: Update dependencies for zpool scripts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8e957b78e6846c57e70d9c302c027fa02f13bb14 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8e957b78e6846c57e70d9c302c027fa02f13bb14 commit 8e957b78e6846c57e70d9c302c027fa02f13bb14 Author: Mark Johnston AuthorDate: 2025-10-08 12:50:54 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:23:03 +0000 rc: Update dependencies for zpool scripts After commit 900bc0206348, zpool depends on mountcritlocal. zpoolreguid and zpoolupgrade depend on zpool and want to run before mountcritcycle, so we have a pair of cycles. Update zpoolreguid and zpoolupgrade to avoid this. Reviewed by: des MFC after: 3 days Fixes: 900bc0206348 ("rc.d/zpool: change mountcritlocal dep from BEFORE to REQUIRE") Differential Revision: https://reviews.freebsd.org/D52953 (cherry picked from commit ae6db60ff56de5b93de9f6fee6116cbc2d4b498e) --- libexec/rc/rc.d/zpoolreguid | 2 +- libexec/rc/rc.d/zpoolupgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/zpoolreguid b/libexec/rc/rc.d/zpoolreguid index f94630d9283f..c19f52d3d702 100755 --- a/libexec/rc/rc.d/zpoolreguid +++ b/libexec/rc/rc.d/zpoolreguid @@ -2,7 +2,7 @@ # PROVIDE: zpoolreguid # REQUIRE: zpool -# BEFORE: mountcritlocal +# BEFORE: FILESYSTEMS # KEYWORD: firstboot nojail . /etc/rc.subr diff --git a/libexec/rc/rc.d/zpoolupgrade b/libexec/rc/rc.d/zpoolupgrade index 1435cba7199c..5e623a9c2bf0 100755 --- a/libexec/rc/rc.d/zpoolupgrade +++ b/libexec/rc/rc.d/zpoolupgrade @@ -2,7 +2,7 @@ # PROVIDE: zpoolupgrade # REQUIRE: zpool -# BEFORE: mountcritlocal +# BEFORE: FILESYSTEMS # KEYWORD: firstboot nojail . /etc/rc.subr From nobody Wed Oct 15 13:26:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsLQ5klcz6CP2y; Wed, 15 Oct 2025 13:26: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 4cmsLQ3H9Nz3Kts; Wed, 15 Oct 2025 13:26:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CLd7LXPB4R/80CycyhsHbJ7YUSfp6FKm6M5m21Y/elY=; b=ky5H4a9tAvSOfqDi1DLwGXHXVreV+bioK3bumIC8T9phqoXoFPSZsjjwQ6IqO0KxMWdnd8 x2L5g4xdFNbTPyU42yp9dZiJkzTBgO9vqpjV+jwrgWBk+yxicrCgGPR5SJaOgitdJ0WiZp sFONBwkYApBQTxw47emCZlr7PEaHXN8MLnbNTZRZwWF4lg2RMHQ9aqEXjTjZqU52CahqGz wxPoS89LX6Fw0XGN25E7f6/uZmsKxGWhOly+BZkUoZqBK0l3IBd/scjjhTrqmpXZ/1Kv7b hioAlnLk5b0vYVb1LVVeKmq9Ws4OiXnhTLCL5R0l/fwC70L9j5tF00vCnYCHww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CLd7LXPB4R/80CycyhsHbJ7YUSfp6FKm6M5m21Y/elY=; b=Es+hhjagWKUJ5fOXZkKDJM4owaaTQAUs8ZWZ+hXoo9FNm6ZjR8XNBXU097HkDAqmkziTN8 LuS0GnbxCbUiKl80Rrr5e/megic1aATIp7j1FVbeTHtEj03VJxcldf1OnDUWWpeavlU7/r M0ZvRt80bswXGo416hxEanHDkm4m5FEqAX2B7L9TosPOfXEK2CyDPTLulIRQ3lse/6I4QC aJv3p5fYMccs3jxeOaY/0G9aZecppdQONsxjKHMI1MgXpMjNyFltfBYJe2liflGk9BGD9U wKq13vmlQM6wWsWSF/PnG1RDzxNk/fAmm7/Vj4zEnH6oqqb3XsXnbQW53FEqWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534798; a=rsa-sha256; cv=none; b=Xfq65D/flgz0NCPMpvMTBgJKpQIWQpavsfyv1z29ZJIBIYyAqfgLKn+M/E9Rg1NT1rcz+N ywFyjgJtZ+CWGEAHBP6+nCzNQu0jgeBc1w8m2hvy6Yl3eYvzFxcIwRW2rDXBeJb/LrjI36 mmvC0s9lQi/7456LaWrqbcyluHR+fwsodkbZGS2opkRHBA/uvFdvLBO5Oma1qckLTOBswl 3fFIGisUZAQeI1O1NeW79cbEle3Vg7QNTOJXA1OSOH11waw3bAQajUoGg0gw/DbJJ7z98M 50POozsz0JlTWcU9ov9CoSLVmm0GaPvDf4F+MvPFxqZNkHlRZx4fNUC3zPcdqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmsLQ2jlbzg6L; Wed, 15 Oct 2025 13:26: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 59FDQccK051055; Wed, 15 Oct 2025 13:26:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQcLI051051; Wed, 15 Oct 2025 13:26:38 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:38 GMT Message-Id: <202510151326.59FDQcLI051051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ead69828206e - stable/15 - ossl: Add GCM support on powerpc64/powerpc64le (POWER8+) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ead69828206e01ee0cc8f9436def1ea76327377e Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ead69828206e01ee0cc8f9436def1ea76327377e commit ead69828206e01ee0cc8f9436def1ea76327377e Author: Timothy Pearson AuthorDate: 2025-09-10 16:54:24 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:23:03 +0000 ossl: Add GCM support on powerpc64/powerpc64le (POWER8+) Separate ossl's existing AES-NI GCM implementation into a common ossl_aes_gcm.c and add conditionals to switch between OpenSSL's AES-NI and POWER8 GCM routines depending on the architecture. Since the existing AVX-512 implementation is less agnostic, move it into a separate ossl_aes_gcm_avx512.c. Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44274 (cherry picked from commit 5daf8ed625af70ebb7e4740ab98a6054e9e52329) --- sys/conf/files.amd64 | 3 +- sys/conf/files.arm | 2 +- sys/conf/files.powerpc | 3 + sys/crypto/openssl/amd64/ossl_aes_gcm_avx512.c | 232 ++++++++++++ .../arm/{ossl_aes_gcm.c => ossl_aes_gcm_neon.c} | 0 sys/crypto/openssl/{amd64 => }/ossl_aes_gcm.c | 397 ++++++++------------- sys/crypto/openssl/ossl_ppc.c | 9 +- sys/crypto/openssl/ossl_x86.c | 6 +- sys/modules/ossl/Makefile | 7 +- 9 files changed, 410 insertions(+), 249 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index c12ab9db030a..a342242ac66e 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -107,7 +107,8 @@ crypto/openssl/amd64/poly1305-x86_64.S optional ossl crypto/openssl/amd64/sha1-x86_64.S optional ossl crypto/openssl/amd64/sha256-x86_64.S optional ossl crypto/openssl/amd64/sha512-x86_64.S optional ossl -crypto/openssl/amd64/ossl_aes_gcm.c optional ossl +crypto/openssl/amd64/ossl_aes_gcm_avx512.c optional ossl +crypto/openssl/ossl_aes_gcm.c optional ossl dev/amdgpio/amdgpio.c optional amdgpio dev/axgbe/if_axgbe_pci.c optional axp dev/axgbe/xgbe-desc.c optional axp diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 91b01845519e..880e804b6c95 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -132,7 +132,7 @@ libkern/udivdi3.c standard libkern/umoddi3.c standard crypto/openssl/ossl_arm.c optional ossl -crypto/openssl/arm/ossl_aes_gcm.c optional ossl +crypto/openssl/arm/ossl_aes_gcm_neon.c optional ossl crypto/openssl/arm/aes-armv4.S optional ossl \ compile-with "${NORMAL_C} -I${SRCTOP}/sys/crypto/openssl" crypto/openssl/arm/bsaes-armv7.S optional ossl \ diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index d2c3aa260cd9..0deada385f31 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -31,9 +31,11 @@ zfs-sha512-ppc.o optional zfs \ # openssl ppc common files crypto/openssl/ossl_ppc.c optional ossl powerpc64 | ossl powerpc64le +crypto/openssl/ossl_aes_gcm.c optional ossl powerpc64 | ossl powerpc64le # openssl assembly files (powerpc64le) crypto/openssl/powerpc64le/aes-ppc.S optional ossl powerpc64le +crypto/openssl/powerpc64le/aes-gcm-ppc.S optional ossl powerpc64le crypto/openssl/powerpc64le/aesp8-ppc.S optional ossl powerpc64le crypto/openssl/powerpc64le/chacha-ppc.S optional ossl powerpc64le crypto/openssl/powerpc64le/ecp_nistz256-ppc64.S optional ossl powerpc64le @@ -54,6 +56,7 @@ crypto/openssl/powerpc64le/x25519-ppc64.S optional ossl powerpc64le # openssl assembly files (powerpc64) crypto/openssl/powerpc64/aes-ppc.S optional ossl powerpc64 +crypto/openssl/powerpc64/aes-gcm-ppc.S optional ossl powerpc64 crypto/openssl/powerpc64/aesp8-ppc.S optional ossl powerpc64 crypto/openssl/powerpc64/chacha-ppc.S optional ossl powerpc64 crypto/openssl/powerpc64/ecp_nistz256-ppc64.S optional ossl powerpc64 diff --git a/sys/crypto/openssl/amd64/ossl_aes_gcm_avx512.c b/sys/crypto/openssl/amd64/ossl_aes_gcm_avx512.c new file mode 100644 index 000000000000..694ed4fc8b32 --- /dev/null +++ b/sys/crypto/openssl/amd64/ossl_aes_gcm_avx512.c @@ -0,0 +1,232 @@ +/* + * Copyright 2010-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2021, Intel Corporation. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +/* + * This file contains an AES-GCM wrapper implementation from OpenSSL, using + * VAES extensions. It was ported from cipher_aes_gcm_hw_vaes_avx512.inc. + */ + +#include +#include + +#include +#include +#include + +#include + +_Static_assert( + sizeof(struct ossl_gcm_context) <= sizeof(struct ossl_cipher_context), + "ossl_gcm_context too large"); + +void aesni_set_encrypt_key(const void *key, int bits, void *ctx); + +static void +gcm_init(struct ossl_gcm_context *ctx, const void *key, size_t keylen) +{ + KASSERT(keylen == 128 || keylen == 192 || keylen == 256, + ("%s: invalid key length %zu", __func__, keylen)); + + memset(&ctx->gcm, 0, sizeof(ctx->gcm)); + memset(&ctx->aes_ks, 0, sizeof(ctx->aes_ks)); + aesni_set_encrypt_key(key, keylen, &ctx->aes_ks); + ctx->ops->init(ctx, key, keylen); +} + +static void +gcm_tag(struct ossl_gcm_context *ctx, unsigned char *tag, size_t len) +{ + (void)ctx->ops->finish(ctx, NULL, 0); + memcpy(tag, ctx->gcm.Xi.c, len); +} + +void ossl_gcm_gmult_avx512(uint64_t Xi[2], void *gcm128ctx); +void ossl_aes_gcm_init_avx512(const void *ks, void *gcm128ctx); +void ossl_aes_gcm_setiv_avx512(const void *ks, void *gcm128ctx, + const unsigned char *iv, size_t ivlen); +void ossl_aes_gcm_update_aad_avx512(void *gcm128ctx, const unsigned char *aad, + size_t len); +void ossl_aes_gcm_encrypt_avx512(const void *ks, void *gcm128ctx, + unsigned int *pblocklen, const unsigned char *in, size_t len, + unsigned char *out); +void ossl_aes_gcm_decrypt_avx512(const void *ks, void *gcm128ctx, + unsigned int *pblocklen, const unsigned char *in, size_t len, + unsigned char *out); +void ossl_aes_gcm_finalize_avx512(void *gcm128ctx, unsigned int pblocklen); + +static void +gcm_init_avx512(struct ossl_gcm_context *ctx, const void *key, size_t keylen) +{ + ossl_aes_gcm_init_avx512(&ctx->aes_ks, &ctx->gcm); +} + +static void +gcm_setiv_avx512(struct ossl_gcm_context *ctx, const unsigned char *iv, + size_t len) +{ + KASSERT(len == AES_GCM_IV_LEN, + ("%s: invalid IV length %zu", __func__, len)); + + ctx->gcm.Yi.u[0] = 0; /* Current counter */ + ctx->gcm.Yi.u[1] = 0; + ctx->gcm.Xi.u[0] = 0; /* AAD hash */ + ctx->gcm.Xi.u[1] = 0; + ctx->gcm.len.u[0] = 0; /* AAD length */ + ctx->gcm.len.u[1] = 0; /* Message length */ + ctx->gcm.ares = 0; + ctx->gcm.mres = 0; + + ossl_aes_gcm_setiv_avx512(&ctx->aes_ks, ctx, iv, len); +} + +static int +gcm_aad_avx512(struct ossl_gcm_context *ctx, const unsigned char *aad, + size_t len) +{ + uint64_t alen = ctx->gcm.len.u[0]; + size_t lenblks; + unsigned int ares; + + /* Bad sequence: call of AAD update after message processing */ + if (ctx->gcm.len.u[1]) + return -2; + + alen += len; + /* AAD is limited by 2^64 bits, thus 2^61 bytes */ + if (alen > (1ull << 61) || (sizeof(len) == 8 && alen < len)) + return -1; + ctx->gcm.len.u[0] = alen; + + ares = ctx->gcm.ares; + /* Partial AAD block left from previous AAD update calls */ + if (ares > 0) { + /* + * Fill partial block buffer till full block + * (note, the hash is stored reflected) + */ + while (ares > 0 && len > 0) { + ctx->gcm.Xi.c[15 - ares] ^= *(aad++); + --len; + ares = (ares + 1) % AES_BLOCK_LEN; + } + /* Full block gathered */ + if (ares == 0) { + ossl_gcm_gmult_avx512(ctx->gcm.Xi.u, ctx); + } else { /* no more AAD */ + ctx->gcm.ares = ares; + return 0; + } + } + + /* Bulk AAD processing */ + lenblks = len & ((size_t)(-AES_BLOCK_LEN)); + if (lenblks > 0) { + ossl_aes_gcm_update_aad_avx512(ctx, aad, lenblks); + aad += lenblks; + len -= lenblks; + } + + /* Add remaining AAD to the hash (note, the hash is stored reflected) */ + if (len > 0) { + ares = (unsigned int)len; + for (size_t i = 0; i < len; ++i) + ctx->gcm.Xi.c[15 - i] ^= aad[i]; + } + + ctx->gcm.ares = ares; + + return 0; +} + +static int +_gcm_encrypt_avx512(struct ossl_gcm_context *ctx, const unsigned char *in, + unsigned char *out, size_t len, bool encrypt) +{ + uint64_t mlen = ctx->gcm.len.u[1]; + + mlen += len; + if (mlen > ((1ull << 36) - 32) || (sizeof(len) == 8 && mlen < len)) + return -1; + + ctx->gcm.len.u[1] = mlen; + + /* Finalize GHASH(AAD) if AAD partial blocks left unprocessed */ + if (ctx->gcm.ares > 0) { + ossl_gcm_gmult_avx512(ctx->gcm.Xi.u, ctx); + ctx->gcm.ares = 0; + } + + if (encrypt) { + ossl_aes_gcm_encrypt_avx512(&ctx->aes_ks, ctx, &ctx->gcm.mres, + in, len, out); + } else { + ossl_aes_gcm_decrypt_avx512(&ctx->aes_ks, ctx, &ctx->gcm.mres, + in, len, out); + } + + return 0; +} + +static int +gcm_encrypt_avx512(struct ossl_gcm_context *ctx, const unsigned char *in, + unsigned char *out, size_t len) +{ + return _gcm_encrypt_avx512(ctx, in, out, len, true); +} + +static int +gcm_decrypt_avx512(struct ossl_gcm_context *ctx, const unsigned char *in, + unsigned char *out, size_t len) +{ + return _gcm_encrypt_avx512(ctx, in, out, len, false); +} + +static int +gcm_finish_avx512(struct ossl_gcm_context *ctx, const unsigned char *tag, + size_t len) +{ + unsigned int *res = &ctx->gcm.mres; + + /* Finalize AAD processing */ + if (ctx->gcm.ares > 0) + res = &ctx->gcm.ares; + + ossl_aes_gcm_finalize_avx512(ctx, *res); + + ctx->gcm.ares = ctx->gcm.mres = 0; + + if (tag != NULL) + return timingsafe_bcmp(ctx->gcm.Xi.c, tag, len); + return 0; +} + +static const struct ossl_aes_gcm_ops gcm_ops_avx512 = { + .init = gcm_init_avx512, + .setiv = gcm_setiv_avx512, + .aad = gcm_aad_avx512, + .encrypt = gcm_encrypt_avx512, + .decrypt = gcm_decrypt_avx512, + .finish = gcm_finish_avx512, + .tag = gcm_tag, +}; + +int ossl_aes_gcm_setkey_avx512(const unsigned char *key, int klen, void *_ctx); + +int +ossl_aes_gcm_setkey_avx512(const unsigned char *key, int klen, + void *_ctx) +{ + struct ossl_gcm_context *ctx; + + ctx = _ctx; + ctx->ops = &gcm_ops_avx512; + gcm_init(ctx, key, klen); + return (0); +} diff --git a/sys/crypto/openssl/arm/ossl_aes_gcm.c b/sys/crypto/openssl/arm/ossl_aes_gcm_neon.c similarity index 100% rename from sys/crypto/openssl/arm/ossl_aes_gcm.c rename to sys/crypto/openssl/arm/ossl_aes_gcm_neon.c diff --git a/sys/crypto/openssl/amd64/ossl_aes_gcm.c b/sys/crypto/openssl/ossl_aes_gcm.c similarity index 52% rename from sys/crypto/openssl/amd64/ossl_aes_gcm.c rename to sys/crypto/openssl/ossl_aes_gcm.c index d08b2ac8a759..e1cdc710c3aa 100644 --- a/sys/crypto/openssl/amd64/ossl_aes_gcm.c +++ b/sys/crypto/openssl/ossl_aes_gcm.c @@ -1,6 +1,7 @@ /* * Copyright 2010-2022 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2021, Intel Corporation. All Rights Reserved. + * Copyright (c) 2023, Raptor Engineering, LLC. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -9,11 +10,10 @@ */ /* - * This file contains 2 AES-GCM wrapper implementations from OpenSSL, using - * AES-NI and VAES extensions respectively. These were ported from - * cipher_aes_gcm_hw_aesni.inc and cipher_aes_gcm_hw_vaes_avx512.inc. The - * AES-NI implementation makes use of a generic C implementation for partial - * blocks, ported from gcm128.c with OPENSSL_SMALL_FOOTPRINT defined. + * This file contains an AES-GCM wrapper implementation from OpenSSL, using + * AES-NI (x86) or POWER8 Crypto Extensions (ppc). It was ported from + * cipher_aes_gcm_hw_aesni.inc and it makes use of a generic C implementation + * for partial blocks, ported from gcm128.c with OPENSSL_SMALL_FOOTPRINT defined. */ #include @@ -29,225 +29,152 @@ _Static_assert( sizeof(struct ossl_gcm_context) <= sizeof(struct ossl_cipher_context), "ossl_gcm_context too large"); -void aesni_set_encrypt_key(const void *key, int bits, void *ctx); - -static void -gcm_init(struct ossl_gcm_context *ctx, const void *key, size_t keylen) -{ - KASSERT(keylen == 128 || keylen == 192 || keylen == 256, - ("%s: invalid key length %zu", __func__, keylen)); - - memset(&ctx->gcm, 0, sizeof(ctx->gcm)); - memset(&ctx->aes_ks, 0, sizeof(ctx->aes_ks)); - aesni_set_encrypt_key(key, keylen, &ctx->aes_ks); - ctx->ops->init(ctx, key, keylen); -} - -static void -gcm_tag(struct ossl_gcm_context *ctx, unsigned char *tag, size_t len) -{ - (void)ctx->ops->finish(ctx, NULL, 0); - memcpy(tag, ctx->gcm.Xi.c, len); -} +#if defined(__amd64__) || defined(__i386__) +#define AES_set_encrypt_key aesni_set_encrypt_key +#define AES_gcm_encrypt aesni_gcm_encrypt +#define AES_gcm_decrypt aesni_gcm_decrypt +#define AES_encrypt aesni_encrypt +#define AES_ctr32_encrypt_blocks aesni_ctr32_encrypt_blocks +#define GCM_init gcm_init_avx +#define GCM_gmult gcm_gmult_avx +#define GCM_ghash gcm_ghash_avx + +void AES_set_encrypt_key(const void *key, int bits, void *ctx); +size_t AES_gcm_encrypt(const unsigned char *in, unsigned char *out, size_t len, + const void *key, unsigned char ivec[16], uint64_t *Xi); +size_t AES_gcm_decrypt(const unsigned char *in, unsigned char *out, size_t len, + const void *key, unsigned char ivec[16], uint64_t *Xi); +void AES_encrypt(const unsigned char *in, unsigned char *out, void *ks); +void AES_ctr32_encrypt_blocks(const unsigned char *in, unsigned char *out, + size_t blocks, void *ks, const unsigned char *iv); -void ossl_gcm_gmult_avx512(uint64_t Xi[2], void *gcm128ctx); -void ossl_aes_gcm_init_avx512(const void *ks, void *gcm128ctx); -void ossl_aes_gcm_setiv_avx512(const void *ks, void *gcm128ctx, - const unsigned char *iv, size_t ivlen); -void ossl_aes_gcm_update_aad_avx512(void *gcm128ctx, const unsigned char *aad, +void GCM_init(__uint128_t Htable[16], uint64_t Xi[2]); +void GCM_gmult(uint64_t Xi[2], const __uint128_t Htable[16]); +void GCM_ghash(uint64_t Xi[2], const __uint128_t Htable[16], const void *in, size_t len); -void ossl_aes_gcm_encrypt_avx512(const void *ks, void *gcm128ctx, - unsigned int *pblocklen, const unsigned char *in, size_t len, - unsigned char *out); -void ossl_aes_gcm_decrypt_avx512(const void *ks, void *gcm128ctx, - unsigned int *pblocklen, const unsigned char *in, size_t len, - unsigned char *out); -void ossl_aes_gcm_finalize_avx512(void *gcm128ctx, unsigned int pblocklen); - -static void -gcm_init_avx512(struct ossl_gcm_context *ctx, const void *key, size_t keylen) -{ - ossl_aes_gcm_init_avx512(&ctx->aes_ks, &ctx->gcm); -} -static void -gcm_setiv_avx512(struct ossl_gcm_context *ctx, const unsigned char *iv, - size_t len) -{ - KASSERT(len == AES_GCM_IV_LEN, - ("%s: invalid IV length %zu", __func__, len)); +#elif defined(__powerpc64__) +#define AES_set_encrypt_key aes_p8_set_encrypt_key +#define AES_gcm_encrypt(i,o,l,k,v,x) ppc_aes_gcm_crypt(i,o,l,k,v,x,1) +#define AES_gcm_decrypt(i,o,l,k,v,x) ppc_aes_gcm_crypt(i,o,l,k,v,x,0) +#define AES_encrypt aes_p8_encrypt +#define AES_ctr32_encrypt_blocks aes_p8_ctr32_encrypt_blocks +#define GCM_init gcm_init_p8 +#define GCM_gmult gcm_gmult_p8 +#define GCM_ghash gcm_ghash_p8 + +size_t ppc_aes_gcm_encrypt(const unsigned char *in, unsigned char *out, size_t len, + const void *key, unsigned char ivec[16], uint64_t *Xi); +size_t ppc_aes_gcm_decrypt(const unsigned char *in, unsigned char *out, size_t len, + const void *key, unsigned char ivec[16], uint64_t *Xi); - ctx->gcm.Yi.u[0] = 0; /* Current counter */ - ctx->gcm.Yi.u[1] = 0; - ctx->gcm.Xi.u[0] = 0; /* AAD hash */ - ctx->gcm.Xi.u[1] = 0; - ctx->gcm.len.u[0] = 0; /* AAD length */ - ctx->gcm.len.u[1] = 0; /* Message length */ - ctx->gcm.ares = 0; - ctx->gcm.mres = 0; +void AES_set_encrypt_key(const void *key, int bits, void *ctx); +void AES_encrypt(const unsigned char *in, unsigned char *out, void *ks); +void AES_ctr32_encrypt_blocks(const unsigned char *in, unsigned char *out, + size_t blocks, void *ks, const unsigned char *iv); - ossl_aes_gcm_setiv_avx512(&ctx->aes_ks, ctx, iv, len); -} +void GCM_init(__uint128_t Htable[16], uint64_t Xi[2]); +void GCM_gmult(uint64_t Xi[2], const __uint128_t Htable[16]); +void GCM_ghash(uint64_t Xi[2], const __uint128_t Htable[16], const void *in, + size_t len); -static int -gcm_aad_avx512(struct ossl_gcm_context *ctx, const unsigned char *aad, - size_t len) +static size_t +ppc_aes_gcm_crypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, unsigned char ivec_[16], uint64_t *Xi, + int encrypt) { - uint64_t alen = ctx->gcm.len.u[0]; - size_t lenblks; - unsigned int ares; - - /* Bad sequence: call of AAD update after message processing */ - if (ctx->gcm.len.u[1]) - return -2; - - alen += len; - /* AAD is limited by 2^64 bits, thus 2^61 bytes */ - if (alen > (1ull << 61) || (sizeof(len) == 8 && alen < len)) - return -1; - ctx->gcm.len.u[0] = alen; + union { + uint32_t d[4]; + uint8_t c[16]; + } *ivec = (void *)ivec_; + int s = 0; + int ndone = 0; + int ctr_reset = 0; + uint32_t ivec_val; + uint64_t blocks_unused; + uint64_t nb = len / 16; + uint64_t next_ctr = 0; + unsigned char ctr_saved[12]; + + memcpy(ctr_saved, ivec, 12); + + while (nb) { + ivec_val = ivec->d[3]; +#if BYTE_ORDER == LITTLE_ENDIAN + ivec_val = bswap32(ivec_val); +#endif - ares = ctx->gcm.ares; - /* Partial AAD block left from previous AAD update calls */ - if (ares > 0) { - /* - * Fill partial block buffer till full block - * (note, the hash is stored reflected) - */ - while (ares > 0 && len > 0) { - ctx->gcm.Xi.c[15 - ares] ^= *(aad++); - --len; - ares = (ares + 1) % AES_BLOCK_LEN; - } - /* Full block gathered */ - if (ares == 0) { - ossl_gcm_gmult_avx512(ctx->gcm.Xi.u, ctx); - } else { /* no more AAD */ - ctx->gcm.ares = ares; - return 0; + blocks_unused = (uint64_t)0xffffffffU + 1 - (uint64_t)ivec_val; + if (nb > blocks_unused) { + len = blocks_unused * 16; + nb -= blocks_unused; + next_ctr = blocks_unused; + ctr_reset = 1; + } else { + len = nb * 16; + next_ctr = nb; + nb = 0; } - } - /* Bulk AAD processing */ - lenblks = len & ((size_t)(-AES_BLOCK_LEN)); - if (lenblks > 0) { - ossl_aes_gcm_update_aad_avx512(ctx, aad, lenblks); - aad += lenblks; - len -= lenblks; - } + s = encrypt ? ppc_aes_gcm_encrypt(in, out, len, key, ivec->c, Xi) : + ppc_aes_gcm_decrypt(in, out, len, key, ivec->c, Xi); - /* Add remaining AAD to the hash (note, the hash is stored reflected) */ - if (len > 0) { - ares = (unsigned int)len; - for (size_t i = 0; i < len; ++i) - ctx->gcm.Xi.c[15 - i] ^= aad[i]; + /* add counter to ivec */ +#if BYTE_ORDER == LITTLE_ENDIAN + ivec->d[3] = bswap32(ivec_val + next_ctr); +#else + ivec->d[3] += next_ctr; +#endif + if (ctr_reset) { + ctr_reset = 0; + in += len; + out += len; + } + memcpy(ivec, ctr_saved, 12); + ndone += s; } - ctx->gcm.ares = ares; - - return 0; + return ndone; } -static int -_gcm_encrypt_avx512(struct ossl_gcm_context *ctx, const unsigned char *in, - unsigned char *out, size_t len, bool encrypt) -{ - uint64_t mlen = ctx->gcm.len.u[1]; - - mlen += len; - if (mlen > ((1ull << 36) - 32) || (sizeof(len) == 8 && mlen < len)) - return -1; - - ctx->gcm.len.u[1] = mlen; - - /* Finalize GHASH(AAD) if AAD partial blocks left unprocessed */ - if (ctx->gcm.ares > 0) { - ossl_gcm_gmult_avx512(ctx->gcm.Xi.u, ctx); - ctx->gcm.ares = 0; - } - - if (encrypt) { - ossl_aes_gcm_encrypt_avx512(&ctx->aes_ks, ctx, &ctx->gcm.mres, - in, len, out); - } else { - ossl_aes_gcm_decrypt_avx512(&ctx->aes_ks, ctx, &ctx->gcm.mres, - in, len, out); - } - - return 0; -} +#else +#error "Unsupported architecture!" +#endif -static int -gcm_encrypt_avx512(struct ossl_gcm_context *ctx, const unsigned char *in, - unsigned char *out, size_t len) +static void +gcm_init(struct ossl_gcm_context *ctx, const void *key, size_t keylen) { - return _gcm_encrypt_avx512(ctx, in, out, len, true); -} + KASSERT(keylen == 128 || keylen == 192 || keylen == 256, + ("%s: invalid key length %zu", __func__, keylen)); -static int -gcm_decrypt_avx512(struct ossl_gcm_context *ctx, const unsigned char *in, - unsigned char *out, size_t len) -{ - return _gcm_encrypt_avx512(ctx, in, out, len, false); + memset(&ctx->gcm, 0, sizeof(ctx->gcm)); + memset(&ctx->aes_ks, 0, sizeof(ctx->aes_ks)); + AES_set_encrypt_key(key, keylen, &ctx->aes_ks); + ctx->ops->init(ctx, key, keylen); } -static int -gcm_finish_avx512(struct ossl_gcm_context *ctx, const unsigned char *tag, - size_t len) +static void +gcm_tag_op(struct ossl_gcm_context *ctx, unsigned char *tag, size_t len) { - unsigned int *res = &ctx->gcm.mres; - - /* Finalize AAD processing */ - if (ctx->gcm.ares > 0) - res = &ctx->gcm.ares; - - ossl_aes_gcm_finalize_avx512(ctx, *res); - - ctx->gcm.ares = ctx->gcm.mres = 0; - - if (tag != NULL) - return timingsafe_bcmp(ctx->gcm.Xi.c, tag, len); - return 0; + (void)ctx->ops->finish(ctx, NULL, 0); + memcpy(tag, ctx->gcm.Xi.c, len); } -static const struct ossl_aes_gcm_ops gcm_ops_avx512 = { - .init = gcm_init_avx512, - .setiv = gcm_setiv_avx512, - .aad = gcm_aad_avx512, - .encrypt = gcm_encrypt_avx512, - .decrypt = gcm_decrypt_avx512, - .finish = gcm_finish_avx512, - .tag = gcm_tag, -}; - -size_t aesni_gcm_encrypt(const unsigned char *in, unsigned char *out, size_t len, - const void *key, unsigned char ivec[16], uint64_t *Xi); -size_t aesni_gcm_decrypt(const unsigned char *in, unsigned char *out, size_t len, - const void *key, unsigned char ivec[16], uint64_t *Xi); -void aesni_encrypt(const unsigned char *in, unsigned char *out, void *ks); -void aesni_ctr32_encrypt_blocks(const unsigned char *in, unsigned char *out, - size_t blocks, void *ks, const unsigned char *iv); - -void gcm_init_avx(__uint128_t Htable[16], uint64_t Xi[2]); -void gcm_gmult_avx(uint64_t Xi[2], const __uint128_t Htable[16]); -void gcm_ghash_avx(uint64_t Xi[2], const __uint128_t Htable[16], const void *in, - size_t len); - static void -gcm_init_aesni(struct ossl_gcm_context *ctx, const void *key, size_t keylen) +gcm_init_op(struct ossl_gcm_context *ctx, const void *key, size_t keylen) { - aesni_encrypt(ctx->gcm.H.c, ctx->gcm.H.c, &ctx->aes_ks); + AES_encrypt(ctx->gcm.H.c, ctx->gcm.H.c, &ctx->aes_ks); #if BYTE_ORDER == LITTLE_ENDIAN ctx->gcm.H.u[0] = bswap64(ctx->gcm.H.u[0]); ctx->gcm.H.u[1] = bswap64(ctx->gcm.H.u[1]); #endif - gcm_init_avx(ctx->gcm.Htable, ctx->gcm.H.u); + GCM_init(ctx->gcm.Htable, ctx->gcm.H.u); } static void -gcm_setiv_aesni(struct ossl_gcm_context *ctx, const unsigned char *iv, +gcm_setiv_op(struct ossl_gcm_context *ctx, const unsigned char *iv, size_t len) { uint32_t ctr; @@ -269,7 +196,7 @@ gcm_setiv_aesni(struct ossl_gcm_context *ctx, const unsigned char *iv, ctx->gcm.Xi.u[0] = 0; ctx->gcm.Xi.u[1] = 0; - aesni_encrypt(ctx->gcm.Yi.c, ctx->gcm.EK0.c, &ctx->aes_ks); + AES_encrypt(ctx->gcm.Yi.c, ctx->gcm.EK0.c, &ctx->aes_ks); ctr++; #if BYTE_ORDER == LITTLE_ENDIAN @@ -280,7 +207,7 @@ gcm_setiv_aesni(struct ossl_gcm_context *ctx, const unsigned char *iv, } static int -gcm_aad_aesni(struct ossl_gcm_context *ctx, const unsigned char *aad, +gcm_aad_op(struct ossl_gcm_context *ctx, const unsigned char *aad, size_t len) { size_t i; @@ -303,14 +230,14 @@ gcm_aad_aesni(struct ossl_gcm_context *ctx, const unsigned char *aad, n = (n + 1) % 16; } if (n == 0) - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); else { ctx->gcm.ares = n; return 0; } } if ((i = (len & (size_t)-AES_BLOCK_LEN))) { - gcm_ghash_avx(ctx->gcm.Xi.u, ctx->gcm.Htable, aad, i); + GCM_ghash(ctx->gcm.Xi.u, ctx->gcm.Htable, aad, i); aad += i; len -= i; } @@ -341,7 +268,7 @@ gcm_encrypt(struct ossl_gcm_context *ctx, const unsigned char *in, if (ctx->gcm.ares) { /* First call to encrypt finalizes GHASH(AAD) */ - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); ctx->gcm.ares = 0; } @@ -354,7 +281,7 @@ gcm_encrypt(struct ossl_gcm_context *ctx, const unsigned char *in, n = mres % 16; for (i = 0; i < len; ++i) { if (n == 0) { - aesni_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, + AES_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, &ctx->aes_ks); ++ctr; #if BYTE_ORDER == LITTLE_ENDIAN @@ -366,7 +293,7 @@ gcm_encrypt(struct ossl_gcm_context *ctx, const unsigned char *in, ctx->gcm.Xi.c[n] ^= out[i] = in[i] ^ ctx->gcm.EKi.c[n]; mres = n = (n + 1) % 16; if (n == 0) - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); } ctx->gcm.mres = mres; @@ -390,7 +317,7 @@ gcm_encrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, if (ctx->gcm.ares) { /* First call to encrypt finalizes GHASH(AAD) */ - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); ctx->gcm.ares = 0; } @@ -408,7 +335,7 @@ gcm_encrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, n = (n + 1) % 16; } if (n == 0) { - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); mres = 0; } else { ctx->gcm.mres = n; @@ -418,7 +345,7 @@ gcm_encrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, if ((i = (len & (size_t)-16))) { size_t j = i / 16; - aesni_ctr32_encrypt_blocks(in, out, j, &ctx->aes_ks, ctx->gcm.Yi.c); + AES_ctr32_encrypt_blocks(in, out, j, &ctx->aes_ks, ctx->gcm.Yi.c); ctr += (unsigned int)j; #if BYTE_ORDER == LITTLE_ENDIAN ctx->gcm.Yi.d[3] = bswap32(ctr); @@ -430,12 +357,12 @@ gcm_encrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, while (j--) { for (i = 0; i < 16; ++i) ctx->gcm.Xi.c[i] ^= out[i]; - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); out += 16; } } if (len) { - aesni_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, &ctx->aes_ks); + AES_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, &ctx->aes_ks); ++ctr; #if BYTE_ORDER == LITTLE_ENDIAN ctx->gcm.Yi.d[3] = bswap32(ctr); @@ -453,7 +380,7 @@ gcm_encrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, } static int -gcm_encrypt_aesni(struct ossl_gcm_context *ctx, const unsigned char *in, +gcm_encrypt_op(struct ossl_gcm_context *ctx, const unsigned char *in, unsigned char *out, size_t len) { size_t bulk = 0, res; @@ -463,7 +390,7 @@ gcm_encrypt_aesni(struct ossl_gcm_context *ctx, const unsigned char *in, if ((error = gcm_encrypt(ctx, in, out, res)) != 0) return error; - bulk = aesni_gcm_encrypt(in + res, out + res, len - res, + bulk = AES_gcm_encrypt(in + res, out + res, len - res, &ctx->aes_ks, ctx->gcm.Yi.c, ctx->gcm.Xi.u); ctx->gcm.len.u[1] += bulk; bulk += res; @@ -492,7 +419,7 @@ gcm_decrypt(struct ossl_gcm_context *ctx, const unsigned char *in, if (ctx->gcm.ares) { /* First call to encrypt finalizes GHASH(AAD) */ - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); ctx->gcm.ares = 0; } @@ -506,7 +433,7 @@ gcm_decrypt(struct ossl_gcm_context *ctx, const unsigned char *in, for (i = 0; i < len; ++i) { uint8_t c; if (n == 0) { - aesni_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, + AES_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, &ctx->aes_ks); ++ctr; #if BYTE_ORDER == LITTLE_ENDIAN @@ -520,7 +447,7 @@ gcm_decrypt(struct ossl_gcm_context *ctx, const unsigned char *in, ctx->gcm.Xi.c[n] ^= c; mres = n = (n + 1) % 16; if (n == 0) - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); } ctx->gcm.mres = mres; @@ -544,7 +471,7 @@ gcm_decrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, if (ctx->gcm.ares) { /* First call to decrypt finalizes GHASH(AAD) */ - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); ctx->gcm.ares = 0; } @@ -564,7 +491,7 @@ gcm_decrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, n = (n + 1) % 16; } if (n == 0) { - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); mres = 0; } else { ctx->gcm.mres = n; @@ -578,12 +505,12 @@ gcm_decrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, size_t k; for (k = 0; k < 16; ++k) ctx->gcm.Xi.c[k] ^= in[k]; - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); in += 16; } j = i / 16; in -= i; - aesni_ctr32_encrypt_blocks(in, out, j, &ctx->aes_ks, ctx->gcm.Yi.c); + AES_ctr32_encrypt_blocks(in, out, j, &ctx->aes_ks, ctx->gcm.Yi.c); ctr += (unsigned int)j; #if BYTE_ORDER == LITTLE_ENDIAN ctx->gcm.Yi.d[3] = bswap32(ctr); @@ -595,7 +522,7 @@ gcm_decrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, len -= i; } if (len) { - aesni_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, &ctx->aes_ks); + AES_encrypt(ctx->gcm.Yi.c, ctx->gcm.EKi.c, &ctx->aes_ks); ++ctr; #if BYTE_ORDER == LITTLE_ENDIAN ctx->gcm.Yi.d[3] = bswap32(ctr); @@ -615,7 +542,7 @@ gcm_decrypt_ctr32(struct ossl_gcm_context *ctx, const unsigned char *in, } static int -gcm_decrypt_aesni(struct ossl_gcm_context *ctx, const unsigned char *in, +gcm_decrypt_op(struct ossl_gcm_context *ctx, const unsigned char *in, unsigned char *out, size_t len) { size_t bulk = 0, res; @@ -625,7 +552,7 @@ gcm_decrypt_aesni(struct ossl_gcm_context *ctx, const unsigned char *in, if ((error = gcm_decrypt(ctx, in, out, res)) != 0) return error; - bulk = aesni_gcm_decrypt(in + res, out + res, len - res, &ctx->aes_ks, + bulk = AES_gcm_decrypt(in + res, out + res, len - res, &ctx->aes_ks, ctx->gcm.Yi.c, ctx->gcm.Xi.u); ctx->gcm.len.u[1] += bulk; bulk += res; @@ -637,14 +564,14 @@ gcm_decrypt_aesni(struct ossl_gcm_context *ctx, const unsigned char *in, } static int -gcm_finish_aesni(struct ossl_gcm_context *ctx, const unsigned char *tag, +gcm_finish_op(struct ossl_gcm_context *ctx, const unsigned char *tag, size_t len) { uint64_t alen = ctx->gcm.len.u[0] << 3; uint64_t clen = ctx->gcm.len.u[1] << 3; if (ctx->gcm.mres || ctx->gcm.ares) - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); #if BYTE_ORDER == LITTLE_ENDIAN alen = bswap64(alen); @@ -653,7 +580,7 @@ gcm_finish_aesni(struct ossl_gcm_context *ctx, const unsigned char *tag, ctx->gcm.Xi.u[0] ^= alen; ctx->gcm.Xi.u[1] ^= clen; - gcm_gmult_avx(ctx->gcm.Xi.u, ctx->gcm.Htable); + GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); ctx->gcm.Xi.u[0] ^= ctx->gcm.EK0.u[0]; ctx->gcm.Xi.u[1] ^= ctx->gcm.EK0.u[1]; @@ -663,40 +590,26 @@ gcm_finish_aesni(struct ossl_gcm_context *ctx, const unsigned char *tag, return 0; } -static const struct ossl_aes_gcm_ops gcm_ops_aesni = { - .init = gcm_init_aesni, - .setiv = gcm_setiv_aesni, - .aad = gcm_aad_aesni, - .encrypt = gcm_encrypt_aesni, - .decrypt = gcm_decrypt_aesni, - .finish = gcm_finish_aesni, - .tag = gcm_tag, +static const struct ossl_aes_gcm_ops gcm_ops = { + .init = gcm_init_op, + .setiv = gcm_setiv_op, + .aad = gcm_aad_op, + .encrypt = gcm_encrypt_op, + .decrypt = gcm_decrypt_op, + .finish = gcm_finish_op, + .tag = gcm_tag_op, }; -int ossl_aes_gcm_setkey_aesni(const unsigned char *key, int klen, void *_ctx); - -int -ossl_aes_gcm_setkey_aesni(const unsigned char *key, int klen, - void *_ctx) -{ - struct ossl_gcm_context *ctx; - - ctx = _ctx; - ctx->ops = &gcm_ops_aesni; - gcm_init(ctx, key, klen); - return (0); -} - -int ossl_aes_gcm_setkey_avx512(const unsigned char *key, int klen, void *_ctx); +int ossl_aes_gcm_setkey(const unsigned char *key, int klen, void *_ctx); int -ossl_aes_gcm_setkey_avx512(const unsigned char *key, int klen, +ossl_aes_gcm_setkey(const unsigned char *key, int klen, void *_ctx) { struct ossl_gcm_context *ctx; ctx = _ctx; - ctx->ops = &gcm_ops_avx512; + ctx->ops = &gcm_ops; gcm_init(ctx, key, klen); return (0); } diff --git a/sys/crypto/openssl/ossl_ppc.c b/sys/crypto/openssl/ossl_ppc.c index 0951745c4b43..980211f46a76 100644 *** 91 LINES SKIPPED *** From nobody Wed Oct 15 13:26:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsLR54Rqz6CP32; Wed, 15 Oct 2025 13:26: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 4cmsLR3qGBz3Kdb; Wed, 15 Oct 2025 13:26:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1PA3RtMht0GIvHef760to9Fm4eoNkDFxcbuodxuvm0=; b=sDSn4dMc7WJpiSWR5PXS3ViyrgTIZf9Jxc7yKMXTw2LGYE+o/v8iV+kag3u5FxngVx2n5j 05TVBhsfHEVW0EJq5fXL3MVMdpheJS3zHPZZrh9mujqhsBWlMzdX6YfGwGqaC310WGjcSY BU4oZBdBzEFyuas0oq3BcfQP9fLLU6fCAt5C7NqhaEdJvQ6ShczQK3KaXUNzFxJfcC0iFs UFyNRMbfVzefa0M4nKONi+pdNbXWIcAUTMDA/1ipttGDZMnjU11n5orzC4zosZbHaCL/gs Fg5Kpf8v8Ax1yHJwSdvPhd5xwCfeNltOr0aq+YOGP4FrG2keBUoaxtUCohkDjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1PA3RtMht0GIvHef760to9Fm4eoNkDFxcbuodxuvm0=; b=LK1m/BPIf4f7E6BjBhnaOTXXxwCdVw/EFHLqZhQRBEMUWlgkYXReOx0JNEPiuUNDeDA6OZ xvS1JKZzEQV8PAqa7udkRokz9HrXD5xIaBsWmY99MMjDRakndhzp0IyJAw0MKEqwTf5a5r lJ/s0kbWzyMK7jZrjlamzXP6zVjR6ItNUk7vwDhIG0LPbm6KX35ucmcncJtAwO/aELzt2u MDXLE4yiVcz+9qF63f5iN+rbc6m7IhmFV86DfjyL+E7VxL7tq4F/7nI8h9yUT1K6tmdyCa fHycftboEexWcJ0UxV0DVkPRIOKe0mlzt5caTCHGXWJ/U1ekjISGnJz+BSkAvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534799; a=rsa-sha256; cv=none; b=B4XW7SAN72HH5iej5pG/Bl+Mv2h8gHTC0AZxN8Iw2/b7/R4t2ro2gRavkS3MGHMbGh3J7O 9ba1qc+ieEpvei+3CUl09l8ymnri+OtTUvTwOhWeZaar9rNRd8UY04pkJFnx0GSIduEu4/ 4ow6F+LolJE9NI6PChwagtjxjWuOjZXUPNduoznwj9tS6QAqPNZzU9qBJ+sNwnkt6L/I6A FWrkEfWe3CV6Zi29GAsANMXeyrO7yk7CK+GVEvmAm2P/TargWbtYsKEV/6Vx+c29KiQdh5 7PUuFOO9/J0ruoJmhPpfJwXKV7LKVe7+rr+wp4bY2qNMmK+By4RTMVgnIn4XEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmsLR3QTczh8n; Wed, 15 Oct 2025 13:26: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 59FDQdW9051095; Wed, 15 Oct 2025 13:26:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQdDf051091; Wed, 15 Oct 2025 13:26:39 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:39 GMT Message-Id: <202510151326.59FDQdDf051091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9bed273477dc - stable/15 - tests/mac_portacl: restore sysctls after modification List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9bed273477dc8aee1e8bd8da2ae718c9210e7e86 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9bed273477dc8aee1e8bd8da2ae718c9210e7e86 commit 9bed273477dc8aee1e8bd8da2ae718c9210e7e86 Author: Siva Mahadevan AuthorDate: 2025-07-15 16:45:24 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:23:03 +0000 tests/mac_portacl: restore sysctls after modification While here, use 'required_kmods' instead of ad-hoc checks. Signed-off-by: Siva Mahadevan Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1855 (cherry picked from commit 170aac93479467334062813c1175a80200400b79) --- tests/sys/mac/portacl/Makefile | 1 + tests/sys/mac/portacl/misc.sh | 12 ++---------- tests/sys/mac/portacl/nobody_test.sh | 1 + tests/sys/mac/portacl/root_test.sh | 1 + 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/sys/mac/portacl/Makefile b/tests/sys/mac/portacl/Makefile index 856a85d331d5..28c3a5cd71ce 100644 --- a/tests/sys/mac/portacl/Makefile +++ b/tests/sys/mac/portacl/Makefile @@ -8,6 +8,7 @@ TAP_TESTS_SH+= nobody_test TAP_TESTS_SH+= root_test .for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_kmods="mac_portacl" TEST_METADATA.$t+= required_user="root" TEST_METADATA.$t+= timeout="450" TEST_METADATA.$t+= is_exclusive="true" diff --git a/tests/sys/mac/portacl/misc.sh b/tests/sys/mac/portacl/misc.sh index a1b729c87777..4d3f18fce1c1 100644 --- a/tests/sys/mac/portacl/misc.sh +++ b/tests/sys/mac/portacl/misc.sh @@ -1,15 +1,5 @@ #!/bin/sh -sysctl security.mac.portacl >/dev/null 2>&1 -if [ $? -ne 0 ]; then - echo "1..0 # SKIP MAC_PORTACL is unavailable." - exit 0 -fi -if [ $(id -u) -ne 0 ]; then - echo "1..0 # SKIP testcases must be run as root" - exit 0 -fi - ntest=1 check_bind() { @@ -95,6 +85,7 @@ bind_test() { sysctl security.mac.portacl.rules= >/dev/null } +portacl_enabled=$(sysctl -n security.mac.portacl.enabled) reserved_high=$(sysctl -n net.inet.ip.portrange.reservedhigh) suser_exempt=$(sysctl -n security.mac.portacl.suser_exempt) port_high=$(sysctl -n security.mac.portacl.port_high) @@ -103,4 +94,5 @@ restore_settings() { sysctl -n net.inet.ip.portrange.reservedhigh=${reserved_high} >/dev/null sysctl -n security.mac.portacl.suser_exempt=${suser_exempt} >/dev/null sysctl -n security.mac.portacl.port_high=${port_high} >/dev/null + sysctl -n security.mac.portacl.enabled=${portacl_enabled} >/dev/null } diff --git a/tests/sys/mac/portacl/nobody_test.sh b/tests/sys/mac/portacl/nobody_test.sh index 7e64f68113ea..a3f2168dc81d 100644 --- a/tests/sys/mac/portacl/nobody_test.sh +++ b/tests/sys/mac/portacl/nobody_test.sh @@ -13,6 +13,7 @@ trap restore_settings EXIT INT TERM sysctl security.mac.portacl.suser_exempt=1 >/dev/null sysctl net.inet.ip.portrange.reservedhigh=78 >/dev/null +sysctl security.mac.portacl.enabled=1 >/dev/null bind_test fl fl uid nobody tcp 77 bind_test ok ok uid nobody tcp 7777 diff --git a/tests/sys/mac/portacl/root_test.sh b/tests/sys/mac/portacl/root_test.sh index daa5b147b4fa..d8898ff4f80e 100644 --- a/tests/sys/mac/portacl/root_test.sh +++ b/tests/sys/mac/portacl/root_test.sh @@ -10,6 +10,7 @@ echo "1..48" trap restore_settings EXIT INT TERM sysctl security.mac.portacl.suser_exempt=1 >/dev/null +sysctl security.mac.portacl.enabled=1 >/dev/null bind_test ok ok uid root tcp 77 bind_test ok ok uid root tcp 7777 From nobody Wed Oct 15 13:26:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsLS6rFYz6CNyx; Wed, 15 Oct 2025 13:26: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 4cmsLS4crCz3Kdq; Wed, 15 Oct 2025 13:26:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=atD6l0N6jr6mOGIFu1AvWf8tsEt4dldeLR6Wth/+Uog=; b=qlya6dH+L3B3U1WHQyiMhZ9Nd6qkQlGpwsmm6RFpZJ/UOTdP4u/K7dMz4JPaMiT1erikg7 nNsvW6RBg9LIq7P3boBrBt0KiHzdyN4lJMf+2CQgU7obCjgZzA4+d0sv1VDcXTXfDkLmCo ua1qUAx/fjoPPg/3iqnjoukxlW2tATAF2UHHDbf6Kc63zRvZThNqyJkezW3SDZe/9TF27T f8MxWd99GZuSbGnynTpCDBa/s5phMLvuqvZJIwa97caPhWGoVQMJXCLf0iC9Twdw653Nvq J+HVDT/QTGjwqhPWBMCioW1hn5BVIryu3Cvjp4jDZIRUrWx0okunHjflj8Ek1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=atD6l0N6jr6mOGIFu1AvWf8tsEt4dldeLR6Wth/+Uog=; b=xolKp57gPXIVABrdwT/RGhWMy+IJtrnMIyas2ihOCTOs2Fer0JoaEDAQ4p1EdHv54Yi18G TLjWajKodOzf/Rjks7rAaWA/q8wK/ZnKwyO9Zav6VPj2gAj2a3w9CL1BlKBjB7DXmMpUqD kVu2QHPYf2g/rcwTP6ARrnaWpMAOwylhO13ksXZv0S+qaCvg9yvrdYLKqD8A+eXzMuXWli 3gB7lGvWOBNmM2woVu3rx8RufpIJ21DVMFl9WA+2eOPzHEVr8CjKLIja6rlm4EP4/i0ar2 VGQHrXA0QTo46QNLs/Tk0c2gnIhJPTK5TqHbTwuBvTbCLQTN5WX9XtfoljiLbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534800; a=rsa-sha256; cv=none; b=Eq5veS4jYh9Gii0tyXM3+r44ZVNv2/pws3N1JigFHHXsCkwOBU2lywWOQ54N2Hx04L8opZ nSLPR5jzfd7i3DBeHDEFTby4ruhg4IfPsWMR7GFh2tnOokWemyNcxWtxU9oqfPwY9QIrEO E1Vd8r5Zqa4bld9vwjGNcHseSGJBjTrYjlk7zFdPaB4iHJ/zN61kjyXYTnfPn+PLtgJRM7 aLw3VWPnrrloTJublddIySU1nB3zAL0rck4oPjSynVqmotimEhWpL5Db1TVEkIExAgAnrk +wINhPbSEYXlVAZeDYhcy7RkWES1iYv7TAAyydbEJhOkdMUOjE/s8suSexTCyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmsLS3gD4zgvl; Wed, 15 Oct 2025 13:26: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 59FDQeR3051130; Wed, 15 Oct 2025 13:26:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQewZ051125; Wed, 15 Oct 2025 13:26:40 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:40 GMT Message-Id: <202510151326.59FDQewZ051125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: df64ca1bfcd3 - stable/15 - tests/mac_ipacl: restore sysctls after modification List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: df64ca1bfcd32b19196c8b99b2b8e78520ef7f7c Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=df64ca1bfcd32b19196c8b99b2b8e78520ef7f7c commit df64ca1bfcd32b19196c8b99b2b8e78520ef7f7c Author: Siva Mahadevan AuthorDate: 2025-07-15 16:45:24 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:23:03 +0000 tests/mac_ipacl: restore sysctls after modification While here, use 'required_kmods' instead of ad-hoc checks. Signed-off-by: Siva Mahadevan Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull request: https://github.com/freebsd/freebsd-src/pull/1856 (cherry picked from commit 79042fd7ed4187d2a74e37618f6fd77f448ca353) --- tests/sys/mac/ipacl/Makefile | 5 +++++ tests/sys/mac/ipacl/ipacl_test.sh | 16 ++++++++++++---- tests/sys/mac/ipacl/utils.subr | 4 ---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/tests/sys/mac/ipacl/Makefile b/tests/sys/mac/ipacl/Makefile index e083f6c1a69c..93b29e250ea5 100644 --- a/tests/sys/mac/ipacl/Makefile +++ b/tests/sys/mac/ipacl/Makefile @@ -6,4 +6,9 @@ ATF_TESTS_SH+= ipacl_test ${PACKAGE}FILES+= utils.subr +.for t in ${ATF_TESTS_SH} +TEST_METADATA.$t+= required_kmods="mac_ipacl" +TEST_METADATA.$t+= is_exclusive="true" +.endfor + .include diff --git a/tests/sys/mac/ipacl/ipacl_test.sh b/tests/sys/mac/ipacl/ipacl_test.sh index 0de1b414857b..892f4c154b66 100644 --- a/tests/sys/mac/ipacl/ipacl_test.sh +++ b/tests/sys/mac/ipacl/ipacl_test.sh @@ -40,6 +40,9 @@ ipacl_v4_body() { ipacl_test_init + prev_ipacl_ipv4="$(sysctl -n security.mac.ipacl.ipv4)" + prev_ipacl_rules="$(sysctl -n security.mac.ipacl.rules)" + epairA=$(vnet_mkepair) epairB=$(vnet_mkepair) epairC=$(vnet_mkepair) @@ -130,8 +133,9 @@ ipacl_v4_body() atf_check -s not-exit:0 -e ignore \ jexec A ifconfig ${epairA}b 203.0.113.1/24 up - # Reset rules OID. - sysctl security.mac.ipacl.rules= + # Reset sysctls. + sysctl security.mac.ipacl.rules="${prev_ipacl_rules}" + sysctl security.mac.ipacl.ipv4="${prev_ipacl_ipv4}" } ipacl_v4_cleanup() @@ -151,6 +155,9 @@ ipacl_v6_body() { ipacl_test_init + prev_ipacl_ipv6="$(sysctl -n security.mac.ipacl.ipv6)" + prev_ipacl_rules="$(sysctl -n security.mac.ipacl.rules)" + epairA=$(vnet_mkepair) epairB=$(vnet_mkepair) epairC=$(vnet_mkepair) @@ -265,8 +272,9 @@ ipacl_v6_body() atf_check -s not-exit:0 -e ignore jexec A ifconfig \ ${epairA}b inet6 2001:db8::abcd/32 up - # Reset rules OID. - sysctl security.mac.ipacl.rules= + # Reset sysctls. + sysctl security.mac.ipacl.rules="${prev_ipacl_rules}" + sysctl security.mac.ipacl.ipv6="${prev_ipacl_ipv6}" } ipacl_v6_cleanup() diff --git a/tests/sys/mac/ipacl/utils.subr b/tests/sys/mac/ipacl/utils.subr index 1d80414bafea..2fff8b1862da 100644 --- a/tests/sys/mac/ipacl/utils.subr +++ b/tests/sys/mac/ipacl/utils.subr @@ -5,10 +5,6 @@ ipacl_test_init() { vnet_init - - if ! kldstat -q -m mac_ipacl; then - atf_skip "mac_ipacl is not loaded" - fi } ipacl_test_cleanup() From nobody Wed Oct 15 13:26:41 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsLV12J3z6CNlb; Wed, 15 Oct 2025 13:26: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 4cmsLT5Cnzz3Kq2; Wed, 15 Oct 2025 13:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrypCXQkBQMhJEYXJ1tNIDFEQyeHU0HZ3TK713Ts9Ys=; b=h8onljl3h2emQVl0O/C47DvPuIacdSuzkm1wnyFFrDXJRvAa+CxkqJYpKNbCCfNVTq/BQm JL5hNZrk8neq0nsigAviDCO+AmXxarq+IKw91fEUFkUpTu9NOURuGvSyLuCqmNUK5pRsOc XAs69BBV8cYa7HwLvErKWMqmte17qtb9GAYyE2KZqvYZuJGzXXHE8I8Ndd3aOzbiD1821A A/98ZisjXiaEjGvZ2mzpHNBPmQM7UP4raX6tninnqeKBilTy2vgkCUkeYhfrbIStOT9NcJ lQiqTu4GOyygeoh6Q6POhq46B0/xga4gNtRtOobTuT0z8vUsqVCHzLi+2csvgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrypCXQkBQMhJEYXJ1tNIDFEQyeHU0HZ3TK713Ts9Ys=; b=cf3hEpfE1Rn0/MVjowO4S/bsEyp2PnAxFlf2qWBOmpLjyoXQCE+H2kZT4ugrgr8gt+faS+ 41aQnIcN5ejyHD6EoQK3E0s9V0aiHJrn1iJjNVRjla5NGCy1LRhpgEvaWHe0X2bWRti7ov 7Oz5NPJLwK42AhLLtR76swY0V8ptGjUxQ37lxWM5igAMwU2ybg/6ZAWQkAOZbRw+P7JoCQ 88RmWQWNb33Htu571AGgE7o422UEKMk2ZI1GyYZQEadiKZwcQwHg8UE07zuc71sceZDOL5 9cvim9UtUkar3AjBRYvwXJ4y6yHpBW79Li8JxFMQ4nKW5u2hOpK0F7EjIaHhTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534801; a=rsa-sha256; cv=none; b=a0knY1YMLMJN5axu2jllo8yFCR2o5KCUOZIuaAmGoKyrIRxakPs8lB5//54NTTCXHOS0yc JHOD1ZHGvBU6MNEJtP09+HMocA4LlpgrNLYujWdHzUUNt0Wf5CXH5yWH8x5GTKDdzcqLaa mo97x3RDhi5ijWXsyKKyHybmDSFEsNHQ5R+GlTV0wfi2P/vpXWpug7w2RCsWL2eWcWJ1SC BB4927HkXxSd2I1wc41nDR3rbRU10KBlu59vYXqCHWstIAO/6bWHT8mMSsM0nW9J8kFtWi WadhX2pXMDOpxMF9JZRKC6VKCkvo3CgyF/eMq+EVWvU5Utp5M+waarU7C/9sog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmsLT4kp0zgdf; Wed, 15 Oct 2025 13:26: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 59FDQfH9051164; Wed, 15 Oct 2025 13:26:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQfgw051161; Wed, 15 Oct 2025 13:26:41 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:41 GMT Message-Id: <202510151326.59FDQfgw051161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 88c0ce38bc18 - stable/15 - qat: enable qat driver for 402xx device List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 88c0ce38bc18acaf50188eda402384a0cb93890d Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=88c0ce38bc18acaf50188eda402384a0cb93890d commit 88c0ce38bc18acaf50188eda402384a0cb93890d Author: Hareshx Sankar Raj AuthorDate: 2025-09-04 18:21:36 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:23:05 +0000 qat: enable qat driver for 402xx device Enabled qat driver support for 402xx device with ID 0x4944/0x4945. This is an additional device supported under the existing qat_4xxx driver. Firmwares specific to the 402xx device are added. Signed-off-by: Hareshx Sankar Raj Relnotes: yes Sponsored by: Intel Corporation MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D52488 (cherry picked from commit 7fbd362c091b2b384d14c3ed5af9234bb2eff9c2) --- sys/contrib/dev/qat/qat_402xx.bin | Bin 0 -> 665360 bytes sys/contrib/dev/qat/qat_402xx_mmp.bin | Bin 0 -> 150084 bytes sys/dev/qat/include/common/adf_accel_devices.h | 4 ++ sys/dev/qat/qat_api/include/icp_sal_versions.h | 2 +- sys/dev/qat/qat_common/qat_uclo.c | 1 + sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c | 58 +++++++++++++++++++------ sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h | 6 +++ sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c | 15 ++++--- sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c | 15 ++++--- sys/modules/qatfw/qat_4xxx/Makefile | 5 ++- 10 files changed, 78 insertions(+), 28 deletions(-) diff --git a/sys/contrib/dev/qat/qat_402xx.bin b/sys/contrib/dev/qat/qat_402xx.bin new file mode 100644 index 000000000000..74151547edce Binary files /dev/null and b/sys/contrib/dev/qat/qat_402xx.bin differ diff --git a/sys/contrib/dev/qat/qat_402xx_mmp.bin b/sys/contrib/dev/qat/qat_402xx_mmp.bin new file mode 100644 index 000000000000..6404eb009d2f Binary files /dev/null and b/sys/contrib/dev/qat/qat_402xx_mmp.bin differ diff --git a/sys/dev/qat/include/common/adf_accel_devices.h b/sys/dev/qat/include/common/adf_accel_devices.h index c09aee8ea4bd..eeffc6a9132c 100644 --- a/sys/dev/qat/include/common/adf_accel_devices.h +++ b/sys/dev/qat/include/common/adf_accel_devices.h @@ -39,12 +39,16 @@ #define ADF_4XXXIOV_PCI_DEVICE_ID 0x4941 #define ADF_401XX_PCI_DEVICE_ID 0x4942 #define ADF_401XXIOV_PCI_DEVICE_ID 0x4943 +#define ADF_402XX_PCI_DEVICE_ID 0x4944 +#define ADF_402XXIOV_PCI_DEVICE_ID 0x4945 #define IS_QAT_GEN3(ID) ({ (ID == ADF_C4XXX_PCI_DEVICE_ID); }) static inline bool IS_QAT_GEN4(const unsigned int id) { return (id == ADF_4XXX_PCI_DEVICE_ID || id == ADF_401XX_PCI_DEVICE_ID || + id == ADF_402XX_PCI_DEVICE_ID || + id == ADF_402XXIOV_PCI_DEVICE_ID || id == ADF_4XXXIOV_PCI_DEVICE_ID || id == ADF_401XXIOV_PCI_DEVICE_ID); } diff --git a/sys/dev/qat/qat_api/include/icp_sal_versions.h b/sys/dev/qat/qat_api/include/icp_sal_versions.h index 03bcef4fcbbb..0eb227ade09c 100644 --- a/sys/dev/qat/qat_api/include/icp_sal_versions.h +++ b/sys/dev/qat/qat_api/include/icp_sal_versions.h @@ -26,7 +26,7 @@ /* Part name and number of the accelerator device */ #define SAL_INFO2_DRIVER_SW_VERSION_MAJ_NUMBER 3 -#define SAL_INFO2_DRIVER_SW_VERSION_MIN_NUMBER 15 +#define SAL_INFO2_DRIVER_SW_VERSION_MIN_NUMBER 16 #define SAL_INFO2_DRIVER_SW_VERSION_PATCH_NUMBER 0 /** diff --git a/sys/dev/qat/qat_common/qat_uclo.c b/sys/dev/qat/qat_common/qat_uclo.c index 54e8e8eb7421..b17020286d24 100644 --- a/sys/dev/qat/qat_common/qat_uclo.c +++ b/sys/dev/qat/qat_common/qat_uclo.c @@ -892,6 +892,7 @@ qat_uclo_get_dev_type(struct icp_qat_fw_loader_handle *handle) return ICP_QAT_AC_C4XXX_DEV_TYPE; case ADF_4XXX_PCI_DEVICE_ID: case ADF_401XX_PCI_DEVICE_ID: + case ADF_402XX_PCI_DEVICE_ID: return ICP_QAT_AC_4XXX_A_DEV_TYPE; default: pr_err("QAT: unsupported device 0x%x\n", diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c index d730efd5952b..49e1e1859e78 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c @@ -536,8 +536,8 @@ adf_exit_accel_units(struct adf_accel_dev *accel_dev) } static const char * -get_obj_name(struct adf_accel_dev *accel_dev, - enum adf_accel_unit_services service) +get_obj_name_4xxx(struct adf_accel_dev *accel_dev, + enum adf_accel_unit_services service) { switch (service) { case ADF_ACCEL_ASYM: @@ -553,6 +553,24 @@ get_obj_name(struct adf_accel_dev *accel_dev, } } +static const char * +get_obj_name_402xx(struct adf_accel_dev *accel_dev, + enum adf_accel_unit_services service) +{ + switch (service) { + case ADF_ACCEL_ASYM: + return ADF_402XX_ASYM_OBJ; + case ADF_ACCEL_CRYPTO: + return ADF_402XX_SYM_OBJ; + case ADF_ACCEL_COMPRESSION: + return ADF_402XX_DC_OBJ; + case ADF_ACCEL_ADMIN: + return ADF_402XX_ADMIN_OBJ; + default: + return NULL; + } +} + static uint32_t get_objs_num(struct adf_accel_dev *accel_dev) { @@ -982,8 +1000,23 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->clock_frequency = ADF_4XXX_AE_FREQ; hw_data->get_sku = get_sku; hw_data->heartbeat_ctr_num = ADF_NUM_HB_CNT_PER_AE; - hw_data->fw_name = ADF_4XXX_FW; - hw_data->fw_mmp_name = ADF_4XXX_MMP; + switch (id) { + case ADF_402XX_PCI_DEVICE_ID: + hw_data->fw_name = ADF_402XX_FW; + hw_data->fw_mmp_name = ADF_402XX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; + break; + case ADF_401XX_PCI_DEVICE_ID: + hw_data->fw_name = ADF_4XXX_FW; + hw_data->fw_mmp_name = ADF_4XXX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_401XX_ASYM_AE_MASK; + break; + + default: + hw_data->fw_name = ADF_4XXX_FW; + hw_data->fw_mmp_name = ADF_4XXX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; + } hw_data->init_admin_comms = adf_init_admin_comms; hw_data->exit_admin_comms = adf_exit_admin_comms; hw_data->send_admin_init = adf_4xxx_send_admin_init; @@ -1002,7 +1035,13 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->get_ring_svc_map_data = get_ring_svc_map_data; hw_data->admin_ae_mask = ADF_4XXX_ADMIN_AE_MASK; hw_data->get_objs_num = get_objs_num; - hw_data->get_obj_name = get_obj_name; + switch (id) { + case ADF_402XX_PCI_DEVICE_ID: + hw_data->get_obj_name = get_obj_name_402xx; + break; + default: + hw_data->get_obj_name = get_obj_name_4xxx; + } hw_data->get_obj_cfg_ae_mask = get_obj_cfg_ae_mask; hw_data->get_service_type = adf_4xxx_get_service_type; hw_data->set_msix_rttable = set_msix_default_rttable; @@ -1022,15 +1061,6 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->query_storage_cap = 1; hw_data->ring_pair_reset = adf_gen4_ring_pair_reset; - switch (id) { - case ADF_401XX_PCI_DEVICE_ID: - hw_data->asym_ae_active_thd_mask = DEFAULT_401XX_ASYM_AE_MASK; - break; - case ADF_4XXX_PCI_DEVICE_ID: - default: - hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; - } - adf_gen4_init_hw_csr_info(&hw_data->csr_info); adf_gen4_init_pf_pfvf_ops(&hw_data->csr_info.pfvf_ops); } diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h index c35ebbcadcd7..fa7249dca596 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h @@ -87,6 +87,12 @@ #define ADF_4XXX_SYM_OBJ "qat_4xxx_sym.bin" #define ADF_4XXX_ASYM_OBJ "qat_4xxx_asym.bin" #define ADF_4XXX_ADMIN_OBJ "qat_4xxx_admin.bin" +#define ADF_402XX_FW "qat_402xx_fw" +#define ADF_402XX_MMP "qat_402xx_mmp_fw" +#define ADF_402XX_DC_OBJ "qat_402xx_dc.bin" +#define ADF_402XX_SYM_OBJ "qat_402xx_sym.bin" +#define ADF_402XX_ASYM_OBJ "qat_402xx_asym.bin" +#define ADF_402XX_ADMIN_OBJ "qat_402xx_admin.bin" /* Only 3 types of images can be loaded including the admin image */ #define ADF_4XXX_MAX_OBJ 3 diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c index cb534dd03b86..f9ad39fa45f0 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c @@ -22,12 +22,14 @@ static MALLOC_DEFINE(M_QAT_4XXX, "qat_4xxx", "qat_4xxx"); PCI_VENDOR_ID_INTEL, device_id \ } -static const struct pci_device_id adf_pci_tbl[] = - { ADF_SYSTEM_DEVICE(ADF_4XXX_PCI_DEVICE_ID), - ADF_SYSTEM_DEVICE(ADF_401XX_PCI_DEVICE_ID), - { - 0, - } }; +static const struct pci_device_id adf_pci_tbl[] = { + ADF_SYSTEM_DEVICE(ADF_4XXX_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_401XX_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_402XX_PCI_DEVICE_ID), + { + 0, + } +}; static int adf_probe(device_t dev) @@ -135,6 +137,7 @@ adf_cleanup_accel(struct adf_accel_dev *accel_dev) switch (pci_get_device(accel_pci_dev->pci_dev)) { case ADF_4XXX_PCI_DEVICE_ID: case ADF_401XX_PCI_DEVICE_ID: + case ADF_402XX_PCI_DEVICE_ID: adf_clean_hw_data_4xxx(accel_dev->hw_device); break; default: diff --git a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c index 2bbccb4d6b17..dbe40835ccbf 100644 --- a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c @@ -22,12 +22,14 @@ static MALLOC_DEFINE(M_QAT_4XXXVF, "qat_4xxxvf", "qat_4xxxvf"); PCI_VENDOR_ID_INTEL, device_id \ } -static const struct pci_device_id adf_pci_tbl[] = - { ADF_SYSTEM_DEVICE(ADF_4XXXIOV_PCI_DEVICE_ID), - ADF_SYSTEM_DEVICE(ADF_401XXIOV_PCI_DEVICE_ID), - { - 0, - } }; +static const struct pci_device_id adf_pci_tbl[] = { + ADF_SYSTEM_DEVICE(ADF_4XXXIOV_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_401XXIOV_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_402XXIOV_PCI_DEVICE_ID), + { + 0, + } +}; static int adf_probe(device_t dev) @@ -76,6 +78,7 @@ adf_cleanup_accel(struct adf_accel_dev *accel_dev) switch (pci_get_device(accel_pci_dev->pci_dev)) { case ADF_4XXXIOV_PCI_DEVICE_ID: case ADF_401XXIOV_PCI_DEVICE_ID: + case ADF_402XXIOV_PCI_DEVICE_ID: adf_clean_hw_data_4xxxiov(accel_dev->hw_device); break; default: diff --git a/sys/modules/qatfw/qat_4xxx/Makefile b/sys/modules/qatfw/qat_4xxx/Makefile index fb7171bcaf45..f6f19d6cbe32 100644 --- a/sys/modules/qatfw/qat_4xxx/Makefile +++ b/sys/modules/qatfw/qat_4xxx/Makefile @@ -4,6 +4,9 @@ KMOD= qat_4xxx_fw -FIRMWS= qat_4xxx.bin:qat_4xxx_fw:111 qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111 +FIRMWS= qat_4xxx.bin:qat_4xxx_fw:111 \ + qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111 \ + qat_402xx.bin:qat_402xx_fw:111 \ + qat_402xx_mmp.bin:qat_402xx_mmp_fw:111 .include From nobody Wed Oct 15 13:26:42 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsLW3RVlz6CNld; Wed, 15 Oct 2025 13:26: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 4cmsLV5yTDz3KnM; Wed, 15 Oct 2025 13:26:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpHes4Qi8wTSbP2PV3BRC93lfyYcJXPOz0EmH0TadtU=; b=xoVcSg7UrSerLUd4UcJ51GBk3wVhVEDXSzlgVihH9+nLnuP8X+m47SS3Rv4A+5li99bH04 ZfCv07Ho7QeVrXOZg647W6Ow64SWk1jEi2Eox7PsR9qhvqG7vnYNYar7Iby1IDSOnaEsLn J5YqDq8M+az3QO3M7jpgwOhTitVdx4f+x2dvG/nTYOPZYc3xHmrEhnYBefv0c+pBMKHMem jM61YtEQry+YSXWacfyHMkitRbBbAcc+fbN2/p4MCQrtMdEQMvo6sKC3CdcwEL9zNH5oQt rDxhyapzuNVOSgvikQOGsDWumQsZpaYPe4OQpW61sAmeYCyfibqOKBHzeTzSHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpHes4Qi8wTSbP2PV3BRC93lfyYcJXPOz0EmH0TadtU=; b=CrboL7MJqRQZG7SSWjyndKOVYTg2yeFcpEJpSLGW0LjDA9HTJE5xA8OsxfQDaE74nuvlm6 KdMhIlq8qIOer5QTKsY9i3ZpT502IRomT/QkVC1osbO+2qRVNzSxbJP27FyHXAyKdmMfaz T9fovVkylILWrGMKpKyEhF39EozbHsc8caHGJaEftBo5uifSn/4PkrnllqldmcZFYmHfS/ s/r7TY8bSdg+GrsqMoLuFUtKfjzZQx+2vxoPRgL08TYUn5XR0mPDhYz0Vtqz1Nvleg4DJ+ xGE1SEBNQQ8lXoWQpbqmVn05hcEKgshpP9lXDSJpZjdOQ8whlE0yN/qRf2Flrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534802; a=rsa-sha256; cv=none; b=pq1rwNthpQ+N8Oq4Wr3zC7sUjPI1J0UN4uVetjGhElAO1ir8grCIfh38uDB1mpmmDBoC+8 4UnYFBm6dyg8KjEZjQNA/+a6yRiYNdn0pWkytJWnvI7AS4mwWqF6iR1CVcm5Htc4faSy8b 9MnjqRS9Uk22swzven3ZxNOflQxn54zFhB1ZXLylNHW9mbt0TT5JTbrWT9yfgPPi7pGznH hLgwNrtBxRg4DaHFgG1gMihzG4HuRu7kcbSPLnLdSXmfMZ3gSL65yC8sHUn7yJgsMUjPXQ MtQpRH8eVeRs0Qnu4UKE/2XS006QsckJKI5matMJx5L5xYD5qno63HGiYwBM0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmsLV5Gb5zgvm; Wed, 15 Oct 2025 13:26: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 59FDQgiq051197; Wed, 15 Oct 2025 13:26:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQgw7051194; Wed, 15 Oct 2025 13:26:42 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:42 GMT Message-Id: <202510151326.59FDQgw7051194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6d44212c641b - stable/15 - pw: pw_mkdb(3) does not set errno List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6d44212c641b9f30e5b9dd6e261659d20f916081 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6d44212c641b9f30e5b9dd6e261659d20f916081 commit 6d44212c641b9f30e5b9dd6e261659d20f916081 Author: Mark Johnston AuthorDate: 2025-10-08 12:47:15 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:23:13 +0000 pw: pw_mkdb(3) does not set errno MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. (cherry picked from commit b464c7a75e30e6149906458075b7eaf0841c7222) --- usr.sbin/pw/pwupd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c index 89c1553c8c92..845a607ab1cb 100644 --- a/usr.sbin/pw/pwupd.c +++ b/usr.sbin/pw/pwupd.c @@ -119,7 +119,7 @@ pw_update(struct passwd * pwd, char const * user) */ if (pw_mkdb(pw != NULL ? pw->pw_name : NULL) == -1) { pw_fini(); - err(1, "pw_mkdb()"); + errx(1, "pw_mkdb()"); } free(pw); pw_fini(); From nobody Wed Oct 15 13:26:43 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmsLX1Kwcz6CNtF; Wed, 15 Oct 2025 13:26: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 4cmsLW6CqJz3Ksx; Wed, 15 Oct 2025 13:26:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YQYWTw/cAqEp36BH3ptySD/m7Du2GDOn/rAkOm69XA8=; b=CTRLMdvSN7E7utaF7ilhSeZXfo0Lxmwtya1xLM8TyczyvObnQAmzQ5udMY+yWGph41v1Zx PE2b1L+MpDgf0sP6oGl72say4/zFySqNfbkofK2LKugzuop4UA5Bj6kvASPd3i0pHEIlnN uoWHvCFEWqxlzNvRqku4/TgZTsMUgduJaPhPIeTYRAafuUxLGGwiK1phuYGESTytyKXlFG hd+pM6hz848VIz7cME2kIYK6TLTR5PSkiOT4W6jqCescx9pIYSzp8bocHuWAUh21Bg/t1K I3WTVKt+n/D6JZ6dbB0Jp6dVpIRROqKYvAigY2ZaihA09tQNyqmV3EBnXdCOSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760534803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YQYWTw/cAqEp36BH3ptySD/m7Du2GDOn/rAkOm69XA8=; b=FypPltp/ZT5yj+cCqr70orPG8TcJ3ZK3tsHmrUS/ESExsq6xA/HRhmRhqWKN6jUV/L6Y8K LGl9GpWcNbR/ZKIB6Dn5PS8vePxpAEZInO3iEsziEYI00ZSRDcXaxP94mH3juMDq6TZ8aS iQBC8prSnTywTdDC9TcXmvVdPT6phZVpAj/ZPjeR6JZWvl2/d1t12sXV/Y0Cg8WxcjPxaf BRSiiB3vhQQAvkB0kZCivpFbmqaKORb/94oPuvAgBSs4bKujW2EAhD4iSoBI8bvbJALA2X i0MAVYVVrOoVHr/h6q2BXybnJPtaqnBwWnoWrLv/6kyE4yEqZKXrYTyILpI4aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760534803; a=rsa-sha256; cv=none; b=XnfOGxwNLs72VP/dVAzgrLGVXy9aAQ4TsvfJGEJjThSmZalSWk3uU2a6YICW7zlXH0vCI6 gfaNWIqooD8IoqIAvxR5/YNBup2MIWeTMR2408WFCdRJJIuJtrDI+nIYOf9g4AeiqtsRI4 KfpZCGJ/gQPLSfpOHJOCr1fA1HwekjOg9qapenuFro8V/BaBJjnFYbV1rbpUkT7BrXO7X+ dbCfvqpqeDAHVf2KCdjJZAk2HyZD9/FuCqqyIWcee5GQwdxRaTRrNPo3xfLyKSQsiarbKa Ixv47at6Te6QftlxXArUXf19NX7f13B8vgHhrYB5AWA23j5ux2tAY/apLdnf/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 4cmsLW5qNrzgm6; Wed, 15 Oct 2025 13:26: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 59FDQhsL051230; Wed, 15 Oct 2025 13:26:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FDQhk1051227; Wed, 15 Oct 2025 13:26:43 GMT (envelope-from git) Date: Wed, 15 Oct 2025 13:26:43 GMT Message-Id: <202510151326.59FDQhk1051227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3a382afe367a - stable/15 - cryptocheck: Be friendlier when testing software crypto backends List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3a382afe367a5ecd849ca0e3ba92781f24ce1be4 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3a382afe367a5ecd849ca0e3ba92781f24ce1be4 commit 3a382afe367a5ecd849ca0e3ba92781f24ce1be4 Author: Mark Johnston AuthorDate: 2025-10-08 15:24:12 +0000 Commit: Mark Johnston CommitDate: 2025-10-15 13:23:24 +0000 cryptocheck: Be friendlier when testing software crypto backends - Fail loudly if we can't change the kern.crypto.allow_soft sysctl. - Add more drivers to the list. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52490 (cherry picked from commit e63bf6aa523eb9a865b7ce34d01e75a13818b367) --- tools/tools/crypto/cryptocheck.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index 6506671455ac..46a364b0453c 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -362,9 +362,11 @@ enable_user_soft(void) size_t cursize = sizeof(curstate); if (sysctlbyname(CRYPT_SOFT_ALLOW, &curstate, &cursize, - &on, sizeof(on)) == 0) { + &on, sizeof(on)) == 0) { if (curstate == 0) atexit(reset_user_soft); + } else { + err(1, "sysctl(%s)", CRYPT_SOFT_ALLOW); } } @@ -373,7 +375,10 @@ crlookup(const char *devname) { struct crypt_find_op find; - if (strncmp(devname, "soft", 4) == 0) { + if (strncmp(devname, "soft", 4) == 0 || + strncmp(devname, "ossl", 4) == 0 || + strncmp(devname, "aesni", 5) == 0 || + strncmp(devname, "armv8crypto", 11) == 0) { enable_user_soft(); return CRYPTO_FLAG_SOFTWARE; } From nobody Wed Oct 15 13:32:34 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 14:05:59 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmtCq4kLwz6CRWn; Wed, 15 Oct 2025 14:05: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 4cmtCq3w7Kz3WPk; Wed, 15 Oct 2025 14:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760537159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3GQZ68a9rDum6qXft0lsbNF6CdHxBtnNXyajjAfuwk=; b=g/0Hj7iBlH3N30dA0UAgfBjsspW7QHRGF9ysRAPUnTbDUoZCGfLtHGr1VilzMDbXGsAl+y BDRQoGlJBbgvFas177pNcxbebCJYt4+VaGqn+HXeJwRWar9w/EItZ9Pc+qYXK/G19ASlv0 RMwFH6pWBRByhTCGEwVKR2VnjMw7Sie+g+KDm2k8DnaOsyXe7M7z27OoeCeSRmL1i9dqav CyaO1N+1M548Vj/KPZculTIPxSZw4oBsqpCQDGazs7MR/IJ1TrGeCDYh2HyAG2MYkPqL8x xHZV9BN6Joxfr0MA44kmxul46zoYL6jXvAid8PQnE9BY0c6pSj2nqa9l4z2+rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760537159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3GQZ68a9rDum6qXft0lsbNF6CdHxBtnNXyajjAfuwk=; b=ICrwWvTZm4geT1OhXbwhmyTvAu5CqT/bvEhs0njFo39zZT2NCpPj9z3NnZxwudy51NryiJ iDfwgnAxzMIvvrBH14AzO3Iv6RDxzdJ2qqNDQeyDoF/GBZA4qRFBiPdTGyQ7FcyaXeeW0b BwmvIhYZDFxTqWJuRZcmbw6div9RN2Sksi75vi8pAo8gNskY5WE3pbmBn1ZVRSKakbewU1 lidO1QpCfnMhKxerOtp6G4Urv9KbXaG5uO5NCFYjjmA35kuIfXWcqqqpUv5soLsrkcbg14 1Br2U7qX2QY9oOoJbfyyRW0ar0I+pXDZFw+AR0D67DsPjPf6uiCNZr54VXahIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760537159; a=rsa-sha256; cv=none; b=bzCMfuRkQNto9e/X5R+joRxbuXTgm48o1GnX09Ka0oA0Q+PJy0ZTgRu5V0qsMpUbEJVO6u lCzN6CETscnOnc98mHGA3Ih5jg2LI5JTzNQ4hXvoNdxkIWz1He+xqC03dkMdU7bU8ld0AN nAdToQdvbn3adgHvekeqeLrO1ZzchHs1sqsMofB+XCb6uOaPceblY1dGocltlxbQhiKGYc 8aYV/43bhA/jUSa8hex+ZByr8BVlG5jWWK34V3W2oafiWAKz0t4TbIXLm+jihMfAxEROf2 XQP3Vn0NV5PU7P89I3meoTjUBwUGdYJ6dfemianFbpeeLKcfvmf+yYkN1/gKGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmtCq31HTzhsJ; Wed, 15 Oct 2025 14:05: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 59FE5xBv026976; Wed, 15 Oct 2025 14:05:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FE5xup026973; Wed, 15 Oct 2025 14:05:59 GMT (envelope-from git) Date: Wed, 15 Oct 2025 14:05:59 GMT Message-Id: <202510151405.59FE5xup026973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 25c6697b0b98 - stable/15 - ipv6: don't complain when deleting an address with prefix length of 128 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 25c6697b0b985228639cdeb5212a5f705731f69a Auto-Submitted: auto-generated The branch stable/15 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=25c6697b0b985228639cdeb5212a5f705731f69a commit 25c6697b0b985228639cdeb5212a5f705731f69a Author: Andrey V. Elsukov AuthorDate: 2025-10-07 13:08:15 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-10-15 14:05:07 +0000 ipv6: don't complain when deleting an address with prefix length of 128 Save prefix length in unused field in6_ifaddr->ia_plen, then on remove check if an address has 128 prefix length, and if so, we don't need to complain that there is none of related prefixes. Reviewed by: kp Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D52952 (cherry picked from commit c4cce0a3e94e3b22f874508d1a9cd81442648238) --- sys/netinet6/in6.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 4f756a75fac7..b98703bdfbfe 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1295,8 +1295,8 @@ in6_addifaddr(struct ifnet *ifp, struct in6_aliasreq *ifra, struct in6_ifaddr *i */ bzero(&pr0, sizeof(pr0)); pr0.ndpr_ifp = ifp; - pr0.ndpr_plen = in6_mask2len(&ifra->ifra_prefixmask.sin6_addr, - NULL); + pr0.ndpr_plen = ia->ia_plen = + in6_mask2len(&ifra->ifra_prefixmask.sin6_addr, NULL); if (pr0.ndpr_plen == 128) { /* we don't need to install a host route. */ goto aifaddr_out; @@ -1490,16 +1490,16 @@ in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp) * positive reference. */ remove_lle = 0; - if (ia->ia6_ndpr == NULL) { - nd6log((LOG_NOTICE, - "in6_unlink_ifa: autoconf'ed address " - "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); - } else { + if (ia->ia6_ndpr != NULL) { ia->ia6_ndpr->ndpr_addrcnt--; /* Do not delete lles within prefix if refcont != 0 */ if (ia->ia6_ndpr->ndpr_addrcnt == 0) remove_lle = 1; ia->ia6_ndpr = NULL; + } else if (ia->ia_plen < 128) { + nd6log((LOG_NOTICE, + "in6_unlink_ifa: autoconf'ed address " + "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); } nd6_rem_ifa_lle(ia, remove_lle); From nobody Wed Oct 15 14:07:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmtFG0fYWz6CS0L; Wed, 15 Oct 2025 14:07: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 4cmtFG08Zvz3Wl3; Wed, 15 Oct 2025 14:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760537234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6kUeZjB9tApHPJRNu8oUNy/leEeYc1Hy9s21YA/Y74=; b=seZHwDvsDV4DO98i6G855hbv/86E4ItnOWaJgmYzjiuLti8167RdnmCeNyB9290lvi1MLV 6P41+NXap1/aoTj1khtCfnqqMyu73eaIiHGLAoxxWKz2D/SYW6cy+LLpAY/Jioh5gIJUb0 lE021FH/4PL6NRP60AVw/+8ogb0HGQbsPRDOorwdyHPTo24E8U4jXd5LVYPJw0uoEtM1nD GmWFzvYhCYgudKNAIhssbLJUmPsFn7qrpgcqrdG21Md7OChHYEizG7iYp69i/vkudpbl3Z dnsWfviOH9w9gegtMDM75l6d+thVPyTQtdv4AGd31mNaXzuUhR5M+Dyu2z51rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760537234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6kUeZjB9tApHPJRNu8oUNy/leEeYc1Hy9s21YA/Y74=; b=c4EFQ7ag3gP3SXyIAibGYqaqRSKFhAzsVbZTu9zXEjD88ss0IFE/Y+RRXV+Hf8u/mjuiet nwcACrRtlFeBZeVUShRS1w1qQsW6rPHlsCbsnsXZXMe43Nkhw2+Bo/gVbAqxDGE6CskZNh fHrc/isYZqEFgD7+l6w+Lw8WJ8H9ybF7xPZClH4xHXRiBYVW2usiiF1wmuqx57X2vWW2JL CTMUVydPuD3syh4d3AmYDaA7kezJAVy0MTawxGmPyZTxDRi9rJI6mHcu9pn+M2sETT+sVi URM3IXF/K5h5ZrFnIBQy7DalAkeYgpSuJsVGT9aOchxxNJxXwPC78FqXNGC+xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760537234; a=rsa-sha256; cv=none; b=Qio5XT/3UhABZKZFMVgb9oHd0xkzFxdB1PPAII1YXI1Jg5DGld2ycQ40aYjMTgWdbA4z9z B0tO+baOVkZ1f1ToTu8y7CCt6l3LgsdKyq7eRWX1a0ThQhXq4ypgK2er5EL7L1WNTECY59 e9PlbvZAnf/rMTQyfFZ0yHlNTdRfB0QMAgkPN0ImpwnLHL36YllJc71OMj95Zd/SD82A56 9AH3ld/S01I/+HXDl2Zcr9aBSAtu8U22qGSWJrTvbbw11ZWQGTaLiOH/CwhsgsJUvhzmNM Yw1D+JVqdMQyCfTMPuf5ajBMIfhf1guJvbcZkykF+sVGxLKD4MjwCeCOMFRjiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmtFF6qwdzhQm; Wed, 15 Oct 2025 14:07: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 59FE7Dv3027450; Wed, 15 Oct 2025 14:07:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FE7DEM027447; Wed, 15 Oct 2025 14:07:13 GMT (envelope-from git) Date: Wed, 15 Oct 2025 14:07:13 GMT Message-Id: <202510151407.59FE7DEM027447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 613eb8ee9cb2 - stable/14 - ipv6: don't complain when deleting an address with prefix length of 128 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 613eb8ee9cb269205cdf168e02b4b093ae1c9a62 Auto-Submitted: auto-generated The branch stable/14 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=613eb8ee9cb269205cdf168e02b4b093ae1c9a62 commit 613eb8ee9cb269205cdf168e02b4b093ae1c9a62 Author: Andrey V. Elsukov AuthorDate: 2025-10-07 13:08:15 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-10-15 14:06:43 +0000 ipv6: don't complain when deleting an address with prefix length of 128 Save prefix length in unused field in6_ifaddr->ia_plen, then on remove check if an address has 128 prefix length, and if so, we don't need to complain that there is none of related prefixes. Reviewed by: kp Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D52952 (cherry picked from commit c4cce0a3e94e3b22f874508d1a9cd81442648238) --- sys/netinet6/in6.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 8d43ae18969a..b2b3c64d0a77 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1288,8 +1288,8 @@ in6_addifaddr(struct ifnet *ifp, struct in6_aliasreq *ifra, struct in6_ifaddr *i */ bzero(&pr0, sizeof(pr0)); pr0.ndpr_ifp = ifp; - pr0.ndpr_plen = in6_mask2len(&ifra->ifra_prefixmask.sin6_addr, - NULL); + pr0.ndpr_plen = ia->ia_plen = + in6_mask2len(&ifra->ifra_prefixmask.sin6_addr, NULL); if (pr0.ndpr_plen == 128) { /* we don't need to install a host route. */ goto aifaddr_out; @@ -1483,16 +1483,16 @@ in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp) * positive reference. */ remove_lle = 0; - if (ia->ia6_ndpr == NULL) { - nd6log((LOG_NOTICE, - "in6_unlink_ifa: autoconf'ed address " - "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); - } else { + if (ia->ia6_ndpr != NULL) { ia->ia6_ndpr->ndpr_addrcnt--; /* Do not delete lles within prefix if refcont != 0 */ if (ia->ia6_ndpr->ndpr_addrcnt == 0) remove_lle = 1; ia->ia6_ndpr = NULL; + } else if (ia->ia_plen < 128) { + nd6log((LOG_NOTICE, + "in6_unlink_ifa: autoconf'ed address " + "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); } nd6_rem_ifa_lle(ia, remove_lle); From nobody Wed Oct 15 15:31:44 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmw720vYXz6CYGh for ; Wed, 15 Oct 2025 15:31:58 +0000 (UTC) (envelope-from jlduran@gmail.com) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmw716kQQz3kM9 for ; Wed, 15 Oct 2025 15:31:57 +0000 (UTC) (envelope-from jlduran@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-86284d59f16so155130585a.0 for ; Wed, 15 Oct 2025 08:31:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760542317; x=1761147117; h=content-transfer-encoding:cc: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=1o+aSjwiL3MvEpiVjdxN98aar0vEbT55zRt+/nuCA6A=; b=Nm3AzKnKsg7cm9sRMiPSH2Vo08D89QPDrJBd6iza2S+8S+2C494PiU1yfwrSnN8OID SMXF7D0PufrDrFr9qsNIXxToT1m6F0/H3h7I7LCUasR/IJRJWYq0cckIMAb9imVJJjse LmeHLo5Rt/9W8oYQ7rnMt+o6Vb40IoCIOQMgljx3I3qxspiUfx3K/EaxoHEfLXOOtXMO lVBktk+KN56lPSMFYdwuqqQd57uOFUwebg3KvnK1KrVOXw3B8o4ZSwWX02j2Xcwsu/BC MWD1S7hidJaC5/24wIsWLK4el3qxvFBINsj9h9ekMapFWBbiK00hwOjFZ6meEHBJXokk 5NWg== X-Forwarded-Encrypted: i=1; AJvYcCWRrjm3LpigjRE/fb+tJjqeF8arCdBZy/g1c4CcIoTAcMBTYfPnfG/QxjdCqnntYfZ2t33h8AnWUkudqxz9vuHDci2/@freebsd.org X-Gm-Message-State: AOJu0YzEbq+yqOK/2qv2U8xigDUC0vGXm8BCjqdWvIbnbE9Dgkusr3V9 0AEq6EPXN6WlRZLxguT3C/jDp7kGyahPnmdn/R05WiKde3TYU/6Jli4TnZGq+g== X-Gm-Gg: ASbGncvmqzxz2Fl5gG7DxGlpjTyvwXOieEtb40yosGbJTwBRJqNGKByjh9i5FnL893Z /R4NfrXj6O22xGzvEoZxvDZbtZy7/qJRPbCHB6hE2MP97lTCziLioBTyB+Dtl3WoyT/7R/Wob9f 9nKM/vsVGDqHcSndO8QqzI9eoTz9Vo2jR+y0lSU35vu/WFA2Jgf3m90UyCgy7QilT+4YJbEHOQ/ 5hvT+MVXFddkgrjwYPj82guH5MGwzEfjiWVxePxj/ZFh2+/OnyRAYqcUlTgUIGbXguOyeffnOUU 8YWevNfn/tyf0bq/j7ljjbDHCkIlkBNDDPUdNZt6HOWyAoimw/14Lu7ZYYPqRGnd48F/7NVYllM BhEZdPFlhOFcFVWxC4utXe2LAATsOlebqhF9Az6PqIaoY/lbO9tqn5ZI9usWOPwIK1khTpG/CY/ J7zs42gg== X-Google-Smtp-Source: AGHT+IGC444peXu17cNM0m274sRyrEdLk5w3paBrGNzvHODDdXnj+kWQokXMpg0mC+EwxBBbl5ImxQ== X-Received: by 2002:ad4:5dc1:0:b0:87b:b675:c079 with SMTP id 6a1803df08f44-87c0169ce21mr33214876d6.3.1760542316870; Wed, 15 Oct 2025 08:31:56 -0700 (PDT) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com. [209.85.222.176]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-87c0120c1edsm20232826d6.13.2025.10.15.08.31.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Oct 2025 08:31:56 -0700 (PDT) Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-88e98345a03so13181685a.2 for ; Wed, 15 Oct 2025 08:31:56 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUk0jJ6Db+OPAYc51HgYeYpYQXVmGLcpbeeluZG2pZ9biMjAA8mH2jmW4kWl42Q4lO83KACJkxLwjDj4nnoIStSBIl8@freebsd.org X-Received: by 2002:a05:622a:53:b0:4e8:9176:1693 with SMTP id d75a77b69052e-4e89176195fmr2184781cf.11.1760542315914; Wed, 15 Oct 2025 08:31:55 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202510151228.59FCSR9W038102@gitrepo.freebsd.org> In-Reply-To: <202510151228.59FCSR9W038102@gitrepo.freebsd.org> Reply-To: jlduran@freebsd.org From: Jose Luis Duran Date: Wed, 15 Oct 2025 12:31:44 -0300 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWAPpLF3eYukvO9dhH-4f-dYDezq3OtgT8iYIPDrChpoJhUmsZZUVF4zOAY Message-ID: Subject: Re: git: d9edb8da6381 - internal/admin - admin: Release jlduran from mentorship To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@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: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: 4cmw716kQQz3kM9 On Wed, Oct 15, 2025 at 9:28=E2=80=AFAM Ed Maste wrote= : > > The branch internal/admin has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd9edb8da6381a3f01b8e72a76b= c7ecc894df8777 > > commit d9edb8da6381a3f01b8e72a76bc7ecc894df8777 > Author: Ed Maste > AuthorDate: 2025-10-15 12:27:33 +0000 > Commit: Ed Maste > CommitDate: 2025-10-15 12:27:49 +0000 > > admin: Release jlduran from mentorship Thank you Ed for being my mentor! It has been a great honor. --=20 Jose Luis Duran From nobody Wed Oct 15 15:32:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 15:35:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmwC80cHKz6CYWc; Wed, 15 Oct 2025 15:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmwC80Bvnz3l8c; Wed, 15 Oct 2025 15:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760542532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ctIqqvPtSmtWa/4pd3wN+1gN+yoh6gUwgljLVAB7UG8=; b=jDJgVQplYQ4HAjVW0IM94E/BIcGIizTPYKcnF8l+ld7JbOfYt4Y4oF32oYk5mPvm9pdVQT OGeN1N0wGjcpAQWy5TT9MsKARgO4JHFb9tZk7iLb0PjNKnYzyalacNANu/Jeg/cphTNb9n Tx4CgA4aOrKGCUVluDQCMQZJbT1glb9qx99fT5rsd0xmlLDey4Yx7gIVnGz8R8Hu7jjHCb afAtje50tJ8TXq0ZnLaju+GIJVO8YzD74TvUVVYGIW6hwCqPbdujJJE03JO+2WUl1n6fkl x6DH24kk030cEIpAVQwQCkNFvpS8GAnRDfBG2fWFKjUgAH5DChpHNk3TT76OVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760542532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ctIqqvPtSmtWa/4pd3wN+1gN+yoh6gUwgljLVAB7UG8=; b=Zv6NdMguhuYV5nNLxUzXq1Y7RBFWpRF3SoOgAN4PXjvaqFtZOG5P8jJtBUubLv8y08FfMP 52txjxVRG02qxXzNmUa74wwwuQXp69I8hd6U+1q68/QBFDvOQNWkaNq04O/buS7jishKko W3CxlgURQuHrZ7fDRk/U6mZ6Dzrzcp8Aeo1qmYZVcRwFAl9AdmOmQT0q85JO4VR4mJ/rBE 0FcWrRwc4+2K6r/AW1jPCgHHxkTa0x85Rww7HQwlH7jvGXoZUbZzLld1GjxMrt3pJwbLf6 cARu8+YDzZajGlKFoKMQls4TYD947bzQbK1EdPn3jmJX63ipA+SWB/Wu1vsTzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760542532; a=rsa-sha256; cv=none; b=Qb/jVTOh90+BWrszilWJWxtaREtc20EIKMqK0ByXIRJMR+beZlK+Aif181Xg8rdFgQYs8P sLs4/QNFz0/VlHYZ8g73YU5tnun1OgBKuBNprfADWS4l2HQ1bgPfIXZkSeKD0tH597ez10 nuhk0rnQsY1RZiUGrjnFGYJMvju6eorGn5+bdlhARzubFmy3/pKgwHKEFzB8/4hLpzOgfO OpONTR3qD7Bo6/3cqNKrCZXhdqCtECXTyeAx54W7sdcKcqkfcKg84Gt3wTWGIfa/IGT0yw iAbEeKcbIys72cR03BRn0f93zQIwzApucJD7XD8lGhGldOafQeovMX66VClo7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmwC76c28zl4g; Wed, 15 Oct 2025 15:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59FFZV5R095681; Wed, 15 Oct 2025 15:35:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FFZVXF095678; Wed, 15 Oct 2025 15:35:31 GMT (envelope-from git) Date: Wed, 15 Oct 2025 15:35:31 GMT Message-Id: <202510151535.59FFZVXF095678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: a728b96686e6 - stable/14 - ix/ixv: Add support for new Intel Ethernet E610 family devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a728b96686e69cc3237f94b07f3bced44eeed8e9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=a728b96686e69cc3237f94b07f3bced44eeed8e9 commit a728b96686e69cc3237f94b07f3bced44eeed8e9 Author: Bhosale, Yogeshnull AuthorDate: 2025-08-19 14:19:07 +0000 Commit: Krzysztof Galazka CommitDate: 2025-10-15 15:26:26 +0000 ix/ixv: Add support for new Intel Ethernet E610 family devices This is part 1 of the support for the new Intel Ethernet E610 family of devices. Introduce new PCI device IDs: • 57AE: Intel(R) E610 (Backplane) • 57AF: Intel(R) E610 (SFP) • 57B0: Intel(R) E610 (10 GbE) • 57B1: Intel(R) E610 (2.5 GbE) • 57B2: Intel(R) E610 (SGMII) Key updates for E610 family: • Firmware manages Link and PHY • Implement new CSR-based Admin Command Interface (ACI) for SW-FW interaction • Tested exclusively for x64 operating systems on E610-XT2/XT4 (10G) and E610-IT4 (2.5G) • Enable link speeds above 1G: 2.5G, 5G and 10G • NVM Recovery Mode and Rollback support Signed-off-by: Yogesh Bhosale yogesh.bhosale@intel.com Co-developed-by: Krzysztof Galazka krzysztof.galazka@intel.com Approved by: kbowling (mentor), erj (mentor) Tested by: gowtham.kumar.ks_intel.com Sponsored by: Intel Corporation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50067 (cherry picked from commit dea5f973d0c8d29a79b433283d0a2de8f4615957) --- sys/conf/files | 2 + sys/dev/ixgbe/if_ix.c | 231 +- sys/dev/ixgbe/if_ixv.c | 6 + sys/dev/ixgbe/ixgbe.h | 11 + sys/dev/ixgbe/ixgbe_api.c | 16 + sys/dev/ixgbe/ixgbe_api.h | 1 + sys/dev/ixgbe/ixgbe_common.c | 25 +- sys/dev/ixgbe/ixgbe_e610.c | 5567 +++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_e610.h | 224 ++ sys/dev/ixgbe/ixgbe_osdep.c | 26 + sys/dev/ixgbe/ixgbe_osdep.h | 31 + sys/dev/ixgbe/ixgbe_type.h | 69 +- sys/dev/ixgbe/ixgbe_type_e610.h | 2278 ++++++++++++++++ sys/dev/ixgbe/ixgbe_vf.c | 3 +- sys/modules/ix/Makefile | 2 +- sys/modules/ixv/Makefile | 2 +- 16 files changed, 8458 insertions(+), 36 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 12ddadf62154..427f6fdebf57 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2282,6 +2282,8 @@ dev/ixgbe/ixgbe_x540.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x550.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_e610.c optional ix inet | ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82598.c optional ix inet | ixv inet \ diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 5adda9642868..5c4ca585c323 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -45,7 +45,7 @@ /************************************************************************ * Driver version ************************************************************************/ -static const char ixgbe_driver_version[] = "4.0.1-k"; +static const char ixgbe_driver_version[] = "5.0.1-k"; /************************************************************************ * PCI Device ID Table @@ -144,6 +144,16 @@ static const pci_vendor_info_t ixgbe_vendor_info_array[] = "Intel(R) X540-T2 (Bypass)"), PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS, "Intel(R) X520 82599 (Bypass)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_BACKPLANE, + "Intel(R) E610 (Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_SFP, + "Intel(R) E610 (SFP)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_2_5G_T, + "Intel(R) E610 (2.5 GbE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_10G_T, + "Intel(R) E610 (10 GbE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_SGMII, + "Intel(R) E610 (SGMII)"), /* required last entry */ PVID_END }; @@ -254,6 +264,10 @@ static int ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); static void ixgbe_handle_msf(void *); static void ixgbe_handle_mod(void *); static void ixgbe_handle_phy(void *); +static void ixgbe_handle_fw_event(void *); + +static int ixgbe_enable_lse(struct ixgbe_softc *sc); +static int ixgbe_disable_lse(struct ixgbe_softc *sc); /************************************************************************ * FreeBSD Device Interface Entry Points @@ -622,6 +636,7 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) case ixgbe_mac_X550: case ixgbe_mac_X550EM_x: case ixgbe_mac_X550EM_a: + case ixgbe_mac_E610: table_size = 512; break; default: @@ -903,6 +918,32 @@ ixgbe_initialize_transmit_units(if_ctx_t ctx) } /* ixgbe_initialize_transmit_units */ +static int +ixgbe_check_fw_api_version(struct ixgbe_softc *sc) +{ + struct ixgbe_hw *hw = &sc->hw; + if (hw->api_maj_ver > IXGBE_FW_API_VER_MAJOR) { + device_printf(sc->dev, + "The driver for the device stopped because the NVM " + "image is newer than expected. You must install the " + "most recent version of the network driver.\n"); + return (EOPNOTSUPP); + } else if (hw->api_maj_ver == IXGBE_FW_API_VER_MAJOR && + hw->api_min_ver > (IXGBE_FW_API_VER_MINOR + 2)) { + device_printf(sc->dev, + "The driver for the device detected a newer version of " + "the NVM image than expected. Please install the most " + "recent version of the network driver.\n"); + } else if (hw->api_maj_ver < IXGBE_FW_API_VER_MAJOR || + hw->api_min_ver < IXGBE_FW_API_VER_MINOR - 2) { + device_printf(sc->dev, + "The driver for the device detected an older version " + "of the NVM image than expected. " + "Please update the NVM image.\n"); + } + return (0); +} + /************************************************************************ * ixgbe_register ************************************************************************/ @@ -971,6 +1012,9 @@ ixgbe_if_attach_pre(if_ctx_t ctx) goto err_pci; } + if (hw->mac.type == ixgbe_mac_E610) + ixgbe_init_aci(hw); + if (hw->mac.ops.fw_recovery_mode && hw->mac.ops.fw_recovery_mode(hw)) { device_printf(dev, @@ -1059,6 +1103,12 @@ ixgbe_if_attach_pre(if_ctx_t ctx) break; } + /* Check the FW API version */ + if (hw->mac.type == ixgbe_mac_E610 && ixgbe_check_fw_api_version(sc)) { + error = EIO; + goto err_pci; + } + /* Most of the iflib initialization... */ iflib_set_mac(ctx, hw->mac.addr); @@ -1112,6 +1162,9 @@ err_pci: IXGBE_WRITE_REG(&sc->hw, IXGBE_CTRL_EXT, ctrl_ext); ixgbe_free_pci_resources(ctx); + if (hw->mac.type == ixgbe_mac_E610) + ixgbe_shutdown_aci(hw); + return (error); } /* ixgbe_if_attach_pre */ @@ -1359,6 +1412,10 @@ ixgbe_add_media_types(if_ctx_t ctx) /* Media types with matching FreeBSD media defines */ if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T) ifmedia_add(sc->media, IFM_ETHER | IFM_10G_T, 0, NULL); + if (layer & IXGBE_PHYSICAL_LAYER_5000BASE_T) + ifmedia_add(sc->media, IFM_ETHER | IFM_5000_T, 0, NULL); + if (layer & IXGBE_PHYSICAL_LAYER_2500BASE_T) + ifmedia_add(sc->media, IFM_ETHER | IFM_2500_T, 0, NULL); if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_T) ifmedia_add(sc->media, IFM_ETHER | IFM_1000_T, 0, NULL); if (layer & IXGBE_PHYSICAL_LAYER_100BASE_TX) @@ -1460,6 +1517,7 @@ ixgbe_is_sfp(struct ixgbe_hw *hw) } case ixgbe_mac_X550EM_x: case ixgbe_mac_X550EM_a: + case ixgbe_mac_E610: if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) return (true); return (false); @@ -1526,6 +1584,15 @@ ixgbe_config_link(if_ctx_t ctx) IXGBE_LINK_SPEED_5GB_FULL); } + if (hw->mac.type == ixgbe_mac_E610) { + hw->phy.ops.init(hw); + err = ixgbe_enable_lse(sc); + if (err) + device_printf(sc->dev, + "Failed to enable Link Status Event, " + "error: %d", err); + } + if (hw->mac.ops.setup_link) err = hw->mac.ops.setup_link(hw, autoneg, sc->link_up); @@ -2159,14 +2226,15 @@ get_parent_info: ixgbe_set_pci_config_data_generic(hw, link); display: - device_printf(dev, "PCI Express Bus: Speed %s %s\n", - ((hw->bus.speed == ixgbe_bus_speed_8000) ? "8.0GT/s" : + device_printf(dev, "PCI Express Bus: Speed %s Width %s\n", + ((hw->bus.speed == ixgbe_bus_speed_16000) ? "16.0GT/s" : + (hw->bus.speed == ixgbe_bus_speed_8000) ? "8.0GT/s" : (hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0GT/s" : (hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5GT/s" : "Unknown"), - ((hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" : - (hw->bus.width == ixgbe_bus_width_pcie_x4) ? "Width x4" : - (hw->bus.width == ixgbe_bus_width_pcie_x1) ? "Width x1" : + ((hw->bus.width == ixgbe_bus_width_pcie_x8) ? "x8" : + (hw->bus.width == ixgbe_bus_width_pcie_x4) ? "x4" : + (hw->bus.width == ixgbe_bus_width_pcie_x1) ? "x1" : "Unknown")); if (bus_info_valid) { @@ -2373,14 +2441,17 @@ ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) ifmr->ifm_status |= IFM_ACTIVE; layer = sc->phy_layer; - if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T || - layer & IXGBE_PHYSICAL_LAYER_1000BASE_T || - layer & IXGBE_PHYSICAL_LAYER_100BASE_TX || - layer & IXGBE_PHYSICAL_LAYER_10BASE_T) + if (layer & IXGBE_PHYSICAL_LAYERS_BASE_T_ALL) switch (sc->link_speed) { case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= IFM_10G_T | IFM_FDX; break; + case IXGBE_LINK_SPEED_5GB_FULL: + ifmr->ifm_active |= IFM_5000_T | IFM_FDX; + break; + case IXGBE_LINK_SPEED_2_5GB_FULL: + ifmr->ifm_active |= IFM_2500_T | IFM_FDX; + break; case IXGBE_LINK_SPEED_1GB_FULL: ifmr->ifm_active |= IFM_1000_T | IFM_FDX; break; @@ -2391,15 +2462,6 @@ ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) ifmr->ifm_active |= IFM_10_T | IFM_FDX; break; } - if (hw->mac.type == ixgbe_mac_X550) - switch (sc->link_speed) { - case IXGBE_LINK_SPEED_5GB_FULL: - ifmr->ifm_active |= IFM_5000_T | IFM_FDX; - break; - case IXGBE_LINK_SPEED_2_5GB_FULL: - ifmr->ifm_active |= IFM_2500_T | IFM_FDX; - break; - } if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU || layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) switch (sc->link_speed) { @@ -2677,6 +2739,11 @@ ixgbe_msix_link(void *arg) sc->task_requests |= IXGBE_REQUEST_TASK_LSC; } + if (eicr & IXGBE_EICR_FW_EVENT) { + IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EICR_FW_EVENT); + sc->task_requests |= IXGBE_REQUEST_TASK_FWEVENT; + } + if (sc->hw.mac.type != ixgbe_mac_82598EB) { if ((sc->feat_en & IXGBE_FEATURE_FDIR) && (eicr & IXGBE_EICR_FLOW_DIR)) { @@ -2735,11 +2802,16 @@ ixgbe_msix_link(void *arg) /* Check for VF message */ if ((sc->feat_en & IXGBE_FEATURE_SRIOV) && - (eicr & IXGBE_EICR_MAILBOX)) + (eicr & IXGBE_EICR_MAILBOX)) { sc->task_requests |= IXGBE_REQUEST_TASK_MBX; + } } - if (ixgbe_is_sfp(hw)) { + /* + * On E610, the firmware handles PHY configuration, so + * there is no need to perform any SFP-specific tasks. + */ + if (hw->mac.type != ixgbe_mac_E610 && ixgbe_is_sfp(hw)) { /* Pluggable optics-related interrupt */ if (hw->mac.type >= ixgbe_mac_X540) eicr_mask = IXGBE_EICR_GPI_SDP0_X540; @@ -2986,7 +3058,13 @@ ixgbe_if_detach(if_ctx_t ctx) callout_drain(&sc->fw_mode_timer); + if (sc->hw.mac.type == ixgbe_mac_E610) { + ixgbe_disable_lse(sc); + ixgbe_shutdown_aci(&sc->hw); + } + ixgbe_free_pci_resources(ctx); + free(sc->mta, M_IXGBE); return (0); @@ -3405,6 +3483,7 @@ ixgbe_set_ivar(struct ixgbe_softc *sc, u8 entry, u8 vector, s8 type) case ixgbe_mac_X550: case ixgbe_mac_X550EM_x: case ixgbe_mac_X550EM_a: + case ixgbe_mac_E610: if (type == -1) { /* MISC IVAR */ index = (entry & 1) * 8; ivar = IXGBE_READ_REG(hw, IXGBE_IVAR_MISC); @@ -3826,6 +3905,96 @@ ixgbe_handle_phy(void *context) "Error handling LASI interrupt: %d\n", error); } /* ixgbe_handle_phy */ +/************************************************************************ + * ixgbe_enable_lse - enable link status events + * + * Sets mask and enables link status events + ************************************************************************/ +s32 ixgbe_enable_lse(struct ixgbe_softc *sc) +{ + s32 error; + + u16 mask = ~((u16)(IXGBE_ACI_LINK_EVENT_UPDOWN | + IXGBE_ACI_LINK_EVENT_MEDIA_NA | + IXGBE_ACI_LINK_EVENT_MODULE_QUAL_FAIL | + IXGBE_ACI_LINK_EVENT_PHY_FW_LOAD_FAIL)); + + error = ixgbe_configure_lse(&sc->hw, TRUE, mask); + if (error) + return (error); + + sc->lse_mask = mask; + return (IXGBE_SUCCESS); +} /* ixgbe_enable_lse */ + +/************************************************************************ + * ixgbe_disable_lse - disable link status events + ************************************************************************/ +s32 ixgbe_disable_lse(struct ixgbe_softc *sc) +{ + s32 error; + + error = ixgbe_configure_lse(&sc->hw, false, sc->lse_mask); + if (error) + return (error); + + sc->lse_mask = 0; + return (IXGBE_SUCCESS); +} /* ixgbe_disable_lse */ + +/************************************************************************ + * ixgbe_handle_fw_event - Tasklet for MSI-X Link Status Event interrupts + ************************************************************************/ +static void +ixgbe_handle_fw_event(void *context) +{ + if_ctx_t ctx = context; + struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_hw *hw = &sc->hw; + struct ixgbe_aci_event event; + bool pending = false; + s32 error; + + event.buf_len = IXGBE_ACI_MAX_BUFFER_SIZE; + event.msg_buf = malloc(event.buf_len, M_IXGBE, M_ZERO | M_NOWAIT); + if (!event.msg_buf) { + device_printf(sc->dev, "Can not allocate buffer for " + "event message\n"); + return; + } + + do { + error = ixgbe_aci_get_event(hw, &event, &pending); + if (error) { + device_printf(sc->dev, "Error getting event from " + "FW:%d\n", error); + break; + } + + switch (le16toh(event.desc.opcode)) { + case ixgbe_aci_opc_get_link_status: + sc->task_requests |= IXGBE_REQUEST_TASK_LSC; + break; + + case ixgbe_aci_opc_temp_tca_event: + if (hw->adapter_stopped == FALSE) + ixgbe_if_stop(ctx); + device_printf(sc->dev, + "CRITICAL: OVER TEMP!! PHY IS SHUT DOWN!!\n"); + device_printf(sc->dev, "System shutdown required!\n"); + break; + + default: + device_printf(sc->dev, + "Unknown FW event captured, opcode=0x%04X\n", + le16toh(event.desc.opcode)); + break; + } + } while (pending); + + free(event.msg_buf, M_IXGBE); +} /* ixgbe_handle_fw_event */ + /************************************************************************ * ixgbe_if_stop - Stop the hardware * @@ -3927,6 +4096,8 @@ ixgbe_if_update_admin_status(if_ctx_t ctx) } /* Handle task requests from msix_link() */ + if (sc->task_requests & IXGBE_REQUEST_TASK_FWEVENT) + ixgbe_handle_fw_event(ctx); if (sc->task_requests & IXGBE_REQUEST_TASK_MOD) ixgbe_handle_mod(ctx); if (sc->task_requests & IXGBE_REQUEST_TASK_MSF) @@ -4014,6 +4185,9 @@ ixgbe_if_enable_intr(if_ctx_t ctx) mask |= IXGBE_EICR_GPI_SDP0_X540; mask |= IXGBE_EIMS_ECC; break; + case ixgbe_mac_E610: + mask |= IXGBE_EIMS_FW_EVENT; + break; default: break; } @@ -4036,6 +4210,7 @@ ixgbe_if_enable_intr(if_ctx_t ctx) /* Don't autoclear Link */ mask &= ~IXGBE_EIMS_OTHER; mask &= ~IXGBE_EIMS_LSC; + mask &= ~IXGBE_EIMS_FW_EVENT; if (sc->feat_cap & IXGBE_FEATURE_SRIOV) mask &= ~IXGBE_EIMS_MAILBOX; IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask); @@ -4054,7 +4229,7 @@ ixgbe_if_enable_intr(if_ctx_t ctx) } /* ixgbe_if_enable_intr */ /************************************************************************ - * ixgbe_disable_intr + * ixgbe_if_disable_intr ************************************************************************/ static void ixgbe_if_disable_intr(if_ctx_t ctx) @@ -4204,8 +4379,9 @@ ixgbe_intr(void *arg) /* External PHY interrupt */ if ((hw->phy.type == ixgbe_phy_x550em_ext_t) && - (eicr & IXGBE_EICR_GPI_SDP0_X540)) + (eicr & IXGBE_EICR_GPI_SDP0_X540)) { sc->task_requests |= IXGBE_REQUEST_TASK_PHY; + } return (FILTER_SCHEDULE_THREAD); } /* ixgbe_intr */ @@ -4247,7 +4423,7 @@ ixgbe_sysctl_flowcntl(SYSCTL_HANDLER_ARGS) int error, fc; sc = (struct ixgbe_softc *)arg1; - fc = sc->hw.fc.current_mode; + fc = sc->hw.fc.requested_mode; error = sysctl_handle_int(oidp, &fc, 0, req); if ((error) || (req->newptr == NULL)) @@ -4276,12 +4452,10 @@ ixgbe_set_flowcntl(struct ixgbe_softc *sc, int fc) case ixgbe_fc_rx_pause: case ixgbe_fc_tx_pause: case ixgbe_fc_full: - sc->hw.fc.requested_mode = fc; if (sc->num_rx_queues > 1) ixgbe_disable_rx_drop(sc); break; case ixgbe_fc_none: - sc->hw.fc.requested_mode = ixgbe_fc_none; if (sc->num_rx_queues > 1) ixgbe_enable_rx_drop(sc); break; @@ -4289,6 +4463,8 @@ ixgbe_set_flowcntl(struct ixgbe_softc *sc, int fc) return (EINVAL); } + sc->hw.fc.requested_mode = fc; + /* Don't autoneg if forcing a value */ sc->hw.fc.disable_fc_autoneg = true; ixgbe_fc_enable(&sc->hw); @@ -5006,6 +5182,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) if (sc->hw.device_id == IXGBE_DEV_ID_82599_QSFP_SF_QP) sc->feat_cap &= ~IXGBE_FEATURE_LEGACY_IRQ; break; + case ixgbe_mac_E610: + sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; + break; default: break; } diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index 54b2c8c1dd68..8a1c1aae041d 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -68,6 +68,8 @@ static const pci_vendor_info_t ixv_vendor_info_array[] = "Intel(R) X552 Virtual Function"), PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_VF, "Intel(R) X553 Virtual Function"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_VF, + "Intel(R) E610 Virtual Function"), /* required last entry */ PVID_END }; @@ -1020,6 +1022,9 @@ ixv_identify_hardware(if_ctx_t ctx) case IXGBE_DEV_ID_X550EM_A_VF: hw->mac.type = ixgbe_mac_X550EM_a_vf; break; + case IXGBE_DEV_ID_E610_VF: + hw->mac.type = ixgbe_mac_E610_vf; + break; default: device_printf(dev, "unknown mac type\n"); hw->mac.type = ixgbe_mac_unknown; @@ -1955,6 +1960,7 @@ ixv_init_device_features(struct ixgbe_softc *sc) case ixgbe_mac_X550_vf: case ixgbe_mac_X550EM_x_vf: case ixgbe_mac_X550EM_a_vf: + case ixgbe_mac_E610_vf: sc->feat_cap |= IXGBE_FEATURE_NEEDS_CTXD; sc->feat_cap |= IXGBE_FEATURE_RSS; break; diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 341d4ebfcebc..844064bf8543 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -86,6 +86,7 @@ #include "ixgbe_phy.h" #include "ixgbe_vf.h" #include "ixgbe_features.h" +#include "ixgbe_e610.h" /* Tunables */ @@ -195,6 +196,15 @@ CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP) +/* All BASE-T Physical layers */ +#define IXGBE_PHYSICAL_LAYERS_BASE_T_ALL \ + (IXGBE_PHYSICAL_LAYER_10GBASE_T |\ + IXGBE_PHYSICAL_LAYER_5000BASE_T |\ + IXGBE_PHYSICAL_LAYER_2500BASE_T |\ + IXGBE_PHYSICAL_LAYER_1000BASE_T |\ + IXGBE_PHYSICAL_LAYER_100BASE_TX |\ + IXGBE_PHYSICAL_LAYER_10BASE_T) + #define IXGBE_CAPS (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_TSO | \ IFCAP_LRO | IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | \ IFCAP_VLAN_HWCSUM | IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU | \ @@ -464,6 +474,7 @@ struct ixgbe_softc { /* Feature capable/enabled flags. See ixgbe_features.h */ u32 feat_cap; u32 feat_en; + u16 lse_mask; }; /* Precision Time Sync (IEEE 1588) defines */ diff --git a/sys/dev/ixgbe/ixgbe_api.c b/sys/dev/ixgbe/ixgbe_api.c index 4c50f10ed92e..f11f52a646e4 100644 --- a/sys/dev/ixgbe/ixgbe_api.c +++ b/sys/dev/ixgbe/ixgbe_api.c @@ -112,11 +112,15 @@ s32 ixgbe_init_shared_code(struct ixgbe_hw *hw) case ixgbe_mac_X550EM_a: status = ixgbe_init_ops_X550EM_a(hw); break; + case ixgbe_mac_E610: + status = ixgbe_init_ops_E610(hw); + break; case ixgbe_mac_82599_vf: case ixgbe_mac_X540_vf: case ixgbe_mac_X550_vf: case ixgbe_mac_X550EM_x_vf: case ixgbe_mac_X550EM_a_vf: + case ixgbe_mac_E610_vf: status = ixgbe_init_ops_vf(hw); break; default: @@ -240,6 +244,18 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw) hw->mac.type = ixgbe_mac_X550EM_a_vf; hw->mvals = ixgbe_mvals_X550EM_a; break; + case IXGBE_DEV_ID_E610_BACKPLANE: + case IXGBE_DEV_ID_E610_SFP: + case IXGBE_DEV_ID_E610_10G_T: + case IXGBE_DEV_ID_E610_2_5G_T: + case IXGBE_DEV_ID_E610_SGMII: + hw->mac.type = ixgbe_mac_E610; + hw->mvals = ixgbe_mvals_X550EM_a; + break; + case IXGBE_DEV_ID_E610_VF: + hw->mac.type = ixgbe_mac_E610_vf; + hw->mvals = ixgbe_mvals_X550EM_a; + break; default: ret_val = IXGBE_ERR_DEVICE_NOT_SUPPORTED; ERROR_REPORT2(IXGBE_ERROR_UNSUPPORTED, diff --git a/sys/dev/ixgbe/ixgbe_api.h b/sys/dev/ixgbe/ixgbe_api.h index b81510dacb95..2b4cec8d110e 100644 --- a/sys/dev/ixgbe/ixgbe_api.h +++ b/sys/dev/ixgbe/ixgbe_api.h @@ -48,6 +48,7 @@ extern s32 ixgbe_init_ops_X550(struct ixgbe_hw *hw); extern s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw); extern s32 ixgbe_init_ops_X550EM_x(struct ixgbe_hw *hw); extern s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw); +extern s32 ixgbe_init_ops_E610(struct ixgbe_hw *hw); extern s32 ixgbe_init_ops_vf(struct ixgbe_hw *hw); s32 ixgbe_set_mac_type(struct ixgbe_hw *hw); diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index df7ab90e72ab..bff022585a03 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -178,6 +178,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) case IXGBE_DEV_ID_X550EM_A_SFP_N: case IXGBE_DEV_ID_X550EM_A_QSFP: case IXGBE_DEV_ID_X550EM_A_QSFP_N: + case IXGBE_DEV_ID_E610_SFP: supported = false; break; default: @@ -210,6 +211,8 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) case IXGBE_DEV_ID_X550EM_A_10G_T: case IXGBE_DEV_ID_X550EM_A_1G_T: case IXGBE_DEV_ID_X550EM_A_1G_T_L: + case IXGBE_DEV_ID_E610_10G_T: + case IXGBE_DEV_ID_E610_2_5G_T: supported = true; break; default: @@ -616,7 +619,8 @@ s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw) } } - if (hw->mac.type == ixgbe_mac_X550 || hw->mac.type == ixgbe_mac_X540) { + if (hw->mac.type == ixgbe_mac_X540 || + hw->mac.type == ixgbe_mac_X550) { if (hw->phy.id == 0) ixgbe_identify_phy(hw); hw->phy.ops.read_reg(hw, IXGBE_PCRC8ECL, @@ -1037,6 +1041,9 @@ void ixgbe_set_pci_config_data_generic(struct ixgbe_hw *hw, u16 link_status) case IXGBE_PCI_LINK_SPEED_8000: hw->bus.speed = ixgbe_bus_speed_8000; break; + case IXGBE_PCI_LINK_SPEED_16000: + hw->bus.speed = ixgbe_bus_speed_16000; + break; default: hw->bus.speed = ixgbe_bus_speed_unknown; break; @@ -1059,7 +1066,9 @@ s32 ixgbe_get_bus_info_generic(struct ixgbe_hw *hw) DEBUGFUNC("ixgbe_get_bus_info_generic"); /* Get the negotiated link width and speed from PCI config space */ - link_status = IXGBE_READ_PCIE_WORD(hw, IXGBE_PCI_LINK_STATUS); + link_status = IXGBE_READ_PCIE_WORD(hw, hw->mac.type == ixgbe_mac_E610 ? + IXGBE_PCI_LINK_STATUS_E610 : + IXGBE_PCI_LINK_STATUS); ixgbe_set_pci_config_data_generic(hw, link_status); @@ -1878,7 +1887,6 @@ static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw) DEBUGFUNC("ixgbe_get_eeprom_semaphore"); - /* Get SMBI software semaphore between device drivers first */ for (i = 0; i < timeout; i++) { /* @@ -3363,7 +3371,6 @@ s32 ixgbe_disable_sec_rx_path_generic(struct ixgbe_hw *hw) DEBUGFUNC("ixgbe_disable_sec_rx_path_generic"); - secrxreg = IXGBE_READ_REG(hw, IXGBE_SECRXCTRL); secrxreg |= IXGBE_SECRXCTRL_RX_DIS; IXGBE_WRITE_REG(hw, IXGBE_SECRXCTRL, secrxreg); @@ -3692,6 +3699,10 @@ u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw) pcie_offset = IXGBE_PCIE_MSIX_82599_CAPS; max_msix_count = IXGBE_MAX_MSIX_VECTORS_82599; break; + case ixgbe_mac_E610: + pcie_offset = IXGBE_PCIE_MSIX_E610_CAPS; + max_msix_count = IXGBE_MAX_MSIX_VECTORS_82599; + break; default: return msix_count; } @@ -4139,7 +4150,6 @@ s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw) return IXGBE_SUCCESS; } - /** * ixgbe_toggle_txdctl_generic - Toggle VF's queues * @hw: pointer to hardware structure @@ -4323,7 +4333,8 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, break; case IXGBE_LINKS_SPEED_100_82599: *speed = IXGBE_LINK_SPEED_100_FULL; - if (hw->mac.type == ixgbe_mac_X550) { + if (hw->mac.type == ixgbe_mac_X550 || + hw->mac.type == ixgbe_mac_E610) { if (links_reg & IXGBE_LINKS_SPEED_NON_STD) *speed = IXGBE_LINK_SPEED_5GB_FULL; } @@ -5494,6 +5505,7 @@ void ixgbe_get_nvm_version(struct ixgbe_hw *hw, case ixgbe_mac_X550: case ixgbe_mac_X550EM_x: case ixgbe_mac_X550EM_a: + case ixgbe_mac_E610: /* version of eeprom section */ if (ixgbe_read_eeprom(hw, NVM_EEP_OFFSET_X540, &word)) word = NVM_VER_INVALID; @@ -5512,6 +5524,7 @@ void ixgbe_get_nvm_version(struct ixgbe_hw *hw, case ixgbe_mac_X550: case ixgbe_mac_X550EM_x: case ixgbe_mac_X550EM_a: + case ixgbe_mac_E610: /* intel phy firmware version */ if (ixgbe_read_eeprom(hw, NVM_EEP_PHY_OFF_X540, &word)) word = NVM_VER_INVALID; diff --git a/sys/dev/ixgbe/ixgbe_e610.c b/sys/dev/ixgbe/ixgbe_e610.c new file mode 100644 index 000000000000..95c6dca416c6 --- /dev/null +++ b/sys/dev/ixgbe/ixgbe_e610.c @@ -0,0 +1,5567 @@ +/****************************************************************************** + SPDX-License-Identifier: BSD-3-Clause + + Copyright (c) 2025, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#include "ixgbe_type.h" +#include "ixgbe_e610.h" +#include "ixgbe_x550.h" +#include "ixgbe_common.h" +#include "ixgbe_phy.h" +#include "ixgbe_api.h" + +/** + * ixgbe_init_aci - initialization routine for Admin Command Interface + * @hw: pointer to the hardware structure + * + * Initialize the ACI lock. + */ +void ixgbe_init_aci(struct ixgbe_hw *hw) +{ + ixgbe_init_lock(&hw->aci.lock); +} + +/** + * ixgbe_shutdown_aci - shutdown routine for Admin Command Interface + * @hw: pointer to the hardware structure + * + * Destroy the ACI lock. + */ +void ixgbe_shutdown_aci(struct ixgbe_hw *hw) +{ + ixgbe_destroy_lock(&hw->aci.lock); +} + +/** + * ixgbe_should_retry_aci_send_cmd_execute - decide if ACI command should + * be resent + * @opcode: ACI opcode + * + * Check if ACI command should be sent again depending on the provided opcode. + * + * Return: true if the sending command routine should be repeated, + * otherwise false. + */ +static bool ixgbe_should_retry_aci_send_cmd_execute(u16 opcode) +{ + switch (opcode) { + case ixgbe_aci_opc_disable_rxen: + case ixgbe_aci_opc_get_phy_caps: + case ixgbe_aci_opc_get_link_status: + case ixgbe_aci_opc_get_link_topo: + return true; + } + + return false; +} + +/** + * ixgbe_aci_send_cmd_execute - execute sending FW Admin Command to FW Admin + * Command Interface + * @hw: pointer to the HW struct + * @desc: descriptor describing the command + * @buf: buffer to use for indirect commands (NULL for direct commands) + * @buf_size: size of buffer for indirect commands (0 for direct commands) + * + * Admin Command is sent using CSR by setting descriptor and buffer in specific + * registers. + * + * Return: the exit code of the operation. + * * - IXGBE_SUCCESS - success. + * * - IXGBE_ERR_ACI_DISABLED - CSR mechanism is not enabled. + * * - IXGBE_ERR_ACI_BUSY - CSR mechanism is busy. + * * - IXGBE_ERR_PARAM - buf_size is too big or + * invalid argument buf or buf_size. + * * - IXGBE_ERR_ACI_TIMEOUT - Admin Command X command timeout. + * * - IXGBE_ERR_ACI_ERROR - Admin Command X invalid state of HICR register or + * Admin Command failed because of bad opcode was returned or + * Admin Command failed with error Y. + */ +static s32 +ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc, + void *buf, u16 buf_size) +{ + u32 hicr = 0, tmp_buf_size = 0, i = 0; + u32 *raw_desc = (u32 *)desc; + s32 status = IXGBE_SUCCESS; + bool valid_buf = false; + u32 *tmp_buf = NULL; + u16 opcode = 0; + + do { + hw->aci.last_status = IXGBE_ACI_RC_OK; + + /* It's necessary to check if mechanism is enabled */ + hicr = IXGBE_READ_REG(hw, PF_HICR); + if (!(hicr & PF_HICR_EN)) { + status = IXGBE_ERR_ACI_DISABLED; + break; + } + if (hicr & PF_HICR_C) { + hw->aci.last_status = IXGBE_ACI_RC_EBUSY; + status = IXGBE_ERR_ACI_BUSY; + break; + } + opcode = desc->opcode; + + if (buf_size > IXGBE_ACI_MAX_BUFFER_SIZE) { + status = IXGBE_ERR_PARAM; + break; + } + + if (buf) + desc->flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_BUF); + + /* Check if buf and buf_size are proper params */ + if (desc->flags & IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_BUF)) { + if ((buf && buf_size == 0) || + (buf == NULL && buf_size)) { + status = IXGBE_ERR_PARAM; + break; + } + if (buf && buf_size) + valid_buf = true; + } + + if (valid_buf == true) { + if (buf_size % 4 == 0) + tmp_buf_size = buf_size; + else + tmp_buf_size = (buf_size & (u16)(~0x03)) + 4; + + tmp_buf = (u32*)ixgbe_malloc(hw, tmp_buf_size); + if (!tmp_buf) + return IXGBE_ERR_OUT_OF_MEM; + + /* tmp_buf will be firstly filled with 0xFF and after + * that the content of buf will be written into it. + * This approach lets us use valid buf_size and + * prevents us from reading past buf area + * when buf_size mod 4 not equal to 0. + */ + memset(tmp_buf, 0xFF, tmp_buf_size); + memcpy(tmp_buf, buf, buf_size); + + if (tmp_buf_size > IXGBE_ACI_LG_BUF) + desc->flags |= + IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_LB); + + desc->datalen = IXGBE_CPU_TO_LE16(buf_size); + + if (desc->flags & IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD)) { + for (i = 0; i < tmp_buf_size / 4; i++) { + IXGBE_WRITE_REG(hw, PF_HIBA(i), + IXGBE_LE32_TO_CPU(tmp_buf[i])); + } + } + } + + /* Descriptor is written to specific registers */ + for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) + IXGBE_WRITE_REG(hw, PF_HIDA(i), + IXGBE_LE32_TO_CPU(raw_desc[i])); + + /* SW has to set PF_HICR.C bit and clear PF_HICR.SV and + * PF_HICR_EV + */ + hicr = IXGBE_READ_REG(hw, PF_HICR); + hicr = (hicr | PF_HICR_C) & ~(PF_HICR_SV | PF_HICR_EV); + IXGBE_WRITE_REG(hw, PF_HICR, hicr); + + /* Wait for sync Admin Command response */ + for (i = 0; i < IXGBE_ACI_SYNC_RESPONSE_TIMEOUT; i += 1) { + hicr = IXGBE_READ_REG(hw, PF_HICR); + if ((hicr & PF_HICR_SV) || !(hicr & PF_HICR_C)) + break; + + msec_delay(1); + } + + /* Wait for async Admin Command response */ + if ((hicr & PF_HICR_SV) && (hicr & PF_HICR_C)) { + for (i = 0; i < IXGBE_ACI_ASYNC_RESPONSE_TIMEOUT; + i += 1) { + hicr = IXGBE_READ_REG(hw, PF_HICR); + if ((hicr & PF_HICR_EV) || !(hicr & PF_HICR_C)) + break; + + msec_delay(1); + } + } + + /* Read sync Admin Command response */ + if ((hicr & PF_HICR_SV)) { + for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) { + raw_desc[i] = IXGBE_READ_REG(hw, PF_HIDA(i)); + raw_desc[i] = IXGBE_CPU_TO_LE32(raw_desc[i]); + } + } + + /* Read async Admin Command response */ + if ((hicr & PF_HICR_EV) && !(hicr & PF_HICR_C)) { + for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) { + raw_desc[i] = IXGBE_READ_REG(hw, PF_HIDA_2(i)); *** 8203 LINES SKIPPED *** From nobody Wed Oct 15 17:29:56 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmyl83cbZz6CjRJ; Wed, 15 Oct 2025 17:29: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 4cmyl83556z41Fq; Wed, 15 Oct 2025 17:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760549396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=biI63e6DHHPPEPB9orJyIIVwFwewKX6QVrdRjGgnO0E=; b=GpUxhGuzGLQGfM3E1T2Vr14qc69RV16KqToxShsOofFqK87a5PHC6ZEqYsv9Bdq3Cscgzf +sO1w0ocJ02sZiBW067/Hvw9wPO7OCmMM5J1Xnw9s2F1wvsENI4VRKcuzHNETth+F03wMD IwTNDz7xRjHvR5xLOhMog7F/OAZ01Rnc+5WbMnZaaWT0iTdoLKvMr9FrJyRkMYUfc/7ZPh +2jxh4T3yCgdrn8igOn0bH7dWefr1gYZmmZm4TbRKHZypZbjK2kAaMVwjPZP2nTFl/jjPb 31OEiPdoeozlhy4i9ea2dwASsmvKVvT5iZb1IOl/QXtuF+ri9WayF3+Tz2V7dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760549396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=biI63e6DHHPPEPB9orJyIIVwFwewKX6QVrdRjGgnO0E=; b=xQ1bynjGcaVRoSEhsu9NBrj2ActCGxLiOjvfEm9j0Bs/XVSkhtSyvzsnj1937b6Zntzzl5 CENWL5XZJVC1P54KbvnMIvl2KERzvGspYEDrkQkZqYKpnOxAo0q7P4k9ZA0CAgwQ2MsjYS xXigHMuD7088wHwY5lIlIvaoYG/cNnv8muvo29sb7F1cgEswMgooi/2eG9m8MgURC3Iy9M eR+JExWY/AH7r+YVxoiESYvCzJfJn2UxjoNNWs1ka0Y3981A3PqPqihntU8Tsa/Tz9UpE3 IS90MVmAL8kJziyuoENUMcQrd5c8au62hOpgjeS+Ptxe9ULLzhtY4BV9Iko0hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760549396; a=rsa-sha256; cv=none; b=wPltp3UmwPXT20T7Y2rX+DXjZ4bt5eMXTAEZcEirvOQXSu6AMILCz6ZPekjZidSQCQwplV Gu8kFF49CBM5CdOvoyfGJAH7smmP5/pHzGqahRf0XgsCVslkje6FAXLnQFlUe80RC40co7 QuYSUlM48FN9JUMfgnbw8ThmGnSJcQEaGtrSsMyDGLVmyxqwr9Bf3doQNnUg1g8xU6C6UD riRZyrfnpzUxLuZqNo/+Ik9fd3UWjQDuQYy5x2dNdUWkYtWewlO2oYRkQFWJwzyAOMhGRP mNHD+l4L1TpJgNu++ZCmFe9MC9OfCtRZAEZXJobTLe3w+5wbHiWxpLPm+Z6ZBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmyl82fHWznRs; Wed, 15 Oct 2025 17:29: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 59FHTuKS005610; Wed, 15 Oct 2025 17:29:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FHTuGC005607; Wed, 15 Oct 2025 17:29:56 GMT (envelope-from git) Date: Wed, 15 Oct 2025 17:29:56 GMT Message-Id: <202510151729.59FHTuGC005607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 4574a86c526c - stable/15 - man: Conditionally install ar.5 in toolchain package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4574a86c526c94d049e156fdf7f1c820b0f359be Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4574a86c526c94d049e156fdf7f1c820b0f359be commit 4574a86c526c94d049e156fdf7f1c820b0f359be Author: Ed Maste AuthorDate: 2025-10-03 16:02:20 +0000 Commit: Ed Maste CommitDate: 2025-10-15 17:27:36 +0000 man: Conditionally install ar.5 in toolchain package Previously if WITHOUT_TOOLCHAIN was set we'd create a FreeBSD-clang package that contained only ar.5. As ar.5 describes the ar format and doesn't come from Clang/LLVM move it to the FreeBSD-toolchain package and make it conditional on MK_TOOLCHAIN. Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52886 (cherry picked from commit a8d774d9708c100a52f231065d9d5f1b4c3aceb7) --- share/man/man5/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index 0f6559b236c6..c13a8b7afde2 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -73,9 +73,11 @@ MANGROUPS+= BOOTLOADER BOOTLOADER= device.hints.5 BOOTLOADERPACKAGE=bootloader -MANGROUPS+= CLANG -CLANG= ar.5 -CLANGPACKAGE= clang +.if ${MK_TOOLCHAIN} != "no" +MANGROUPS+= TOOLCHAIN +TOOLCHAIN= ar.5 +TOOLCHAINPACKAGE=toolchain +.endif MANGROUPS+= LP LP= hosts.lpd.5 From nobody Wed Oct 15 17:32:12 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 18:59:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn0kQ1p1Sz6CqjV; Wed, 15 Oct 2025 18:59: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 4cn0kQ1D5tz4GW9; Wed, 15 Oct 2025 18:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejf5ncxBN7IejVBYWPza2CAgjkzRxe1r9rOqrDQoaCs=; b=eQ7XdxeffjS0cFMcY8bhUNktn534m8K0i40ZKyIq+FwSGcndVmOptaL5Ac90vyQ3vvx/8a T0rAtVHOEuaDnwZvUcUbWocG8gXc+M3q4o4qphUNrRncexbZVDw+wpkATilj5OiDMePBfu n7FqZZB/cy7mapccke/FQIuehFTn9CBq3BGZrRCcLkzXg5fuLuDA4ZQ/8pTN7wENVVybhT gb5T3wDErV2bfvKs37R2n9DSGrj/VFzlSj3FHKSeegq056fL3+sIW3y1H9KI45IKLGiAFK zWh74E9dYcK68hYvGq1FfVy4QgqhBEn7P/cLTiZnNarLJBolryDQVlVWJ/rbdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejf5ncxBN7IejVBYWPza2CAgjkzRxe1r9rOqrDQoaCs=; b=BmwrEKpPEQPrhxggB99CVeH5oeovZIyqudDwOa+UEtGsrW4S95YVudvIIZtDzv6Jr2uZ8E +VV6yQ52MDDIMHZdXLkBMp0UFumYufov5Yfsef1VFdxZuC+8+NtbIKnJ9oDf5mo3k1+1QK AaY/p2MG+/G0okm0WPg0HjT75oAPTvp5U0Q28ki0i0VoU637fhFapA6XhcV74d1eRtA9et S63tKkiReSYu9/bwBL/D816Yg1xcO2npoPx67t6BIc+4kzJRvzCTDcc0cLLibqhnKDdAng 8g16NO6QhD9TNXLzQUiEF6TgITv+FsL36uk38Nwu09UQ0okDFUFmPVvATjxbZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760554766; a=rsa-sha256; cv=none; b=c+QKnK/IxiaA3qYa/21zTXMnEVZrJpJ/9bdj7VFcP8n+MBXivkSnQQY2C+tHca8yvjG16W 0gKxkhi9zs3njOMZl2DqWaZna6uQ6yoDDZhcZ3Szfc+7Fkd4B+2slQfE/LuTebFYhqdIWg IyplgojIrVB7nsoTG9XkSBrX6fQOz9iffldaVa38Fk70aJa9UiNa2c7oBcgq3fuXj/Juti 84Y6kWIuDvwJ5wP41LsziBd3wfTGwhQhLF0zHIMWt/4gEGQFj6LgKhVsHtThFrsCGZIkpg rmrq8zCPfZbOqLc7bY0X2Vqs5mzYNDA4R8kIH+mt7uH/eizr2jiPLXDUnn4k3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn0kQ0mDtzrT1; Wed, 15 Oct 2025 18:59: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 59FIxQ95074286; Wed, 15 Oct 2025 18:59:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FIxQ5U074283; Wed, 15 Oct 2025 18:59:26 GMT (envelope-from git) Date: Wed, 15 Oct 2025 18:59:26 GMT Message-Id: <202510151859.59FIxQ5U074283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 794299ac6876 - stable/15 - netlink: in snl_init_writer() don't overwrite error in case of failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 794299ac6876ecdf62e503d3fb05bd388f5c8be7 Auto-Submitted: auto-generated The branch stable/15 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=794299ac6876ecdf62e503d3fb05bd388f5c8be7 commit 794299ac6876ecdf62e503d3fb05bd388f5c8be7 Author: Bruno Silvestre AuthorDate: 2025-10-07 05:48:28 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 18:57:46 +0000 netlink: in snl_init_writer() don't overwrite error in case of failure PR: 290050 (cherry picked from commit 488718ff42346888243496c00cbeb42ba004171e) --- sys/netlink/netlink_snl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 586716776bc5..ca1169d24b91 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -1057,14 +1057,14 @@ snl_init_writer(struct snl_state *ss, struct snl_writer *nw) { nw->size = SNL_WRITER_BUFFER_SIZE; nw->base = (char *)snl_allocz(ss, nw->size); - if (nw->base == NULL) { + if (__predict_false(nw->base == NULL)) { nw->error = true; nw->size = 0; - } + } else + nw->error = false; nw->offset = 0; nw->hdr = NULL; - nw->error = false; nw->ss = ss; } From nobody Wed Oct 15 18:59:27 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn0kR2M2Bz6CqgQ; Wed, 15 Oct 2025 18:59: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 4cn0kR1pn6z4GdQ; Wed, 15 Oct 2025 18:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JL9GHWWR7Afp7XoNwxsRiP5MRwVeWdgJKpgqzS/Bi0=; b=OSc63KLdfmpZSfx1aZiKMUY7FH1cXC1B04NoPaaNP/U7CrLvU3tnxvoKbmZ2BL9SvhRgzg 45qd8a/C62yRJjuRH/wzacVEm1VaKm8pdTOnZt3RodY9UTdoHDjJ1x53YFfXPo+DYc9/pW HBItZFbyv+LZw2pqdmqUKo/LAfFaIu3LMLNSk320nZbm4i+2ZrivoVzjOq3/xuR2YJl6sg X8+btRMpdiLeK9qdLStolxDllv53gvtlip5Zr6MAvgBuabAJhOTUyY2Wwq1aHiu71tdcm4 qIZS3hOc+lG2tFauQYL5NlOzsKhDk8iw2Y/JrgCuvB0+Fx9HYZ3QVOjsVUOCqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JL9GHWWR7Afp7XoNwxsRiP5MRwVeWdgJKpgqzS/Bi0=; b=otHsf0a/RuFqwNHFZYRcYCkOikR9h2yZwMbHXxvG05CgKsUcSkZW0W5Yrs/xi0wHF9+sCx XPOjTQPv14ZhfVVl/y5oXII+7NjJaTN1+Lkma4OWSRmfIa5t2xqUpwjGBERCA0shMRyip+ j/IThMi/7Ypy/lpSJw4hkYF4bG+NKXCMugsD7yh4o5hNxXgLdgZni0EnvzIvi68Zhn8Z02 GtigqZqcNif+rGAct/m5+X0XaNBRUCwZKjDvqCm3INOgeFyIKLEYgmaUvA6xIqochwdBbR fcNp87jlnInimDLi5U4yFs9sI9ML+/BsoS20fPIEmCTYrrpU9nmZ3t9YQDlaAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760554767; a=rsa-sha256; cv=none; b=UQHeAcSHSTsCy0Yl9pUbcT6ziJ+ydJKmt70TCHE4Gagd7J9jDPbCCgnUBFvzC5zGzhoVoM 50TVmTnufMn5FBRtiuzZUzZErvmH6KFDUUktqhGxYM0xxffc/QjlCHD4vvcQ5G5iTJ1HHJ GJbG19hnR9ITdyhuwmc7Bg/m2sfD8cp877FmGAYmG94lJZl2S6DPl1E4ScMoHVca4x30xw FmnV9zI/1av2/C2hj9RAztbTu4OAvx4DwxUHQTC6RpgRjj7Tv2SeUQbWNH9OTwdvxhaBGX hQILdZ7s2C/fLryp2friueq/ApoOYqZcdo/rlknC9lFztg5Ay1RpVdvSLpx+Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn0kR1NmmzrRm; Wed, 15 Oct 2025 18:59: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 59FIxR3l074322; Wed, 15 Oct 2025 18:59:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FIxRUI074319; Wed, 15 Oct 2025 18:59:27 GMT (envelope-from git) Date: Wed, 15 Oct 2025 18:59:27 GMT Message-Id: <202510151859.59FIxRUI074319@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: a091d6919c31 - stable/15 - socket(2): refactor the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a091d6919c3175f2385719e7b1c6fbd8576134f9 Auto-Submitted: auto-generated The branch stable/15 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a091d6919c3175f2385719e7b1c6fbd8576134f9 commit a091d6919c3175f2385719e7b1c6fbd8576134f9 Author: Gleb Smirnoff AuthorDate: 2025-10-14 18:41:25 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 18:58:54 +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 (cherry picked from commit 86d17239233ea4f5766bee68ba6355804525cefa) (cherry picked from commit ad13fd5a8fa1607805d11ced3428e86dbd94778e) --- 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 b211611c6354..16317fcd3aa5 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 fulfill +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 Wed Oct 15 18:59:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn0kT0m9wz6CqpK; Wed, 15 Oct 2025 18:59: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 4cn0kS3F6fz4GZx; Wed, 15 Oct 2025 18:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=349ON6NuhCtjthH90G9JFcHc5jjF56+7aepClhODufU=; b=UdiH4EABN+N/ZlB3mFwYCTIsWNjnYVDMVMTc/2aovcvWrzB+gRv+WUfCJ1n/UBmg+2q9aG fYZg/kmyq1CccSFAwYaLfNqiO+49YX2mZ+Anp1au7VoS+aC97pqrPN6VIVy18xMpi46Qs1 uCSBC74jkHQpBaxpTvmgPL5rrPovmMoK5OhQ/aj9g7mRRwKhz9Y0Is0d1wXLwkIjVApYVq K8NT6BlFSctoGkQgPcHFTUeTD9NvjWbrrO3cUdXMkEgRPquRJU7hhGc/cIYWooG5nFGZPv CABN7QEB5vyfV+TzhqQk8qaomP5Mc81Hu+gzlMZod2jsP5ebvFQL9IoHq4Iv+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760554768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=349ON6NuhCtjthH90G9JFcHc5jjF56+7aepClhODufU=; b=kjqyXgRHRmvq4uL/URUXaOkGohm+b1lgrenB/vIddko3PthJuUnUFAV+NlNGDaQ3F0814K cUA7exG5R7mFe5HnRKynXNouDGC1IMNVnYVE/txDC5aykW2UWfzyspspFr65IoesISTmkg P8Mh1iQqVX+n6zu+G0qDiuYjnUJYdnmlO8gIIqzY8vNbi3iQZlrH/1uMLmLSP+l7e1vuY9 WPIDA4ZW8UqlZMKJZl8iX5uMCOHsmYBGi2WHp6twnpMv2wrNSZLonQUdEZj9uQPrtCeV9H Pg2oUQM0KdexegmiFFGR+b9HuMQb2BjA3SFXWuU1n6xDfqZbUaW/SErMRAgdIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760554768; a=rsa-sha256; cv=none; b=mjIjVvFPo4a8ypYK37VubZ6GBQocE2rnGeduXNlaArCk1R91LXxUOyPcboHgg3kbfQ1gSG SXhvarPsXCKLTXWMxf+7n9bIUYLe3zH9wd0DmJqw0LTVDlg7DOZaEh/7Xah5gJQ8DvGCGM 0lDMthpCYpb21X0EZVETHwBY9yJjIRGQecfAj4VyZTFGxJa9HgAsFdydHeedhXCkum7o7c ugkGkvwtppce7jWKwcgM5Coam+f00zQ9161REo2qo8pBLy44T/A1K8DhAaSzbG9oyF1LhG Y1mwjsbKXIKHzGLql5Votvk1h4a0IFcceEP/xeQMcXbFlxSrDyZgMwxtsqhYkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn0kS2fhzzqN3; Wed, 15 Oct 2025 18:59: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 59FIxSs2074355; Wed, 15 Oct 2025 18:59:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FIxSOO074352; Wed, 15 Oct 2025 18:59:28 GMT (envelope-from git) Date: Wed, 15 Oct 2025 18:59:28 GMT Message-Id: <202510151859.59FIxSOO074352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: bbfaff26bf36 - stable/15 - unix/stream: repair SO_SNDTIMEO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: bbfaff26bf365126cb4d38fda99a2100a256d9bd Auto-Submitted: auto-generated The branch stable/15 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=bbfaff26bf365126cb4d38fda99a2100a256d9bd commit bbfaff26bf365126cb4d38fda99a2100a256d9bd Author: Gleb Smirnoff AuthorDate: 2025-10-15 00:29:31 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-15 18:59:02 +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 (cherry picked from commit ead721935251ab5640ea736d4269814b7f9d2f64) --- 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 19:49:05 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn1qj5hx5z6CtyJ; Wed, 15 Oct 2025 19:49: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 4cn1qj506Rz4N8X; Wed, 15 Oct 2025 19:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bCoRsK4S+EhHWJOGGrKUjMDm0SqmeiGVWQuO/nU7KsQ=; b=oxKC2IHit1DOuk1dPlWIuVxJv1VoknBSAUC1Klk8zKAWEGO7NiMQteqdoOUnzRs0/adO/d O19yWZzw9P2uATlYzD1GEVtGC2Oi69adQ/uFPfCb8H1ts6xxR9jiZHdLTt5lAHLlghnemH lc+9B+oGWZ8CxN/xY9XUhidnvT34Et0yBNroVDlzZDX3Noj998PzoQKysnnRvfRN/qPmTC 1+fAuX/7OgFyNMDtHe9NXOckmF7+Fxbl1haGmwCX2gE15yJGtkcSZ3DzZjuCWPeiw35ZB+ Ew6PD200ffWfd0viPuh4U5TOgupK9Skh0/XDAbPElgel2PPcmLV3pZUbt8HG4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bCoRsK4S+EhHWJOGGrKUjMDm0SqmeiGVWQuO/nU7KsQ=; b=cTOxzzfORyfjni60Xi8jw7159SqZqNvuZFqcfX39EIcm7s7n6hK5NKFWocr7jJu44EICRE KjNnCuLIsQtjsh+SQpBl9Cszfn8a5Xf4n8bvIKF5fs/8I3bm547ppEm3ScSb8sAOa9pPFW 6zeHAnwLqgnqSWhSH8LACN/HTB7jovzz/ak0BsQkOAQMZU6oYjv9vfHjnMirAqMl1Yy2AK OY6SV+7Ddl48aoWcekUmfYRG/8sTjLhiP/K0/ttXYsDtHLPKQ2TFEQU8ZiLi7OJmMxmmep KaJQnq+i3065hQTsIr4cQ5xLo+OTLOEdQXSjkpDhSxfiFK4BFwjNOf4wb6783Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760557745; a=rsa-sha256; cv=none; b=mRK7K0UwdibyR13oNMEDkFFid0Hy1O8gFeLZzQmZuH9uAoRA3qHoI1KH7L6ic4fO6tJLc/ IWTL+CJpvZSth7iTJ2iXK6uiLOV0dEwOC+SRspuA5u24GAJN8XK8IeEPqAr97vJDjjHmfN J26GOdhqwTJr7PG3eVOKpGXnDizwq7BdEBfUKpmldypXaGtq3hthuYJGQz66Hb/auKhyjB aeEI76EnTkywvf+x3mNF9jQ7EHPg5iE3FcfxJlTIIydSqUk8jTHaRVGyVr0SwLZ7+PBlP5 ygIYOrtI1BVX2qL3ck77vGdeZPmJrOHGgaUjh1O8Y+eQfl/Ri2w07p3MHBuqbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn1qj4W5tzsYX; Wed, 15 Oct 2025 19:49: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 59FJn5uC069452; Wed, 15 Oct 2025 19:49:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FJn5Pq069449; Wed, 15 Oct 2025 19:49:05 GMT (envelope-from git) Date: Wed, 15 Oct 2025 19:49:05 GMT Message-Id: <202510151949.59FJn5Pq069449@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: c307343246b9 - releng/15.0 - bsdinstall: Tweak pkgbase/dist set labels List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: c307343246b98dc6cb3b4b8fdf4ee19100176372 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=c307343246b98dc6cb3b4b8fdf4ee19100176372 commit c307343246b98dc6cb3b4b8fdf4ee19100176372 Author: Ed Maste AuthorDate: 2025-10-09 17:01:36 +0000 Commit: Colin Percival CommitDate: 2025-10-15 19:23:19 +0000 bsdinstall: Tweak pkgbase/dist set labels Have the button labels refer to the artifact type directly (distribution sets / packages), and use "Tech Preview" as packaged base is no longer experimental. Approved by: re (cperciva) Reviewed by: ivy, cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52999 (cherry picked from commit abd9424590ba37ac10e92723ad6428f0448024c1) (cherry picked from commit dbd1e32296437c9b2e3fb73400e59fda4adc3e64) --- usr.sbin/bsdinstall/scripts/auto | 4 ++-- usr.sbin/bsdinstall/scripts/jail | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 61d52065af2a..8058b1a41dbf 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -209,9 +209,9 @@ if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST ]; then PKGBASE=yes else bsddialog --backtitle "$OSNAME Installer" --title "Select Installation Type" \ - --yes-label "Traditional" --no-label "Packages (Experimental)" --yesno \ + --yes-label "Distribution Sets" --no-label "Packages (Tech Preview)" --yesno \ $PKGBASE_DEFAULT_BUTTON \ - "Would you like to install the base system using traditional distribution sets or packages (experimental)?" 0 0 + "Would you like to install the base system using traditional distribution sets or packages (technology preview)?" 0 0 if [ $? -eq 1 ]; then PKGBASE=yes fi diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index f2c7ef2b37de..3b1b2ee98fff 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -175,8 +175,8 @@ fi if [ ! "$nonInteractive" == "YES" ]; then bsddialog --backtitle "$OSNAME Installer" --title "Select Installation Type" \ - --yes-label "Traditional" --no-label "Packages (Experimental)" --yesno \ - "Would you like to install the base system using traditional distribution sets or packages (experimental)?" 0 0 + --yes-label "Distribution Sets" --no-label "Packages (Tech Preview)" --yesno \ + "Would you like to install the base system using traditional distribution sets or packages (technology preview)?" 0 0 if [ $? -eq 1 ]; then PKGBASE=yes fi From nobody Wed Oct 15 19:49:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn1qk75V1z6Ctht; Wed, 15 Oct 2025 19:49: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 4cn1qk5z6Fz4N8Y; Wed, 15 Oct 2025 19:49:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hokx6ajiSuNnymlcBmjtu06uhyyeCCTKtvRNLNdm+f8=; b=g85vDBFDrCYLfUYzp/t/PIomWRJJV/5VlHeSZqKtllf32GDEcdSd7k4px0/GWV+ygMhga9 WJoXlBx8escCA4Ddlp5Thcd4Z1zuvu5nkAy+PTZFz79abAXW3hmutbjG4x0OPmGn7W3QRN YpFksY1ULdfqz/+6yaqYGbMtxGP7Ta0lAi5lEO75EGumwofRvvYKy9IXIaG2laYZVisueC YcHZYtxI+7PiTIBm3QrCCTBom1p4G/p9BlNfKorIAjc9qUBCUXlA0AdyDKcTcnDvVYjBpW +thv8JIAEev2CUi95W+HXVj+f7wgrkHtKiaeI71CAdAeiJG5k7ITz96m/1ui+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hokx6ajiSuNnymlcBmjtu06uhyyeCCTKtvRNLNdm+f8=; b=k9T3mrIjRJV3E6LarCdScbv7Da+ctcB+vfRgH4PMJLWp1ij2p9PHAFyx739Lc9+FCm3jw4 SvNr4CQLNW3poGAk+6gcG46OXuOfRhJaUVOSLk7cXtDga8kwxFDKCerAmQSlZ2zq0dSJpN IjugSG63cFPIfo4OiQvCXx2ApFQwIyvy5sVajCFd5GPzK6LDb/49A7n3sQEhdO2EjHiqbd OrhQRPo1+jO0Deyxmpj4qeeQ43Mue1w2FbT767WavpEAHvZnlU1GBGmeWFEdeGQ3tMOzx8 LNvSb1gG8LYN5rUuyXRjmUMVsMLZg5bxVP1oyLvp1Yyw86AyNN+ZP3M502SuyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760557746; a=rsa-sha256; cv=none; b=faWAEIppTT33O+MMw0HSn3BZqI5vQYljJ/VDrqCM3NVK6olxSUpXeysiL2ftMAVzcPzY3c j4mL/SYh1MKfMBppAQ3Yw6Dgawg/LkGvsMaunyorEkZMMDGjuBvXf18LREd7rFBPKz6MZn xv+1jXgCqOkyNS+p3BUPmiJyeM/Nm/naHYwc4KZpVNWl7CJqLK8RFwsXPGbwPYGyMRbebt GnKlr3FAin7dz7Umq+drkgOTwY2gsrMe14MCl5ceAIoGEK8qC87K8ZAWLwzDL3jShajJCk 74cCKrlQUbjrlqh48uM5KSzma1N/hasws4PfJ2usEc2KjJfqk+nAapNm8JEEDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn1qk5Slyzslh; Wed, 15 Oct 2025 19:49: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 59FJn6Lu069485; Wed, 15 Oct 2025 19:49:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FJn654069482; Wed, 15 Oct 2025 19:49:06 GMT (envelope-from git) Date: Wed, 15 Oct 2025 19:49:06 GMT Message-Id: <202510151949.59FJn654069482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 7ae8ea82d769 - releng/15.0 - Cirrus-CI: Bump to FreeBSD 14.3 image List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 7ae8ea82d76984e880759900f0de68be1d90b506 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7ae8ea82d76984e880759900f0de68be1d90b506 commit 7ae8ea82d76984e880759900f0de68be1d90b506 Author: Ed Maste AuthorDate: 2025-10-04 13:10:09 +0000 Commit: Colin Percival CommitDate: 2025-10-15 19:23:29 +0000 Cirrus-CI: Bump to FreeBSD 14.3 image Approved by: re (cperciva) Sponsored by: The FreeBSD Foundation (cherry picked from commit cca9295dd6adc4245fbeeefbe05c13c52d089bd7) (cherry picked from commit 608043e6d029a00170a0a80d52fa9afdf209c692) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 9ed08d750e2f..082d2d98dc7f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,7 +4,7 @@ compute_engine_instance: # gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images platform: freebsd image_project: freebsd-org-cloud-dev - image: freebsd-14-2-release-amd64-ufs + image: freebsd-14-3-release-amd64-ufs cpu: 8 memory: 8G disk: 40 From nobody Wed Oct 15 19:49:07 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn1qm5jTgz6Ctq8; Wed, 15 Oct 2025 19:49: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 4cn1qm010mz4N2V; Wed, 15 Oct 2025 19:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=He2HLKaXW6lhZAN6dpqXLPtY7qiOe3td/GL1ELy1wAM=; b=shMSvDSr7lqwaNi7hHuNpEa+XgvR2JjXFJokxAOdw4u1SYG/xJWgg7md9GnUYBojnnntqi AFEmKCngb2HhiVJGSsHWJv24X0MyfReConaDDVQFNyNvRjs4iQ0kfRwteQtuS/MEWt38TP FV9FOLdtCG6iW4JFdHROgOkU/oFORsPWExhrlsYm1W7FAY+6y/C73mWQrRBD/3dVKYgV2h VyO0NFbbznGPfbe28LQFnIgvCOuJBLpdZ17FGmHcdYvSLbujAD1GVVfP8CM2j8Czaja2UO V9yjiMX8/86se/PbeScDKwI5rlRMQMAP0mMv49VYavBfeaNm10YXJyo/tKKAAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=He2HLKaXW6lhZAN6dpqXLPtY7qiOe3td/GL1ELy1wAM=; b=Mzjq4jRn7anKlrsbvFHf0a3DDfBn00kCm80ySGO/5Ifp8U46jl7kldHV23VXrY+HFMWBFd m/4KbwiCLaJNu9v4kQgo82kQfk+Es6+BY8UPLUFUlUvzf5oe/BWpPfBN/wE6N07/ykRtr5 R4ubR3jSauGfME5YBOfxaccuMJ36612fC7YvU+C2zd3IyeFpz0uRRSKtW5us4DLqOAM9Gs coW1zoXqNxNmlyWjsj7ooHTjq9M14drrpFJhj8L+AWO42xpjW5qK57UAzMg8euXcYSmQv4 yERdUa+lxRnm+EPqIDRjFnEbUatAjyDMKNuEhIEZVnzpQ9S//su8odQ3V1egDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760557748; a=rsa-sha256; cv=none; b=Ldya1eX5og+vCvH7J3HAzBJrOR66Bb5GV/dtPrlc55RaWIaAeD/fKrcgWoxbRcrYaxlPax OmKD6dVHVjamHb6YBpNgv33CR9t0X6JLN5cPbG7Eq9IvRU10cHvf9Wufhandjuav4Lm6qU 7wKbC6wReHJn0VI0c0393xn/fhZyGZc30ihJ3RInhKUTfVTWs1jBXn+YTAsikP8tROdnXE jeWWX7XHbGBsB2EbGm+zTwWkAEuXrmJK+lAsGmvPEA+TDPklCwPrXIEWAem4lstIUenZoD R/bOL6z9OMYvr7EOy7pl8iS+lCv6SO8+S+3QoDOBO7PNEIxysFFLra2Bfk+qXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn1ql6jbkzsYY; Wed, 15 Oct 2025 19:49: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 59FJn7Vj069518; Wed, 15 Oct 2025 19:49:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FJn72Q069515; Wed, 15 Oct 2025 19:49:07 GMT (envelope-from git) Date: Wed, 15 Oct 2025 19:49:07 GMT Message-Id: <202510151949.59FJn72Q069515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 14d97bd64a4a - releng/15.0 - ncurses: Add an ncurses-lib package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 14d97bd64a4a240d5a12337d22431bba525bc0df Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=14d97bd64a4a240d5a12337d22431bba525bc0df commit 14d97bd64a4a240d5a12337d22431bba525bc0df Author: Lexi Winter AuthorDate: 2025-10-15 12:28:43 +0000 Commit: Colin Percival CommitDate: 2025-10-15 19:23:32 +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). Approved by: re (cperciva) MFC after: 3 seconds Reviewed by: kevans Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53060 (cherry picked from commit bde703e8b6ab3acc73bbb20f1ebe26221f33e9f1) (cherry picked from commit 9dab0e61a921b5f3c4db2e0e2b440aeb6a803e42) --- 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 19:49:08 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn1qp0n11z6CtnD; Wed, 15 Oct 2025 19:49: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 4cn1qn13Pmz4N2s; Wed, 15 Oct 2025 19:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jvnqp1VT0uH7dgGUXqHlE3QcgMaqX4dszyoecM7CBJM=; b=gslhCcH5P/5k9mtLUrG/PbIBlYvUGoqNr5SX7GzQXdw/NspilRrrgVCcQGDdl6ubvPElWk n9T6olnkInbFM7A3Z7dgL7Dlfl8/W6TDOWPCzeQG3+qr+xAZWc8a5KI0MSu884VhkSu4Lb gqHm0iXV+RCsMW1D9wXh5tMIMt/dTWa9g7YQg/2XgQTLzpCIhwDrTukWcNoQhy8Z0jaUHT 0bkiehuL99gYk8l7Zrvqnd4sZK9HUCY/pCdjHjo/VhWM13oOI9Gc+sQ27ncpuZKJ0mEPjn e0UZ3gQkR5U9ILTkbWCSvtwwBXIyFO1datQeWKfJO5sH+sfMQxm9yZM2opKzVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jvnqp1VT0uH7dgGUXqHlE3QcgMaqX4dszyoecM7CBJM=; b=uuiCMhzYyTuYufVhEBSvPWCMM4G7wDWMUlfHhxByA0qoP5v9Zb76/aUcX/xodqT7jfBlHs cT3qOrAGnpwlLX3ZVpCo+un6d6eyA8y38246TCrohww+1jyWssiyI/B53AyCppfZ96ZyL4 ub0aDEkkG8ft1PHX49I4JjPSLoYB2GAS3Z4k+lZRvk6UUHwNneywHMnxoGi1/8/hy8uO99 Nm6EJ4HRn+fijOjPpYfrxeMpAZItnI8CymULoQvXeLUqFIPTX10eLCFXudhO15fUYIP7+U 08hsltBoMI0UwTWsrSjhhbEnxgkmUK0PvoKwhM7q2yV7G3/wiXOMhOrtW9NCow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760557749; a=rsa-sha256; cv=none; b=NJpkZjM1L2NRau7Et4Hx4E7/zEmaTpBt9/q2GSGjDBNNaKVGWNxNd4wRMrM3tXOdy8wxJ5 h/ulmvo7QmHCQfDpXS7hAMcM4BZStnWJwodz8wx/l3sgDB6zesfeWNIb286l4k8QZ4xBBk UyLuM5E3qoUIcnp2raJ0kfguDjJrwW4xSmcvr+2yxTbXMTaQPL7B0mfWqVcVFpDyS4f+ge GKLE6sF7ozD681V1GrPHx9Xf6dWrBD5380YzOlZhCUKdUciNVBX4rezCbiik5ukDdLnrzU DUydsXN44vR8vlBwh+uDBElPGv1pW+EFWNILr8APhFrjX7pV+eG7Yylr6Ajbig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn1qn0fWdzsKy; Wed, 15 Oct 2025 19:49: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 59FJn8GU069553; Wed, 15 Oct 2025 19:49:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FJn87c069549; Wed, 15 Oct 2025 19:49:08 GMT (envelope-from git) Date: Wed, 15 Oct 2025 19:49:08 GMT Message-Id: <202510151949.59FJn87c069549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: d8897097edc5 - releng/15.0 - packages: Rename unbound to local-unbound List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: d8897097edc5e3d2d76a3066e49e422f0eab0c9f Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d8897097edc5e3d2d76a3066e49e422f0eab0c9f commit d8897097edc5e3d2d76a3066e49e422f0eab0c9f Author: Lexi Winter AuthorDate: 2025-10-15 11:00:35 +0000 Commit: Colin Percival CommitDate: 2025-10-15 19:23:36 +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. Approved by: re (cperciva) MFC after: 3 seconds Requested by: des Reviewed by: des Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53056 (cherry picked from commit bf84861460f9287fe9cf66b2cd22fefe8e242a28) (cherry picked from commit f1b0e00d56a8b01be86ff41a05cb6916727cee8a) --- 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 4b14159ceb4a..d18aaeb2fd46 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,14 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +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. + 20251001: The deprecated ftpd(8) has been removed. Users who still need ftpd can install the ftp/freebsd-ftpd port. pkgbase users should remove 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-branches@FreeBSD.org From: Colin Percival Subject: git: 138e36514fe8 - releng/15.0 - qat: enable qat driver for 402xx device List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 138e36514fe8bd78e56c249e080a9499bc3fddef Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=138e36514fe8bd78e56c249e080a9499bc3fddef commit 138e36514fe8bd78e56c249e080a9499bc3fddef Author: Hareshx Sankar Raj AuthorDate: 2025-09-04 18:21:36 +0000 Commit: Colin Percival CommitDate: 2025-10-15 19:23:40 +0000 qat: enable qat driver for 402xx device Enabled qat driver support for 402xx device with ID 0x4944/0x4945. This is an additional device supported under the existing qat_4xxx driver. Firmwares specific to the 402xx device are added. Signed-off-by: Hareshx Sankar Raj Approved by: re (cperciva) Relnotes: yes Sponsored by: Intel Corporation MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D52488 (cherry picked from commit 7fbd362c091b2b384d14c3ed5af9234bb2eff9c2) (cherry picked from commit 88c0ce38bc18acaf50188eda402384a0cb93890d) --- sys/contrib/dev/qat/qat_402xx.bin | Bin 0 -> 665360 bytes sys/contrib/dev/qat/qat_402xx_mmp.bin | Bin 0 -> 150084 bytes sys/dev/qat/include/common/adf_accel_devices.h | 4 ++ sys/dev/qat/qat_api/include/icp_sal_versions.h | 2 +- sys/dev/qat/qat_common/qat_uclo.c | 1 + sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c | 58 +++++++++++++++++++------ sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h | 6 +++ sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c | 15 ++++--- sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c | 15 ++++--- sys/modules/qatfw/qat_4xxx/Makefile | 5 ++- 10 files changed, 78 insertions(+), 28 deletions(-) diff --git a/sys/contrib/dev/qat/qat_402xx.bin b/sys/contrib/dev/qat/qat_402xx.bin new file mode 100644 index 000000000000..74151547edce Binary files /dev/null and b/sys/contrib/dev/qat/qat_402xx.bin differ diff --git a/sys/contrib/dev/qat/qat_402xx_mmp.bin b/sys/contrib/dev/qat/qat_402xx_mmp.bin new file mode 100644 index 000000000000..6404eb009d2f Binary files /dev/null and b/sys/contrib/dev/qat/qat_402xx_mmp.bin differ diff --git a/sys/dev/qat/include/common/adf_accel_devices.h b/sys/dev/qat/include/common/adf_accel_devices.h index c09aee8ea4bd..eeffc6a9132c 100644 --- a/sys/dev/qat/include/common/adf_accel_devices.h +++ b/sys/dev/qat/include/common/adf_accel_devices.h @@ -39,12 +39,16 @@ #define ADF_4XXXIOV_PCI_DEVICE_ID 0x4941 #define ADF_401XX_PCI_DEVICE_ID 0x4942 #define ADF_401XXIOV_PCI_DEVICE_ID 0x4943 +#define ADF_402XX_PCI_DEVICE_ID 0x4944 +#define ADF_402XXIOV_PCI_DEVICE_ID 0x4945 #define IS_QAT_GEN3(ID) ({ (ID == ADF_C4XXX_PCI_DEVICE_ID); }) static inline bool IS_QAT_GEN4(const unsigned int id) { return (id == ADF_4XXX_PCI_DEVICE_ID || id == ADF_401XX_PCI_DEVICE_ID || + id == ADF_402XX_PCI_DEVICE_ID || + id == ADF_402XXIOV_PCI_DEVICE_ID || id == ADF_4XXXIOV_PCI_DEVICE_ID || id == ADF_401XXIOV_PCI_DEVICE_ID); } diff --git a/sys/dev/qat/qat_api/include/icp_sal_versions.h b/sys/dev/qat/qat_api/include/icp_sal_versions.h index 03bcef4fcbbb..0eb227ade09c 100644 --- a/sys/dev/qat/qat_api/include/icp_sal_versions.h +++ b/sys/dev/qat/qat_api/include/icp_sal_versions.h @@ -26,7 +26,7 @@ /* Part name and number of the accelerator device */ #define SAL_INFO2_DRIVER_SW_VERSION_MAJ_NUMBER 3 -#define SAL_INFO2_DRIVER_SW_VERSION_MIN_NUMBER 15 +#define SAL_INFO2_DRIVER_SW_VERSION_MIN_NUMBER 16 #define SAL_INFO2_DRIVER_SW_VERSION_PATCH_NUMBER 0 /** diff --git a/sys/dev/qat/qat_common/qat_uclo.c b/sys/dev/qat/qat_common/qat_uclo.c index 54e8e8eb7421..b17020286d24 100644 --- a/sys/dev/qat/qat_common/qat_uclo.c +++ b/sys/dev/qat/qat_common/qat_uclo.c @@ -892,6 +892,7 @@ qat_uclo_get_dev_type(struct icp_qat_fw_loader_handle *handle) return ICP_QAT_AC_C4XXX_DEV_TYPE; case ADF_4XXX_PCI_DEVICE_ID: case ADF_401XX_PCI_DEVICE_ID: + case ADF_402XX_PCI_DEVICE_ID: return ICP_QAT_AC_4XXX_A_DEV_TYPE; default: pr_err("QAT: unsupported device 0x%x\n", diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c index d730efd5952b..49e1e1859e78 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c @@ -536,8 +536,8 @@ adf_exit_accel_units(struct adf_accel_dev *accel_dev) } static const char * -get_obj_name(struct adf_accel_dev *accel_dev, - enum adf_accel_unit_services service) +get_obj_name_4xxx(struct adf_accel_dev *accel_dev, + enum adf_accel_unit_services service) { switch (service) { case ADF_ACCEL_ASYM: @@ -553,6 +553,24 @@ get_obj_name(struct adf_accel_dev *accel_dev, } } +static const char * +get_obj_name_402xx(struct adf_accel_dev *accel_dev, + enum adf_accel_unit_services service) +{ + switch (service) { + case ADF_ACCEL_ASYM: + return ADF_402XX_ASYM_OBJ; + case ADF_ACCEL_CRYPTO: + return ADF_402XX_SYM_OBJ; + case ADF_ACCEL_COMPRESSION: + return ADF_402XX_DC_OBJ; + case ADF_ACCEL_ADMIN: + return ADF_402XX_ADMIN_OBJ; + default: + return NULL; + } +} + static uint32_t get_objs_num(struct adf_accel_dev *accel_dev) { @@ -982,8 +1000,23 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->clock_frequency = ADF_4XXX_AE_FREQ; hw_data->get_sku = get_sku; hw_data->heartbeat_ctr_num = ADF_NUM_HB_CNT_PER_AE; - hw_data->fw_name = ADF_4XXX_FW; - hw_data->fw_mmp_name = ADF_4XXX_MMP; + switch (id) { + case ADF_402XX_PCI_DEVICE_ID: + hw_data->fw_name = ADF_402XX_FW; + hw_data->fw_mmp_name = ADF_402XX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; + break; + case ADF_401XX_PCI_DEVICE_ID: + hw_data->fw_name = ADF_4XXX_FW; + hw_data->fw_mmp_name = ADF_4XXX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_401XX_ASYM_AE_MASK; + break; + + default: + hw_data->fw_name = ADF_4XXX_FW; + hw_data->fw_mmp_name = ADF_4XXX_MMP; + hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; + } hw_data->init_admin_comms = adf_init_admin_comms; hw_data->exit_admin_comms = adf_exit_admin_comms; hw_data->send_admin_init = adf_4xxx_send_admin_init; @@ -1002,7 +1035,13 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->get_ring_svc_map_data = get_ring_svc_map_data; hw_data->admin_ae_mask = ADF_4XXX_ADMIN_AE_MASK; hw_data->get_objs_num = get_objs_num; - hw_data->get_obj_name = get_obj_name; + switch (id) { + case ADF_402XX_PCI_DEVICE_ID: + hw_data->get_obj_name = get_obj_name_402xx; + break; + default: + hw_data->get_obj_name = get_obj_name_4xxx; + } hw_data->get_obj_cfg_ae_mask = get_obj_cfg_ae_mask; hw_data->get_service_type = adf_4xxx_get_service_type; hw_data->set_msix_rttable = set_msix_default_rttable; @@ -1022,15 +1061,6 @@ adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 id) hw_data->query_storage_cap = 1; hw_data->ring_pair_reset = adf_gen4_ring_pair_reset; - switch (id) { - case ADF_401XX_PCI_DEVICE_ID: - hw_data->asym_ae_active_thd_mask = DEFAULT_401XX_ASYM_AE_MASK; - break; - case ADF_4XXX_PCI_DEVICE_ID: - default: - hw_data->asym_ae_active_thd_mask = DEFAULT_4XXX_ASYM_AE_MASK; - } - adf_gen4_init_hw_csr_info(&hw_data->csr_info); adf_gen4_init_pf_pfvf_ops(&hw_data->csr_info.pfvf_ops); } diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h index c35ebbcadcd7..fa7249dca596 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h @@ -87,6 +87,12 @@ #define ADF_4XXX_SYM_OBJ "qat_4xxx_sym.bin" #define ADF_4XXX_ASYM_OBJ "qat_4xxx_asym.bin" #define ADF_4XXX_ADMIN_OBJ "qat_4xxx_admin.bin" +#define ADF_402XX_FW "qat_402xx_fw" +#define ADF_402XX_MMP "qat_402xx_mmp_fw" +#define ADF_402XX_DC_OBJ "qat_402xx_dc.bin" +#define ADF_402XX_SYM_OBJ "qat_402xx_sym.bin" +#define ADF_402XX_ASYM_OBJ "qat_402xx_asym.bin" +#define ADF_402XX_ADMIN_OBJ "qat_402xx_admin.bin" /* Only 3 types of images can be loaded including the admin image */ #define ADF_4XXX_MAX_OBJ 3 diff --git a/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c index cb534dd03b86..f9ad39fa45f0 100644 --- a/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c @@ -22,12 +22,14 @@ static MALLOC_DEFINE(M_QAT_4XXX, "qat_4xxx", "qat_4xxx"); PCI_VENDOR_ID_INTEL, device_id \ } -static const struct pci_device_id adf_pci_tbl[] = - { ADF_SYSTEM_DEVICE(ADF_4XXX_PCI_DEVICE_ID), - ADF_SYSTEM_DEVICE(ADF_401XX_PCI_DEVICE_ID), - { - 0, - } }; +static const struct pci_device_id adf_pci_tbl[] = { + ADF_SYSTEM_DEVICE(ADF_4XXX_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_401XX_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_402XX_PCI_DEVICE_ID), + { + 0, + } +}; static int adf_probe(device_t dev) @@ -135,6 +137,7 @@ adf_cleanup_accel(struct adf_accel_dev *accel_dev) switch (pci_get_device(accel_pci_dev->pci_dev)) { case ADF_4XXX_PCI_DEVICE_ID: case ADF_401XX_PCI_DEVICE_ID: + case ADF_402XX_PCI_DEVICE_ID: adf_clean_hw_data_4xxx(accel_dev->hw_device); break; default: diff --git a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c index 2bbccb4d6b17..dbe40835ccbf 100644 --- a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c @@ -22,12 +22,14 @@ static MALLOC_DEFINE(M_QAT_4XXXVF, "qat_4xxxvf", "qat_4xxxvf"); PCI_VENDOR_ID_INTEL, device_id \ } -static const struct pci_device_id adf_pci_tbl[] = - { ADF_SYSTEM_DEVICE(ADF_4XXXIOV_PCI_DEVICE_ID), - ADF_SYSTEM_DEVICE(ADF_401XXIOV_PCI_DEVICE_ID), - { - 0, - } }; +static const struct pci_device_id adf_pci_tbl[] = { + ADF_SYSTEM_DEVICE(ADF_4XXXIOV_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_401XXIOV_PCI_DEVICE_ID), + ADF_SYSTEM_DEVICE(ADF_402XXIOV_PCI_DEVICE_ID), + { + 0, + } +}; static int adf_probe(device_t dev) @@ -76,6 +78,7 @@ adf_cleanup_accel(struct adf_accel_dev *accel_dev) switch (pci_get_device(accel_pci_dev->pci_dev)) { case ADF_4XXXIOV_PCI_DEVICE_ID: case ADF_401XXIOV_PCI_DEVICE_ID: + case ADF_402XXIOV_PCI_DEVICE_ID: adf_clean_hw_data_4xxxiov(accel_dev->hw_device); break; default: diff --git a/sys/modules/qatfw/qat_4xxx/Makefile b/sys/modules/qatfw/qat_4xxx/Makefile index fb7171bcaf45..f6f19d6cbe32 100644 --- a/sys/modules/qatfw/qat_4xxx/Makefile +++ b/sys/modules/qatfw/qat_4xxx/Makefile @@ -4,6 +4,9 @@ KMOD= qat_4xxx_fw -FIRMWS= qat_4xxx.bin:qat_4xxx_fw:111 qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111 +FIRMWS= qat_4xxx.bin:qat_4xxx_fw:111 \ + qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111 \ + qat_402xx.bin:qat_402xx_fw:111 \ + qat_402xx_mmp.bin:qat_402xx_mmp_fw:111 .include From nobody Wed Oct 15 19:49:11 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn1qq5ZsQz6CtYM; Wed, 15 Oct 2025 19:49: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 4cn1qq33cfz4NLs; Wed, 15 Oct 2025 19:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0iq/0lfyFR/jXF+FUvLSv+W34MexRHrBC0n6cFRM7ak=; b=ntkZsExV47NCNwB/I8OVL0kG/41QS9k7J5AbzckgPXZ5g95/PY+O1d0JXNf607k645C0QR Pu6vkSz/f75CYtWd3DIX3uPphJk1nNF2HtArB1dqMawNqP0wBePHuSKR3JrRHxvnEo+a4Q S3QL+RFl8PTQjHBKFQ6gYG4Nsp3SQ/6d1x8F/NmOVrThxyY8PbIsbPz5T9UTY3Iae32e+n pFcXHMiQRBx15kMgQIDzEDTBfXFPqJV7dp2c37AlMppyh4GWY48bzEPQek2xNsWpU1Tg89 3sJWL+3arFpybgmu+HU8Lsr7Xqq0KCaXcxkjwzblVqxYezPd5UTPJ/lX0F8ZlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760557751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0iq/0lfyFR/jXF+FUvLSv+W34MexRHrBC0n6cFRM7ak=; b=cckAJYh/0f0sb7yQSpUzfS5nzGp5q5qI8/jQ6+cLj21Xt5hUtxgvYgfv+3VK3nMdRPLyNL KfITlMNzm4/ITnrJSEh3a9SUbtZTEJRQhVnNB2mmjgZuq2NcAAhIrFRV4jb+w7zSCEV5CM yfqGQQpZhhDk7zf5J9C6ItRD3+G/5VX2bdFUrWSojilKd/kDXUUkGLyEYSuihn1iRXFCBq y5pjSo73OXlDkajjoVUgjPVxXeY4XFDDds8cG6wx1fAuxIfIE0amIZa+RkciAHzJd7ugqp bOpZAKESWEFgNQbwjlW3oL9Bk5hYt8aT7HGtJActkgA5c6ctgu3dDEg7zr34fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760557751; a=rsa-sha256; cv=none; b=bhkpimQoBTcQVpHZlAcNDYfBN37ejkpWsqzE9rQxAPeUwfgt7I/evW//P+N3pltNB/rWSy +kq0+NeEf0L/VbI3oPyweHmyILBJjP6AsHBkVc0QiSqBzy+Kn9SeP7mxNCB98qpwMRJarT 7cQr7zNI+djf6ivAYbHL1BglDqRJNQ2xYXXX8KFp82u+NaDqxA6ag1UgX+zz02uyouJWqF dsMqs8ovzNNPZP4zVThPkN/s4JXANnY885itGEb0Z1jFCwm7GRC/QoveTMkYs/H1nOXPSU l2DYVSZXd4YT1XL8dUA8n69gyU+2sszMGg4avCEfjfBjfLVAnAyrkEosEvSTAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn1qq2D26zsVw; Wed, 15 Oct 2025 19:49: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 59FJnBtX069624; Wed, 15 Oct 2025 19:49:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59FJnBrJ069621; Wed, 15 Oct 2025 19:49:11 GMT (envelope-from git) Date: Wed, 15 Oct 2025 19:49:11 GMT Message-Id: <202510151949.59FJnBrJ069621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 24546cb506a0 - releng/15.0 - rc: Update dependencies for zpool scripts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 24546cb506a0b54b548dd2cf1dfe1e7e029ec146 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=24546cb506a0b54b548dd2cf1dfe1e7e029ec146 commit 24546cb506a0b54b548dd2cf1dfe1e7e029ec146 Author: Mark Johnston AuthorDate: 2025-10-08 12:50:54 +0000 Commit: Colin Percival CommitDate: 2025-10-15 19:23:44 +0000 rc: Update dependencies for zpool scripts After commit 900bc0206348, zpool depends on mountcritlocal. zpoolreguid and zpoolupgrade depend on zpool and want to run before mountcritcycle, so we have a pair of cycles. Update zpoolreguid and zpoolupgrade to avoid this. Approved by: re (cperciva) Reviewed by: des MFC after: 3 days Fixes: 900bc0206348 ("rc.d/zpool: change mountcritlocal dep from BEFORE to REQUIRE") Differential Revision: https://reviews.freebsd.org/D52953 (cherry picked from commit ae6db60ff56de5b93de9f6fee6116cbc2d4b498e) (cherry picked from commit 8e957b78e6846c57e70d9c302c027fa02f13bb14) --- libexec/rc/rc.d/zpoolreguid | 2 +- libexec/rc/rc.d/zpoolupgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/zpoolreguid b/libexec/rc/rc.d/zpoolreguid index f94630d9283f..c19f52d3d702 100755 --- a/libexec/rc/rc.d/zpoolreguid +++ b/libexec/rc/rc.d/zpoolreguid @@ -2,7 +2,7 @@ # PROVIDE: zpoolreguid # REQUIRE: zpool -# BEFORE: mountcritlocal +# BEFORE: FILESYSTEMS # KEYWORD: firstboot nojail . /etc/rc.subr diff --git a/libexec/rc/rc.d/zpoolupgrade b/libexec/rc/rc.d/zpoolupgrade index 1435cba7199c..5e623a9c2bf0 100755 --- a/libexec/rc/rc.d/zpoolupgrade +++ b/libexec/rc/rc.d/zpoolupgrade @@ -2,7 +2,7 @@ # PROVIDE: zpoolupgrade # REQUIRE: zpool -# BEFORE: mountcritlocal +# BEFORE: FILESYSTEMS # KEYWORD: firstboot nojail . /etc/rc.subr From nobody Wed Oct 15 20:20:09 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 00:35:04 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cn89h3nXkz6C3R5; Thu, 16 Oct 2025 00:35: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 4cn89h3093z3dmB; Thu, 16 Oct 2025 00:35:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760574904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9cORiDZr8erHhm9ir3cbz2HFhZhKItgkRcWdcVX+qDk=; b=nbuysDJDYKZHfcXb1qu39cR4u15TLDI4YwDpmHxAhLTsrPoOs85bxXQSQBDxLJAcQ5CKrz 0G3KFrhwEkmBdS1Qf0ulBU+0pmf9T1f/KhBgpSI6YA24Ir7ZSnjnzPnf7a+hT19i6+rEJi 1licXYzAH4iFcCPuZiY9YTTlTYEB7HIgwx3kas4sfOKSOiH6fr0fqjX+0bGkqgElNK0Qy8 MRJso8y/o9fI06az4Zk6bGkdIMPAJeRACTW4qSaRVeVZCk+eIP2NAkW+/GP6t1UrRhqY6j P7u14wYJI+bhpf1M1GNz5HWyKH86gBeg5B9pPdt+KyCYVZbkpP88bTzzceegtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760574904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9cORiDZr8erHhm9ir3cbz2HFhZhKItgkRcWdcVX+qDk=; b=ioP1c4Dhk5hfY003tHIqk9XbiAIRhU8SxyqA0URUhxUkRTRayGH9PPFrwFw9IYgqvq17cy p41/gYTivXfhnvsp7Y8QBZP6SKAtuF88I06OpgzAXAVmja33l+31AqhntMrwQQXtzdTcuc mXAaHphtF9cTGJ7LMA79b/rH8ayqZaUhNOUQ1tJATyHluSjjrJ2Lwovsv7Nvly9X9Pu4xq hb2AHB77cnI6OU1lNVna6d9pK73qGS7J/JI8ZLJyzQByzpHhs/KfdGsrRGT/00Tzkhd9nE cfXxnbjTqqa/bokocAjhbgXwo8P4OlJcmqwEbIhEovueGDYOUa+OovqjuTi92Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760574904; a=rsa-sha256; cv=none; b=nbatxN+GR8FXLXe5hEk9a8ZXYGCnlr7A1G2NB06sp0vpXnBURa/EcLYujvlFrWELtOg/MJ YNsPjImAxHNLwP9vPqaJNG24oOgLxRKd3RdZAP5B/BGpo1Q3jqJK1NvDIZ3kBJwzuDHOXp +rXRvCYacnWj1hBS9cXLe35Nd2u9cEDtIj2iEcQCW5r8n681Xvzk9beS5Q3bOtv28Pgrif a0tZ4RESgKvz4enKcrn+bRcc2bfgR+e+Gl4+N2dBL9frOs2+KM72c4U7lfZM8HdgjjH7uE 98gye9vc0DOWpZM3UW5bPyVcge58ZSP/t756onE1ExVHEowMpm6Ad/9Xe+gpKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cn89h2Xcwz11qt; Thu, 16 Oct 2025 00:35: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 59G0Z4d3011653; Thu, 16 Oct 2025 00:35:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G0Z4tX011650; Thu, 16 Oct 2025 00:35:04 GMT (envelope-from git) Date: Thu, 16 Oct 2025 00:35:04 GMT Message-Id: <202510160035.59G0Z4tX011650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 7161c525abff - stable/15 - openssh: blocklist: Remove non async-signal safe probe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7161c525abffe6cdb19ac01223d058fcbabf49c5 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=7161c525abffe6cdb19ac01223d058fcbabf49c5 commit 7161c525abffe6cdb19ac01223d058fcbabf49c5 Author: Jose Luis Duran AuthorDate: 2025-10-15 13:29:30 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-16 00:30:07 +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 (cherry picked from commit 9c82c17c2a3ac61a69cb5337cb6f92ae88bc0b08) --- 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 Thu Oct 16 02:22:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnBYd0q8Cz6CFxm; Thu, 16 Oct 2025 02:22: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 4cnBYd0DYZz3t3m; Thu, 16 Oct 2025 02:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760581349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aGGlaBbpzDtCldiz1pK8AJgFRPnuqmHkgdJkOILNQjg=; b=t6wbDgMta720GEZf0bDZ0iY/H1XXZ6Fy1EtE+1Xe0oTcdk9q0p57bSnYEecxzvmAYjpafC Y9Lt808kwOJyXhymCHCQn5FWnG0lNdHWVuRNT7OabJIuxHZNwpAQFbcaG4I8gR02uWdhnT pCCtLu6HEoQhdDZTgOx/7ObCb7AAJSJO/M8qtWxB/nnFetc5jLn4RHqNV9g3/yZd4sjf6V +WZh8EfHfDl+YeK/k/s7BscreNBxcDsBzezjYeQ9sk55XwtHYWK32FnoMLSY/yzXMyp9b8 acIkGydpUxZ25YAM89SJFwrfzfxb6ZWDgl5M+w0ZigrX53qsN1BhVOF3NiZaKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760581349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aGGlaBbpzDtCldiz1pK8AJgFRPnuqmHkgdJkOILNQjg=; b=hpwV9Zz+18F78l9ECnRj6YjoKTZUn9iq1tfEUo+3U9zmM+uzLaGbblz7XB73XLSKR/4Xeh 6C5uv9sCpYk+Bx59N/aunm2psquJ6q5J6ZQQFredG4H7Q5eoA4Lcs3LBuJMMk06JtMzcE+ aIV0RzAuEVI3TBalTqGdZkYJMUSf04ceDfKt0YliVgm7b0tDk8/kYLxiWIrGZV8/Wb0GX0 6j+XWXj7KQAoOSLs2DPm/BxEIZthh7CuZMBltptRfqjVDS9QWz4WdWwwjlOvN+vO29Gapu bKcz6y3SCeAXdyeri1iBwC9wJwuLgJ/afx2tReHY80CRMtDkCAoo31L1iGazCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760581349; a=rsa-sha256; cv=none; b=M3I96LjXQFID66JZOII5pDUjdOJfZQXDVX4i2zwSE51IuiQP1aT1XahkoElRiY/ahp5V3g tnviefjlu61ClH7EOl0tpOBZjZJeRb8FAsFOBy7oy7ECEA891OweYWmO4J0F2tNVRG8xSH GJ8oFgfPZNvvgzdlZSZRFe6zvOntp9s0PnEUfqzWT7vwayv/BdSSdh1973Rjo982iTr2kf B9Wlp5eiy2qY5lXKJUlN+SexOfdFA1NZkTgLRSsUXeiVT30bm+d46otxcG1uLGeitf1a5B JzCV3dXqjWFgk/0LXd7Ru9DL/VwOGM0KRyHzptG04hy7twLc/SFLj7hBSDsG0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnBYc6y4Jz14HF; Thu, 16 Oct 2025 02:22: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 59G2MSx2017880; Thu, 16 Oct 2025 02:22:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G2MSNr017877; Thu, 16 Oct 2025 02:22:28 GMT (envelope-from git) Date: Thu, 16 Oct 2025 02:22:28 GMT Message-Id: <202510160222.59G2MSNr017877@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5a0a2d269f37 - stable/15 - nullfs: add a helper for testing if vnode belongs to a nullfs mount List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5a0a2d269f37fa79ee879e54856c94272b7e3c33 Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5a0a2d269f37fa79ee879e54856c94272b7e3c33 commit 5a0a2d269f37fa79ee879e54856c94272b7e3c33 Author: Konstantin Belousov AuthorDate: 2025-10-08 15:42:27 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-16 02:22:20 +0000 nullfs: add a helper for testing if vnode belongs to a nullfs mount (cherry picked from commit 419f2fe6b70b1a409bf7eca7020d7c745558690f) --- sys/fs/nullfs/null.h | 10 ++++++++++ sys/fs/nullfs/null_vfsops.c | 4 ++-- sys/fs/nullfs/null_vnops.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/fs/nullfs/null.h b/sys/fs/nullfs/null.h index 0a93878c859f..abd652c4ac1c 100644 --- a/sys/fs/nullfs/null.h +++ b/sys/fs/nullfs/null.h @@ -78,6 +78,16 @@ struct vnode *null_checkvp(struct vnode *vp, char *fil, int lno); #endif extern struct vop_vector null_vnodeops; +extern struct vop_vector null_vnodeops_no_unp_bypass; + +static inline bool +null_is_nullfs_vnode(struct vnode *vp) +{ + const struct vop_vector *op; + + op = vp->v_op; + return (op == &null_vnodeops); +} #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_NULLFSNODE); diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 4cddf24a5745..e2dabd8e33cc 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -116,7 +116,7 @@ nullfs_mount(struct mount *mp) /* * Unlock lower node to avoid possible deadlock. */ - if (mp->mnt_vnodecovered->v_op == &null_vnodeops && + if (null_is_nullfs_vnode(mp->mnt_vnodecovered) && VOP_ISLOCKED(mp->mnt_vnodecovered) == LK_EXCLUSIVE) { VOP_UNLOCK(mp->mnt_vnodecovered); isvnunlocked = true; @@ -150,7 +150,7 @@ nullfs_mount(struct mount *mp) /* * Check multi null mount to avoid `lock against myself' panic. */ - if (mp->mnt_vnodecovered->v_op == &null_vnodeops) { + if (null_is_nullfs_vnode(mp->mnt_vnodecovered)) { nn = VTONULL(mp->mnt_vnodecovered); if (nn == NULL || lowerrootvp == nn->null_lowervp) { NULLFSDEBUG("nullfs_mount: multi null mount?\n"); diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 74c1a8f3acb6..ebb765b0a1c5 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -274,7 +274,7 @@ null_bypass(struct vop_generic_args *ap) * that aren't. (We must always map first vp or vclean fails.) */ if (i != 0 && (*this_vp_p == NULLVP || - (*this_vp_p)->v_op != &null_vnodeops)) { + !null_is_nullfs_vnode(*this_vp_p))) { old_vps[i] = NULLVP; } else { old_vps[i] = *this_vp_p; From nobody Thu Oct 16 02:22:30 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnBYf2gTTz6CFgP; Thu, 16 Oct 2025 02:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnBYf0w2Wz3t1S; Thu, 16 Oct 2025 02:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760581350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=29mPZ/qD3icruHUIw2AdjowCpL2/GGQKGggK0zAsy4M=; b=gRertx/sfLNtnBjy9BuyN3eDPHn82spqx7J82vN38EIzCK0IegsiffKMQTbZWLlQds1DtD vFJ5jS+MB3Fn2kpl5MHWkfR/9xa9V+EuXCVM745Al4JMmyHpgzf8XnC8lPgQEchSw2Hj1h KqTqo4Ug3LNtohi/ED5QpgSzf4tvjp73DCBO0TVM3+NDhfuqMDj/is7UjGGvX59p3jVZuh xVLKqBrU3yYgoR9fm/ZC9vD13Kir6IQeAIBOqwdA6P1X4U7MxYxk21PMV1OnZYlyf1tpIR S/EPcvzQ1qps2GMiQAt9WHS2DCTFlWHYk7v61e0Bx+hvynCod7N9NPFRQ1g9RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760581350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=29mPZ/qD3icruHUIw2AdjowCpL2/GGQKGggK0zAsy4M=; b=wDVb+PY6B/6LCqsCLqgq58lkGwWSvmVXV7xzrVlQ00UqlejcddPC2d2Wk47wnLk8Lythxn hRIL133IgX3X6JO8QmmPeYb62KIBiUN2kRThwNw8f35Sqi0mzHMO4CFceOr5rtKDz76rJZ 16yiphQvhRn9+/2uUaLMC8jX/iBqXE2nSkaSKbHofY2VjkDlrC0HqXNy2WGhCBjZ1M5YEU h9hzNzOI5f3XsosWEgJHRd8RgN4bRxedjriSNbUlvJ1BAaX+XH8rWloqJBzb0XLod4pXRQ 3Ewx1IhNHVBwmXTcNhZV+hYBWiFeShc5ICBSSo3eban5N+Ekc64om+NrRCdRDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760581350; a=rsa-sha256; cv=none; b=EXG5cfR3xwjWvXngQFqj9UKK+EYTgbB6RI7fmiH23aaQ4pdzq/E1M2WNtJbqrfq139rP3v Zdf9tYa8SAaIaXFX7kKfNnU3uuNXlOd5FXGYYlXRBnit928eDKJEcWoaxbY34897TAD0fM +JOICFpeO9n2Bx5rwtmA2A+cwLgqLnT+GxShHBXuRfB/Ito0kIKmiYRB/6cVHKYnk32q9U Se8ejpNNANx/IYii+akrsB8DrFAOzksypJC+5VuijAJty9hlmuAakQxLJACJiHHeFRfN7Q y1zcTh4GwsqcXixvxjP16W3dtrQIAX7+fSVv5xGZAZXLHVDoeC+Bq+9oQGar+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 4cnBYf0VlXz14Mn; Thu, 16 Oct 2025 02:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59G2MU8c017913; Thu, 16 Oct 2025 02:22:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G2MUbl017910; Thu, 16 Oct 2025 02:22:30 GMT (envelope-from git) Date: Thu, 16 Oct 2025 02:22:30 GMT Message-Id: <202510160222.59G2MUbl017910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e9a48e988e2d - stable/15 - nullfs_mount: use symbols instead of string literals for cache mount options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e9a48e988e2d65827d4278e3b3bf437aea400827 Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e9a48e988e2d65827d4278e3b3bf437aea400827 commit e9a48e988e2d65827d4278e3b3bf437aea400827 Author: Konstantin Belousov AuthorDate: 2025-10-08 15:44:59 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-16 02:22:20 +0000 nullfs_mount: use symbols instead of string literals for cache mount options (cherry picked from commit 8e6f6a5fbde78bd8d19445ee6ebaf00b8f4f5aa9) --- sys/fs/nullfs/null_vfsops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index e2dabd8e33cc..483d4182e65e 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -85,6 +85,8 @@ nullfs_mount(struct mount *mp) char *target; int error, len; bool isvnunlocked; + static const char cache_opt_name[] = "cache"; + static const char nocache_opt_name[] = "nocache"; NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); @@ -205,9 +207,10 @@ nullfs_mount(struct mount *mp) MNT_IUNLOCK(mp); } - if (vfs_getopt(mp->mnt_optnew, "cache", NULL, NULL) == 0) { + if (vfs_getopt(mp->mnt_optnew, cache_opt_name, NULL, NULL) == 0) { xmp->nullm_flags |= NULLM_CACHE; - } else if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0) { + } else if (vfs_getopt(mp->mnt_optnew, nocache_opt_name, NULL, + NULL) == 0) { ; } else if (null_cache_vnodes && (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) == 0) { From nobody Thu Oct 16 02:22:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnBYh1Pt8z6CG0w; Thu, 16 Oct 2025 02:22: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 4cnBYg2CK0z3sh4; Thu, 16 Oct 2025 02:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760581351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p5HM9muI7YdfTIxBYbvoJzJtS40dtSrvlC3w+NWKzB8=; b=JwLSBweqnI5/Sv8LNiFUqEywncIenm4dxfrVDxBRQA5Sn7h97E6EsdrIg+tbKYWjRf+9op tbKd2B6ObYdlPnZLEQ86kWhP9zAblWn9nPMp+Qd5DDpKGiGuYPa50jGoosM5fjImhBnm17 vsKzU410h6k6j3JgBA+mN8is025qGxZHEPPZOmhnOpx4VVJS3rgutbLMUyTEQkCKytz3s7 Cz8Na6FOZeTpULNnsjr0CcLsTR/QPnniy1D3eoPR4rYFLqTM9rYiy7jXWsHJssyIRcaFQa idP9n3Hkx+by/wHcVFwdmFS5ySw6Y0BdonFSOiBlBEEsqklJIQ9A8XwTRdBkag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760581351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p5HM9muI7YdfTIxBYbvoJzJtS40dtSrvlC3w+NWKzB8=; b=vG6iMdc6qZLrJPQDyluiTXp//x4952i3eRqaIU9hYpS0QEG06StgFrTY+ufABoYk5HFtGW 4uHHVTqfm4o8HBNRPNbR1xgcuRb5Vb8FpVDmG9pHVByvAzDC/nDSAktZPsofyHnHigGoXs EqQhgCfE42u90XFQDC1OWBEVg7VoUkIN+eYJdWYH8X5TeWfjjz1OlNMHkeEeS5mMKzVe85 iz6wj5kBa7+T18vqRhLfr8pmryVQG4wH0XDtktWV/r+v627Nn+MGj74QVhbgI2DwhY4tfi jB5pwx1Yb3DTHORHPnpkFveE/qzlk2Y8OgEA+Gryk4SsoH8cYXenTMNn05EN3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760581351; a=rsa-sha256; cv=none; b=QwUKba8expR5ikOVqfrpmCKyxo3XCvVXxd7jKkn9AtwHCfIsUPhraLIubrJOruWEvVygjy tM6JrOqIaVH5uTR5vVihA8FDtfId8bW8KwE1YgqX21+1Gii/+mX3dnG8kc0A6yfuJDzYp2 Rq8RMnSGj8SbDzq4e4CA23gJcV1EeH/GsTyqIjsUqRdOZmwNwr5xG6bBpFpohY7u5waxRy zRmmEYdjdYLQcSZbXU9qDslyF0nyQE7080/2NACBUOcoFQuvkPPJ7NoSLXNxhiWojrHMDH McmQE/al2Zwa2R6tnIJBGujKyEyHxn5onZO2+eqn36eS6Wv/bLiF1zHPe1QrzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnBYg1RZsz14HG; Thu, 16 Oct 2025 02:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59G2MVZO017950; Thu, 16 Oct 2025 02:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G2MVj6017947; Thu, 16 Oct 2025 02:22:31 GMT (envelope-from git) Date: Thu, 16 Oct 2025 02:22:31 GMT Message-Id: <202510160222.59G2MVj6017947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b4fe667b2fdd - stable/15 - nullfs: add nounixbypass mount option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b4fe667b2fddde0101fca4e431868336cc5c4099 Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b4fe667b2fddde0101fca4e431868336cc5c4099 commit b4fe667b2fddde0101fca4e431868336cc5c4099 Author: Konstantin Belousov AuthorDate: 2025-10-08 15:47:15 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-16 02:22:20 +0000 nullfs: add nounixbypass mount option (cherry picked from commit 6fa205a6233fea7c41ba0306c778bc5cab37ce7d) --- sys/fs/nullfs/null.h | 5 +++-- sys/fs/nullfs/null_subr.c | 4 +++- sys/fs/nullfs/null_vfsops.c | 9 +++++++++ sys/fs/nullfs/null_vnops.c | 8 ++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/sys/fs/nullfs/null.h b/sys/fs/nullfs/null.h index abd652c4ac1c..d07e5c8643b9 100644 --- a/sys/fs/nullfs/null.h +++ b/sys/fs/nullfs/null.h @@ -35,7 +35,8 @@ #ifndef FS_NULL_H #define FS_NULL_H -#define NULLM_CACHE 0x0001 +#define NULLM_CACHE 0x0001 +#define NULLM_NOUNPBYPASS 0x0002 struct null_mount { struct mount *nullm_vfs; @@ -86,7 +87,7 @@ null_is_nullfs_vnode(struct vnode *vp) const struct vop_vector *op; op = vp->v_op; - return (op == &null_vnodeops); + return (op == &null_vnodeops || op == &null_vnodeops_no_unp_bypass); } #ifdef MALLOC_DECLARE diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c index 7dcc83880bb9..d71e91cfacf1 100644 --- a/sys/fs/nullfs/null_subr.c +++ b/sys/fs/nullfs/null_subr.c @@ -210,7 +210,9 @@ null_nodeget(struct mount *mp, struct vnode *lowervp, struct vnode **vpp) */ xp = malloc(sizeof(struct null_node), M_NULLFSNODE, M_WAITOK); - error = getnewvnode("nullfs", mp, &null_vnodeops, &vp); + error = getnewvnode("nullfs", mp, (MOUNTTONULLMOUNT(mp)->nullm_flags & + NULLM_NOUNPBYPASS) != 0 ? &null_vnodeops_no_unp_bypass : + &null_vnodeops, &vp); if (error) { vput(lowervp); free(xp, M_NULLFSNODE); diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 483d4182e65e..170a3dd51cd8 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -87,6 +87,8 @@ nullfs_mount(struct mount *mp) bool isvnunlocked; static const char cache_opt_name[] = "cache"; static const char nocache_opt_name[] = "nocache"; + static const char unixbypass_opt_name[] = "unixbypass"; + static const char nounixbypass_opt_name[] = "nounixbypass"; NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); @@ -222,6 +224,13 @@ nullfs_mount(struct mount *mp) &xmp->notify_node); } + if (vfs_getopt(mp->mnt_optnew, unixbypass_opt_name, NULL, NULL) == 0) { + ; + } else if (vfs_getopt(mp->mnt_optnew, nounixbypass_opt_name, NULL, + NULL) == 0) { + xmp->nullm_flags |= NULLM_NOUNPBYPASS; + } + if (lowerrootvp == mp->mnt_vnodecovered) { vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY | LK_CANRECURSE); lowerrootvp->v_vflag |= VV_CROSSLOCK; diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index ebb765b0a1c5..acbe4cb03f76 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -1215,3 +1215,11 @@ struct vop_vector null_vnodeops = { .vop_copy_file_range = VOP_PANIC, }; VFS_VOP_VECTOR_REGISTER(null_vnodeops); + +struct vop_vector null_vnodeops_no_unp_bypass = { + .vop_default = &null_vnodeops, + .vop_unp_bind = vop_stdunp_bind, + .vop_unp_connect = vop_stdunp_connect, + .vop_unp_detach = vop_stdunp_detach, +}; +VFS_VOP_VECTOR_REGISTER(null_vnodeops_no_unp_bypass); From nobody Thu Oct 16 02:22:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnBYh52nMz6CG5p; Thu, 16 Oct 2025 02:22: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 4cnBYh2VPNz3t6W; Thu, 16 Oct 2025 02:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760581352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yp6Li9wx/QsH3FfJ6D5Vft+keFBeyrCf4obzluM8Lr4=; b=l1/ek0BZF0YF9oYDRRDxqehT0oZ/bT0aiXt15oHczcHnFWWuZdedeljpJxiluJnqlqKyZ+ ZSt+Kc4s2rg/YVYnG7THYysOkgKZT4vAHMTqLgvDfhB1uuqbUFEdiHcwW8pSYvbQW42oXh Yv+OWdeQjgsCq6dzz5NPvtlQDAf0pdQgFjWou27/td5rvJVybSKCjBUQEdnfxNjOLHCb9j QvOPr0ARC839ymEY220ZoqpOAWRI9sIg/56ruzAbzsmayQGJjiRpWoPrYGo/pSAYdpuS5r pH9J8HVEcTv3ZVlw+zBiIrt2TzTNOvgxylr44Z3ubDG6dr3fA6+ZBex6PRoO2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760581352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yp6Li9wx/QsH3FfJ6D5Vft+keFBeyrCf4obzluM8Lr4=; b=QihIy/EeQqkrLGA/lAsKAcHxnGQUCP/YiSIwNtei/npleIMlB/9oGA582vq2JAgTjkBggr 9W61z3mqTGWUI10V6i0LCUzpYjgOR04a6maD+bo4XGlZKsSurJ7tilqJEylyDuzjWvcFlM 5kXYNNBCUIlmuZ94CxUTIQtS2lnRQ6LeE1DBDQpsQ+TQfujZaeZLPSBpLh9BD54+XJzkdW Okofcyq5/Cj8bsNRZ5FS66Mxbj9UoDoXO7dADB9yI1PdYefkou5T1hhmZ+P5SiaCfr12gs 6Tp4sh2M8NCIL1qqSF8on3XgQUYMpBOVK6u0PtTrq1NSD+bvbO9snG6su9QxTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760581352; a=rsa-sha256; cv=none; b=dtla25w6usds/kw7MSPyfaEwjtt4yn5TaOD7L1IDolYlfymqkVofWUIzFehrFjeyih2lSh 5WU2kdxAQY/ANZeDGVp1YdbwWgppCOIWQY4AAeg4RvVnstwy7Iu2EU8A5I+2FpcRe5lXaj 4QMbVAasIp32Qtu29N/msPA8rJJayZ4NrAWM3amB7jlYz/aJ5Y/2AocHqUQhVjQWl+nbsG 14pWhAgAncDcD1o1Lrqw3SOl+Fvhxy0FrSyzkYuhUnIAyuNFTKGLClVgHYCi6oGTiSX6L9 Uv6bs6mK7v/paagbxFEMFRZtz3JUtgD9DJJvE8jsjidsoGL5ltq1A0+cVQjpPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnBYh269lz14BV; Thu, 16 Oct 2025 02:22: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 59G2MWGe017988; Thu, 16 Oct 2025 02:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G2MWOs017984; Thu, 16 Oct 2025 02:22:32 GMT (envelope-from git) Date: Thu, 16 Oct 2025 02:22:32 GMT Message-Id: <202510160222.59G2MWOs017984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 24f4ec797e9b - stable/15 - mount_nullfs.8: document unixbypass and nounixbypass List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 24f4ec797e9b19abd4488554c78e7ecc27313428 Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=24f4ec797e9b19abd4488554c78e7ecc27313428 commit 24f4ec797e9b19abd4488554c78e7ecc27313428 Author: Konstantin Belousov AuthorDate: 2025-10-09 20:55:01 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-16 02:22:20 +0000 mount_nullfs.8: document unixbypass and nounixbypass (cherry picked from commit 033587a985a46e9d45fc3fb48a78754d81f0d50d) --- sbin/mount_nullfs/mount_nullfs.8 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/sbin/mount_nullfs/mount_nullfs.8 b/sbin/mount_nullfs/mount_nullfs.8 index 17b1f45f5e42..b3cf57fd9dea 100644 --- a/sbin/mount_nullfs/mount_nullfs.8 +++ b/sbin/mount_nullfs/mount_nullfs.8 @@ -90,7 +90,7 @@ See the .Xr mount 8 man page for possible options and their meanings. Additionally the following option is supported: -.Bl -tag -width nocache +.Bl -tag -width nounixbypass .It Cm nocache Disable metadata caching in the null layer. Some lower-layer file systems may force this option. @@ -98,6 +98,32 @@ Depending on the access pattern, this may result in increased lock contention. .It Cm cache Force enable metadata caching. +.It Cm nounixbypass +Disable bypassing +.Xr unix 4 +socket files used for +.Xr bind 2 +and +.Xr connect 2 , +to the lower (mounted-from) filesystem layer. +.Pp +The effect is that lower and upper (bypassed) unix sockets +are separate. +.It Cm unixbypass +Enable the bypass of unix socket file to lower filesystem layer. +This is default. +.Pp +The effect is that +.Xr bind 2 +and +.Xr connect 2 +operations on a unix socket done from either the upper (nullfs) or lower +layer path are performed on same unix socket. +For instance, if a server +.Xr bind 2 +is done on a socket in the lower layer, then +.Xr connect 2 +on the socket file accessed via the nullfs mount, connects to the server. .El .El .Pp From nobody Thu Oct 16 03:47:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnDS74bP9z6CNs7; Thu, 16 Oct 2025 03:47: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 4cnDS73yBDz42YQ; Thu, 16 Oct 2025 03:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760586471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uuer8RSq7v1ojywrvbFzzvHHzwBzzVSDBSb/ggeXuVY=; b=nLa66kVnbXDJZ5TNH1G8bFRQQUSg/vsSicj0VaokbrFnYGO90Cg+cbVzoQZrqo/qSjctGr yG8tDPzPqjRwshNxMPFaKGM+nLPMrSFEJ3PxxI96pubq4VCjWcQy/Dm6oXCpnO8iOir0aO BgFq273JxYo3c2iYPsEzcROMPubEPBSMTl6Ke6wTELDFgh1rHOLihD6P19UENQyvC/13Ol mGZaNJ2xfwGWvSXqWwUJWO6Oql/w+FivhAN0LzawBlWwPvOJU5TI5X6T0+wPfxUgnCDm0O 06tdOPeYQx7bDeIjjzWF3ZipqBQH/SRnYprmJaRDJY1sK0aVGVnbE4nxMrOOAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760586471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uuer8RSq7v1ojywrvbFzzvHHzwBzzVSDBSb/ggeXuVY=; b=RuEC98GD+rK9eamwh5zDwGRN/5qTCvbczPP+ZhHzfY39A+TBvZDv1HU4CEEZ/7de/cBVOH 62NorQVICMVQZrW514SyEOpTtArmHrfLhmWC+muobwHnUTRkN29RQ1n/wPESKqUsgw4rGP GFa5GlmvpvXg8GuJAyL9w1DerPhVnEHLuGiAzS6N2ZL2Q5DMB3jUO7tOLExBwq9GwDZu4D ebl6Dtjhtmf/oD/ursT7qqmaQdpIgbYgFN46Na7NMLn5zBL9R17WVJ8twxWM6BWM4mqazO gn2obcTyjStzPm3fkrAQ98epSTq9gUTrO9B3q1QBGPrmrnK7MIDKMoVKI8PEUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760586471; a=rsa-sha256; cv=none; b=NGKoE+JRxDuuy9JRRLtDDC+jmDt+EuDwDmyQUn8ILFXggjBVRu19wRaXmYzfdvM8yAFPYX xK6kZpB4dwcwbuygazd6ZXC+1t86rYeP8DNnh3xxe2+Y2zo1iokghDZNu7gnEERKmphl5M 2fAHB6RSFceT1WQD8C9N7KccJiwyWvp/xff2RD2MUe4oddw6Sm/SRzz1lDiJ11GMTpbx6C kMkFwHXR/P7XBNBj9e7rH9a8a1KMQsk5zXuT7ildUtdjW+VC5F6958qb2jls1yh05T7PNK K/BrywApCEpvL+7I0HjSTWkIvCI2/VVQ+hSNLbeXJSNSiT7fQgwrxyOGfemGMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnDS73Tnzz16yL; Thu, 16 Oct 2025 03:47: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 59G3lp3V070874; Thu, 16 Oct 2025 03:47:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G3lpUd070871; Thu, 16 Oct 2025 03:47:51 GMT (envelope-from git) Date: Thu, 16 Oct 2025 03:47:51 GMT Message-Id: <202510160347.59G3lpUd070871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 2b4d38a47503 - releng/15.0 - openssh: blocklist: Remove non async-signal safe probe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 2b4d38a475032e1cf92a4aec5cad660e939df84d Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2b4d38a475032e1cf92a4aec5cad660e939df84d commit 2b4d38a475032e1cf92a4aec5cad660e939df84d Author: Jose Luis Duran AuthorDate: 2025-10-15 13:29:30 +0000 Commit: Colin Percival CommitDate: 2025-10-16 03:47:33 +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. Approved by: re (cperciva) Reviewed by: emaste Fixes: e02003bce726 ("openssh: blocklist: Use NetBSD probes") MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D53109 (cherry picked from commit 9c82c17c2a3ac61a69cb5337cb6f92ae88bc0b08) (cherry picked from commit 7161c525abffe6cdb19ac01223d058fcbabf49c5) --- 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 Thu Oct 16 07:09:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnJwh2hSdz6Cg0M; Thu, 16 Oct 2025 07:09: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 4cnJwh1vZ0z3JmY; Thu, 16 Oct 2025 07:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+mZvJGlRlj6czK2jlrsM3CwP2Mz3fCHRy3xmBX+Tng=; b=d25cJblIQAZqcPFxqPCVDZTOQYRBASIua0aW8uWQLAWtlm+2CFUvKoGhrKgIkZVp+uOcBX lSiyj2qE4hklW7Unssbv+tVLOcd1Ki6LDtIhEuyB0js2wQu/z8/XIRI2hCKD+xlDJA4FML Y2mBDr2OR2ZdAebMCoq4hXWmoYime7PybNdhowJoBH5ocS7EnQ7mO+g8FznMQ7vmU31zyq PfDNmQ+sSWQ1LinP8/SWBo04xnY62qPavCpm6jJin9oBGHoXfZ5qdtitk8yCfis2ghRkJx hGrJ/HNAkypLmXqzaOHVBPds4MMW7HXBPHZvsjit5pbcKwelvXAYvNI8BcYkDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+mZvJGlRlj6czK2jlrsM3CwP2Mz3fCHRy3xmBX+Tng=; b=OWT138A1gQm37SZ0BaLya3YDAhr9s2VucgPAasOI3y54MbXCgUP10ZHqJ3ZnPcES9VC08c x+KQKniqkS6CV4riVxh5o08rnLw5Sz2Nh2OeFbqXrBbc3nT9HArG08loTOYoYuAqxedMQZ expwSV0myuobXmCpSMArVgwWWuZzMw1QcswNlZK+auiUPX5m4qvKr65WqgZbvVyvCPzNvc Mr+Gd6yRR0AYZnnOjiejuo2q+4w14WkR2hJElrb7PRPYQITpjTF+cYw4CTOHYcW8MGdpJW j/Z2RDRjM8awbeRhoBs3qYGY0szkgn7mow4txTgju6WiXFZeOqR9Zd1SXN2qOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760598564; a=rsa-sha256; cv=none; b=IRctq2Kbkd4MOhmIsDXIBtPOKux9pnycFttttFebDgd7IYIHWIuhpQaUUOVzca8rzPPbx6 XdkzVysv4sbxGjNW8TyMimh1BkzZqA+W/YXO02uRlDldkm8lLjPILwqt2MCXCs4YTnCRl/ a9YUULtbSvoF6bTwuDc37ABN8WK25aIpjD06Lrqa8Pw/48hcA8SUmCMVywSJAhrk4Mq1gZ owlpOak+y9Pfsww1ytU8TQukhCYe4Dntz4vqjh7wKXGhVsWU369edAc/Jf8Yy1kIj987xZ M331sydtPpX3pe7FIWQBwi6TPfRQVtaRWnBpHh5cZRRwOtfmOgoYb2cb2Llomw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnJwh0x44z1CYT; Thu, 16 Oct 2025 07:09: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 59G79NZ0046921; Thu, 16 Oct 2025 07:09:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G79NXR046917; Thu, 16 Oct 2025 07:09:23 GMT (envelope-from git) Date: Thu, 16 Oct 2025 07:09:23 GMT Message-Id: <202510160709.59G79NXR046917@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 520abb95e116 - stable/14 - usr.sbin: Remove repeated words List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 520abb95e1168cea585aebd4af9cc78addd44c61 Auto-Submitted: auto-generated The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=520abb95e1168cea585aebd4af9cc78addd44c61 commit 520abb95e1168cea585aebd4af9cc78addd44c61 Author: Elyes Haouas AuthorDate: 2024-04-11 17:46:59 +0000 Commit: Eugene Grosbein CommitDate: 2025-10-16 07:08:40 +0000 usr.sbin: Remove repeated words Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/887 (cherry picked from commit ec8a394d9c676b3c4fd2cd721cf554e073736fc1) --- usr.sbin/arp/arp.c | 2 +- usr.sbin/bhyve/amd64/spinup_ap.c | 2 +- usr.sbin/bhyve/pci_emul.c | 2 +- usr.sbin/bhyve/virtio.h | 2 +- usr.sbin/crunch/crunchgen/crunchgen.c | 2 +- usr.sbin/fstyp/hammer2_disk.h | 2 +- usr.sbin/kldxref/kldxref.c | 2 +- usr.sbin/newsyslog/newsyslog.c | 2 +- usr.sbin/nscd/config.h | 2 +- usr.sbin/nscd/parser.c | 2 +- usr.sbin/nscd/query.c | 2 +- usr.sbin/pmcstat/pmcpl_callgraph.c | 2 +- usr.sbin/ppp/arp.c | 2 +- usr.sbin/sesutil/eltsub.h | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 9a19d792f788..fa2c595379d5 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -831,7 +831,7 @@ doit: /* * get_ether_addr - get the hardware address of an interface on the - * the same subnet as ipaddr. + * same subnet as ipaddr. */ static int get_ether_addr(in_addr_t ipaddr, struct ether_addr *hwaddr) diff --git a/usr.sbin/bhyve/amd64/spinup_ap.c b/usr.sbin/bhyve/amd64/spinup_ap.c index f874efcd374b..9cfd9a4542c5 100644 --- a/usr.sbin/bhyve/amd64/spinup_ap.c +++ b/usr.sbin/bhyve/amd64/spinup_ap.c @@ -52,7 +52,7 @@ spinup_ap_realmode(struct vcpu *newcpu, uint64_t rip) /* * Update the %cs and %rip of the guest so that it starts - * executing real mode code at at 'vector << 12'. + * executing real mode code at 'vector << 12'. */ error = vm_set_register(newcpu, VM_REG_GUEST_RIP, 0); assert(error == 0); diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index e91b4d0a1e20..238c4780088e 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -2255,7 +2255,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, /* * Just return if there is no device at this slot:func or if the - * the guest is doing an un-aligned access. + * guest is doing an un-aligned access. */ if (pi == NULL || (bytes != 1 && bytes != 2 && bytes != 4) || (coff & (bytes - 1)) != 0) { diff --git a/usr.sbin/bhyve/virtio.h b/usr.sbin/bhyve/virtio.h index 4c6c8004b2d1..8ee59ce2716e 100644 --- a/usr.sbin/bhyve/virtio.h +++ b/usr.sbin/bhyve/virtio.h @@ -97,7 +97,7 @@ * begin with a 16-bit field and 16-bit index , then * have 16-bit values, followed by one final 16-bit * field . The entries are simply indices - * indices into the descriptor ring (and thus must meet the same + * into the descriptor ring (and thus must meet the same * constraints as each value). However, is counted * up from 0 (initially) and simply wraps around after 65535; it * is taken mod to find the next available entry. diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c index 996db29dee8e..1b7350f834fc 100644 --- a/usr.sbin/crunch/crunchgen/crunchgen.c +++ b/usr.sbin/crunch/crunchgen/crunchgen.c @@ -657,7 +657,7 @@ fillin_program(prog_t *p) } /* Unless the option to make object files was specified the - * the objects will be built in the source directory unless + * objects will be built in the source directory unless * an object directory already exists. */ if (!makeobj && !p->objdir && p->srcdir) { diff --git a/usr.sbin/fstyp/hammer2_disk.h b/usr.sbin/fstyp/hammer2_disk.h index eae40b618966..6efefe9a2495 100644 --- a/usr.sbin/fstyp/hammer2_disk.h +++ b/usr.sbin/fstyp/hammer2_disk.h @@ -619,7 +619,7 @@ typedef struct hammer2_dirent_head hammer2_dirent_head_t; * * Simple check codes are not sufficient for unverified dedup. Even with * a maximally-sized check code unverified dedup should only be used in - * in subdirectory trees where you do not need 100% data integrity. + * subdirectory trees where you do not need 100% data integrity. * * Unverified dedup is deduping based on meta-data only without verifying * that the data blocks are actually identical. Verified dedup guarantees diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c index 38f4e87f6ed9..0ef4ed72dbd7 100644 --- a/usr.sbin/kldxref/kldxref.c +++ b/usr.sbin/kldxref/kldxref.c @@ -230,7 +230,7 @@ typedef TAILQ_HEAD(pnp_head, pnp_elt) pnp_list; /* * this function finds the data from the pnp table, as described by the - * the description and creates a new output (new_desc). This output table + * description and creates a new output (new_desc). This output table * is a form that's easier for the agent that's automatically loading the * modules. * diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 6b21c8e8f855..5444790e25e4 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -2295,7 +2295,7 @@ set_swpid(struct sigwork_entry *swork, const struct conf_entry *ent) /* * Warn if the PID file is empty, but do not consider * it an error. Most likely it means the process has - * has terminated, so it should be safe to rotate any + * terminated, so it should be safe to rotate any * log files that the process would have been using. */ if (feof(f) && enforcepid == 0) { diff --git a/usr.sbin/nscd/config.h b/usr.sbin/nscd/config.h index 243c18582df6..f7baf46fff90 100644 --- a/usr.sbin/nscd/config.h +++ b/usr.sbin/nscd/config.h @@ -68,7 +68,7 @@ struct configuration_entry { /* * configuration_entry holds pointers for all actual cache_entries, * which are used for it. There is one for positive caching, one for - * for negative caching, and several (one per each euid/egid) for + * negative caching, and several (one per each euid/egid) for * multipart caching. */ cache_entry positive_cache_entry; diff --git a/usr.sbin/nscd/parser.c b/usr.sbin/nscd/parser.c index 6427f179707b..dc8ad809e8a8 100644 --- a/usr.sbin/nscd/parser.c +++ b/usr.sbin/nscd/parser.c @@ -362,7 +362,7 @@ set_threads_num(struct configuration *config, int value) /* * The main configuration routine. Its implementation is hugely inspired by the - * the same routine implementation in Solaris NSCD. + * same routine implementation in Solaris NSCD. */ int parse_config_file(struct configuration *config, diff --git a/usr.sbin/nscd/query.c b/usr.sbin/nscd/query.c index 652be2357003..a84e9fd84ae2 100644 --- a/usr.sbin/nscd/query.c +++ b/usr.sbin/nscd/query.c @@ -79,7 +79,7 @@ static int on_write_response_write1(struct query_state *); /* * Clears the specified configuration entry (clears the cache for positive and - * and negative entries) and also for all multipart entries. + * negative entries) and also for all multipart entries. */ static void clear_config_entry(struct configuration_entry *config_entry) diff --git a/usr.sbin/pmcstat/pmcpl_callgraph.c b/usr.sbin/pmcstat/pmcpl_callgraph.c index 2ba6dfc0f8d5..fa8114e57466 100644 --- a/usr.sbin/pmcstat/pmcpl_callgraph.c +++ b/usr.sbin/pmcstat/pmcpl_callgraph.c @@ -359,7 +359,7 @@ pmcpl_cg_process(struct pmcstat_process *pp, struct pmcstat_pmcrecord *pmcr, * For each return address in the call chain record, subject * to the maximum depth desired. * - Find the image associated with the sample. Stop if there - * there is no valid image at that address. + * is no valid image at that address. * - Find the function that overlaps the return address. * - If found: use the start address of the function. * If not found (say an object's symbol table is not present or diff --git a/usr.sbin/ppp/arp.c b/usr.sbin/ppp/arp.c index 3502d714a561..5613b345c116 100644 --- a/usr.sbin/ppp/arp.c +++ b/usr.sbin/ppp/arp.c @@ -221,7 +221,7 @@ arp_ClearProxy(struct bundle *bundle, struct in_addr addr, int s) /* * arp_EtherAddr - get the hardware address of an interface on the - * the same subnet as ipaddr. + * same subnet as ipaddr. */ int diff --git a/usr.sbin/sesutil/eltsub.h b/usr.sbin/sesutil/eltsub.h index 3be59d31cb7c..d7feb461368e 100644 --- a/usr.sbin/sesutil/eltsub.h +++ b/usr.sbin/sesutil/eltsub.h @@ -12,7 +12,7 @@ * derived from this software without specific prior written permission. * * Alternatively, this software may be distributed under the terms of the - * the GNU Public License ("GPL"). + * GNU Public License ("GPL"). * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE From nobody Thu Oct 16 07:10:43 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnJyC6shsz6CgN8; Thu, 16 Oct 2025 07:10: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 4cnJyC6FXWz3K3w; Thu, 16 Oct 2025 07:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I/nheNPW+jTs5SIWOhEuw3e6MCm9R+KprI1SIrgOvFI=; b=eq9QW+V3MiIB3ooX6jjqydeQv1tN+LesY3MUx0m/izJvB7AuCkXb9alx3l0SR5EJfP2Qbi /SyFM3R+1ouoo4da+ho408FecfIFLXLbbBakv9J7eLrmImzP5TDMKYFgELHfoPIUmf5fnx 2wflY+jaCxh7ghi72jKQXL7Pim40mwQWGqMgM4xEt3m3netgHP7oHmBVxBPZCaxVJGyFuO DADdtb+E/vh7kCKTqyOQ96JV/xnaTLtVx7obgoi5o+dE95WGan4EqG7wTn3Q5ldk6U7el+ S0vjFPO+FoDnkEd8XaBrJISZOzLCXz8wx6sO5qSrG0U34Ex4ajqAGvW2IwI03g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I/nheNPW+jTs5SIWOhEuw3e6MCm9R+KprI1SIrgOvFI=; b=xNS9LcEIug3BXyWki/QKT14urgMQIZ2pne1ZYyHcobpalTVQ6fDtxv72B41jNYl/7U7HHg TMXiynY5+q2mopGQ+kqNs8rXA2R+ftPZ35ZDouT3hqYvxQpx1gLnFIr0oWx8+lVUfm6eiz PJORYRg9i7aNFIa3oskec4eEu+GOAwn89u4eQrGjli6FBgWik+we+YTEFF7XzJXWdgnCOb GTEvPksRogZbtr3zI60eVromfxjYfenKi3iCJfsYabfnR/C3Qlj6GvhIGm8I8/gQ6zOAoQ MXEUfpV3zJF0JQKQpISSUYXEiGO7pDArjSXijwA/z0FydDQdqmBNmmMvEmofuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760598643; a=rsa-sha256; cv=none; b=tujHmxc+ceDZ2W4sfqIlYSG+omtUVoa5EjE/HlYsDv2EMx6v+LRc/FPQX+ALTeX97TfqOE tjNZ1OoWCBxy37LRD0SBRZPxB3V3P0a4CaQ3WYTsyb8kYhS4/2M33RSMruSvmXu52gCR2F V/YqiJlUNQfte2F6lWXXbMzviEyy6QTw+UdHZB+VHdrs5BgJ08WTAlHsXOFOPK4xs59Vl2 eRt9SBHeyIXYAl17Bwvu9reZvbFyFV2+wJOCC8fdnI7u15mCuBR9YOCg5CoPT5ePHDH6Qc Phv1KEEp6FQbdm9ETu6yUVOhB8mIREY3iCfG8tO7GN+SqQ/ra15dOhxmq6Naag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnJyC5nwnz1Cn4; Thu, 16 Oct 2025 07:10: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 59G7Ah3K056197; Thu, 16 Oct 2025 07:10:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G7Ahjh056194; Thu, 16 Oct 2025 07:10:43 GMT (envelope-from git) Date: Thu, 16 Oct 2025 07:10:43 GMT Message-Id: <202510160710.59G7Ahjh056194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: cf650aba2ddf - stable/14 - arp(8): fix a typo in error message for -s/-S List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cf650aba2ddfb8bfeedae9df5e7a2083f4af6aea Auto-Submitted: auto-generated The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=cf650aba2ddfb8bfeedae9df5e7a2083f4af6aea commit cf650aba2ddfb8bfeedae9df5e7a2083f4af6aea Author: Lexi Winter AuthorDate: 2024-05-04 15:02:39 +0000 Commit: Eugene Grosbein CommitDate: 2025-10-16 07:10:29 +0000 arp(8): fix a typo in error message for -s/-S Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1214 (cherry picked from commit 0ad9b235e1eaef36e07247c8c7635a8eac98f4b1) --- usr.sbin/arp/arp_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/arp/arp_netlink.c b/usr.sbin/arp/arp_netlink.c index 8644f3722aed..24e01126044b 100644 --- a/usr.sbin/arp/arp_netlink.c +++ b/usr.sbin/arp/arp_netlink.c @@ -385,7 +385,7 @@ set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl, char ifindex = fix_ifindex(&ss, ifindex, dst->sin_addr); if (ifindex == 0) { - xo_warnx("delete: cannot locate %s", host); + xo_warnx("set: cannot locate %s", host); snl_free(&ss); return (0); } From nobody Thu Oct 16 07:11:49 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnJzT63M8z6Cg9y; Thu, 16 Oct 2025 07:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnJzT5S78z3KJ4; Thu, 16 Oct 2025 07:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s9euSAKHtVhv1O89GxtIb4baCl7Zb7vGQKJYBRLnGCY=; b=QGdeHp7HHdqXJnnFa03R6yZaFQ8M2+kzXuMMdSaysc5O1pY4ev0Ay5xuU1AogMOwK/2blG ETtLaxjxoS9VWmC3cB5Eqy8s6/klurOds2Nh5EggX1tDl78TAsGWqi8qxem6+XefxjnaQm ez5u3lOs+Dqr+QqYLj+fFvGkQKoc6UgMgvtW9XAlBUhXCs2npTIjbTdZBKLJYtZq+mDdBE u6U7dhCM8Bqnvx32fEjp6iFWyiBmBZYKOIHkHS4ZqJNW4sCSihtJHqdxchyIZAHFv2wvYp mIsi9j5/nqyGz4bYL1KMoQ0KFJROa07Bv30YCdhq6KewXIT7d0M+mM5ObQQMug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s9euSAKHtVhv1O89GxtIb4baCl7Zb7vGQKJYBRLnGCY=; b=UwGR32Wbf9auolJQnGOGtcboNRAs0o4TyhbeMPhvRBxNqmkkwu0kE7g3MJ5eAOjWrvIpUc s72GsBhof2pr4a/vfN1usgudpQKYSf1vZM10NPHslc5I1Ym022QhuAATvq7oQ4oo2S2pgr dV9WSFWjIj8Ll6ARKIzf6rB6H9vPGcWmeLYP7fTP4UXSIdOsXkGijXamFZ0ai5tvbQ7S3x maxpVoYKEv1ICDRy1z9kJMJuwppZ8wwMt1Oy32J0VMbgI9ITpnRc5Vdvv+drQLhGm2+R8n oULKMITfMt7FeZiXlt/JSBNMXoLGA35jqtH2mO+4ics+fLGaqJ/zi3RR4Vl5wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760598709; a=rsa-sha256; cv=none; b=QOHi7fWZQDkAIblA3CR4EeqwWqTFJRFQiWIE4ommP/M0T9IYSAQ9ma4OZIaLJR3gS0j2WT iogSY8qGdVng/LHBLuGWGcINs+W/OdygGRd0QSqspbNCdQ9RzXuzZ2MCEEF6ueWoCNe+ZN Z951s4v/FJkzSkhillHYoERcAvq9dZxcxVwlghzrtHkUMeTozT0Jj28ItB75v3llgoQcfs 45dN31J5terauB9J78IQIxBDuOS+K2i8aRmKWlDo+KCSXVczbrQi2tHsrpZarEezKLreGK Uthgm25Tnz5ai5bV77OWT3bFdtnWo9LCi1253LbZKlqwm+9Mm0WBrDNF8h/ewA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnJzT535Dz1Chw; Thu, 16 Oct 2025 07:11: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 59G7BnT3061461; Thu, 16 Oct 2025 07:11:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G7Bnqf061459; Thu, 16 Oct 2025 07:11:49 GMT (envelope-from git) Date: Thu, 16 Oct 2025 07:11:49 GMT Message-Id: <202510160711.59G7Bnqf061459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 3bcb5b7adc77 - stable/14 - arp.8: don't document a syntax that doesn't exist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3bcb5b7adc77085580817b2543d3e6a4cdffb94b Auto-Submitted: auto-generated The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=3bcb5b7adc77085580817b2543d3e6a4cdffb94b commit 3bcb5b7adc77085580817b2543d3e6a4cdffb94b Author: Lexi Winter AuthorDate: 2024-05-09 23:26:41 +0000 Commit: Eugene Grosbein CommitDate: 2025-10-16 07:11:33 +0000 arp.8: don't document a syntax that doesn't exist The arp.8 manpage documents 'arp -d pub', but the 'pub' flag is not accepted by the arp command. Remove this incorrect documentation. Reviewed by: imp, gleb, mp Pull Request: https://github.com/freebsd/freebsd-src/pull/1215 (cherry picked from commit cd917a17bc39991bb1ee11b90716bcabfcd42791) --- usr.sbin/arp/arp.8 | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/usr.sbin/arp/arp.8 b/usr.sbin/arp/arp.8 index 3f61c0cd9ecc..ad03a554f527 100644 --- a/usr.sbin/arp/arp.8 +++ b/usr.sbin/arp/arp.8 @@ -46,7 +46,6 @@ .Fl a .Nm .Fl d Ar hostname -.Op Cm pub .Nm .Fl d .Op Fl i Ar interface @@ -97,15 +96,8 @@ A super-user may delete an entry for the host called with the .Fl d flag. -If the -.Cm pub -keyword is specified, only the -.Dq published -.Tn ARP -entry -for this host will be deleted. .Pp -Alternatively, the +The .Fl d flag may be combined with the .Fl a From nobody Thu Oct 16 07:13:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnK1P0Y2zz6CgB9; Thu, 16 Oct 2025 07:13: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 4cnK1N70CKz3Kpt; Thu, 16 Oct 2025 07:13:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uIpUGa7TF3S7uZ0HNim6IdGjEpqacv+icl3KwCEl/3o=; b=bZZ0PIIj7DKkmO49S7z/uJYQPAAI9KY/OG+97+DP3wF1ZFAny0sfE+pgr3OImXmC4Gbawz 5MhDaUmTKjwc1swPtSKeDm8lRpQBok/+KUG8cldvfNgZm7ielRSjO+r/E+KupHh/qQwnip 0GX6ftYUMetQlOvfENxKK3dcc4irjMwf71T/bcM9LUqstzLef7K7MQvg4FOTKnYsAIzser wD0X45yj+WN02UZYwlB8hqFGjY4AiZ9bCP+1rLChIkazqpgnJ6rDlE3EC0anuooYcS1yVq mHdM4f+yBN0LWMAEeV5HijcxNU0PDVsQMm1NLM0FHYFcRAGelom0h5U5i/p7Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uIpUGa7TF3S7uZ0HNim6IdGjEpqacv+icl3KwCEl/3o=; b=TQ28wWbS/k/JeWisbHHGh/P45KvMQb3BIFeq4KM8Gpluzr9ZBFNpOgt/O+Vy0aRL0XEZMQ 5/jFFI4C5S0jsC7ARPSpRodRMZQSFAzUxrqpO5QrOpmXtyvUme94nEHjtiLHJAMQ7TDpTc czbMiDsr2MuK6/fCBA6omWVe5VbAytrf2lZwR/4fr8UYOnnP7C5Wp7WgKq8SdzQNGJnyfy oGqvGiA0aroj2WYYoOQ01Yerc8P1F1krNSpwFrAXjeJtom0TSAtu7BVlf4BMOR51iXcyzm YFlSmLq8FHXwPRtJgMBJzaOy1lFa140zNwRMzXUFpIEfZ4JNVGOi6WDVXUBc4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760598809; a=rsa-sha256; cv=none; b=a1YvI3oJrGMEg9hTvaZFIIY5ckdZzsasn5r9qdBGiAQNvayw6W90fKj6AZM3Qpj3yOEtLC 3HYycpF1xvJBQPncjLldcBcLzm7oD7DIRIBRqD2NN4xUNktBfIAr3hwf64UJreHo+FQe51 dl+WdS95XvwOQJNaADdF3tegtz8Je0HDQHdVhCZjmK1IJoMiFNE5M1r972//KXRDNCI2zi /hfQ7b3iXMDykiIjHCY1jM0vmK8XDKHmqcB3v0jgaL+kdcF2whX7huvVJt0RpD133hfN6j +VB4Aq023ZMnCpy2B0Y0+aNE3Jwh2QlYoi/YtoALNV0kM+GyJcfA0/Pf1Yj+6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnK1N6Yk7z1Cs1; Thu, 16 Oct 2025 07:13: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 59G7DSKx064272; Thu, 16 Oct 2025 07:13:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G7DSPL064269; Thu, 16 Oct 2025 07:13:28 GMT (envelope-from git) Date: Thu, 16 Oct 2025 07:13:28 GMT Message-Id: <202510160713.59G7DSPL064269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 057bc783c67e - stable/14 - arp(8): allow -i with -s List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 057bc783c67e8196d0b8c8c60a7eee6f7dc05805 Auto-Submitted: auto-generated The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=057bc783c67e8196d0b8c8c60a7eee6f7dc05805 commit 057bc783c67e8196d0b8c8c60a7eee6f7dc05805 Author: Lexi Winter AuthorDate: 2024-05-05 18:21:06 +0000 Commit: Eugene Grosbein CommitDate: 2025-10-16 07:12:22 +0000 arp(8): allow -i with -s arp(8) usually disallows adding a static ARP entry for an IP address which is not configured on a local interface. Change this to allow such ARP entries to be added if '-i' is provided to specify the interface the ARP entry relates to. Due to limitations in the kernel lltable, this still requires that a host route exists for the target address, but allows static ARP entries to be configured to proxy ARP for, e.g., local jails which use an IPv4 address with a /32 route. Reviewed by: imp, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1220 (cherry picked from commit 2356b60be7024b10ddc4361fc22f96205b55fbbb) --- usr.sbin/arp/arp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index fa2c595379d5..200912736137 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -156,7 +156,7 @@ main(int argc, char *argv[]) if (!func) func = F_GET; if (opts.rifname) { - if (func != F_GET && !(func == F_DELETE && opts.aflag)) + if (func != F_GET && func != F_SET && !(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) @@ -387,7 +387,7 @@ set(int argc, char **argv) } } #ifndef WITHOUT_NETLINK - return (set_nl(0, dst, &sdl_m, host)); + return (set_nl(opts.rifindex, dst, &sdl_m, host)); #else return (set_rtsock(dst, &sdl_m, host)); #endif From nobody Thu Oct 16 07:15:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnK3W3sB7z6Ch0g; Thu, 16 Oct 2025 07:15: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 4cnK3W2c7Nz3L04; Thu, 16 Oct 2025 07:15:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Lsi4svnGszffw5MJfURORKRhk8mdBwKK6FvFa+206M=; b=FSNHK+k3el5zLMIR/VFhaDuJ6dLN2hXXUyjieSoLKZIx8EPpWpYdFYCI75Iin+XPWYf/B2 bWJJNmpNYkd03JZToLTVJVooCkSQxIJAGkj7JRYRSMIbIFtA7yNrnpba5lZWPJsRaPZPvM CtBYBs4HpFA3I4w4GEMUmzpKwQ+RHR6fSyiva8+T8byq7L/zGTuUDxr268RUi6Ug6+tZ9R SU0qOwsCZGzBbW3WL5idYheq2CsmLc1sGNozY03S7sgHaTClrmWKj5ew0K+H8Du1K0MKl2 D1HUGDHGqnLD5sw5Z3sh3F2o4n/3FuqvTmeTTwWZrnx04rbiaMat8KGwsuofEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760598919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Lsi4svnGszffw5MJfURORKRhk8mdBwKK6FvFa+206M=; b=v1Y5jBRO98ITjL6bZGQdZxDBU7oxfSbRwdjFlI0sDMUj7GfUsUGhB1I2NxA0vyJu86omJR XPiOpJYOcdg1fZk6D5g2iiYt0jT7gyBY7di+hof13jNbnjqsQud5upVLvffx7G+5y6Mydw ROCkgKIwHMypz3yToTeTy5R+Ljt4nNuwjT56yeCIcttLhvg2ojSCqjVlvHhkZi4qov4+9o kbwtKDV0IeEH5BbQlbZL0CtuoZ/0A0yOzXIpZ9yAFO/Lu7jAo6SXUSzEGHxWk3VXvFbzHK hkvbcrgzylOyXn9L4pKuPn4l+vhmg2fQ/EjCilOWolp4R7pqm3+Pn4tfVhL4/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760598919; a=rsa-sha256; cv=none; b=qihtCITAWPkMb8/0G+RJyU0I66aFDG74LUHxsMM9ico1EN4kI05inyMAnnc4k+LiW157VF qMK5uWwKG4FwTkD+TMAcaCocgICtV29nwxGVgmUquTK8jOkBFOV58Ry22TkTZuRTvkhNX7 egrpOscy/frPzjrqOEPRhlu30kc05LBET6c55uokTJ6Yu0vdy1St0QKrHQWUpB4xLflspR iXciVx5L/vF8tUA5FnJRjBbf+bRnLXpctTBEp0XVKCLqv8hB/FjQc07K5ib38RYz09GcvS U5B8zx05Upgp0Fd4PB/Q52KxDPKpGQXaweK+pG3UNhmhKLmZfquzFoY/VET/eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnK3W21JMz1Cs2; Thu, 16 Oct 2025 07:15: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 59G7FJrs064913; Thu, 16 Oct 2025 07:15:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G7FJIa064910; Thu, 16 Oct 2025 07:15:19 GMT (envelope-from git) Date: Thu, 16 Oct 2025 07:15:19 GMT Message-Id: <202510160715.59G7FJIa064910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 9d53ea06b320 - stable/14 - arp(8): Complete libxo transition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9d53ea06b32097a648fedbaf4abbe8ee54951225 Auto-Submitted: auto-generated The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=9d53ea06b32097a648fedbaf4abbe8ee54951225 commit 9d53ea06b32097a648fedbaf4abbe8ee54951225 Author: Yan-Hao Wang AuthorDate: 2024-10-12 14:38:45 +0000 Commit: Eugene Grosbein CommitDate: 2025-10-16 07:15:04 +0000 arp(8): Complete libxo transition Reviewed by: des MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41408 (cherry picked from commit 417842f908619336dd4c739a92c326ade2c35770) --- usr.sbin/arp/arp.c | 11 ++++++----- usr.sbin/arp/arp_netlink.c | 5 ++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 200912736137..fba6bdd57ed5 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -67,7 +67,6 @@ static char const sccsid[] = "@(#)from: arp.c 8.2 (Berkeley) 1/2/94"; #include #include -#include #include #include #include @@ -181,7 +180,8 @@ main(int argc, char *argv[]) xo_close_list("arp-cache"); xo_close_container("arp"); - xo_finish(); + if (xo_finish() < 0) + xo_err(1, "stdout"); } else { if (argc != 1) usage(); @@ -218,7 +218,7 @@ main(int argc, char *argv[]) if (ifnameindex != NULL) if_freenameindex(ifnameindex); - return (rtn); + exit(rtn); } /* @@ -458,7 +458,8 @@ get(char *host) xo_close_list("arp-cache"); xo_close_container("arp"); - xo_finish(); + if (xo_finish() < 0) + xo_err(1, "stdout"); return (found == 0); } @@ -735,7 +736,7 @@ nuke_entries(uint32_t ifindex, struct in_addr addr) static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", + xo_error("%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: arp [-n] [-i interface] hostname", " arp [-n] [-i interface] -a", " arp -d hostname [pub]", diff --git a/usr.sbin/arp/arp_netlink.c b/usr.sbin/arp/arp_netlink.c index 24e01126044b..db1ef775dea2 100644 --- a/usr.sbin/arp/arp_netlink.c +++ b/usr.sbin/arp/arp_netlink.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include @@ -43,12 +42,12 @@ nl_init_socket(struct snl_state *ss) if (modfind("netlink") == -1 && errno == ENOENT) { /* Try to load */ if (kldload("netlink") == -1) - err(1, "netlink is not loaded and load attempt failed"); + xo_err(1, "netlink is not loaded and load attempt failed"); if (snl_init(ss, NETLINK_ROUTE)) return; } - err(1, "unable to open netlink socket"); + xo_err(1, "unable to open netlink socket"); } static bool From nobody Thu Oct 16 09:58:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnNgr32qJz6C98W; Thu, 16 Oct 2025 09:58:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnNgr2S70z3cC5; Thu, 16 Oct 2025 09:58:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760608712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NHNT8DaUoPkRG2Jbu7wZpAbfYI0+gskkhnjyNrVPa0s=; b=YwCCXgv8jRojN4dA3sh+tL5tjJw4juHejpImeoWOspApxqy+kjqvYZSZ+AKnnPpEna0HTJ d683avnGQ2l1/sCkA8lXgdif2EvF4NUtinlrdvqmneYgZeH0MMfHvczYN1OGx3dbttr5XY iu9D23g79v798VbWQnZvB7Y95y4usUnao0R1t5x9bsi7heRiM35e3VoBJJgxIGDk9NCiN5 Y36UKvt069cCw6kxSAB1N2y5VCwkrP5raXaMhJyhRxrN4uAihQ4qhffIPqEtZd5f2xHyuV yjBjhetdJhvV2bi8Xgq/cYL44oRA3cC2ZoVJmrU1gBJDjg1xEExw4zfk5dz45A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760608712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NHNT8DaUoPkRG2Jbu7wZpAbfYI0+gskkhnjyNrVPa0s=; b=VnJrpP5Wsz9hr89zbSRMt+iCL31wQXPtA+M5z/7ydjd4Z5+c63ruq1LkhZT/5q5Pgseqcc 2pGUYlEF1sTinxtoeOVhDJic2X/BlEgXOi0LL9Z76LLHJk4U2B+I7lTDu+Tfe7dKgMMt7m 6rN/XMU+eEDYNbQaNVZwRhjilutJ5qCORaty0oZME0d6c4z5YlB4Q5uS3b99RCMtlMrdHL H5UBMDe/TCSvXowCpp1bL9krf24xv/6dRDC3Qpe2Jwrqq3Lz6cRMn9rmKoLhMIHIHPMNy4 MqEyoSE2v+d6lvDexBRaK/UxbYYOdClC2viTBJkgRwiOGfDbtIe5A+YL1qU0eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760608712; a=rsa-sha256; cv=none; b=m0ISUH76TnXcOwe1LSGWy8EB051TsysPQjW/5Ivsf7M4k4Ixk2itwtGAcP1PpkEus+rELb Kw4YZ/2agM1PfPLz1y8JiuHSyDtxbjSwpKW/srHTHptjYMP+D8DRLFXjq8/VslSP/e56vF TaeaH/CBM+kPzYmWpg+gY4kKxHduKlFxFR8PLuA3lAO04f+VE39B5ZcnT5yNjttP6mQHFp khq1nGmfR+T8042PC/+iy+Vt2oV8J8eFsCIfd4lht4jUMsO5tpTdCV8Nbf87A1cYgCvdLf /29dcspchhcG5xlrWJ3pjODya/x9fFR2tXKSOi1hekfJIY27wcRZjkYrlv0OyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnNgr23Cmz1HpB; Thu, 16 Oct 2025 09:58: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 59G9wWVr066135; Thu, 16 Oct 2025 09:58:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G9wWQC066132; Thu, 16 Oct 2025 09:58:32 GMT (envelope-from git) Date: Thu, 16 Oct 2025 09:58:32 GMT Message-Id: <202510160958.59G9wWQC066132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 258cde4b2e48 - stable/14 - tcp lro: use the flowid only when it has hash properties List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 258cde4b2e4832bfaa49c800754aec8800a388c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=258cde4b2e4832bfaa49c800754aec8800a388c7 commit 258cde4b2e4832bfaa49c800754aec8800a388c7 Author: Michael Tuexen AuthorDate: 2025-10-09 12:37:11 +0000 Commit: Michael Tuexen CommitDate: 2025-10-16 09:57:10 +0000 tcp lro: use the flowid only when it has hash properties When a packet is provided to LRO using tcp_lro_queue_mbuf(), a sequence number is computed based on the m_pkthdr.flowid provided by he driver. The implicit assumption is that the m_pkthdr.flowid has hash properties. The recent use of tcp_lro_queue_mbuf() in iflib exposed a bug in at least one driver (igc) , which * reports always that is uses M_HASHTYPE_OPAQUE. * sets in some cases m_pkthdr.flowid not consistently for packets belonging to the same TCP connection. This results in severe performance problems for the base TCP stack, since it handles the packets in the wrong sequence, although they were received in the correct sequence. To protect against such misbehaving drivers, just take the m_pkthdr.flowid only into account, if it has hash properties. The performance problems were observed by gallatin@ and analyzed together with rrs@. Reviewed by: gallatin Tested by: gallatin Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52989 (cherry picked from commit 73f56fa542ecf6ea6819c9e17fc60962eeb726d8) --- sys/netinet/tcp_lro.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index 2a5839440d69..045412f6856a 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1475,10 +1475,11 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb) } /* create sequence number */ - lc->lro_mbuf_data[lc->lro_mbuf_count].seq = - (((uint64_t)M_HASHTYPE_GET(mb)) << 56) | - (((uint64_t)mb->m_pkthdr.flowid) << 24) | - ((uint64_t)lc->lro_mbuf_count); + lc->lro_mbuf_data[lc->lro_mbuf_count].seq = lc->lro_mbuf_count; + if (M_HASHTYPE_ISHASH(mb)) + lc->lro_mbuf_data[lc->lro_mbuf_count].seq |= + (((uint64_t)M_HASHTYPE_GET(mb)) << 56) | + (((uint64_t)mb->m_pkthdr.flowid) << 24); /* enter mbuf */ lc->lro_mbuf_data[lc->lro_mbuf_count].mb = mb; From nobody Thu Oct 16 13:18:47 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnT702nfsz6CSq6 for ; Thu, 16 Oct 2025 13:18:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (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 4cnT700sfMz41f7 for ; Thu, 16 Oct 2025 13:18:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-86420079b01so132104485a.1 for ; Thu, 16 Oct 2025 06:18:52 -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=F2v7SlAnNw1QTeLifSfWHezuqz50nAi4KZlOzdDBSf0i9gQaCx5FwwpyWPh3pR7m/T XTHxw3XrEJLBR6oXIo2Y1b6TIVnbRl0AD61b9HVrdUwkVvK1xMTNQDn/MDXTOlg4hQVQ yBuwUcrsyIRoeZYqggQnJfy27fbNEOyt0aWWqk92Bp49xYOlAQqZOzwxyp2C70KN5Zhq 298aIWol7LyA8h39q/870s47yqGnat/8+uVXalFxezRAVSWftBeM4jzCjUNrYFZMvKp0 XtoVMk6hywqK5Bjb9brHMtgnfRs/kvPAKnIOiBZjF6aBV2VzHiaKgml6yFDqJXLLpopn Ramw== X-Forwarded-Encrypted: i=1; AJvYcCWl/KiMFvos/HZw7CAQ5LcL+42YWZD1RgZl4HKmYtozmBt+OsJtSxp0ibTPRlBzyhHLuSGUo58Yt3zKrHI+1p6+WNWw@freebsd.org X-Gm-Message-State: AOJu0YzZUhIqyhvx/HNjr1JKk3S1uwCS4FqEeoTcYUmSNsq0tQlzolh8 5XVXWO1K9a4MUOEbdRD1pSnHqTTGHEbQbmbengMM22pmV+StiXP5JrLp X-Gm-Gg: ASbGncupyExKvHMZ1PwrKckOIzm/qqADEpU78scVzK9DzfVI/P0wYjJAH7DY5h464O4 /izZGVp2o4NHQLgUGcX/O0BUz/6zyVXHm0ylMz0U/BQYYdV7tEDUxkeZ6t1Dx60fvNiGQPiHIdd GjhBw0o104AWV6uQCaofXJbIrVbirqjx3cp48JmMkk7A6cigeLVmAbsk2CC9DFPyAcN3HBDnxfM prfedqOULIMcSt5BuK33jSHt/UerACMSwsjB7vsJXPgh/6tGkoZiHV3ngjpAI+kWEZ5jQn3bkpI F9mOZM6fdXt6eH1U7fwVFmDnevzppDT67ODW+0gEFc0WxbWWOTulPI0/5f8DG+H5Sv/DWAWmVv7 brSsPaEXwy6xPLoU2o+f4qOD85eCPZM8Kb7RLPgsa54Zc6ugS3qMNGfNGJW1UP9PWoLbmu7B6Gc m4yHEUN8v48zlAuHc203anxsKa 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202510152047.59FKlL5b081751@gitrepo.freebsd.org> 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: 4cnT700sfMz41f7 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 16:58:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ0C2mnVz6CnQr; Thu, 16 Oct 2025 16:58: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 4cnZ0C25dwz3k2J; Thu, 16 Oct 2025 16:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rTrLvoAErp31NzliMloosw6m294NQxreRSGFC2zj2uA=; b=tEYK7hK1eEVB+Oxd82wJ+sAG1oaMO9vpqY+QOnrv2QPWSUQITb1imphiD+Q/fT0xlzHuun s8osHRi7q7hM6s2lzDY2bx4nIawMl0VWnx+sYS3ve4JxZwqQ2WiBp32+ryMtDv5aHLw0QA ffFVqCI+mBeQs7UAcQkHTnHVIn38GPRLfaUMQ9pCBZtNP6hCjRqXDNxsxp8B7M2AQNvqzu VpFJ4hRdfGlsQPGxaPkEiU3MCgtzbFTdVYAjYU/+IhqJQGhudvXBkxYEOERecgLSHsNFnG 4Ca8mlOTaLH4336IENiGuSpsAs062yVuhkIr/MygFGmIH52kfR3xb8qtMPct0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rTrLvoAErp31NzliMloosw6m294NQxreRSGFC2zj2uA=; b=PxuBJauQjAXIpF2CmRqaa+Rdghdiw26GEpBt4C5cAeoxhlNx6QfbZyYDErDVcNfJ4WhlrJ BRQWzcFGevH1Ia93qZMrK0rFlS0mvLA7OUf5jKkVrgDbuTI4gj51hvrycT9QqzvJIhAys8 hZJj8A3Rr+6oGp0xqBbJ87LMYRv2nApmLKL4RnPm9Bw9ELdJw8eTu1yZGvAg7pKRDu553Z jjBK4tHVIFjklpD8JAozAh3C7Q3YtYEMOFM5Gt0LD0PPpf1FfR+3aE8u9R3dbBojacG3Sr cf7d6d8RBF7lJgtSI46YmYi4gGhEDr1s3zfYNoAe/oSJWKFLK2fXmVXt6RpLsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633899; a=rsa-sha256; cv=none; b=Li7HxdCpLZ/ZzWbrWAm+LRT31iylNCo0Ciym+TLNYS5hsh2pHygSZiBhKO3TRCyitd9Vne A0RMv0y6B96sNHKjb0ey1nxJ57u/6YAog5RSrmcDu2TVD6ueubeak6F6KKOUjIua2XxNWk 8v6m5Mzydac33zmmHn863FOE3t8b5ZHT0d49w6mYhdnv41f1ChO8MlRbEjXExpIsChMf71 UK1bQGGHyOUoaB3z/ep5N5AsfsnjF7MsPdz7CDszfy4yTZHPg92EaSMxJDfEHIQk2pU4i/ JETtsnVg4O4w/4izkeE+moC7/LESdMOePiaOHSVmXkJ1QFqrK/7pT+d17DvkUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ0C1b1Hz2Gc; Thu, 16 Oct 2025 16:58: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 59GGwJnL055705; Thu, 16 Oct 2025 16:58:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwJF0055701; Thu, 16 Oct 2025 16:58:19 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:19 GMT Message-Id: <202510161658.59GGwJF0055701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 5e482104ecfa - stable/15 - sys/rpc: UNIX auth: Rename 'ngroups' => 'supp_ngroups' for clarity List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5e482104ecfa57b6debc3c495f2dcb2d2ea50ea2 Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5e482104ecfa57b6debc3c495f2dcb2d2ea50ea2 commit 5e482104ecfa57b6debc3c495f2dcb2d2ea50ea2 Author: Olivier Certner AuthorDate: 2025-10-07 10:03:07 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:39 +0000 sys/rpc: UNIX auth: Rename 'ngroups' => 'supp_ngroups' for clarity MFC after: 2 days Sponsored by: The FreeBSD Foundation (cherry picked from commit bda3b61512b2597d4c77d2b9c9074b844dec0405) --- 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 Thu Oct 16 16:58:20 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ0D3N0Gz6Cnj4; Thu, 16 Oct 2025 16:58: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 4cnZ0D2Vrzz3js4; Thu, 16 Oct 2025 16:58:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3/V49JVRpfThJoujR6KqodNfAv9ISWZaSqmqQXNlZo=; b=NyfBd5B9Pmz1MIPnMD1rwYrxSsg0dLmuFgNeNOf67o1K2WpdjIyHsef+xfKnqDff3bpwSh 7lY3H0BXmeDUM/nOFb0C0TQSihdBgeijIAmIWKT0iFCpITXnLPseJa7t07myWKEGJ0HGB6 DoND7jUHibozwgjgO0r4naY516CIxOwyDzX/x/FuyVW+oNM3QrdoJxdocdJg+Oamcx4cLA GSetu4aBYky6eqeIV+ZFOqGK90QPLtcbXS03H0N03PwxulNZfZM2A4HxfLzPL2Bqc22iLa 3o21WIdyTp/WKHiKdeYrZYzt318oKwUa7XFgASGBmzK9qH7H1R7/GKSN2rUncQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3/V49JVRpfThJoujR6KqodNfAv9ISWZaSqmqQXNlZo=; b=ejkPPOC/ysPIYR2WNd3XF1vm0vBWYYRRc7CANTO25tTZFQdax/eFwcALu9Ynd3jvUpp18j 9HoFsKpzFC7U0ADX8TZaH8Z0NYvR/ZpAYmNqAY0MLR7itefcpFvrxtsiSdUCKM0eFjc96b Xd3S55GGFJbSM6PD+QcJPPMgNtyLt+mgsTM48478yGNAwYW/qXAlqDVIr6AvGsLxydbZW7 mXGgIOrWL0WWg8IIjNvjH+QHvk6J0P8F7oXny8frce8qFmEyu2ROW7gXtFTo44BYfd6y8F 5+OfNASMCIMNdhD2x/6tdI9k9hS1hwhexxfypKzh5SrDErYSKeMsm+GeYZy7Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633900; a=rsa-sha256; cv=none; b=k87qPYH5uAorv7Dy316yw8ZPlPOcaQtoSKxRnDim8v/cpv58dY6/tNXoWb2PegPQlfFQZM fYHlepgR54pMZTsVgkDUyhPL0vhWMtNETHAbxV8yDxXm33OOXyQfoA65x5ijPDOKuihZkz Pv3xYyz2s+ew1YR5DFNF5ltdZbpkeYX/Pg0HEbCVjU2fmRSIc/9jjOTzG3hY/pT1jtTZU2 nKe4bCsXeTfPqEGPbphE7RT9dYxNojSXz2V2yENwXMQDbw6rcvpLHU6DObOnux2Y344dfd BLq5tKmTnx6Zl5PONrX5dJMZIhduhULgVoZnYDil6KYZSJmpgnqyym7Y3IQ8fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ0D22JFz25P; Thu, 16 Oct 2025 16:58: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 59GGwKw9055739; Thu, 16 Oct 2025 16:58:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwKsd055736; Thu, 16 Oct 2025 16:58:20 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:20 GMT Message-Id: <202510161658.59GGwKsd055736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 9492a1e27fb1 - stable/15 - sys/rpc: UNIX auth: Fix OOB accesses, notably writes on decode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9492a1e27fb18fcd6122bbd9ddcd853ee7693417 Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9492a1e27fb18fcd6122bbd9ddcd853ee7693417 commit 9492a1e27fb18fcd6122bbd9ddcd853ee7693417 Author: Olivier Certner AuthorDate: 2025-10-07 10:02:23 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:45 +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 (cherry picked from commit 47e9c81d4f1324674c624df02a51ad3a72aa7444) --- 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 Thu Oct 16 16:58:22 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ0H3fw6z6Cnj6; Thu, 16 Oct 2025 16:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnZ0G4v2xz3k7R; Thu, 16 Oct 2025 16:58:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EHdhCOHiIzx7zVdzE2qzqEzrVWDeLYb59xtDpAZ1DXI=; b=W+g9cvuDwQ+ksjdiqETiezxDlYGw54qb+o4G+iKaNRyIo+iXl729vgbr/0Kjja84lsrxvp EJif+CsbCUv9BoxB7qPUBjTgnJ1R2V0ezL9sFNmA852kDX8kgkJAGwkSb1NHBkTpGQvsnF +8/TShpsp133Oi0BSVp3Isbo4EOTgN8HjlVbbjK+mNmMPii3MAcE3QL20hyN4FbgpmKe5I LPuSAniCkgN+csW3q85J34Wdx4fz0zn/cZzoYPdt12nEUe10X9bKqYRB5VIV4UaR/I+JLo K3wj6lncjJndqY/Qs837TtYMKiFcfKWnTwxtS976WcDp9+sZktyg2CE3bja81w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EHdhCOHiIzx7zVdzE2qzqEzrVWDeLYb59xtDpAZ1DXI=; b=XdBPJxVxY3Ew6AcuuLw+de2oT70gbSGalmoCaOj/plwLThBYG/7Sg96HlRTySVknpK3uVP mLenPUGUGwRqKwsneNNJ9CwnoPzPPpISb1YyXyacTFegKpM7/dUmEq9r2hbXkHgshpLHSk 5GydTti/tu9jlwi/6sUNngtqanYUz+x8dBjTCN4gsgT3C5JD8rQxifg3uaC5e0lCSS89LQ gYLrTdJq1aBencG7HcP2RoOYOYMdHfccMQZVfr0lscVFE8XMBX+1ikgNUUPYuZh+WkAguQ dsxy+X3E2z4tUXMkl4DfMAYVYhLQpEcq51T3gOOq4V9kALnbpLybHifSFrmysA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633902; a=rsa-sha256; cv=none; b=u/JU3P/M4AhwogSRr4RiY3P7GGGHI8PhlcLD3oBnqB0Jh925KM0Pwftm447vh3kHJ2B9or 5693cdPKaMrmlrsKfQoA8/jppUWeJZK1DmgsSiW2JwXs+aGs1NYvziQ0kZfEeZ2EAwvXCg AosBn5OqvREuh/1atxKwm173O3n85lBhFR3uuowa+bg8bHuN+acOX95qygeK00wPEcc5yk SqAEb9J81bRoZfQmcVeJJsdBnGwJJgJDr4oIt244jItdNvzNCx/ySNdNCgBmQ9YQIuOrUQ hthUte1KjorUIp3UQ1U5IhO3T6bZeE8uhqaBAB1f1xD50FFBoJriNvVHGONXYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ0G3nhLz2Cd; Thu, 16 Oct 2025 16:58: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 59GGwMXc055806; Thu, 16 Oct 2025 16:58:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwMPh055803; Thu, 16 Oct 2025 16:58:22 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:22 GMT Message-Id: <202510161658.59GGwMPh055803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 34fc20503f04 - stable/15 - sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (1/2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 34fc20503f04e3c035844f4bfa8eb72964ccbf68 Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=34fc20503f04e3c035844f4bfa8eb72964ccbf68 commit 34fc20503f04e3c035844f4bfa8eb72964ccbf68 Author: Olivier Certner AuthorDate: 2025-10-07 08:46:56 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:45 +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 (cherry picked from commit b119ef0f6a81eb32b0e1cd0075cec499543e7ddd) --- 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 Thu Oct 16 16:58:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ0F6GwQz6CntC; Thu, 16 Oct 2025 16:58: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 4cnZ0F3L79z3k2K; Thu, 16 Oct 2025 16:58:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IBjD641ZAn7xKm/wHCVeCLmV5POqy/6L7IeMiPR//Rg=; b=wVLdKuB32QpdpJaNKWWDgo+lqac0oKzi5n3pAGun04/yFr0pfsShnz3JqeaEMCIg+V9VVU IXnrphUxF0IEhSmGCjQsYQ0CXTjh+HfdviS/+DjNx5oMOATGl6ICzZ6peZMa3ZkdA7ES7N LpACbDcWvtyYZBsBmKlr+GtNE8vCNjNdr2hmZKkiDEAL1phklu1OrQh1E6E7r+n5EgCD4M 0Epe6oZTHJ2l/PXmmCSNo6bnD8PpfJPJ5N99hGOde9FhDy2ER41MX+CCAs0A+bxikwevt+ Ki08i0Ygb41ECkTrLTzoKXTgOVcQM3z9TYr5wKA6+CgAjou+Ktx8fHiDiBH34Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IBjD641ZAn7xKm/wHCVeCLmV5POqy/6L7IeMiPR//Rg=; b=n7z0MsNhue2jV3ozUIEQXMKObu43hdxy1ko/WlsDK9JcmjGCPx4dJm0pJZTVTgqjmr9LqN g9KJobnBo1ctNMa2RMLLlo6mfKQSxP58qDxJZFBAfakWDyxRPcmw8Iq4Y5MKpd6BH2I9TL FQ8djsX1hzj5mztBLsDLyJCLQT4ogPwpJQGuBe2JKwD6s8YTRSXmvnKYraMBH18Xk0Qw1Q 6P2ySBh0LTP/HfoEf88wOGamtd5P1v73UDPCcDNX+3UgKdLocCDq/d0PxPFvmw4k5UwnaX sqtJoXYhdI1bWp5NbIkYzHY9bo46VIjWfwd6fvHemni9YErW5YPLWVAxbSdGdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633901; a=rsa-sha256; cv=none; b=CSJAxTz4gTflh/P4M1G3eRi+8vgJiRnP1e6m23BXPpZDaSAsXyGK11Wgp4DSuUi9L4tEEp qtceD2pSgqb0YtOxYPZUP3uSr1KFIGNIwQ8sHD+JUFg7csWYuxcgbaD0JjtPfS72gpCW+n 5Udrl5WHyGGDXMMOpsfX+DS4AEhB1/Cgra5o4me8bFryDIiGDq9tXB9++F+CL2HaWKrK7F YrwqHZWzm+9kBuGmGw8ElrXZlrGVANlDPnLxgwMnGoTH2vDfZJfOJxy8/MwDtZqh8DgXMk 3Tbw+0/0pDJBVXWT7XMTyBN1b6jPHvyV/YPA3q3oayMGHjZFNiEMvQ11H4j2QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ0F2pX4z2Rk; Thu, 16 Oct 2025 16:58: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 59GGwLtf055772; Thu, 16 Oct 2025 16:58:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwLXD055769; Thu, 16 Oct 2025 16:58:21 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:21 GMT Message-Id: <202510161658.59GGwLXD055769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 37aeac44647d - stable/15 - sys/rpc: Define AUTH_SYS_MAX_{GROUPS,HOSTNAME} List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 37aeac44647dbf2c194c70a56a3fd52aef365aba Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=37aeac44647dbf2c194c70a56a3fd52aef365aba commit 37aeac44647dbf2c194c70a56a3fd52aef365aba Author: Olivier Certner AuthorDate: 2025-10-07 07:51:23 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:45 +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 (cherry picked from commit f7c4f800cc0b4fac1c99cda8e22d46b67592f9fa) --- 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 Thu Oct 16 16:58:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ0M2zyyz6CnfZ; Thu, 16 Oct 2025 16: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 4cnZ0M0dL5z3jxZ; Thu, 16 Oct 2025 16:58:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rNxIfaOGBrLQV4+KUUKEhneLT98fl4D5stj0yvNSiqk=; b=Y0DTk0w9nWfyuXxuPKzDQjMNdd2ZqNTSC6Yv4PUoAtM42ld2xyJDhIdWBPZZ6o6ht99XZ5 X08QOMeoPGDKMq3qbvKB4YyrmY7WzIwT2vxfQSzMxe9T6dMVdmF/Wvcp4k4m0nAKfKnDeZ Mg0F1Si7jNgYA29jeJ4Ar7b+hOWnSK4c5E3QrM2lVO13Zyx9lrtN/kWNvwk9Zx0ilIeDTy PtgbruirlS5ujK/yrOXl3W3a+z5bnC5yOEvTVHgCcO4d3uFyOYdU3ytNU7bDYKRWnxfDP3 Z2mVKSZ9h5Rpec1ow8fh9f2dDKWQkJUdWbQF9TpKXbdcUvsDNgX0m+iN6w74jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rNxIfaOGBrLQV4+KUUKEhneLT98fl4D5stj0yvNSiqk=; b=i79nWqr98ds6ODdK/NOIFlb05vd2HmfeXeXqbc6hXu20QUiyGNmSfplHBMqbfqGlRqPHIc yOJn5RexAW91cfh7ZMnLZphCdAXzl9ktclikRbPzhOpmfIMEKocmVVMAmZoIiiiaLHoreX F31aO1GMNH0R4YXssrMarE8IUBuLjPegtjU8OXEdkemV8RdyCNvJPLRcLVjBBKfNESDlfW PTGxJBPZZVFaFrfLv3+zcbzICoAM17gRgDf8KITzO1bEXARxTIml8/n/L++Ia76yRAX9t6 pLXpFLBIA2orhaIW6kCzswzSL/S/Pbg0HxejH7ZkQMmbmOqzimzwT2IPVUxgKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633907; a=rsa-sha256; cv=none; b=wy4ZYxH6VL5KEQxY44CungUoTZ6fJL1OeGaR93VwWKJ93bMDU242oz8D7t3XqsVhMshxXv fP+FJBOwgZmw7vobtl7IivtVySHyuOAYCs8VQQPpvVqwwkRrLZGaAs/Y/HmbhUiUlo+9Q2 6WAqsCoz+nwss7gZt09e8ioxefhkAIwnZ44kCIBXCmJRVsiaekhIY4EiervLIFqZ5we6J8 L3z9tmUshlJWzHNKEBhsvNsmL3BreofPX5AbN7TJXwowmcjvMDrbQkchgzZvyYFr3AQjrA 4rItRxor7T8VyxlodM6TPfyVB2rVPjfuPtaQCDciJu6GMjngZ80z5R4PMOPgsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ0M0C0Jz25Q; Thu, 16 Oct 2025 16:58: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 59GGwQPV055948; Thu, 16 Oct 2025 16: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 59GGwQgQ055945; Thu, 16 Oct 2025 16:58:26 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:26 GMT Message-Id: <202510161658.59GGwQgQ055945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: d06658b8066d - stable/15 - sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d06658b8066d1c3af400db33896a493be2ebdfab Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d06658b8066d1c3af400db33896a493be2ebdfab commit d06658b8066d1c3af400db33896a493be2ebdfab Author: Olivier Certner AuthorDate: 2025-10-07 17:10:12 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:46 +0000 sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes MFC after: 2 days Sponsored by: The FreeBSD Foundation (cherry picked from commit a4105a5d4e179aa1ef661ee45d6008e83fefd2a7) --- 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 Thu Oct 16 16:58:24 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ0K3p3Tz6CnjB; Thu, 16 Oct 2025 16: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 4cnZ0J6DNcz3jtj; Thu, 16 Oct 2025 16:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Piog4mNq/r8CHwX9m3uywnIWfYAjGwUMXxk9dhcHZjM=; b=plfGmtUSq/bYPJmEUs8wO2JzZgKPK6r3L1Lj8+3Akgh57HMJR5bD6NSDUResa0D+zihsz1 H/qmwqt7PQ6KlgavCHrii0MqvvH+mQl5cHYoh3IPRxMX99ZExBF6mQP1g0vPUlzpT9AyEg 8c3w7aObqjEV10ojGA7fbiNZ31pxwiq93LV3bJkehidRB/Qp9LUamwdyW3CCYN1Iw2umXd RvxrfemujCPG337kIZEDaYJ+ixBrVmLprAy71aZc+uXoTkPkyxzfQNcBRO5L1EmEzGnbBf dZx1jpNQkWguoKtH4uWnaAKDns7LxGOksBB8crzuIlbsFruoFJeE6QEkMfbMYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Piog4mNq/r8CHwX9m3uywnIWfYAjGwUMXxk9dhcHZjM=; b=hUBA7t4OTDUF59tYXWeU0RGfsRbfN7WuWJBMxkbKp1xo3Xs3eTgQvgfCiZmAo8yvzTvGPv Y5sXlhpxKfqDw74CovEYLONbU2sUTL+efwZpHPLhV9Bc2pZx2BXbYY/61aYlJMRVj+YEqV LGXjg9fS6RQHROfrr/FQRqs2WjaJJHZxpNnXmWNFfoQdX3J0idsI3LkiPtJQ8QmPWZkZMY qcu7gTPWZ2+ZbcCaVgz3C4JIopkAKfghw0nVHsK9ySwWT1rK4pT76EQuWVb1TcV3O34I0y k1XEkfbSYEjabHGn400rJAiGDVwmQClest3x6DM+aFrur1nvETmR2wHZlGdw2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633904; a=rsa-sha256; cv=none; b=dwzPRzUlkGgWQMYDAOYo7bDfvWk4zFj9nseEGbnZR5ykS1vX/a8lk1D3lYH0FfHyPaSzjA uU0uyrm4TnApq/d0Nqt2ua7FbHfCS6cNXH/NvyrFMqyHRGHCgbyjiI447iUHVQCCfZ0cNR iTDmOG7/y4x6byy1kK9x7TNpJHm/ugV4RIyoK0Yo5xkJK6L8rm1rrQIHF3Q5mf+YgbnPDq fVJF5pKSecdcWSIVMoufZbacOBrgaplDgidqThpTjnlzSQ3Imc6LsMz4vv32IRHKOWcBK0 DpzjRPYvEAe50GG5LnuaPUbJN7JAUuTGhfgwyLxSfbh+UmouIwvB9/nqAUk3lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ0J5n39z2V5; Thu, 16 Oct 2025 16:58: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 59GGwOHN055877; Thu, 16 Oct 2025 16:58:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwOLH055874; Thu, 16 Oct 2025 16:58:24 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:24 GMT Message-Id: <202510161658.59GGwOLH055874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 45e671c9cd3b - stable/15 - sys/rpc: UNIX auth: Fix OOB reads on too short message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 45e671c9cd3b92ad20addf340f96399d0055df7a Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=45e671c9cd3b92ad20addf340f96399d0055df7a commit 45e671c9cd3b92ad20addf340f96399d0055df7a Author: Olivier Certner AuthorDate: 2025-10-07 15:51:16 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:46 +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 (cherry picked from commit d4cc791f3b2e1b6926420649a481eacaf3bf268e) --- 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 Thu Oct 16 16:58:25 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ0L23kkz6CntG; Thu, 16 Oct 2025 16:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnZ0L0Nm5z3k8R; Thu, 16 Oct 2025 16: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=1760633906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vkqZlNVVJ7UGw3eGK0d5x/yPe3/JmN9NSwhJ70cll1A=; b=vKBLOCSE4SlE5IEot3yfJKed11L+Ur7/QfGL2mSLWwCUvCUPv+qmxWsrnIc307ybQSHfYX 05zGdA5BoeELvP3MaqPIEO0cukbG8p1aJLMpe9EiL6a+p9It6xEUZAhBjHruMG+tT8MTGv n68zKhJ4HL1M0MBqmvk/7tkarmwUSg21CIX5xCwHWy+9SX8FZTQHjIRsfui07X9zXM+xPn ZmeNYf4ws0oaQGa8Y8EKM+BNjNkcVmEkRpyTQjFdFtYag23TzpOGEEmR7aDcOc/riGy1yq /liMSYDPETbvkYzmXzmJz2/bduig3gh7tecdVGv1sc3ZkU0k+lgBduO4zd2JiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vkqZlNVVJ7UGw3eGK0d5x/yPe3/JmN9NSwhJ70cll1A=; b=f2Js+9Af/ZSMbX2RBOTZyD2YuOx1xsFVBnNRwwDiuQ0RiflfUNVzlE1QNd42zR5XKXEPRL INWOSZ8ERNf+oCUTIwkRho/Up7MBJnlzNyaH3vhi8yMA+BVkCebe5FjasGJZ66b1R5DbHv 67eATR1HXRiwbNbnIUTOgSpkrOmF3CA+kHCu96Ca6DBuUj3JqcFEMoAtDt2wvVJfFRCs9K oxsbnV8+hivT1egbCdnRVFkS92v8IaTaQKxlJ+4g3CAYtMGYsa319PkbPIlhjZir8vzh/Y Sha1OYJP6JAQmSiF5WSa/R1LRn3AnuWE15A7i5gTs+urxi84AaWPYPmW1vfzSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633906; a=rsa-sha256; cv=none; b=b82PeS5LGEgA6ctHoBteEV+vSVy4ncMgrJcuEQHJksBDzFIRE5hqfs/XLFYAE7Eb9mGVi5 XsNnEVkoJgQ8+STQYeOW2P2vbA2QX3gIPPDYQ4a22ZYe3BNFHzHsAg0jQBWhO5ubUvHSBG D4Wy6dTeKUESe8umhIEpWlK5NBwQZumwWNovaBQ80yddpSuYOLCLAwB7SpUSDFg/OIYUep 2TlzranLExL5BBBBqphXSbdSoUEzfS/9L8JYvxLuKThN3qBfs7YBlewVyxdS9jBKYP3R+U jppGhD4xrMBJfMJV+pK95h1Ui6VeEDICNq1Q8LOoA5sSe532AeimeTg1AZODIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ0K6NpNz2Gd; Thu, 16 Oct 2025 16: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 59GGwPcr055914; Thu, 16 Oct 2025 16: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 59GGwPB6055911; Thu, 16 Oct 2025 16:58:25 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:25 GMT Message-Id: <202510161658.59GGwPB6055911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: b27688a8b5dc - stable/15 - sys/rpc: UNIX auth: Support XDR_FREE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b27688a8b5dc92c87e74c40f3702484f5e2e329c Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b27688a8b5dc92c87e74c40f3702484f5e2e329c commit b27688a8b5dc92c87e74c40f3702484f5e2e329c Author: Olivier Certner AuthorDate: 2025-10-13 15:13:09 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:46 +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 (cherry picked from commit 4ae70c3ea498e06676040ee99254d261e29ae82e) --- 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 Thu Oct 16 16:58:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ0K1J7Tz6Cnm4; Thu, 16 Oct 2025 16: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 4cnZ0J06lyz3k7r; Thu, 16 Oct 2025 16:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AxwCYJbEllXuDGZKmQ9FrEvVj3omrW4zKIRREYOQ+/s=; b=PKuJZH1rKOffWdBOVkjjdL6UatVa94rifs8vrv0ckREGC5BTXyulz+3L9DRWEEBIOYw6RF Z8SEoLEt2MaWSekxm6BOghPU6WUd9kB/zv2/E2ffUkXcW9nHi51Vrgg9G/cyWCHmbsHIZb rRdvbuzHk5UDU3E4SKFe04oNX5mSREVPOeKDjq1fH7L3QDjdcdN55IhpBkENKmnw46oJDB H2vu8m7rdmkLiBZh3ZTzAtSp0/t2MRf8j/4zrs5IxAtHx2JVPC7PycIiFiAIn5sRpmjSkh QFX5SUfwB+3f5GpLbOiyGoJYRteX3ddNu+gVvU5abnDsolasL8Gc/OWkNAmbeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AxwCYJbEllXuDGZKmQ9FrEvVj3omrW4zKIRREYOQ+/s=; b=TxSku8tcwl6XmQm38fR8CSd5J1MrPxSxqcIFBXgRWScElwb0Sa8hZvLrcU6ZphI3nxJp8A zNIKa5khnu2lq5HMEJjFaj1uKU/MFxjDvFwvDWxsDklHZABDGkMwiSzCrtu5new0tF/yxf kMcPov3pLWtEEzhAUzuzYwXTJn6FTbkfccoLPIi9VirAYM8pFusmWwTs/pB0pp+kuZtNx9 zae0Pynt0/84Pgbkv4oiTONpYT6Mu00/6vHdthZ/MqQjYV49X1ASd+Sd9D025um7kBOMme CtrrZlyGdjaQPy8v/wKCPQEJycWDN+lblSmLIAW1cWRpdSSARJSoAjjq5J4NAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633904; a=rsa-sha256; cv=none; b=S8gYz3JmmDuJpLfmUL9/WCYpqrjDGXn0frAFWbgTWpAFA66W6oyX0dkcJ7AqWdG2doGf5s DJ+gWH2wbkaWNLNOENcEJ3Zuh6vomD/3+S9RFTv+InGUKBokceQRec/vlbc8ockEgw0nca 7ty5pJcj6X+Hvfeluqevek+LPqDTr/CDAl43SNvKGcVUawoOcq6WF5fS6TDpjjHONvnfeN VQhMnDl7GjclUq6iUriPWFzClF62r0GecfmvEYlCI9aMUhezcnrRSpoN+2YVVHkb0TEDAS Ke1nH7vs5PkH2xE0h1ORQKnpEkL16PLxhxs+GOSrpIZ0bYfz9QBJMfV7fVoMQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ0H59gyz2Rl; Thu, 16 Oct 2025 16:58: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 59GGwNSK055840; Thu, 16 Oct 2025 16:58:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwNLB055837; Thu, 16 Oct 2025 16:58:23 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:23 GMT Message-Id: <202510161658.59GGwNLB055837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 9763e76cccf0 - stable/15 - sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (2/2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9763e76cccf05d405e0fd9c9c351808993e93b14 Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9763e76cccf05d405e0fd9c9c351808993e93b14 commit 9763e76cccf05d405e0fd9c9c351808993e93b14 Author: Olivier Certner AuthorDate: 2025-10-07 13:33:53 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:45 +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 (cherry picked from commit e665c0f6f7a611d25d9d7e7f64d98c84b3a92820) --- 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 Thu Oct 16 16:58:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ0P256dz6CntM; Thu, 16 Oct 2025 16:58: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 4cnZ0N2FKWz3k12; Thu, 16 Oct 2025 16:58:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zGneb186piDI1FwN1XS7rHh2KHppfg+SoHrlU7ya7Kk=; b=DJ1G17Zsp+81jQ0b5sT4Ft3SqYpegxQegYqjhTvj19fHpCAGZ1RVqVQm6t+zOxiG5FeHgk R4DmhXJWqtNjRToj02GXWyuKH9wKqnxLwsxhWPmth9lXJw0zr6mp0USAtr1+1aAdCwCn3y IKdZ3uH21ofy1TgW9ND52tq2nBbDBCtkRkv3rGp5skQydqX65ZjTuSvwLzppoo7m7klRPB G94gmZn4WgP0CDZ8+ISem73GkTIDkV6RpsOzSm2LlhXKDb8KF47sjsRrNH158FRCgjcmhb jYRorZlCY4AqHF9wpqE7n8mA92pk/cqeifvjTIHrKNSWz/xDKWACwj0mu7hndQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zGneb186piDI1FwN1XS7rHh2KHppfg+SoHrlU7ya7Kk=; b=VeCpKk9mhwbeGP3XN9K6Fx4SO2Wk4FNiu22862XXRJLd63PlxqxiA0fZe3haoGUtJHsRFH qU6zcOovsdn6FepJDUOfkQDTKhxNvZpgbj2/T71BGeZP4F32f8b++7OERtUTXjq1OY2eEv OeORLsrLEolyiMTpj4TOnSWbvFZAKPfGXUSKS8L1qc9RTJYqP2J7tU9Gu/TKON/lemR/iW GkvgYyCjQmadcx493ylCbaX6aqda1dML+URZBgcBNOBx0DjfZOkVDNDg53Qlz4WSDKRRyK OXuzAbjKHt//hI1Z2JCc290Sjnb1JUWXXIropZ0NdZOMALq2Iz0slonXqCYTFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633908; a=rsa-sha256; cv=none; b=w7fk/QmSWWqL5oGkkt8jJ216opCz+RNmoHIlxaiqb6FNZYymHLLefEwGGabJe/XfVPlcwY PiqYLANFuPFZxzicHpEd0YnKxwVYDkOnS0IW/ZnmuEZuz2PCuyQafM2OvpXIIghIuAD4ZQ pcN+PqIpDiE38PIpqonKl4e0J/GQLOxSmmvY4WLnAaBalgr3THWBHJSz3jbFYHYFCtbtoo FpcYRS80ABC3j2oeASW5k4rEelJYg/jXu27QlaSwJS/KhawYpZ9aowpRl8gtUe78OrTcIl qJjDLn3fhYx0VhOEZ/HSVK+lBW0TydhxdASa/LKBis3L8Am/6Ppnbf6ZnW56OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ0N1FKvz2Cf; Thu, 16 Oct 2025 16:58: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 59GGwS85055981; Thu, 16 Oct 2025 16:58:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwSwr055978; Thu, 16 Oct 2025 16:58:28 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:28 GMT Message-Id: <202510161658.59GGwSwr055978@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: fb8a978ebfeb - stable/15 - sys/rpc: UNIX auth: Do not log on bogus AUTH_SYS messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fb8a978ebfeb5522123e3afcbcd5dc36591dce31 Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=fb8a978ebfeb5522123e3afcbcd5dc36591dce31 commit fb8a978ebfeb5522123e3afcbcd5dc36591dce31 Author: Olivier Certner AuthorDate: 2025-10-14 12:54:55 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:46 +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 (cherry picked from commit 2110ae0ef9d6ca8cf52b29fcaf926c4343f56826) --- 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 Thu Oct 16 16:59:43 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZ1q750zz6Cngk; Thu, 16 Oct 2025 16:59: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 4cnZ1q6LtQz3n2G; Thu, 16 Oct 2025 16:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXE3FcAVmGAAG95/8upPL1gg3+zsFDw3MVtQ2AWHaHo=; b=V88qs8ForuCTminfKFtMgmaWaK0hI9REn0R08d0BB+JJFFoTnQSLwVufE0oHwYSHCgbg+B LxwAxUxmDQ+WkATz+jpzzNsikX4hoqp4O+WvcWI4P8Jy3FutfcqrtwsvexiTrdZJaTCXJI xgKq0lJSQAyiVoQai22jbRL/B51yjdPqqgblhQfE6O6VV1mn4ewcyooQU4E2vLBzxq0qrR qCSB02YvpoY2+H5i7hzK3qXC4wJseek+ymadAM1uAfKpDR0HWt98ucxtZOu8bLhgIAGlj2 rJAH7icZp4Hq08VYkboI9x2GrF/jCy1/fM7dbzw67rkPNZA0xbX7oZrlCPUz7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXE3FcAVmGAAG95/8upPL1gg3+zsFDw3MVtQ2AWHaHo=; b=HfoFC7sm2a2JCoWpRA42f0gZS26lwuOZSuks0PcSr4I6xxAokHRINyJdQzFXPaMNmUD21D B+dju1IjhmFzQwnmBmx7P8h04hru5Dm8Zus4Uh88lgDvzzlYYqGiSOT3xddpSEOX6YPhSB eqMo6cgBEgU9odNb4z++6+TbG3AuexHO6u5HY70BoMm5myaBlyx+LNAYNnjtfjoMfdwiIT SDBEt0bvj/2woSTxfRa9g8bekW9MMJ2+NQvz8jglyDLoMCZ9frkYrd9xD/zJRq3usTz/VM D6i61rdcfz5hn0N9CANE+qJKsfO/xaMN/ZKjUGulHOWJYY+a0swL1CJ2htGGfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633983; a=rsa-sha256; cv=none; b=IAORO1QHPA4E0Pq3A+q/gxIVxB3aGE3rg2ZKMZ9j/ckm9oQSm/7FBuI5GuDiB3Bm1PQqeJ bmcFIWoCephv3gQD0KR71mZDClhmfXV0ILt8i9dBE3wxQygKKUXa5IRmkGQP6D0XLuxV0X XgZLygb3vMrmAh4zt1dUHnGqAQnTJuJaYAYyDIGBQHdL0dxvXzQjgJam4j+I2fwcS075N9 o/AEuSau19+HF4r9alPJzd2weJcPl8ABdGp1zdT1JzFh0MoaolXG67292nLq0vlBTmjcbi tEDPqfnlEyczjpp8Kttu8TmIU5bxooiUYi8OZ/k9JJBZGhoIYGWdkRFqWSC9og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZ1q5xx1z2Rm; Thu, 16 Oct 2025 16:59: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 59GGxhS8056516; Thu, 16 Oct 2025 16:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGxhUH056513; Thu, 16 Oct 2025 16:59:43 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:59:43 GMT Message-Id: <202510161659.59GGxhUH056513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f0033878b92e - stable/15 - zfs: Emit warning upon use of legacy sysctls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f0033878b92e1a00120fec4edf590715f7c4ecbc Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f0033878b92e1a00120fec4edf590715f7c4ecbc commit f0033878b92e1a00120fec4edf590715f7c4ecbc Author: Ed Maste AuthorDate: 2025-10-09 15:57:14 +0000 Commit: Ed Maste CommitDate: 2025-10-16 16:59:33 +0000 zfs: Emit warning upon use of legacy sysctls The introduction of OpenZFS moved some sysctls, and legacy compat shims were added. For example: Old (legacy) name: vfs.zfs.min_auto_ashift New name: vfs.zfs.vdev.min_auto_ashift Upstream OpenZFS removed these, but we've temporarily restored them in FreeBSD. Note that l2arc sysctls use generic sysctl functions (e.g. SYSCTL_UQUAD) and thus cannot trivially have warnings added, so they are not handled. PR: 266374 Reviewed by: jlduran Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53033 (cherry picked from commit 654a3aa9a1de176648eec00b3c201c33b10bd325) --- .../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 17:18:03 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 17:38:42 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnZtq1m8Kz6CrRS; Thu, 16 Oct 2025 17:38: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 4cnZtq18Gdz3whC; Thu, 16 Oct 2025 17:38:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760636323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wFUkpa6APG8xD7yohulAUEdJD9SY4YPgvr0l6OIkY6w=; b=jqChZunktPVWK2oMxWE7IeqXU2ALUa2CZ2WPKvO20xfGYy70xevC2NCBSVjlgJrgur3PWg YNH7Cge5UMBMgmZGd0muERokA21budyMP8IKOo2/kxemO0TuWlZ3b8yKwnWvIuR4Ad86nv vnPo4eVSe3xzsgnYpXOlsQFXB+Pp2pESb6lRJ6701YqKD1v8C9ofKsE8+0EEwPshmXQjfP kg69MchkaRu7U3p/pITQf5QHRFwSBeaTBOwzoiXj3bi3mkLNpGHs8V8wSDgN0MfMJEinUo Jz38DSFMRFIFQLuCWh3O2ZejI7WFnSZlKYkMsCwMVvjNvusDrgb/uP8UOw1xSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760636323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wFUkpa6APG8xD7yohulAUEdJD9SY4YPgvr0l6OIkY6w=; b=DNbNldljUBKy7aLJoWbLU0WI0UFNdHXVOH2qxgFTYslUCTLrNOGvPc11G/eKH9YkkrxtLo eEngaVvxKaIFw0m4jtYSsQp2+hzojGwUCWlgoz9xsXgFat3UdvADVu5bsfVpBIWN1812B8 zTk4s+cq7TNOHNTsFZKOiHV6xh++xr8H143kdg9Wuu7NvB6OLzUKSteFFiSQqiL14rYLQD ftkd7gNU0JvB1A4yl+m79C/+O5NhG/K7UoXj34sp7JiT1d2iWzfyGaUBdNrWPUrtN+bWG7 Omtlbx2aVtqDR9FVPQjvVf5+5pPDQifTLGGxl4IhuTpPq7CjEy6hzEMW9hKo0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760636323; a=rsa-sha256; cv=none; b=N7KpTdpu9+TbmyOwerCBo4SpsPRooWNcNQjRPB0xeD2bU/Spxh1fCjQf/+baIvF85391PV GUZB3352Jlvyt1d39LoLVk+VOsCKvtQeU2nX4itFwPMgsQYPb1bXp4Po5RokGsLY9Cju52 MSag6zjGlzTyrVBbDoAkB+SobaXo4BuzKzi0zuNF7qNK7VIQlJEpyZX+1+ThXihsBQFIOp rGw1/WvpFDyg5aBtXTJiuPVMt44lZ7gsydA+5/MqI12BFBb6DFWC+A/OXPo9DvjWtOspNm AnPMgKRMMHySZ8GNZNw2tlim61uQR7M+GemSUIVGxQjBI5DnnqBMVeyZNs3RDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnZtq0bcfz2ys; Thu, 16 Oct 2025 17:38: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 59GHcgeE032328; Thu, 16 Oct 2025 17:38:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GHcgUC032325; Thu, 16 Oct 2025 17:38:42 GMT (envelope-from git) Date: Thu, 16 Oct 2025 17:38:42 GMT Message-Id: <202510161738.59GHcgUC032325@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 4c87cff1c8c5 - releng/15.0 - libm: remainder: make sure x is zero List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 4c87cff1c8c53f06d8d25813fa32f1cc35657897 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=4c87cff1c8c53f06d8d25813fa32f1cc35657897 commit 4c87cff1c8c53f06d8d25813fa32f1cc35657897 Author: Ahmad Khalifa AuthorDate: 2025-10-10 09:30:52 +0000 Commit: Colin Percival CommitDate: 2025-10-16 17:37:22 +0000 libm: remainder: make sure x is zero Make sure the entirety of x is zero before flipping the sign bit. Otherwise the sign would be wrong for small values of x when x is negative and |n*y| > |x| Approved by: re (cperciva) Reported by: alfredo PR: 251091 Reviewed by: kargl MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53023 (cherry picked from commit 25cca51ed294890d20a3c0290814cd26875db686) (cherry picked from commit 583e976d6d09770a6299a19603d4f0dbaa562cac) --- lib/msun/src/e_remainder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msun/src/e_remainder.c b/lib/msun/src/e_remainder.c index a5fb7141d01a..cc6cd320073e 100644 --- a/lib/msun/src/e_remainder.c +++ b/lib/msun/src/e_remainder.c @@ -64,8 +64,8 @@ remainder(double x, double p) if(x>=p_half) x -= p; } } - GET_HIGH_WORD(hx,x); - if ((hx&0x7fffffff)==0) hx = 0; + EXTRACT_WORDS(hx, lx, x); + if (((hx&0x7fffffff)|lx) == 0) hx = 0; SET_HIGH_WORD(x,hx^sx); return x; } From nobody Thu Oct 16 17:43:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnb0W1C4qz6CryB for ; Thu, 16 Oct 2025 17:43: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 4cnb0W0CmRz3xJn; Thu, 16 Oct 2025 17:43:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760636619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ZtXtvws9IBaHpos4V8isrZJuR+nP5F7fL0SMtikjjU=; b=ILUIgYkyCykZcdoVsr95bc+rSFN6DlUZr9o+bVZ1aYxnaLo4LRHW40JN82c4cEe5s5urYj 6OJSTIvDzO3yIddXMfXRs0h+SlOQSjfpcuONQnGWyK4wogo7cGp8qoObwu+HLuGlxjlyhR BPhBt16fiaIZPI0XJfvQlO0rro72SdPmEGDDByAcHt2L3hLvMS8FF59NiEVp4CJfbPb5qN 2sj8UhxyqJGUBTRzJWxOILM+B404RoC0uUi6i/gAOq+QyDduCnIFRJgjRERjOqKNdhL6wR DURUPtQn4ebJvQoL4Gq5MyG/DxHU0vbqEYlpMD1Dp015DEU/7nOvXzoR7Uegpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760636619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ZtXtvws9IBaHpos4V8isrZJuR+nP5F7fL0SMtikjjU=; b=FZh9KGTGUu71Dvj3uPBICXI4iu2ucELrhmLTzPzCA72vjg0G4Baw0ykNHwRvLXjzIqZIvh VNOtQkTnD5SeIdihsofln2tcWMoH249jy8qnquZY6hxDNaS9GmgDzoD1/NNsPcC3qj1g12 f6NyW4wLCqKEa3IgbFhzNG24caJkq8IzTMRDvkF4tzaROojEmnBzvpVT50lwzmci/oPvBR rSFwAoWN/a3+GJ7HPK+gtWW5wHeRISe2W7X+z/k1+m6cRuiRWT/j1+43Fwiw1sMyMzv0FK tc+Tr1fcmK5MeBWS6wtVTAhPIknr3+4q1ygtGw6oubkEZVuBLllJ3oUX5AIm+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760636619; a=rsa-sha256; cv=none; b=akE2rBIZMNdAw59vu3WXdMTNwCXUb7757eutEotov9I5dMcGXHxgykHORTOFgVma4splyc YDEpSUbjHMIza2LxlxaLpxAwdhEOO+N5llzE0UI6FD+42yxA5df+BI252yXXNJ8OZhDv3H 8VhUPAIEK2grXboYhkSRC66nnORk1hl+Xa5wPbGAz39yHiy90t7bS0k+LNSi9PuscEU4kX O0O/bmTuJtIa1NAp7PJIpaxaaGrcV4bJlwczTSl2Pk7cx4lB7ElapeIU4+9NqOMe0M9RVM kaNRVX35PWhhztDlphL/oQTlanv6ST496iNhUn+t3FAZVXAkaLbAYygLuXwxIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnb0V6VFnz3Xg; Thu, 16 Oct 2025 17:43: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 59GHhcNb050301; Thu, 16 Oct 2025 17:43:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GHhcNr050300; Thu, 16 Oct 2025 17:43:38 GMT (envelope-from git) Date: Thu, 16 Oct 2025 17:43:38 GMT Message-Id: <202510161743.59GHhcNr050300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 76141d3306de..8f38cbcd9c4a - vendor/libarchive - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/libarchive X-Git-Reftype: branch X-Git-Commit: 8f38cbcd9c4a4f27bdccf2e75a7e20026cff5181 X-Git-Oldrev: 76141d3306dea42228646b9a4a5e97ccba59fe2a X-Git-Newrev: 8f38cbcd9c4a4f27bdccf2e75a7e20026cff5181 Auto-Submitted: auto-generated The branch vendor/libarchive has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=76141d3306de..8f38cbcd9c4a 8f38cbcd9c4a Update vendor/libarchive to 3.8.2 From nobody Thu Oct 16 18:04:11 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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:18:33 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnbmn2xXSz6CvZx; Thu, 16 Oct 2025 18:18: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 4cnbmn2CfMz45xt; Thu, 16 Oct 2025 18:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760638713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ysST6FkaPWLCA2xWiKSnrghU+SC5iY6w34xePZQ878U=; b=vRLi0j3kLGmf55BiB4vGZZBcPYm3/WUJWTOqCs4Ejwc6yKfT9/vQxsdgDNHznyGDJ4dOtp uhb/I3BIVtmAmFlBMIHuEBXgZkQ8Z+kVFOdFZBsfd5kxJ0AYnlKlNObmMMIcKhE6jq4ti6 2DmPLY93VBYfsbes0NxV4ocgxSbDuy8wp0nzYpKjxrwsUd7FDgdf24uXTK6qNMHSGPjpKk Txk4JyhpGm57m2byW/Nkxidnp/w+7GCS4l4lgxY5t2Xh6M2hQs9wp9dwP3cifBHe2CM2h4 ajGKYd66Xzgzfnm0CTfHS9haSUBeKMgDdTpqhcbo0B9acyGmpytwS4fjESBb8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760638713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ysST6FkaPWLCA2xWiKSnrghU+SC5iY6w34xePZQ878U=; b=dXac842f1xn4+8TFaGAPaRVMUawZVrnhnGz1OR4+RmjyvvPL2hBihYKAoiJgtngnB5YKZI /a3esBgOOGKFRszolD6jAIz853kXK716cxoYaivVaQFFUS4Q2V7DF5OCC2PH8xHm+88OKv xLTREt6UHeI2CzDFwD7HrENyTPWSNJdPUKbJBhQVE7XjVfICwCEGoQBSJas0yFkHxfc6e7 lCbsA0bFPkXBKegJomrY5+U78fpsmaqHpiqQzJIV1+NfckMIIXNg9MkKy0IPS39ctVosA4 cUEEHELVT825/aq0Aezvm+YI8pS977wPvRGiSgYHYVq/JfzJLc+VVJH+6Q1JPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760638713; a=rsa-sha256; cv=none; b=KyJ8cejOHbLvQWqsY7DZcyMda5h4fnUfQUDgOs0N60PmJ8/MV/roDaJChfOkMCxWnGFx+O aTlQWUeb3H+M3BRTAwhbKGAVYSQc2/onqwVy3UA2l3wK4oDtkfZZMRC+Li5NloyK/I34+i 0Lhw0x8rgRnEXVCm0QVmLE/Bi8sB7ECqwrQfhn1kk/MXmHCHSEA4dv32/QH5HtwNWhLEDi bIib4LWoevqAuWFDE0FQXUfcLqwzzUOGUo5D3xaCQZ97HqxY+CUN0UCsUCm7cJPHCZ8jP6 mRZWKasKFiMQWq31YRLfGmAH1qwXCTLSfY2VuIu60VHcg69cxOBmb75Eq3WIRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnbmn1MjRz4Qv; Thu, 16 Oct 2025 18:18: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 59GIIXXh008407; Thu, 16 Oct 2025 18:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIIXtT008404; Thu, 16 Oct 2025 18:18:33 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:18:33 GMT Message-Id: <202510161818.59GIIXtT008404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 53eda63d6de6 - releng/15.0 - zfs: Emit warning upon use of legacy sysctls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 53eda63d6de675b8a89bc036bc4a0a64b3c5e0c5 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=53eda63d6de675b8a89bc036bc4a0a64b3c5e0c5 commit 53eda63d6de675b8a89bc036bc4a0a64b3c5e0c5 Author: Ed Maste AuthorDate: 2025-10-09 15:57:14 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:15:49 +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. Approved by: re (cperciva) PR: 266374 Reviewed by: jlduran Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53033 (cherry picked from commit 654a3aa9a1de176648eec00b3c201c33b10bd325) (cherry picked from commit f0033878b92e1a00120fec4edf590715f7c4ecbc) --- .../openzfs/module/os/freebsd/zfs/sysctl_os.c | 41 +++++++++++++++++----- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c index 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 18:43:24 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 18:46:01 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncNV2zM0z6CxmF; Thu, 16 Oct 2025 18:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cncNV1BCRz3DN0; Thu, 16 Oct 2025 18:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hc2FfqcLmd3UYyRqR0kWThhMvO0kj0uF2u+CiGgK8zY=; b=RQWlqF1lpV1iztx+A1TGhieiV1CXNeMhVi1RDOi+J8w6rOGHOBGG8caeUIyWkB6aMMWCKg 7FpJIM9BUQpP8CoZyON+XTDzxsy3T7LMPh7gQhvSvUuJJWxSdJu76VGItN6oodpu02z2vB Y9icK4gPY63Aq+TgsMxD4FY28Sy36M2hZwqO7G2HAnpk/9zFtDBjIRiBEsLYsgHC0QYZbj xbvw0yTzSr6sTcPhd6+qItBcLi+s57UmPxatlU76u0JsW7WEg/kA66FIRrtP0ebijEDKiY Sh7UKRbL+bDfe3610gIJN9L5x/DgX6C8SJceT1QvvMbLrwMmkCyUzqrDFLfs1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hc2FfqcLmd3UYyRqR0kWThhMvO0kj0uF2u+CiGgK8zY=; b=k2UcjoCwAWihejRNS06Xj6Bhyc1CYEr4WswIMx8TJpJd3H9jHnNx7EnVp2q3Gm1nT9NSbt uKLYO/EHgmC1nNWt04O8E+mYVZ1Z7yuLZhp/8PlUmJndhXA7E5QD2u/p/V/zYrj9wS4NZK HRngHbUk81oQ42WDCssCQ3NvSHYphEZG4v3j9jYwu6cy+56TAzEG5Ya+yRvHMrDA6XIshj HalX8tL6OokfGKGSQwNtSvEnGFzX9sfR3d9DgMXN8HbQCeBp5sL7f8nmXsMmeTyaIEOu+L DaFys5K30okcLBFrvU4LXkkClmsGAFduGrdQ3rJhVIqdOqQeddC7NUWfQFjJyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640362; a=rsa-sha256; cv=none; b=SmvOTdsZfrhqZUWm/UP4uTieB2g94MLUVXYMxjz25NAGEIjWUpCQWQODc37KjDrXcV7zNt mBDCd77zeJV1sP3z157Rpd8+w6pqtPD9qVhSEJ37XUDNUbbMgqK175LTEFE7LaWcnqTmHO wOl1Kpz+QWmzUwUV3baALfkbq5uLZWLnXfL+QiuqUGvKwn5tiL0ihemUoizVH0D/j/IcqJ 7zgIyRrHn2BUBs+WlE04wdVW97xz3LyPe87kKW37z+dvkPWPblRJIWXRDgX+GrR8OdlkXs Qw5iBLGtZ4sy+rRiKHyLgleCtlZn5ZSo4JrJMM4DE6NLmWWYBnahI+5dzotT5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncNV0TgRz5Rd; Thu, 16 Oct 2025 18:46: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 59GIk1QG064623; Thu, 16 Oct 2025 18:46:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIk1un064620; Thu, 16 Oct 2025 18:46:01 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:46:01 GMT Message-Id: <202510161846.59GIk1un064620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: dd9f56faa9a6 - stable/15 - nanobsd: rescue: Update legacy sysctls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: dd9f56faa9a6f9eb2b77d069453ef65d1e6af948 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=dd9f56faa9a6f9eb2b77d069453ef65d1e6af948 commit dd9f56faa9a6f9eb2b77d069453ef65d1e6af948 Author: Jose Luis Duran AuthorDate: 2025-10-16 17:13:49 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-16 18:43:36 +0000 nanobsd: rescue: Update legacy sysctls Reviewed by: emaste MFC after: 1 hour Differential Revision: https://reviews.freebsd.org/D34598 (cherry picked from commit 93ee9bb424619f0189b3454380588c955222b89b) --- 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 18:46:03 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncNW2HrGz6CxgT; Thu, 16 Oct 2025 18:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cncNW1bhqz3DH3; Thu, 16 Oct 2025 18:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YW08mhtr9lC2YUMfUv+U4R+7dohp8f7jhwI2LcWbmiw=; b=s7SKzY6yIH+WFye2oqK+7x3ODLGO2+XeqEZ6gNshZv31XXJMLzH9ar1yZjGh6EfPojZn2V HTetv59LFtIKTx5NFeNBi8zzsvsMhH6Ms5D58YZffxecdj7HEoPcf0PXjurRgRWRzzBWM2 3j6UxMUN5jfvMAlhRxUiDHM8zjsF8hBxyc2LT3+jQneli6WgMAYeqoSm1IjSLVJlgjit54 J264pLlGJCv6LwFX7o4vazsFHj0czGr9HTauAhPmXbXd6TQMjDwxse5uTrKdMCnIFDmcPP S7uf+y2jJiWu4mn0F1XLkV+uTVFhC+k8o6IhOKJZY3xjQM6noPMlUfc3wjhN6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YW08mhtr9lC2YUMfUv+U4R+7dohp8f7jhwI2LcWbmiw=; b=AHvQbVRZnfTR61nS/M4cjaC29l3rVX49JMHzsXAyUsQXlpIJPCb6zvjqBNFr8gBXWSFI2t zf65iYz30gOeZy13wpINcqtd1okxarGJgCCd1Zs2TqDgbwMF8/b8vnSPqxf6n1Wqztu4ox vJbsjcXO6EwIupKrAkfBtGk+ccbksmL6tLrGA7DEUX09C7hNtDvAS06k+cWyASJ9gdYhfN Vsh/z+0rmHyT97xg9FEKP1evOu8tlUe9a73rYH1G4aC3tVNV+BI9PbaRXPv+T39des5YGD Zqbwu8Q6KvX+5lbLtEradceQjA/jLuF2HDk9lETPfpc6qhIrj1qcTB27C0UifA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640363; a=rsa-sha256; cv=none; b=P72pgCKn2SlFrOgVbu/jYgc1gW++YXKCV3weO+G5ILO/Y3j6JYxC/49jdvPOJYg2DX7YEm 7Ekdtl1wzdjQtFJgAltNxAY5O6Xd/0xwcq06yEbLLDjofLaDZn34jZml4vxOJb7Oc74krd vf/wra7EFFZFy8Q2MqNudqIWKuxnEmrco46u7ENrqdguc9G4+mXgeyU3qsZ+y+wDLoELDX BX0nGhtssPt+u3rTWKkyunMW5XM6jTv9kjpFu0+949RFGUcRaMs/EbrP2rAtP3JtNcE6o9 ssu7Pg/A5U8kN6hObgso///Qk/gbvQ+B8s4iXkKt0X3AI1OC9ZYWPzFVg5ZY0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncNW0x5cz5N1; Thu, 16 Oct 2025 18:46: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 59GIk3b6064664; Thu, 16 Oct 2025 18:46:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIk35F064660; Thu, 16 Oct 2025 18:46:03 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:46:03 GMT Message-Id: <202510161846.59GIk35F064660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 68e136b5d684 - stable/15 - tools: Update sysctl to its new name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 68e136b5d684f9aa8cf6a39c09c1a2fd6e2ac780 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=68e136b5d684f9aa8cf6a39c09c1a2fd6e2ac780 commit 68e136b5d684f9aa8cf6a39c09c1a2fd6e2ac780 Author: Jose Luis Duran AuthorDate: 2025-10-16 17:18:51 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-16 18:43:58 +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 (cherry picked from commit 84333aada464296c1e28126b5c91ae2fb3f79eef) --- 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:46:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncNp4BSMz6CxSW; Thu, 16 Oct 2025 18:46: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 4cncNp2SGrz3Dp6; Thu, 16 Oct 2025 18:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xWzN12W7Ldi0fsyvHGjpySjCTtEqBDEgJ98sDn2sg8g=; b=xyS3QbW8BoGtgvZ+9y7NdE77JwbxG9zkS+llx3faN6RFWjprYwtwnZuGyddUnGBwqz2SJw V6jSerSyKOUdNhpeu65B+4fiTVVoO8hq8bRy5OCph4EKLSv6sGtYepmMJQFkypeOs9s1OP t0Dv5GPtXMSc0kAdrssku8aBsfxdE9IoG+7XiG2PSsOlf3EbdlV/V0Hek0rwyq6X5PZfDi xYhFgtjz/m3WbaB9pGzF3u/Of3MpYrmA893/hHIJBcsxA+FA2zxuRO0QVTjnBhF5onqApi CQ153/5p99oo6/kJd5lGmDx6w6fjmeN6PrzXFYd5Pvy1YbHWpWHh+o7NFJ3Pzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xWzN12W7Ldi0fsyvHGjpySjCTtEqBDEgJ98sDn2sg8g=; b=ZGhnf0L2qMR75/swEReRefOkx3SMzr2clL58TqKesxONGtVbUJ4+UDPJVWVjr+BNWQOT9/ I1kNU2FJizzxSmYxItcCbSklm31tLjFVaV+zTxDkYnaGgl9t0L7qvKMxvvIdQI3OZCh5Zc H0xFbewnerFe5jCJQun6HduA9bz5c89hyvCYbcfNbBpJk1VIoSfTA1fFNazdkRm0mVOit8 RtVl6rZUcEhLm6hnZfZ2G62UKaA09m3MsgvwF/P7Jatd9mlKkDQvGvunKOXGa4z6u20ebh 6Aube1YHzEa4JMAm8Yxf5VDZur8KpmnoufBuoNaM4phWZcSg9oXdfiBW/B3sVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640378; a=rsa-sha256; cv=none; b=h4GwTiDa/cLA8uq2W9GLrkQLMayq1/mNnWNnMWut9iTROQUSrNyC2UMf0J3BqwhWb0lBiz Qd5dUk5XzhGpoet2wawWt+NVL/KUT55YL0KOyQkhfxECcg2erMn2FGzRq7wMn7/lZ4wrVr s0VIgR8MHVPdytlreYfhzzlQC1Mz9Hqxjh/5fcUr77lrfbmqPCSbHjWhrXGf3CCLC1QGrI 3TRMZ+BcFwNncNyjnU0cYGuOLUKA8UGF8B+dggiMF9A8+w//yYum8znzlL1dSCDTxrQcn0 lVCMMZ/lWDMXUjaxvIP1958tvXfAH3VFtrYJ57itlFpCux0Zbgs/cnGxxzHHzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncNp1x1pz4nQ; Thu, 16 Oct 2025 18:46: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 59GIkI9t064852; Thu, 16 Oct 2025 18:46:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIkIoR064848; Thu, 16 Oct 2025 18:46:18 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:46:18 GMT Message-Id: <202510161846.59GIkIoR064848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 20103d288e80 - stable/14 - nanobsd: rescue: Update legacy sysctls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 20103d288e80e299a76c5d3e5f5c8b3eee4e4b47 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=20103d288e80e299a76c5d3e5f5c8b3eee4e4b47 commit 20103d288e80e299a76c5d3e5f5c8b3eee4e4b47 Author: Jose Luis Duran AuthorDate: 2025-10-16 17:13:49 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-16 18:44:41 +0000 nanobsd: rescue: Update legacy sysctls Reviewed by: emaste MFC after: 1 hour Differential Revision: https://reviews.freebsd.org/D34598 (cherry picked from commit 93ee9bb424619f0189b3454380588c955222b89b) --- 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 18:46:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncNq4WZ8z6CxmJ; Thu, 16 Oct 2025 18:46: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 4cncNq35hSz3F0v; Thu, 16 Oct 2025 18:46:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZRmFdgyJh9qHVFg6BZrHWEbcFKNTqM/9dEBMBQPdkrU=; b=sv13fyOUjXXOV3XMMB12xJ0Yt1YKFUqfv35eguJs13W1bNdYj1387iktuEXL/3u+E6z7m5 wu8RSLlKkrn6H2Df1idENQFZFfx+wO88O8jiR8oLZ7wKJ1G3rFUJiPJpobKN5JQAgibq/1 DWX8o5TUDOSr6psDLS+vmqmTB7T5ry3pBtJwxEYCdJ17yNhoHvzK77qtugI38jX5uJaFeW zhg4gLAhIKef3iNnyVgENJtnTrPtllmaZj4Z0f1gkWIFQx5RLuKHdpvlggaNYvUA7y+pEG grviNVGwfm+dBdbuWcjRsyTffXQtpOOBiKEtpkPokzT1KvSZXc99tzj8f3olXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZRmFdgyJh9qHVFg6BZrHWEbcFKNTqM/9dEBMBQPdkrU=; b=YrsQIZu5o1qIkXI2kidyfk5Efuc1m15M8+GoBfCUkeKPizMqv2FKy263RTNnm/ODy1Kh2l 6H5SMONUisRMwfS3ttSCFhV7nt/paVYYJs2q+L5zHWHEf3q9Ofw5hFt7KgCJeuIPvFcwWG Wb87Vgg6oTxVlh8gZDqpBMSby6lo2o7pkr+58ifxfDYhHcmbhSfcr4VyKQvUHAuRQjob3o Q73QbUSS25XimSPhF7u4UjZp7EKITtX/Zb+Fmt2Jv5K20y4I3jN0fc2LdknWuqEevEdLy0 KhgvJ3uin5CLGTZiGvjy/XSoazNy3Ka3X3ggn1ka6pwvpgEWIzElgMKOWhq/Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640379; a=rsa-sha256; cv=none; b=FUxYk6rPWQ5IqhNFgYdbbPAT+WhtpGFUzeGsANN5MsKJYrswoDs2f278XZRwU+BJ9xGe4h xOZYB8KfT+oP/+fPAvu2VVrfV3WVWD5VHUzyusoZJtKXMbO4MryIJQIaGgmHHHRs4SAUvT oclXGGml/tQr/aXRWUma+hyB8OpB2BFq/rM6s50jF/7FSdKbekLMQ7JjsSHF3p6tfRJHMu MwJHHlAE2CscQILCquCqxz25jcWnHTDYaMnrbxqzg4c8hOVnE4L0iL0XU0uoDDr0doiHnl sOV3L8XMVhl4VjfhNTVCCn2eCFVbLZvZ0ahcbmPM1Wta13et6jv/IL6/bQObkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncNq2jTvz4sR; Thu, 16 Oct 2025 18:46: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 59GIkJfo064889; Thu, 16 Oct 2025 18:46:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIkJ3v064886; Thu, 16 Oct 2025 18:46:19 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:46:19 GMT Message-Id: <202510161846.59GIkJ3v064886@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: d2c80ed5c420 - stable/14 - tools: Update sysctl to its new name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d2c80ed5c42066bd74132d9fcd390cd2c884fcb9 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=d2c80ed5c42066bd74132d9fcd390cd2c884fcb9 commit d2c80ed5c42066bd74132d9fcd390cd2c884fcb9 Author: Jose Luis Duran AuthorDate: 2025-10-16 17:18:51 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-16 18:44:51 +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 (cherry picked from commit 84333aada464296c1e28126b5c91ae2fb3f79eef) --- 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:46:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncPB6mRMz6CxpZ; Thu, 16 Oct 2025 18: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 4cncPB698hz3FWL; Thu, 16 Oct 2025 18: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=1760640398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XFJ2pEmbVC7Sios19BCsyI5PWNRFx6mzdG3Qey5/dYk=; b=DCb90NIMbPL8PBI7GJ5eaN/lJlhmSclFYAVOOo/7BbmhZp/09JpKybMBil8Oh/BJT4K95V EUTPiuAnvhvQlpech/hJ1vZ19bD+hqtxY4gK1vV4tdyIYW4qJxleOgk8G08Ncgy1c8CTzE ECw7GD1L/Su0BLK8/gdKIoKzENLSS1HvJzjKpRAu+dK36fvncAFJzE41aRZplz5A8mPe07 Whxq+RfWZm6kNxyWDdojugX9bMWhUDn519oRIaj8UGUUXXNarGLoodBiPbv6yGF29ybVeO AZwIzvvP//aDQXLOF3HyNAtVqCVyBa9LjPVx/t/hkzTxAfz+JBSsCm+gdVjBjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XFJ2pEmbVC7Sios19BCsyI5PWNRFx6mzdG3Qey5/dYk=; b=UdzkJf6vBu7d0R3I3HfwYCXVaBPNING5pn9h7ooB/7aajcc+t+DFclapKChE9LLXxTPNG0 AXH8uLjEs4ZBxn1/dIfu2RxWKIlgs14o0tyA8UxUAEiK3l9XQGb42GU/r25GJcZOQk4IjN aY4NUMImWdjfWVy1v6OPZ1MCXmZR6vXOkHu2z+xUQ8Q1efnJ9n2PXZV6378sq2SILH25p8 efByYD3c73xLiQqN4G2bMQ/42NCHsP3FXtOXaGJkO18fC1gcD7aGYHVYP2bQaZ/cOuVlzj GVvyt+CucEALTTS2tmKfz7KCmEvgi0Cw2lf6XUeoe1rBpG0vEDPpZBM792JHnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640398; a=rsa-sha256; cv=none; b=MhJCLVkwMMQLlKaQJB79JY4qsLZhQ+818RDG52nDtmbnR6B7l+2dkKxKHfe00l345hzK6B WlJsEyikUbGNl6zfU/vPFeDNotH1EjlJg1+WvY7UP4AMse6bjqbeLGXm0QyW4j2ytxtHuh T0/rAZUDpEOSB4slY/mn5Euj28p373gEhMh/ulJwW+AByidEM5cdCBv2bJBEBuNkWBzJxO VEXnQsmx1RW3hnMHaAn+cZyOwh4Apj6z++auiBjJiKtbZb2o9Nibct1qLwa1NgohvjZX1w ZdiQ0zKi5ItcS0asXKRQ9aNfmUT3/7mR7ZIdYOuNg6ddLfGYX2zOs+FpyiSsBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncPB5YQGz5P8; Thu, 16 Oct 2025 18: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 59GIkcOm065113; Thu, 16 Oct 2025 18:46:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIkckY065110; Thu, 16 Oct 2025 18:46:38 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:46:38 GMT Message-Id: <202510161846.59GIkckY065110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 14e02220e415 - stable/13 - nanobsd: rescue: Update legacy sysctls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 14e02220e4159f197c148c60cfd8ccaa62076dce Auto-Submitted: auto-generated The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=14e02220e4159f197c148c60cfd8ccaa62076dce commit 14e02220e4159f197c148c60cfd8ccaa62076dce Author: Jose Luis Duran AuthorDate: 2025-10-16 17:13:49 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-16 18:45:23 +0000 nanobsd: rescue: Update legacy sysctls Reviewed by: emaste MFC after: 1 hour Differential Revision: https://reviews.freebsd.org/D34598 (cherry picked from commit 93ee9bb424619f0189b3454380588c955222b89b) --- 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 18:46:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncPD0KTKz6Cxjy; Thu, 16 Oct 2025 18:46: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 4cncPC6hsTz3FMF; Thu, 16 Oct 2025 18:46:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pe8tWAWr25a7iPhJ/srWMc2QHoqLIUF642DBoSNOfWo=; b=doWQGVcXNPxbEJMjS4MTZhpMG9G6XjzgNiRgFj7hhiPRG4+LkIAY8GHfvmdOmJ5q1wacsq HZ9q018C/xVxutfwdTnoKGHMfMG12FetedkG0/potVNOMKfra/oUlfnlWfNwOZwnaI+//z o7nLfnAOm+Z/lFNDrLikfjE4Cy5Y1mZkcsa015damclagBxtHg51ktbq0g5GdN5Ref4Hp9 9kx1cMDFLStuaSF2+p7hsnS30bndM1zWXVkgyirztUrVt9qbBKPiV85pp0Zdcquu2uW4KB Gsubkv3dk3E5d0QuWd91oVhX9XXEUaq/LA/H8Ctfdd4Y0/vdT3lLD3vGl9aduw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pe8tWAWr25a7iPhJ/srWMc2QHoqLIUF642DBoSNOfWo=; b=CovUEWYUwAzIi2F8jHIaECyok7sNkSrGdSSy6KhHrrO8IR7leab4Wh7986aNVIkJkngIvh Z2HsYu14wZn4Pxexij8uzx6SHCWeg5nzlJozol77x1pG671LTQRDxOFA8sH6wiAulA0wAb 4TKPSNDvB8QrDjnez2lwidu/tp1FebgQ9zi5aEaLrz6kRYtmBo9mq+yvOaZA8GThhRjBlo kdDdNzz6fkmh8HszpNeT7GusRjDb6pjt5ZufgZ2wJM63q9d2FC/+x3TEtaOoJswIAa4zB1 X+gJS2T4USdcVsQiaQfy+4sUQ3d8kZxZs9SVAknp6NZ/hGhSHzVoWukyDaSslA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640399; a=rsa-sha256; cv=none; b=SLKjoxq5ptE1SbfiDXk/dtRJ8u4SgIjpxQgFpDRURSrc93eQZbjcVtoZIF05+2kLBzaIso tf3JI+haG+FkBzWZ/bk04qGTxHgcqNu3k9OeJ1IQ3KHvU0kA1dHLoc0e2nsstaZ5G1iWvS HCfWkRBjI6BVljj1QPRuGTqGcK15N6x9kpjnn/eKrwpvSu1ueZ0ScRo9NgnMHbWfoaX2OM TefiyjaHx0g8QsG0FiI2Yxp4nXV+1qJXLAMFhXCqVWQ+z3YIcGkcM1kUCYHdsHD6Lu52IU WGMX7RYdaD1a8kovFoC1WagYOoH66nsRqaTPrj37aauDIHQvjiw8swPyNaVqGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncPC6DLlz4nR; Thu, 16 Oct 2025 18:46: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 59GIkdJO065150; Thu, 16 Oct 2025 18:46:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIkdge065147; Thu, 16 Oct 2025 18:46:39 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:46:39 GMT Message-Id: <202510161846.59GIkdge065147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 07a3c93bc51e - stable/13 - tools: Update sysctl to its new name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 07a3c93bc51eab1ca51846a941b90a7161df52d7 Auto-Submitted: auto-generated The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=07a3c93bc51eab1ca51846a941b90a7161df52d7 commit 07a3c93bc51eab1ca51846a941b90a7161df52d7 Author: Jose Luis Duran AuthorDate: 2025-10-16 17:18:51 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-16 18:45:33 +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 (cherry picked from commit 84333aada464296c1e28126b5c91ae2fb3f79eef) --- 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 6d9d807dd7dc..09a5ed8e7cfd 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:50:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncTQ4vv5z6Cxt6; Thu, 16 Oct 2025 18:50:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cncTQ4J4wz3G2t; Thu, 16 Oct 2025 18:50:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ERv9SZhtUQ0kBQMeneup6pRCATfudM0A2yylgbShrRs=; b=DmYiHqYvrgmZIqRJ8EO73L42jq7Vlescytk9UpfgcsBFGSGv9e8h7idiVe6896P6/2g9GI BakL0BuLhpqmVuA+OCbBTMQnsj48Fk1WlRM3SSunkNgBNLlCvGtb06uDayj0+PuuLqr8Hs ANS37lc3L33Al6zjlBIYmmzinojlGZz7cMTEtcDJPFXY1b6TNM1F36uDKyiWCqH+y7dBFf 9BIWEP03nEiU6gUQcOhq4y0CMfaKA0CE73E2ztxdmzMH6Bz6JggyMuVQsXxgbbZa1VvZEQ eoO/69vZ4gCBGCE2B9/RUXJ5+n3bEHaG2H524M/6H3MBEWcvpfsR3Q6LsMR9bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ERv9SZhtUQ0kBQMeneup6pRCATfudM0A2yylgbShrRs=; b=A157hP4UDj/B6HnX95vpNzvwDOCGEdLF+2VsZYrp1J+P1I0aCDXfhQc75dOs6R5Xgq2Rpj KJdxlEi+lOyyeM/9szYmQor8NyzXO/xpkNJoGFSv5kiDovzwQqbeeRG4h1wERK9ZhKXPFv yX4dQVO8TW5OlhvYjca6Sui7FlChhK6Bm07iY7kvy5w+rB3CIUjMQGxYe/j/S3qPwJpoiP E2aQhhjOGWE/mk381jBQMAGsIzgeQdBKHf+zkaLNk142EnaJGJhoOvQ6FIJ8DsyXGCR+eI 1dIFDLGU+sOI4iuEBI80G7x/0dVGZRZU7DaK6IaveuflOldq7Tth2th0Mo0CUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640618; a=rsa-sha256; cv=none; b=yTzM/DvQDEHtS17Tbj85f5XcSNDI0T5CfeYpifyLtv/ykoKAP70RutJ/OAg745A7Grxf9D e6q7xhu752NGYrZgK94CzvERZCfCPc7ZeF5ZeW7fGkW7pDvkDZqcafUUofQmAX8YDpSTFD 3KaAsyFLIEZ9rPq0mIXMZnHI4+p8Pu/8HiPpKdn0Y+SFobgEo8nw+QYUPvSnbPC90yc8/m 9Y0KOYEe2dS5CtHz2ao4wQ3LpZSZBoXnvFdUDivDOcqnOJ81ItjbzNI/2QgL2vlaFNYCYu u3UyAX+XcMfAzouhgQe4Gxqv6RB6TGT9mD5FzT+HLTADF6PemymmYV4RNk8h3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncTQ3rDtz5V5; Thu, 16 Oct 2025 18:50:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GIoIfv075063; Thu, 16 Oct 2025 18:50:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoITW075060; Thu, 16 Oct 2025 18:50:18 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:18 GMT Message-Id: <202510161850.59GIoITW075060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 330b91854917 - releng/15.0 - sys/rpc: UNIX auth: Rename 'ngroups' => 'supp_ngroups' for clarity List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 330b91854917ce416700ecb8a2a1d781f9abe45f Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=330b91854917ce416700ecb8a2a1d781f9abe45f commit 330b91854917ce416700ecb8a2a1d781f9abe45f Author: Olivier Certner AuthorDate: 2025-10-07 10:03:07 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:47:57 +0000 sys/rpc: UNIX auth: Rename 'ngroups' => 'supp_ngroups' for clarity Approved by: re (cperciva) MFC after: 2 days Sponsored by: The FreeBSD Foundation (cherry picked from commit bda3b61512b2597d4c77d2b9c9074b844dec0405) (cherry picked from commit 5e482104ecfa57b6debc3c495f2dcb2d2ea50ea2) --- 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 Thu Oct 16 18:50:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncTR5mSFz6Cxwh; Thu, 16 Oct 2025 18:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cncTR4qdsz3G4j; Thu, 16 Oct 2025 18:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWV7wjHtnbioqmoZTuZEhFKevpfoA6x44Jlhn6Hc/iA=; b=LtERT7VKPU5hLnvtkE9zYvVZ1qBANRd+pZrNY2JqHeiOIGs9/hKtulau8fHogKgdg5GHxM msyjaNc5/mJsHrJmH+juaXTrlJwIIhrV6YCwiWglnKO/o5WKJKcbjTVWjH7wsPcIXnKXNE e2Ki09TdXskU1qIPrWEARD75fkh9I4g1LhV2/J2/vUa38oQloxYm4OrKoYPm31tUR4DEXe u6fHp6o4DAkjubSEvczVxZnuugRsn94MDC4r5O0Gxo5KUDK5ebHN0k7zQLWJ6bbJZP2Fjd 7k0Y9MjLhOiWxFcpvlqgovVZ56ysrbvLkX3afeV1kdHlikfYUVP2JI8ll5ghOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWV7wjHtnbioqmoZTuZEhFKevpfoA6x44Jlhn6Hc/iA=; b=KI7YP7rlhyNyurY7mRKd5/haN8nfCdZSPkMiLB8taIyIMi3tcA+xvzSRnWT5p1kovScp2s fxu9F2YLMjD5pAcE2iPv2NdUrJr/qXcpfQwMT2uVFf7fMo0ss6GCqmltmdPZaLlHU5gtPM qhOXNdq7wRUlvtLw0D7jPtK/hVimF9XcyTh3G0TUOET0usippD2GVk1uqLmhZgUhunwcrV HMgVYHts6h8c7W82/ma6VPCUY9K/TZoerI7h9jVegC1lkxtP7acY3kxJ+m1S08b3+ZIf7f 8mj5RNYaaU9uZAsHjKDQMevoWToKPS81oTMXpYRUp3hCCa0g7C8R1NecePvIqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640619; a=rsa-sha256; cv=none; b=jsl6ZRA6IbfJFDP1Qa5lC7FF9ZuAP8TGu71t4pwQQ3PHnfNLrBU5oxZQZvWWoJQV8gpJBb Td6iZMDJ2P90IOQbFd+TuUeeXQLtzCf7eQ+Hd9uaQy+MPHpzRPx2Op3meMc/ApIb2a5ejO VyT15fNvDClLGh63NfiUOO98IdxKRqE6GsxDsamfMy6tdi7RYJxxD8QuOVL+7imR9OVJkJ ln+4wnRitHSmuSkS1a0RjzfYMxQ6cwTkc/VK8j0jNDPnRFmRffOFjqvJosk88Bpjcfokqd 5tX0EfHuF8j03XkZLcnJNqiNTSqO8WIxoGvl6XdQomc0J1qL3sQ/Kec0cGGU+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 4cncTR4Rjvz54w; Thu, 16 Oct 2025 18:50: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 59GIoJqK075095; Thu, 16 Oct 2025 18:50:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoJeH075092; Thu, 16 Oct 2025 18:50:19 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:19 GMT Message-Id: <202510161850.59GIoJeH075092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f647564f3ff6 - releng/15.0 - sys/rpc: UNIX auth: Fix OOB accesses, notably writes on decode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: f647564f3ff637699d7e13ef6adf3659e254cbf7 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f647564f3ff637699d7e13ef6adf3659e254cbf7 commit f647564f3ff637699d7e13ef6adf3659e254cbf7 Author: Olivier Certner AuthorDate: 2025-10-07 10:02:23 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:48:00 +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. Approved by: re (cperciva) 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 (cherry picked from commit 47e9c81d4f1324674c624df02a51ad3a72aa7444) (cherry picked from commit 9492a1e27fb18fcd6122bbd9ddcd853ee7693417) --- 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 Thu Oct 16 18:50:20 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncTT19w9z6Cy6K; Thu, 16 Oct 2025 18:50: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 4cncTS5sqbz3Fqr; Thu, 16 Oct 2025 18:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LJSgK0rJNLoRAVcE2j8R6mknd98PUIRncM/4Rr6h5tc=; b=f5s182gD3YWUFcKpvp+xRNCSyAymOa31QskLPC9SLADXybap138XDzB2ZI3jSqlilMynRm 1NAf5Oi+Uunbci1zap8US+ctjZeKSyCA540Ywdmw7G4ydfu/X3ODpMqv4mwz3X3cTkqpP7 2fkOoLP+EpXH11ySZuJJ7bcnWt7V7xwBaq+VfcrOv8C7qWUnSt82qunr+1ctSA8b3TCxf2 Y3+XWWXOkahOacMOzxsQ3fpTDoZTGYmvehPbzUwL6kJAZ9D8bk588r5GVUAx4fKNmw8aWg YxEWYEOMjKhPGBKJhgasmPfYjxf9ojeWGjX6E/+hENEzwV0ZvX9mDn2PKYt68g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LJSgK0rJNLoRAVcE2j8R6mknd98PUIRncM/4Rr6h5tc=; b=o2okT7M3bKWxgMEm4BHlr/MHui0gMB+9bwm1XfvCfE5ykWihh14XSH+F2LN/yxl38z4B1o 7GVZBh2jXBlbJ2BG9qxMYGslLKa1VA/3FukAq8cxN9G4c/fVMWYkB8K8SdI6csAkkkC71Z f/1SEN3QMLwuaD65+g572EpAWCbklZS0iE6/offS7R3O9dlg6LUfdqp240tkjAYmtbGx3a GjkNOpGmi8oU8f+0G6ye78q1i/2+JhmI1WZZWie94yhWr/D+AxXdNF9ixm9WzMlMNLkGty Rr6CbjrbE6Aj95Gqh5QHdO2W9DSNPBKvYLjDbM3VKWYlvaDggf8yBiLyyWHFuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640620; a=rsa-sha256; cv=none; b=Y0D76kyu2sczzu4vQUp/3rqLx5eWyxd+wud6llRvXxkSSnbSTpTMu4iI71L6+iaQjZ/oXd MgrcQ/XtMQRNUpj1ixeXKkod6YdG0++usrCDtP7slcnsuU3X9vjh8uvJ8JDNqteEBIuDCX GpLl7lIeD3XzbAC1KcXAMszs1HJEvHSuLxBaz/jSa891nJWq+n9A9xjXpublEZFPWoGHRS 9CngiOT6nRaQkaAQwZDeV9y15q4D8mI4te3Gh4I3GprzTIdd7CfmevCXnG0JEut90JbGRe c4lHXWg9O3eXUW970QtyNGI/DfefKll9fCxTM/LXSLS9d/tNuTOvvbOmfpOREQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncTS5PSVz4sW; Thu, 16 Oct 2025 18:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GIoKvq075128; Thu, 16 Oct 2025 18:50:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoKkA075125; Thu, 16 Oct 2025 18:50:20 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:20 GMT Message-Id: <202510161850.59GIoKkA075125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: ed62b31e3000 - releng/15.0 - sys/rpc: Define AUTH_SYS_MAX_{GROUPS,HOSTNAME} List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: ed62b31e300065e51237f0063e0dff3cf76503b7 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=ed62b31e300065e51237f0063e0dff3cf76503b7 commit ed62b31e300065e51237f0063e0dff3cf76503b7 Author: Olivier Certner AuthorDate: 2025-10-07 07:51:23 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:48:04 +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. Approved by: re (cperciva) Reviewed by: rmacklem MFC after: 2 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52961 (cherry picked from commit f7c4f800cc0b4fac1c99cda8e22d46b67592f9fa) (cherry picked from commit 37aeac44647dbf2c194c70a56a3fd52aef365aba) --- 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 Thu Oct 16 18:50:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncTV0rH3z6Cy3p; Thu, 16 Oct 2025 18:50: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 4cncTT6rRGz3G37; Thu, 16 Oct 2025 18:50:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHwReUBKrOtrQ7EnYzTZuP7TOFWM46tBn8ZGMs+1uAw=; b=lXEP6o8xm/Vyib4dIrL+ZtzgFXBa92SFRfdRR15Sg9g5g0ur1lrQWTzrItrsqAgq0dfEWG hfZBx87f6S3oh+kNVi12JW5SjacdN8gPdgCHrKFy1QFqVC+H2w+PsR14BWqWUeLGwGsBOZ rrDlq3MDZ+pm/GBhtvLMyGW35+mvXGv1VOGvGxXG0kk8GJ93fx2tAAq3ORRHr9JxdIxoMM a8IFb4xtVoQOBhRaByVJ6Tr4Wrmz48ljVzaYgjuTfVOQkJfUBA4dao1UPXVJuUyB3+Yqt0 yx/ghdVrbthIaYCXXzVDNDK67lGPM7E0U/OBLFFQyLu6hTvV9+AZsWPT7ENDiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHwReUBKrOtrQ7EnYzTZuP7TOFWM46tBn8ZGMs+1uAw=; b=ZtbxyC6U+fbA/LyVW/qtrqOGdVicBziNFXoYDjQucEtjs3SuYzCT89Ke5OgIjaWtIf5pl1 Vt+PZ8Q7l4Yr1ir514/sXhimPGrssFmhaPcaF16AqH45utI8PNPnsKGpeQme9chmL9XBHV v8fvN3WvmbrLZ1sFt6Yj00Ypb1jLnWGOurmoeALbzyYUtPlOXLOhVHxBt2WYn4Kjtonjcp xH48oqzeSOauP8xzAe27MHs2XjcYPpzM1lRb1nnquqnGGwkuzMdUvSrHWAd4l0FOCUC8uw fQBM7mASIRTgvPgxu6G1bBcaw6sRR9TrYpL4BpWPP1Da9g5SOUKCFniuJWVm1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640622; a=rsa-sha256; cv=none; b=pzsaOrCvVkiQLUznohfGKoPtDA/VZuxwFSmGBLPWjTa4ueGG44JTN1TMwuJsYUOUqvkupt FikMLck3FeEpl7sRupe4v5FZ7arDkekFZGYMptJvY0R2iNmvN1QVNrRhyXRgnIJT5pugJB qgtBKaCRGluCWdgCOud5mlKKSD2+a0JbuSydZ6NOZdQtyK66asTt+foMrhwJY2VRN7gr+E 0hxLgKTUdUA2PLCcQbCFNOmzkZ3MDN4VrU/krtenWY9GMM/uZRnbKYV1/5mCeqUCsO/mGk o0pLDmJ/yzV8j/kjll226khtpsaY/Ek6ts+ZxtChr7LBQuKg+0aH/9R4HLqDOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncTT6Q13z4nS; Thu, 16 Oct 2025 18:50: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 59GIoLHH075164; Thu, 16 Oct 2025 18:50:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoLga075161; Thu, 16 Oct 2025 18:50:21 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:21 GMT Message-Id: <202510161850.59GIoLga075161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: fc3b621afdb5 - releng/15.0 - sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (1/2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: fc3b621afdb551dc17ebe41134cfdb3799658792 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fc3b621afdb551dc17ebe41134cfdb3799658792 commit fc3b621afdb551dc17ebe41134cfdb3799658792 Author: Olivier Certner AuthorDate: 2025-10-07 08:46:56 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:48:07 +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. Approved by: re (cperciva) 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 (cherry picked from commit b119ef0f6a81eb32b0e1cd0075cec499543e7ddd) (cherry picked from commit 34fc20503f04e3c035844f4bfa8eb72964ccbf68) --- 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 Thu Oct 16 18:50:22 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncTW4zN5z6Cxt9; Thu, 16 Oct 2025 18:50: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 4cncTW0WpZz3G5N; Thu, 16 Oct 2025 18:50:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VzT6hrk6O2GGl9tp9Ei1KK3wiZnJSbyTdkgejbBBBVc=; b=DQ3Z2/lIV9w1/2+D18tzSk5BY0BEKs7zOzAUGqmyjJeHBaG85wCkS5DJjO8Bxlx/+lDBBu 1T1Q/P3XWxnsRSVtkqu8ba/n8Y8nmOL7AtqIqLPOO914HbN289+P/GDi61PEpwMJaP85Z3 qIHIU0uxoE1kCCWo5hJNsdRI0lggdbYzIAwuJOQdyNSKT8wABU5hin0Y0smXC1pmBpD1Un GGDCp/d0Jx4pKFmNt7Jt2xDpFtllI8gJsl96GcjFSrdpEwX3/9fHrocTgNx5ra64kS6pd2 XTKpZaRX1l+etMq3jETyUsqiJdTbf/T5ZBUaZ9xenoYfTt7MX49qcGUoNaIXQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VzT6hrk6O2GGl9tp9Ei1KK3wiZnJSbyTdkgejbBBBVc=; b=lSk1xSDzFBIbbC1sJ3pts0fi19rE+xK/w72WsgvPHuNHQHETv4LWoVt377aW3IRjSL+S2K l1gUj4cDBxZg9hxkzXLcx6sfCMGEJPSZFpSi7T4ABdmuC+CxRu4U+WnUPtVig3gK47zlHh vcjnAUCluDjejlrdHadqa/EVETkpzgVaWEFV1SPel5US0tqRN25ie50L4mYDK39OE5fOpM A5hD2iXkR2MR9Bl6co85BYiMSrzByxe+HNE+HwqOT+xrs3xkT9p/d5EajEMnbKjlMrrtgc 8KysKdmPQbYBSAj89Y7x0QlusT94dqtYnPZfZl4SXg0AHOyvn7ccPfWMEPl0pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640623; a=rsa-sha256; cv=none; b=H3fEPv27jN1mAcVs7b6uXDUOouPMsPUOaK/wRzZo8ghimk71O7WMHK32stWJPjViJQG/nd remgkwtxktY0Bb0tqUYuj7/3l3YwgDU+OjU3HWzwYfHCBR0lvuWZJ1pzN6qZYeDzfkoV+h RsZKKx9LkzyqyBu0A0CK1hIuWXUElLf17kePcwLfJ5SgFIB9u+ktW0usELX5a81zsNbCwn zvpcmRs5R9F/TcdQKAyLqZwiuT+dQPwUnAZBr0lfVlRfXJFiKJDNIuI5JxxB8i4nAH3/aj Fik+VL+9c16xUAvu99BU3+JJ8MFcOppKRZY98ZFPB6o3jq8PAso56kmJlqxnNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncTV70hlz4nT; Thu, 16 Oct 2025 18:50: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 59GIoMnj075197; Thu, 16 Oct 2025 18:50:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoMb1075194; Thu, 16 Oct 2025 18:50:22 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:22 GMT Message-Id: <202510161850.59GIoMb1075194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: d14f6f170453 - releng/15.0 - sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (2/2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: d14f6f17045395572b605b4f00b2d9b40fff98a8 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d14f6f17045395572b605b4f00b2d9b40fff98a8 commit d14f6f17045395572b605b4f00b2d9b40fff98a8 Author: Olivier Certner AuthorDate: 2025-10-07 13:33:53 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:48:11 +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. Approved by: re (cperciva) Reviewed by: rmacklem MFC after: 2 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52963 (cherry picked from commit e665c0f6f7a611d25d9d7e7f64d98c84b3a92820) (cherry picked from commit 9763e76cccf05d405e0fd9c9c351808993e93b14) --- 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 Thu Oct 16 18:50:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncTX4FKgz6Cy3r; Thu, 16 Oct 2025 18:50: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 4cncTX18S9z3GCq; Thu, 16 Oct 2025 18:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjXXO9b4gtrhzfbvRNhfbX4e3nL29YtE3VPrNI3zajY=; b=lThBaX0E7tmJzg7RTZO4oogfSMHm1V1jEmsF40zBURCVJOg6C6nO0UHeawD+fXoR/lfsW6 QyU1JKuIhEA6cmPMOer/CivGCpcTfzuDftz559ePUYM6Mgds5myObInVjQuoTFnreWGm24 AX55//ePLkVKJJx6QQI8fXyzcz8IBGJcvbScjRRtcziZC0ey8e2bHRxu5+G+XheQiqozZs re/cJQXAbYT9tTtAA5icZcSXmnxPYw2MhWqmSgqFR53lzqREMRoCGB3ZJSKghE9LzRoms1 mzxKQxhfrAHflNnkCYh6gu6F8WQT/juqujRLYaTR/EYUgT50VbFEyx0RNqRb9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjXXO9b4gtrhzfbvRNhfbX4e3nL29YtE3VPrNI3zajY=; b=g3rpRaED9h5GnioRI1fXcYsukkYY6zpcFbOJb8hkiwqiMUdk4cyGpUo/rc5ES53m4iiVfO YlGjwfuk+NpVZYx13YIJUB2hWx9aAGgRgp4m1PWyTD+HIRcITg+d9hXNQOUtnKq4dToTOI Zaa76yO74ofeAkbEe/S6nBP5bZnqLPL48CVzWsmor5WQ3o+hq9F6WHSj8sdLxGdccin/X+ DVWsowHorYtVxSiSKD1X20Z4xKof/wC10ZJgTDy9UdEnIF5gCKc6cX0HgKacdBRFV5KWnx /AI9Wc1IH+mqxVQbTHbj5/5BuiN1JTJTqMFG2FSflToxqhpnOIvHiDXenkpGZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640624; a=rsa-sha256; cv=none; b=f3GAJu/IE7Z5AuVAhtVMMAQf6uN5Hwk/W+EVenU4Vj/cdW9V3AuDw7IBop9Aueq+BTl9BY +r2pklZJ6Q7SAWquABCIlGxO4TV94G26P95FOca+bM0G2XCJQBkr4ME4hlbDv1io8KszzL BpulEqiJ7DrBNrpshbczjDvjVt5zVOJ0A5sy1nabHdfosHqef+XDR/4Zh7L86b/8CIqjUA GnjxwhVDpKOd0xcd07pgl/sZpXKrRUnKiv+gtNE+99uYYrAdELWkXhTgr0OUvAvd9MixLZ RpLUVhevphHQ6Yp1MqPqD+OxJLK2UyfsDJZ1xNPT5SKolUzyPftoeVFzvvh+zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncTX0SmBz4sX; Thu, 16 Oct 2025 18:50: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 59GIoNW2075235; Thu, 16 Oct 2025 18:50:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoNkA075232; Thu, 16 Oct 2025 18:50:23 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:23 GMT Message-Id: <202510161850.59GIoNkA075232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f96df7ef179f - releng/15.0 - sys/rpc: UNIX auth: Fix OOB reads on too short message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: f96df7ef179ff54f8fe5f3ba1dcc780e9868615d Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f96df7ef179ff54f8fe5f3ba1dcc780e9868615d commit f96df7ef179ff54f8fe5f3ba1dcc780e9868615d Author: Olivier Certner AuthorDate: 2025-10-07 15:51:16 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:48:14 +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. Approved by: re (cperciva) 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 (cherry picked from commit d4cc791f3b2e1b6926420649a481eacaf3bf268e) (cherry picked from commit 45e671c9cd3b92ad20addf340f96399d0055df7a) --- 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 Thu Oct 16 18:50:25 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncTY5Q7kz6CxtB; Thu, 16 Oct 2025 18:50: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 4cncTY25yZz3G5s; Thu, 16 Oct 2025 18:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THqlkSXcAbywfjWVgIEjaef85Uhr5EJII7RrQ6oM5Hc=; b=QcgX4dO1p/dgXM9m5sF6/VEbtCagnPC/WgrJlAHzmdDwD6FKsY6TIK9u5/WDpe9nl6Gpn6 CoTXNcrTYh4h8Yn09DwgMEH1QlnaVNczCDvQ1RUtZMdksRaG3DtN2R76MYFtR2kC3GtQsb 8ME8cWYQCXtb7wlo8EITtMK+7r3PoZlRw5E8vLKFAvObHm6Xdj4vM3MxxBumMGdH/JM0u1 EtNe2rKBHZCu5xGlaMhw9jSOTwINuQVV8G4XNDD++gmiKgW9Kedu4bF6Y9edgGr3oa7w65 SRC//O4jBotWCELyPl9+62b5MbHTqb+7ZiEEK8fvNGGvAbPxP5UKKOHB8r3wxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THqlkSXcAbywfjWVgIEjaef85Uhr5EJII7RrQ6oM5Hc=; b=IYQAC1lBmxjP/27yvRH7hYgHYPIsczFsdKVPQIk+hEsEfztfk6P6sm8Lefeq0OiFWvg5FU bXc84fKQXIMh2PdYOQcUV7dIcXVZYVdkFJ7Gjzd1V+EAyaRigMgIV1f6h4xjzY7uU1p0U/ lppbHTpUr47kukEQSYPUvu1yULpw2Xaj/uvkZ5AFwI+C/rrUJoC/6+FasVUq2ny5VhpuY+ abX3azTp/tpU7TG6sLYUcn/Rb7sLnob3H5y6hC3YAW5ikpCAAdnF8gatnlJN4ZmE5G2Alz VDd9reIHhJXJBzuI7rvY207NMTDs/8LLieXC7ID+plA9FlEBg4M0X4VipVD7dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640625; a=rsa-sha256; cv=none; b=By+oBAJemybthw4dlXSl46BXCYC1K94epAzfkCuhuvVfRifqQdqx9Phgqp/d3H2yO14a3J lhmOzBCLD+2UAvcv378ejXY8EpzLVfsY+j3uwm7zk7qEjtEW5M4hX9X2lIv6cefWcTjnfh mN72cKyqk6HDSL1d1xWipYFZqGEuqXT2Wl7IsIG5MErPoKzeoOoPbUaI1YoPVEG5we60ab t4tzxj/yi7v/0R9J01LGOrnCuHaKyRkb2yqBeYzW6xLnDPnpA+7052gKEM6+NBR7YIB8kO JHsmTletyUlja3PyEuM13GMRhMyyZMxXMpYEgXdesNPEOHhv6JpDmeTi5gWFRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncTY10wzz5Rf; Thu, 16 Oct 2025 18:50: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 59GIoPC7075270; Thu, 16 Oct 2025 18:50:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoPmQ075267; Thu, 16 Oct 2025 18:50:25 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:25 GMT Message-Id: <202510161850.59GIoPmQ075267@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 082e48e81bd1 - releng/15.0 - sys/rpc: UNIX auth: Support XDR_FREE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 082e48e81bd10237e534c9ba88d270abb9351a36 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=082e48e81bd10237e534c9ba88d270abb9351a36 commit 082e48e81bd10237e534c9ba88d270abb9351a36 Author: Olivier Certner AuthorDate: 2025-10-13 15:13:09 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:48:17 +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(). Approved by: re (cperciva) Suggested by: rmacklem MFC after: 2 days Sponsored by: The FreeBSD Foundation (cherry picked from commit 4ae70c3ea498e06676040ee99254d261e29ae82e) (cherry picked from commit b27688a8b5dc92c87e74c40f3702484f5e2e329c) --- 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 Thu Oct 16 18:50:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncTZ5b3nz6Cy3x; Thu, 16 Oct 2025 18:50: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 4cncTZ2MsMz3GBM; Thu, 16 Oct 2025 18:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v7rvp2ohH4BIWkCfE4PKpO/963/ruuDow5WfmsLEF80=; b=H470vTPu3thAZp+J4BONpAuTWMyFZ7b5RZhZd4TpWAFm35qqAsTQlhGddJ8IrVjT0KRLKz JGXsHDroN+d40Va/YWqPJyn1xwq2eYiW3r7wMc69mwjQWOIZUfZx/1e/X6QHDC0d/7oVVA RXdh32udr/mNe8r3EUSnF2x8LoM91bHlCVJ4AMFydy+vyVYoJDmzUPdQ9rRdOjbMEs0Hp7 r01nPGF0wNe/R4YAx54CCea7lCt4p4YkYOYtsjnngH39j3wPCgSriI/99F9f5jzMjSVuXN yGd3VBIW3JRGVr0EPPfOARG+pbWbpxBJTIff9LERTcy/EI9p8+CykLbDwerFLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v7rvp2ohH4BIWkCfE4PKpO/963/ruuDow5WfmsLEF80=; b=pOaiv7w3f+wj4leDwGJNZqScFE3W06BOMX+J+qNFNOEyVNvsPeceEB+sE4eebmahB2nvRF HSPEkvu7/qvz5t0uuLJ7hcSUF//+q93JQGRF1/n21x5i63mw5RRofvt8UFYL77w9pPFBua ZMVHbIdHAyse123IcGmAvFW3HbZKXkf0PC6RJ/MieIMoNxsxGhqsH4yKq63d0HOrMuO2AK 7fe+uqXPaTobZgPTFgMP/C8ZJxSq69/WYpPd+xqdvgisxh2Hzb5ogG2qkbxNUNiVm3GtQp 06WNMb916bTt8Z5K5njwRmFFb7OnP7nrCliUuj7ctWpudtcjwnFDMgP+wtAWpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640626; a=rsa-sha256; cv=none; b=ftStZLBHR4XmmvzCi9bUZiageR6BEBpxy0Sq55Cj/LKPWQ3UdJVuR5HjECuZ3KzDTfZ4k8 Qd/3FUb/H2uMZ1c+uEvhd7YBY44r4i1mpf3+A4Lroeo5hh/UwRltEQ6lS1q79Fp9rflx30 7q1TW7M+N0FvfK4n4dviFWOO4JOQ+UpSSLRD/VUa/6FVIPZDat0QIG6zEOHNb0HxX0S4Ed 1Ycq6ju7GA7nlIQcgFie2fKUCNz3QiiIBzo2KX6P31zBCFX8yYicopnoqmePSxAAlQZaAv lCpjTljOTw7DfFPmIGK/zVqruUG43DGlr157F/vZoxHFUte7mIyfwdHAhTOu3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncTZ1wqpz5P9; Thu, 16 Oct 2025 18:50: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 59GIoQFU075306; Thu, 16 Oct 2025 18:50:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoQVU075303; Thu, 16 Oct 2025 18:50:26 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:26 GMT Message-Id: <202510161850.59GIoQVU075303@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 2dda215652e3 - releng/15.0 - sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 2dda215652e315f12e2db2dd1b1d04af5899c1fb Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2dda215652e315f12e2db2dd1b1d04af5899c1fb commit 2dda215652e315f12e2db2dd1b1d04af5899c1fb Author: Olivier Certner AuthorDate: 2025-10-07 17:10:12 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:48:21 +0000 sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes Approved by: re (cperciva) MFC after: 2 days Sponsored by: The FreeBSD Foundation (cherry picked from commit a4105a5d4e179aa1ef661ee45d6008e83fefd2a7) (cherry picked from commit d06658b8066d1c3af400db33896a493be2ebdfab) --- 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 Thu Oct 16 18:50:27 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cncTb5FQZz6Cxp6; Thu, 16 Oct 2025 18:50: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 4cncTb3LhNz3GMm; Thu, 16 Oct 2025 18:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1/uEZhFi6Eyo5iHs5EzyH1a+8Vi+77Wk944WlXgC57U=; b=he1HmkW6Gi2qsRSetFd8RUz6kSc9UZsqSOjhXO0RTjTaYyzrK54+gFNUVk8C7Dj6dmt8wb qRDTgscxOFenn/ZlpeML2Se7LXLySVa9lZYj9tDZgQ2AOttpdC4YIVJf2Cvd0CyUMH+dPH tUzWH7XFc4G4wjkWuHf5kAaFEX661ZSCKHtkhMAbkppgvENFlnniHHNZrUcHG8Uij/Xcc2 q4bEMg/KU6JV2UwgBTsXKttsmSi45JXq5ktjKvsK7h9QSefK3/57ZRNnnou8W2WI/N7vgQ SQ/QcCm9VmYnvBOcpeqgeJSnH9fKsA7bwCUMMlGfSr4XEupb5oT7maDo7K4ZZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1/uEZhFi6Eyo5iHs5EzyH1a+8Vi+77Wk944WlXgC57U=; b=TQosKrTP6U8deWMe9r69fw0Mxc/qB3NjdLCavi2yv9IqymJWZ0m1CzN6x+TZEH/27bdfZg HmmMLlZ6mc3QtBtVCGnKIbzGX8+/UyNJdIIOJWug2uAaHP0NWawghkmdaLuoppvsd0Qmf/ qIQOXVVOdldM4MZO+7X6Xy9JcYI00deYDH1LHQnV5gKFh6Q6wPuU2b7j0e5Ol+F1xb7tqO w5vMzLfG+HMmHzSL+G0Yuy9kU/e+DEdK7Wb3XL70NaVlPqAyvI7GiXKwZGGvDLNQNfUO/k a5UCh2hRSREY7v9KDawMnsiG/AES9soKYpM6XQ+2b1vk0xwN/bhRG+8WsPvQSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640627; a=rsa-sha256; cv=none; b=Lfi796Rh/9H0dwEBQP5cIkmOwBaRIUxMz79sWOeM0oPseQKpJ9CaumNgmXljiG6eak4lzf PG7iWDhnKcVjSst0iXcY+lwPXo44V0Tav4ZcwSsw0fq+Tbq7Dvl+6I7VrRH3Pz/64sAqYI SpHlvAVftSeD/lDdEIg/0nCgfPbBluAW2dW5sPPOwbBrDy7qMl7+JNLzk4gJRrixvaNna3 /dH71vLzWDAIDyE722Q8qgLxu/+gYAhz3JtESdX7FwZ5cr97xEn/eCeWotnWWPVdS+TVxO SfW+l/xUXhyB9Zp0gIJoO/E80ES0R0/1MQnmqUdoF2fpW9kbR+WYvf+6g/uEyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cncTb2v3lz5Rg; Thu, 16 Oct 2025 18:50: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 59GIoR9Q075339; Thu, 16 Oct 2025 18:50:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoRpL075336; Thu, 16 Oct 2025 18:50:27 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:27 GMT Message-Id: <202510161850.59GIoRpL075336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 77a00e86d64c - releng/15.0 - sys/rpc: UNIX auth: Do not log on bogus AUTH_SYS messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 77a00e86d64ce6af066099345cd2f00f9bc2ca82 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=77a00e86d64ce6af066099345cd2f00f9bc2ca82 commit 77a00e86d64ce6af066099345cd2f00f9bc2ca82 Author: Olivier Certner AuthorDate: 2025-10-14 12:54:55 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:48:24 +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. Approved by: re (cperciva) MFC with: d4cc791f3b2e ("sys/rpc: UNIX auth: Fix OOB reads on too short message") Sponsored by: The FreeBSD Foundation (cherry picked from commit 2110ae0ef9d6ca8cf52b29fcaf926c4343f56826) (cherry picked from commit fb8a978ebfeb5522123e3afcbcd5dc36591dce31) --- 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 Thu Oct 16 20:03:17 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnf5d2MfJz6D4BV; Thu, 16 Oct 2025 20:03: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 4cnf5d1sHZz3TWs; Thu, 16 Oct 2025 20:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760644997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMdC43xPX+7W44bsAhIgE+dFYhAALK0T+qT26215vRE=; b=qCEIYnMMQgehqrBjr0DTNFfF+NvLceICKSTSv0h4kuyuyVokByNv0IWqGtBeYccqL/t6SP 5VJaA++KvF4Lrdq7fzsOtHmfdc0NFRh+mhQ1yB53Q6gY5qwzQoqqz6GIXKPXOeZ+OYqE9l +iLL9fV1m8HVG8whWRBn7rDMp1Fuu5+ZM+GDaDjn+3tCGzgAl5CbrhDrKa9fGrhtP2n9Yc 9CjwPylSkKXRFa9XknM4qr8UhJmrwa09ta6w88HeXH+804i6GaIrIy+AStqgiQorY5SCUa ZsXavwNf45m6BqTAl96txCZZMHqltXLDC+fmjf97YruK44eLjhoHbnOHdKXw3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760644997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMdC43xPX+7W44bsAhIgE+dFYhAALK0T+qT26215vRE=; b=mY4HSjLNRlDbl8Pe4eP+Bdc/6yruX6JXq+iuI7PYCNlUIBAiN+Xl55hCT/qrGmdiFJx8rK OxG3el99juk3fNZUeijf7k0N4Su3uFDHuIiH4VBami4K6tjXh4Lw8xMa+if2I2hN2WAbnm 7zOrHj4y43WVjC7OLsU5t5sILlEmuRWfqOZ5kRZA5rBICtpbGmnOehUORmzp9fLGmSRMA1 2JMBl5nLAlzGBtZs07QyBOm3LEA++9BBWiFIv0HxH3HftYIomm76iVnom4wjNs34xM+h3x 8HwcWzXyILPg/bFghECc7anQM5Qh3UGUOyj+ql6w8RyZN0jtDa0wG5+0HaVtJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760644997; a=rsa-sha256; cv=none; b=Il7aBXBEArqPr9yJl/umGgEeyFOi2m7gSl5C2nKmGzPGkVq3HyQh9USvrz0SRtFwHAFQtr Zxlu9xPF+8EiVJOTiNgZ4qbs03ZdPZaSdXciembb95QJnYvlK1XNmCGifyof77+oZPO45a 3yOWpy7Lbeb9CpGVFMIDyNirbOfMhOebqnHSymVm/39ddHh6TSK//70FiKelAAWB9e6RIq EyBVAAkGX08zNYBHTHTWgZCot6pGQzfIlXmKK04r6/9l1UPfMZs7NETH2RINIrj4rGts/6 x+WoScsXHH3h5Zl0FYXCasCV1a/SgAmrxatSgUhPHNej86HXn1wBkDecQ373vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnf5d1ScMz77l; Thu, 16 Oct 2025 20:03: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 59GK3HDO016708; Thu, 16 Oct 2025 20:03:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GK3HD5016705; Thu, 16 Oct 2025 20:03:17 GMT (envelope-from git) Date: Thu, 16 Oct 2025 20:03:17 GMT Message-Id: <202510162003.59GK3HD5016705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 3d8ec3273dbb - stable/15 - packages: Compress in parallel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3d8ec3273dbb9edf9080ded97e071edff59dd708 Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=3d8ec3273dbb9edf9080ded97e071edff59dd708 commit 3d8ec3273dbb9edf9080ded97e071edff59dd708 Author: Colin Percival AuthorDate: 2025-10-12 21:44:14 +0000 Commit: Colin Percival CommitDate: 2025-10-16 20:02:56 +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 (cherry picked from commit 16155cccc4bf42a5a76806128e7ef637f9ae61fe) --- Makefile.inc1 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index d530ca4e9584..21adf215c0aa 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1977,6 +1977,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 @@ -2157,7 +2158,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} \ @@ -2183,7 +2184,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} \ @@ -2226,7 +2227,7 @@ create-world-package-${pkgname}: .PHONY fi ${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} \ @@ -2245,7 +2246,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; \ @@ -2275,7 +2276,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} \ @@ -2312,7 +2313,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} \ @@ -2352,7 +2353,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 Thu Oct 16 20:03:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnf5f4cJpz6D3yV; Thu, 16 Oct 2025 20:03: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 4cnf5f3LCgz3T9N; Thu, 16 Oct 2025 20:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760644998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hMdOg3VCVdJG50vT9l6W0SBovUSzyng30GB2lEZAs8U=; b=YMHUD7lrbiVLuuFA1Nox/k1OtlSjDJ7BfQAD0ZDAdniv+3/7YeIa2xd8x2fa/MgvNTJ/VM aLELo5wbZQmmqG5dce+nFKd7lcaA9hq/1UZ4XXRPZ/DcJYB9WJf7Ia8LEkLZQp5L9SXP+o rwbfvc71HkBTzR3eG0zUbfu4RCcPR7X+wC5ZLPC42qkxrpfmvA2HFIQYwIPDHeRzUbGrnI py8e5mMMxR4ScDGAclMqH7ReKAQi0ObRj2INrgbGeTQTvHidnCGcyAUPEbgnnaiCixqdFW P69BkjrzEEO5tfBUo6rvF1zpJ9xIzVbe+Fx34Yzm8rKe0tEgUwR5L3Gm0C0/ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760644998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hMdOg3VCVdJG50vT9l6W0SBovUSzyng30GB2lEZAs8U=; b=IYGMg2HP/LswD+9PygKA4OZ8QzVWnbM0vf3srqmzFlNcyxvLILT6Me9maELg3QkI+HdFbh iGOeBi/DLn8Vk4h5S8pbliaOo2ukJTZt3VwJkWjDGpvUyObBPtGDTpuvr+kYEbDGSCbJr2 wP7ULG960c3JTMP+RZtADltbzhJTBMlW4YOYdHDNAzvEN+hp59lgdLGo+GikBpyC2NytLt c6eBB3CdR9sRrPdGt/kzsRjJENlAXvmjV9NobU2LhKIGPqBfoa4iZwYR2Vi/JUSpxfrKu1 1xW9W/1EO4kNyMGUPyKIJqsUL5I9lQRJZu5oQWVUCulykVv0DdQ0Soba+G2FVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760644998; a=rsa-sha256; cv=none; b=uD0WT6Ukn2SmGn5B7jh4oMSmvqTYrKm+sytUkfIjVab2hs5mBkoMblsENollFwE4Dmt69G D7zvIn+2n00T/MT6P3Gu5AJVlAknuAKGQRB/z6IykLLYsZZkwU18TGjcWtFoQAXcPUrgnc 4kJXreaptMegNcmYYf0iR8ZRoR3BEycLIO5xka30FAgGGUUQ4q2XZoZtgomAI6EMNuIqTa ZXH7oEUEkho5SqBMy+sfjFhlyTARR2S6W5fpt0E277cHBRclXM4mn931fcvt37EOIZDmYj mFuHK9qXPeJZeq3xkMkwGPy3Oqqf7QUiuWzD93Os0z8i03M0x6hwa6wuExhM6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnf5f2jjTz77m; Thu, 16 Oct 2025 20:03: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 59GK3INU016741; Thu, 16 Oct 2025 20:03:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GK3If0016738; Thu, 16 Oct 2025 20:03:18 GMT (envelope-from git) Date: Thu, 16 Oct 2025 20:03:18 GMT Message-Id: <202510162003.59GK3If0016738@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a7c1d6b72a3e - stable/15 - Ping: Make build reproducible List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a7c1d6b72a3e3b979d38ad1ad706cc0d9be927ae Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a7c1d6b72a3e3b979d38ad1ad706cc0d9be927ae commit a7c1d6b72a3e3b979d38ad1ad706cc0d9be927ae Author: Colin Percival AuthorDate: 2025-10-13 15:58:10 +0000 Commit: Colin Percival CommitDate: 2025-10-16 20:03:04 +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 (cherry picked from commit 3c9a2f383fc25cdffa80c1348cb5388290e0f283) --- 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 Thu Oct 16 20:08:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnfCQ5Mkyz6D4hL; Thu, 16 Oct 2025 20:08: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 4cnfCQ4rTWz3V3x; Thu, 16 Oct 2025 20:08:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760645298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nf/rB1nYCF6Qmv7O6VaazoRcxH+Pb4JBRQaLL1FAM4U=; b=m/OGXEa7hPjnMso1mwmP2/g/3SJGb+8vKN2GeyKBNqe8wES5eMpwn5LMbUi6jp+NVaR5j7 ThX5lAGxGXoF3iIj2A0wzhi3tB7t0JnmKrkmCR6jgBqdwc1bieNGqZlMKPO410zAfO8SJF bgcYtHcb+Z0bnn22csw7GHJEdT64v1X9EaG0Wta5ZEUjobcXltiVCS+pM5Yza+ObVNw7vl uCKFRgr/fIiYeKj8dZYH0z/FSLvxhdEl9fjzVBhGfpgLSY1Zsi2t3cs8hKbbCNDqLtsr3E dL3NlXcCZUV/0VqNqXJxeS0TCLWcFW6GsXT7wkUme2IEkAWJOoJaiLaOWSE7bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760645298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nf/rB1nYCF6Qmv7O6VaazoRcxH+Pb4JBRQaLL1FAM4U=; b=P5uRnsTqydV+qmcpJ3WStqQJZeNl5k1UMs1HTKOJNp2p3NYZtR15Y2Mj70Y/SbsI12ppbN Qrwma9M0vSL0A9XadmvhnKSiGQPv/LZKwQVcnFRmwzdhj6LtqhbM40kfMPKQinnL/a5GxN bp7TgwCZeJXGjh1O8raEh5KSFbfzX7CCuH251KnpoXa0emYbGsIDQQ4npaKQ/odjfvLYy5 dMHa2V2r9w+diqJpnxCeRyIm4hidzJ/li9cfA72ebo4GVNoQuDkCTFz4KdRHx3wPGeP+oe oE4wc7q98woeHD6vbe4jf3HYNx0S6bvW+24DoeXjWDkYXJKufWQvrNIBIqfrVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760645298; a=rsa-sha256; cv=none; b=SRIsdaiHRtaxuvNHWiEgfS8NmB5jFlRutMTm9mvBfszg2s8z0SUy8Jt2saddAt57OWdDKo XaJHaBdbTbSaIb/m1OccIFvqM6LA0z6TOj58Y/Tv01j4aC/fs4LMC513lr6PPqMjyzIa5a uOd2/mxyP1hirPTw0AvXsBDPiqW8ssHvXY39TY27RORhcYVu0q27/c8kFnyfraCCCXpD2N fddMftsikfRs2QasLKYpxUuEHyyYtj96hUlwGW7qE0N/6WM+rxpschUR5N7ZUCzTGF0Q5B 4QiPl+EtfqpVBt8+M2c6CzJsdU3nds9BlaNM/oYMWcjJ8FnuT6NY93314DzDew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnfCQ4Gv8z71G; Thu, 16 Oct 2025 20:08: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 59GK8IoU018308; Thu, 16 Oct 2025 20:08:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GK8IdF018305; Thu, 16 Oct 2025 20:08:18 GMT (envelope-from git) Date: Thu, 16 Oct 2025 20:08:18 GMT Message-Id: <202510162008.59GK8IdF018305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 8f5eb720e2e6 - releng/15.0 - packages: Compress in parallel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 8f5eb720e2e67446fc9c10ab61d0069c356cd73b Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8f5eb720e2e67446fc9c10ab61d0069c356cd73b commit 8f5eb720e2e67446fc9c10ab61d0069c356cd73b Author: Colin Percival AuthorDate: 2025-10-12 21:44:14 +0000 Commit: Colin Percival CommitDate: 2025-10-16 20:08:05 +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. Approved by: re (cperciva) Reviewed by: ivy MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53053 (cherry picked from commit 16155cccc4bf42a5a76806128e7ef637f9ae61fe) (cherry picked from commit 3d8ec3273dbb9edf9080ded97e071edff59dd708) --- Makefile.inc1 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index d530ca4e9584..21adf215c0aa 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1977,6 +1977,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 @@ -2157,7 +2158,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} \ @@ -2183,7 +2184,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} \ @@ -2226,7 +2227,7 @@ create-world-package-${pkgname}: .PHONY fi ${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} \ @@ -2245,7 +2246,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; \ @@ -2275,7 +2276,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} \ @@ -2312,7 +2313,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} \ @@ -2352,7 +2353,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 Thu Oct 16 20:08:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnfCR6snMz6D4YF; Thu, 16 Oct 2025 20:08: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 4cnfCR6JKRz3TvJ; Thu, 16 Oct 2025 20:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760645299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HeYy4wp8jc3XgxGDN9uj5QBbbnivsNTqtZRIhJejUNk=; b=oZcE0rAElLaw/qVgxhY1irK8frnE2hhnLi4cLQYARXKIPUgDzoVb6Bl3DBVqXjlfGFoRnb Kw/+m6Fv1yUH7tgPZCqP/OBamnAQs21sLoauaLI6pzxiD1SjAy4cKrOuip9NGvkwnmM4ei eebKNlbgQo4J2b5aKHk+xg5Oz3JLA5tNxwuY8Gd4yMdS/dEPRWCeVpv7ckGzYHaAZPi0gY 2N8me6iNcxt0CQVFVlntFkUHGNoIBrKuPbI2nZGKndUWXMteIUfRCgsVKOU6tN/Sd8mkYb 1EcTkRl6RdCJF8J7CD3OJNGjU4pU5HdxSGj2S3P3P/hG7D27AYQq5iT1sZNpjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760645299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HeYy4wp8jc3XgxGDN9uj5QBbbnivsNTqtZRIhJejUNk=; b=yHzAxd7c99etZqJmEV/otcZhAP+Pmfic7GLhDKEXVTugoR0DLmjjj/PlP8t24YyhF4CKQR aBZnk8R6aN0If5vndxkrRDdxdgQkKNf/xIYQP3zbnflynKT1RIDDW7H9dRmw8FAwr7AJGB vJo9dKAVJSAp2u5zL1q8W3ebfxcKWjNVCk4uR0NRqBQnj051YzlWn67fJ8AnoNIXyD25OX qfl7wT4VW6DrDXTo2CmY15TpiatfRt+U3A81Ehhz1veDhuFlbdRUxELdIbDiXLoV2bXyXQ rHjbmEJDWew0rEhX8YHmV2rHiySvyZOnRqsoHe4QcBfFxcHzEYBr5fWaDqPAXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760645299; a=rsa-sha256; cv=none; b=q2oBsTO635NF5E+v7fVLu+1RpBYRTyWUSuiOIbuPgACDetVwyctdBNOSPBXwivqmu9q5Iy XGdXQMFM5mthKjCv6zBb+9Br6ZnC7Ynp3dTmsB8e4274JSzQSKiNOGDZEdc0m+urG+Fddd kWqniUtgPxs5NmLOALRBTa8AXdnXGAGC7/T8uuPOeePdneeS1I97C8O08xggiGY1BKQRzo sIw6EB5xGgX8sg5cxbVTc1giUlUBzBlcwRGQ81/T7TUKhSu1RidvDjX/MP1ALNPekNF0JF LjqpWZVwC8xDkJJkXKzejXYNZDXG/Mw2lIRmMo6mG4iLJbrtm1S0CRSthju/qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnfCR597Mz77p; Thu, 16 Oct 2025 20:08: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 59GK8JJH018340; Thu, 16 Oct 2025 20:08:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GK8JEt018337; Thu, 16 Oct 2025 20:08:19 GMT (envelope-from git) Date: Thu, 16 Oct 2025 20:08:19 GMT Message-Id: <202510162008.59GK8JEt018337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 6fc227a68bbd - releng/15.0 - Ping: Make build reproducible List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 6fc227a68bbd12e070ed92985057dc933f4801b3 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6fc227a68bbd12e070ed92985057dc933f4801b3 commit 6fc227a68bbd12e070ed92985057dc933f4801b3 Author: Colin Percival AuthorDate: 2025-10-13 15:58:10 +0000 Commit: Colin Percival CommitDate: 2025-10-16 20:08:09 +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. Approved by: re (cperciva) Reviewed by: emaste, jrtc27, kevans MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53075 (cherry picked from commit 3c9a2f383fc25cdffa80c1348cb5388290e0f283) (cherry picked from commit a7c1d6b72a3e3b979d38ad1ad706cc0d9be927ae) --- 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 Thu Oct 16 20:08:34 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnkW21tQ1z6DKFv for ; Thu, 16 Oct 2025 23:22:06 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 4cnkW15fkFz3y7T for ; Thu, 16 Oct 2025 23:22:05 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-63b6dfd85d4so2474209a12.1 for ; Thu, 16 Oct 2025 16:22:05 -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=FQikBqn8ifO27qaBTRnVv0kXZzh4pdc1Lx5jkpHcowlUcNtfWrsLplotltuEQd1cgo sgSRymuELVQmmM4vVgH9MBHdwiCvOTxg5Y+JD/FzM7+GRAhmFVXEQyRYI+JHMhaNt1Jt jh/7slxc2J1y7N5q50EnexYuOaT1EAKxQHNuhzZ1CnAXRSMQm/r/GzVVz1D+yiVgjr4E K75CvDSsxxAq3cAh3KKMKhOSrMYLZH//6YP74uxYieRbZ7HuRjpdxM5ZT6Yjb3IDZXmM doyyaFt43hVl13ni9Cpt37SvEKyMzaOCgCH4+inO0VQMSLpWe91GXBs5vsBI56AzvNGz QDcw== X-Forwarded-Encrypted: i=1; AJvYcCVZDOUiysQzZtP2cObD/oCa6x4PUCDxm948nbE0FXGStk2QMwrglAR8QN3vUvNzk7PraGZS2t6NGaliVvLSdvW89HsU@freebsd.org X-Gm-Message-State: AOJu0Yz6HMI871tlLdANu0zBvP8SYeNyhwTAyz9UQmial0qM4PCG4Xau 89U01anXzX+xusORRkk7BeoB6OD1oQJIkh+k9yLFmfgFWVfHx8CSKRnZWJveaslz6yxncuxQ8Hw oAJ1IwALcI1SRbD9RJnptybzUX7b2eA== X-Gm-Gg: ASbGnctMQ/ewfzXKz+6Rkp6DnQqo6YbugTh42h24uPhtCJlroZVUwyWgSftcYBEX8U6 NssrG/94EpT3lBd4lz76h4kfSjoK6eucdOZJC1j+9fe7pn+xQDGNV4gcD+9Yb0KvusSkIK/Ynz5 Bdt1TpxV6s0c38+CrymDvTM9fJHDkxh6NKf/4KmeIAYr0gLeobOHchl7wdIZKg/3qRcHS6WMRUL cHjo9Wer/XvhCcc5Mk8vJzNiaUfFewesxc7EeJB+kpp+d0Nw+ZrFyTLOLK5B1Kc3SaQ 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <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: 4cnkW15fkFz3y7T 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-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnkhP0d9Xz6DKvv for ; Thu, 16 Oct 2025 23:30:13 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (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 4cnkhN1jBzz40Wm 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::632 as permitted sender) smtp.mailfrom=rick.macklem@gmail.com Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-b4539dddd99so226625566b.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=l9jXSRDXaGZglMsGMH6FivJeI8eh4NAkjQrLcqPrSDScy/jErx3MwZJtDvP2GL5z6p hNNdGPsMCV84ui2dagsFAxeooJC8tg8ai2SCboS8ITXjzOhp9VMQTdt9ihD65inZDda1 BFDLWHPpohJpVCn1o1LnHnayeckyfkuRcxLHY/7QhpVgz4/8TJh9Aysc7mFd+aDX8FQH YyIY1ADWXkh1SsKCpWHoMWqhhVZ4yYr+c84VVw6gLqiEWI5FM/UsojXbiLbxAhQ2kUZw U8gikEr+FT9y9ArBUQPHhYISJoDldouK/QwJ1YFQMNBEiWvzFuX54fdf1/wma/NA3NcP oV7A== X-Forwarded-Encrypted: i=1; AJvYcCWxozqdnpddE5WqhxedtyLFOfdwMh69dU5GbUYzQsA+e9gdJL4FtGMDjpEozc6HvhmiFu4R2VcSyyXEHeQ9JJMX0Pw2@freebsd.org X-Gm-Message-State: AOJu0YymNHKXD8h+7wg78SngyKHWY3D+h5USj6LO48TA6JKSapFcA4zV mDBK3Pv0RBSOba6rAHrN3mC8atuX6L4CtCPniGTs61OJpCgzRuYnNeHw/1zr5tTy85qwkNe+itT Y76DMbK3zNDSqCsikQ5mcAjn6yTul6Q== X-Gm-Gg: ASbGncvEGo+i+3B2pOcYNsDfaJLSoT65rCRP+yRCmEeWwppigdXZZRZde3pagEvWwNC yLbz9ziapubMDSwAzd2ADCcrp1P9eW8wwUVJlQqhtN1xloXMdklhr2u971meqEU0AArATIaRL8x 3FzIHG13KOoMQNpsjcUjhNZLcp/XVo3c7WyvWkuo0RPx3hNs4L9DQRQMqgvDcmQdrpkoOy8JO8F 5+a8GmdIp2ZuXnHu/gdgBM+qRl2ZpKqr/Fji51yo8sOMYlgadxV7ghsgHM7gRtqX/IS 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <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_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TAGGED_FROM(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; MISSING_XM_UA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::632:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4cnkhN1jBzz40Wm 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-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnlKJ6TxJz6DMqb for ; Thu, 16 Oct 2025 23:58:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) (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 4cnlKJ1f9Gz42KV 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::f2d as permitted sender) smtp.mailfrom=markjdb@gmail.com Received: by mail-qv1-xf2d.google.com with SMTP id 6a1803df08f44-87c13813464so23833516d6.1 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=eAUcN0vBgQ6+Qwvz2N1UgfujpeKxyj0M4t0Exzh72x8G7fzwK38yAvi5cJAXkosuFk a+30ZU4mU7IorltVJA5KGSG2h2Q7Jf+Y2V3rsYJB4vomtlWP5ylBARtKU7/hEK5Fpg0u UafWDIRjieLY9dP2I3zG09iWfZmZiM9gz6AfVkQZ/8NACuf/8E62Yw0HuLWoRJs17bfK n9yiQmU5x0fI2G4oOYSRGWfouywJQmX3iUb973JdfcIZARtZg0ILsqAIVAbOpJeGP0ey 8GG4qGK2t1Sojftk1aLkm+hVSP/BTUymE09156+773lxnt9PXuNK3mxsMrvWynlkfqsN D+5Q== X-Forwarded-Encrypted: i=1; AJvYcCXSy/lxd9/BVHM3UiXlFLw7LXAxsHsidPAcd7HLoeCMLHuQ0iWoZ49sDcJP8pkZQvr/XZe4qOllrqEmLqvYQmeOEdaZ@freebsd.org X-Gm-Message-State: AOJu0YzI8z2vXsiImEWT1LDGNoZWi1lzGWnfpzQp30EIr+tILzBFoH3w a+TiXV2mfzCR7xZfsuoLmfIQc+nW5iMepn9xkmaxM0X9noo3A/fZkGg0WS+ZHz9OCp8= X-Gm-Gg: ASbGncu7XDrB2AAEwIwQBtcKtwMnf7qibt0bkCQrdebXyiv5NOW+c9JsHGmiE/Hk0sq Ux4C0L/hX42FSE62nZl41foDufFZoh1JQIakVDXsjM2UTcMXuUZse7IEvbCeV3/w0LYinDBeJOs byDwU1xfQ0jpEahNT+/pZBQ4wNpiPAuHZBuDu9m89CEpVZnNMWPPOz0FpdTJkcFkX7398NJXYjA vufkZtIL+kugFsUf4rpF77KKzIXOYItgRhu2eUdJ916/N2/tirSw7JWJ0lDRJkyEyL46Ai9mQz5 hSHqKXoR7DTyP09BXPTe1Mq7TD5/f4H3uLofzqX6pY6+YsrHnK28/ynpEFMWpJ+ZlbBIahNykPj utngNXcclUgFgxaYlfUNYaHg+h9hb5YnGTmRwkLZjyP2P8qYJgCVPYmpjWQ/vxwn0/UfDcwZxHw 3GTLQfEJITUimB2A== 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spamd-Bar: -- X-Spamd-Result: default: False [-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]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), DKIM not aligned (relaxed),none]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_TO(0.00)[gmail.com]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2d:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TAGGED_RCPT(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; MISSING_XM_UA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4cnlKJ1f9Gz42KV 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:17:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnn4J0TTsz6CFGl; Fri, 17 Oct 2025 01:17: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 4cnn4H6rLHz4BG4; Fri, 17 Oct 2025 01:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760663856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V2q6xh1Gw09nu0rpLpAJwDNbVzLg8pzF6Vmg4EgGoLE=; b=MlEyQntzfh3YUvdjQeq1sAk14n7vmfQVX0NcXEAvHynnCTzcmqS0yJswUrNOC5zYemSsVR UmsJQzGhllZXuaWzLHDHvV769efRIni/16tbm4gvEA6qIX8Ik7npoHHuqRGyFebj+xR6SQ JybPx/+TXeOQR3LgpQmV0SYr3ZpSk4qKEtwfC19IjoFXBGbRAmqIb96oVQWIIgqogjQS1y EK6PDP/sHHvoJJwp0sd+u8f6tZxCk7tueASRAtSXHyByy163/rZb991sDdb+AHY1PiLKuA jWakahl8o6+ZpGQC2EwShMjHw5fwtdauS+EtibFNwJQ8yP9Kfl7h1L4JvUUEaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760663856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V2q6xh1Gw09nu0rpLpAJwDNbVzLg8pzF6Vmg4EgGoLE=; b=ZkFuYooz6q4HoqSYsJnkA5ZGoh01lxI7By/aRFMGflwJ2gvzjjHSc6RTb87VaHVnWcIMxj PEmMrZlHjN0vFkSC79NKRrmpl8pqInloPYqsmW3F1dW8sgkI6NJwTAXF0rbvoYFWzFUUGc Bc4vO//3ypz1pdL8MihPu0YXT/uMWh543Ku+rZrhtEAbXaDXnmdKamwQ2fqtG2xpZT1gWW f6p+qiSDVquEuvtYEslfopqoFrpb9jj/UWI7IaFfXHINA/39f4F1e8j3EfRzU1fz/N5NBV 76sp4lNu9ziUO326JWh1pYMJtM2eBTMuQ4QRkwcjBZ1Xr8mQtZ3V+03mp3wJgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760663856; a=rsa-sha256; cv=none; b=gBjdRXWEMi+i7vhniroUZYQeAdssQhwiwgQ2pZ5AZVDlNXFiUiNzAdTqMBMZWPc9H1i7P/ 1Wbw4lFd1Kwiee5TR32i8y/x5lETXdk8su5+IQiJopaJvva7IV4NgDhbsY0qhRol0j8BXm Ejqn13VjQfCSEntB6eKSTObF+PNjeJfus8bT3+UVpOHHG38rgasADJhOlJkhLX+UWs/ZCd dSPWveQxpfa0AqnylpLlrMY+862u8tXSwebtpG3CHamdDEdn4GTR2VHgFxZLwGwtMbtbBa E8RPdUlayRakaJN92jxDBmw9uyjoNjlf90dWocXsnZI76x5CN9YGI5KQEOAKEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnn4H61dkzYqF; Fri, 17 Oct 2025 01:17: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 59H1HZIP000695; Fri, 17 Oct 2025 01:17:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H1HZqR000692; Fri, 17 Oct 2025 01:17:35 GMT (envelope-from git) Date: Fri, 17 Oct 2025 01:17:35 GMT Message-Id: <202510170117.59H1HZqR000692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: dc5aae134a44 - releng/15.0 - release: Switch back to latest packages for now List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: dc5aae134a44d18921e179355e9b93a7eff534ed Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=dc5aae134a44d18921e179355e9b93a7eff534ed commit dc5aae134a44d18921e179355e9b93a7eff534ed Author: Colin Percival AuthorDate: 2025-10-17 01:15:15 +0000 Commit: Colin Percival CommitDate: 2025-10-17 01:15:15 +0000 release: Switch back to latest packages for now Normally in BETAs the DVD images get packages from the latest quarterly package build; but aarch64 does not yet have a quarterly package set built for 15.x, and this made the BETA1 aarch64 builds fail. Switch back to using packages from the "latest" package set. Direct commit to releng/15.0; will be reverted before the release. Approved by: re (cperciva) Sponsored by: https://www.patreon.com/cperciva --- release/pkg_repos/release-dvd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/pkg_repos/release-dvd.conf b/release/pkg_repos/release-dvd.conf index 600c309d5979..c2e64c43a56f 100644 --- a/release/pkg_repos/release-dvd.conf +++ b/release/pkg_repos/release-dvd.conf @@ -1,5 +1,5 @@ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", From nobody Fri Oct 17 01:30:57 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 01:32:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnnPH4RZ5z6CGFM; Fri, 17 Oct 2025 01:32: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 4cnnPH3z8Mz4FPm; Fri, 17 Oct 2025 01:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760664739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aJYLk+Xw4zjWdV+mwXhihdgsLmsDvP3P8vger/WTLtY=; b=O6ucoCAezdOUlx9sbvqBDkrK8heQcpYYlCv6N4U5FwcEz8nieEhRCj2Sxu/zTBRwOTx2od U3dme8RjdwtvPGOjTWnq5VqtvcDB+0aR2Bj4q3GLh2BPXYKD8WakmmiTdP7Zl7wtY5K+13 PBQLZnOiIURSoSw2rT+6VphX4doDrvitLFlaUCoe452WBcfZQ3HjHdXqJsf9P/LVVd6445 a3+ziA3ixZTj9cTtkl1ys0we/adZvzaTgW7N4SJgAI2061J6hBuN/KaWBrAy/s2EgTvbIO NM6dM2ZUZW23rcppd2/yu/q5uYrHujP6APBsGTrxVvz5D+A0y19ZhMf715jz8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760664739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aJYLk+Xw4zjWdV+mwXhihdgsLmsDvP3P8vger/WTLtY=; b=y0G51whgXgo9rl4fzZUXn2D9lTOUBP1BiHNIGyrzmRwhibXNppTbfDTVlLOyuaAZ5cI7mX TcYtDfJj1jr+xRsRTB+imqF7jNKf8xhCNGkYYFnYv/rIqdPNxIvitfdW7K/YTk6+OIEVPy h68bekWAugmUpoWxAsZjTAX6M/BYzTKGEXTvdrbEdLwKF6dgTnfohE1cWIJOGzeY8+BOEW HOVe4RiMCfazcjRFJpU8B1PLcplv8tLP3Kg8OEEvm3nnUTJ8vTEK1HyIu/fbOx87ANLcSl Q5zhnrT9YIsHY8I6s6ney0dIaj4ti3MTK30+2liU1/T44hsPXtkC0F+AeFfmIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760664739; a=rsa-sha256; cv=none; b=DqC6j2SGtCfOPoOIvn2fneVXoUPpwa0mrhqCh4v2uemvH4JfPtLMfS4jasR+gczrIlE6P0 q2i78NQHd1W0h92lq46xXl2v6xGcYxCdvO5nTcfVSygzrJAVJlPKli/EjfohHpssd62ZJy FUkEIlV+N6hqrYL86K2pfYV07/sMyuO4sdyQoblUi4xFxkgRjEDxZ18bW+kdC3T/gJWmBO JvmaFoeh38V8gL1XLxOkQ67WSsa1WPxVCJw+CT77Mk96qptt5VVtLmqSeDrgp06FQfScv+ Nu7y/lQ43pMV8LylMLESP/+hq9jAlLdR9kISLOdNPQ2D4Wbz4gby2B16j3MqdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnnPH3R7YzZf8; Fri, 17 Oct 2025 01:32: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 59H1WJB5036699; Fri, 17 Oct 2025 01:32:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H1WJBj036696; Fri, 17 Oct 2025 01:32:19 GMT (envelope-from git) Date: Fri, 17 Oct 2025 01:32:19 GMT Message-Id: <202510170132.59H1WJBj036696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ecd943a5af7d - stable/15 - pkg-stage: Correct /packages permissions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ecd943a5af7d8cb09f9418a8a4d337a72c06fe22 Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ecd943a5af7d8cb09f9418a8a4d337a72c06fe22 commit ecd943a5af7d8cb09f9418a8a4d337a72c06fe22 Author: Ed Maste AuthorDate: 2025-10-15 13:04:58 +0000 Commit: Ed Maste CommitDate: 2025-10-17 01:31:29 +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 (cherry picked from commit 2db11dda840c4889aeb719761cdafa62730083a2) --- 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 01:33:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnnQc6b6sz6CGCv; Fri, 17 Oct 2025 01:33: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 4cnnQc4CzWz4FpN; Fri, 17 Oct 2025 01:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760664808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cITFbziyP1gsbsjltySPOZpRg15ZB0Tiq1LkM//mZE=; b=d+wApNudBZXz+Az/O99YohS3wNW3eoFY+yx+ZZSt83cGYEjhiu7kYQrcr7ddlJ+F1cqFbI e1o+UYAGUYdyuBCnNS8SQeVxph/TN6D0t2E6cyZFwifDUfqc3g1WO1utz+DImdDCkWdQGm npfyKzDPPUp9CZnGk5+qqne3FiIdhtC58SaqisAFnbXeXaIhGcvXEB50l8QuCHn00Nj34H YXxgjJe8EahO5HRWQMaYlBJG6qFW4sBmnv6DhdAQ8SxtUeo3r+2i0/Vuam57EhFqWU8e/Z GXMMHG2Tk8j3zOmGGiACU8DoUDQyVgUh5zYQk4WatnCZ7cGRXNZ3WFZZP8jbEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760664808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cITFbziyP1gsbsjltySPOZpRg15ZB0Tiq1LkM//mZE=; b=iCCSsyheRY5kOKYpsebkhTs/1WqYW8G2lF2Yjo8x9MedSvz/nBuDxQmZohc7YtEYDc7CeL fGh2qSJ9PLoAk+pHEYLW0N2J4ZGel8BTYMwHAWg4CsEi1uj20+I9bUTdvRWZ1mHM2QslHG jWra3IXqFL0dvxqhjZfekuUQhBPVzz6583ybLxG25SOu+B3AtZFCnj5h8x/ZY+FMT7+pWA ZraeqCjrwKEr31yosItP0y1CAyd4/Grrc62X/Edkj2dOtinM4UFC/UL91pgs5JhOWVBPSO z+JqPgpPmvsQ/OFrUSmmASQtgBGofNkZ9Dp+1/O1CNd08Nqa11J5FRF/raRjRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760664808; a=rsa-sha256; cv=none; b=f6FdBZ7ziizKTU+JZm9Gsf6wlqKkAWEeashpH+DVfOjvpIyGvSqOVBOW6wfbhSGz8FYz1C CTGrcka+ccdataHPC9s9jvSeGSrA5udGNt6BWy6q4CJzDj7sWkvvYc0AGruz9F7pVYwfsB 94eR5wngcfgusJwFe00efWJCnjgsvjuV4cTM7B1QTxe05VfIjrQ79qb/9Q1+Q7LD9xWyNP kF6baxIM9pTZxB/3FObdMW+62gKtfrlYOKJ5szkmrXa5VaS+09L8MRK36yWiGehQghrztx 6Sr0Z0by8yKBGdacmRXT6CyhIjYAOvhQwfq8NlviLmzZyFqXOvISodKkGPwHfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnnQc3gH3zZS9; Fri, 17 Oct 2025 01:33: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 59H1XS73037206; Fri, 17 Oct 2025 01:33:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H1XSuJ037203; Fri, 17 Oct 2025 01:33:28 GMT (envelope-from git) Date: Fri, 17 Oct 2025 01:33:28 GMT Message-Id: <202510170133.59H1XSuJ037203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: b5d5181d74f0 - releng/15.0 - pkg-stage: Correct /packages permissions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: b5d5181d74f0b78530df8b94a7248a409c3ea72c Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b5d5181d74f0b78530df8b94a7248a409c3ea72c commit b5d5181d74f0b78530df8b94a7248a409c3ea72c Author: Ed Maste AuthorDate: 2025-10-15 13:04:58 +0000 Commit: Colin Percival CommitDate: 2025-10-17 01:33:12 +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---------. Approved by: re (cperciva) PR: 290222 Reviewed by: cperciva MFC after: 1 minute Sponsored by: The FreeBSD Foundation (cherry picked from commit 2db11dda840c4889aeb719761cdafa62730083a2) (cherry picked from commit ecd943a5af7d8cb09f9418a8a4d337a72c06fe22) --- 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 05:47:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnv3r1hfXz6Cfrm; Fri, 17 Oct 2025 05:47: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 4cnv3r10nKz3SYh; Fri, 17 Oct 2025 05:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760680056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJeN9jxm5OPEl7+a3cSa0ojqJfC2+thZVk+WmMOM4v4=; b=UOOfbUOvHLj8/kVvDGkDiNrCcL8Apib67gXCfR0bSNinhI1Psumn8zd7KVp0YekX2+0E4V YkzlF60ktfhJvraARR8QlgH2Un/JvgM0cJz1Kqa36GoJ2jLuBovFxXMiFvUCI00s2W+9ta thHfPK5/7keL8i7rjjohZV+y+EtOPv23UQfFZ+hbaq1s9Kgi29bB7OWBwPZh7/4YYijQeT GBX9DGh8xNag68J6CFW0eMD2Uz9DRbLYNj8BVS3b2/YBlFagwbpyGOZV28ZH3lMIzieruY jSlhcKeVkslcqArIov2D2FqS237ojud95PhKgnwPLXVORkUIIZ33ScEB6PbHPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760680056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJeN9jxm5OPEl7+a3cSa0ojqJfC2+thZVk+WmMOM4v4=; b=JzwVxN+ulB3DOsmSlzMwS78CwXPxp3q7e8HsTe/yngcJxySp3XK/nPxuECoPbLEy7xlP5S d+hXY+0HP1pb7XMvXl6/OqefASlZ4XOhkdAJPmuWYyFNoUP5lce8IQtiqZHsvOxX4ajV2t pKxhonexeSXY64L0T0htoOkBazW0EVo6ikPfojPpE5JZzWmeDPoTGXQHuC0Ter+PZKT+zl Xpkw1Ae+7tSNobDuzZHYboJqID2HIYTdq6bLJ/7gbrxBOJVIsO0HuETnqrw0/k68G1L2bW WbXXOl9hu5oKrJVqP6QniqTtb+EsfwilFN/FZTOZPxodKfdqeM4l4/x+XLAwKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760680056; a=rsa-sha256; cv=none; b=rF4uJ4UIJ3ijtz+/TTLmdyCk6uanfBylVNCOJdyoQ46QRaiQ5Uj3t4pw7YDnOo8nIwaJyg QsU1Bfko9LQiNCGKiAhIdT4hBMIHhkGaz/SsCeJ33vz6eqj4c6oCj6F3n4ti39zJNUscvi KVNS9E28RLigYzlJtJkJE5xPzbEW1wHbr6Ruz+eyJdCROumo2ohu0u1Ctt56Gcq4Qchhex 1vBrA9QCbp0Xx90OuOeHLw+uMK3LNNO5so7FdZUhgCN8OhrzduMrL5L7jD6GHtqecGKUMy 6+bercl9QIxhyuzU445j3PizyXZHygPhyo9irZRh5ZGfMooCVW4kFtOxNYjeyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnv3r0VGmzhb8; Fri, 17 Oct 2025 05:47: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 59H5lZHl010279; Fri, 17 Oct 2025 05:47:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H5lZwQ010277; Fri, 17 Oct 2025 05:47:35 GMT (envelope-from git) Date: Fri, 17 Oct 2025 05:47:35 GMT Message-Id: <202510170547.59H5lZwQ010277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 9a0a114b7f10 - stable/15 - sockstat: show path state column only when useful List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 9a0a114b7f10c9510f6e2d4e5d1c5e40218f383b Auto-Submitted: auto-generated The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=9a0a114b7f10c9510f6e2d4e5d1c5e40218f383b commit 9a0a114b7f10c9510f6e2d4e5d1c5e40218f383b Author: Michael Tuexen AuthorDate: 2025-10-09 19:16:38 +0000 Commit: Michael Tuexen CommitDate: 2025-10-17 05:46:23 +0000 sockstat: show path state column only when useful Showing the path state column is only useful, if there is at least one SCTP endpoint shown, which is not in the state CLOSED or LISTEN. Don't show it when it is not useful. Reviewed by: rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52986 (cherry picked from commit 746eadecaa7dc8913721cbaa9be4e603bd36ea49) --- usr.bin/sockstat/main.c | 8 ++++++-- usr.bin/sockstat/sockstat.1 | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index f0eb83eb3e9f..7fedfd5b8724 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -103,6 +103,7 @@ static bool opt_u; /* Show Unix domain sockets */ static u_int opt_v; /* Verbose mode */ static bool opt_w; /* Automatically size the columns */ static bool is_xo_style_encoding; +static bool show_path_state = false; /* * Default protocols to use if no -P was defined. @@ -584,6 +585,7 @@ gather_sctp(void) !(local_all_loopback || foreign_all_loopback))) { RB_INSERT(socks_t, &socks, sock); + show_path_state = true; } else { free_socket(sock); } @@ -1485,7 +1487,7 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) } else if (!is_xo_style_encoding) xo_emit(" {:encaps/%*s}", cw->encaps, "??"); } - if (opt_s) { + if (opt_s && show_path_state) { if (faddr != NULL && s->proto == IPPROTO_SCTP && s->state != SCTP_CLOSED && @@ -1632,7 +1634,9 @@ display(void) if (opt_U) xo_emit(" {T:/%*s}", cw.encaps, "ENCAPS"); if (opt_s) { - xo_emit(" {T:/%-*s}", cw.path_state, "PATH STATE"); + if (show_path_state) + xo_emit(" {T:/%-*s}", cw.path_state, + "PATH STATE"); xo_emit(" {T:/%-*s}", cw.conn_state, "CONN STATE"); } if (opt_b) diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1 index dabb3042bfd4..d14eb967ad0f 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 7, 2025 +.Dd October 9, 2025 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -205,6 +205,7 @@ 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. .It Li CONN STATE The connection state if .Fl s From nobody Fri Oct 17 05:47:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnv3s3rsQz6CfyQ; Fri, 17 Oct 2025 05:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnv3s1X3Pz3SkY; Fri, 17 Oct 2025 05:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760680057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dT8CADMyLa9uZZPaTHyhSp7Up+az5L7bNBhvFCY3O+I=; b=MPc3Kx1YOB9pgs/OZ2KiSDrAQo5p7k4NFihWQ8L7EiMon80GARyQsDYqwtaXABAIBmidOh zJ3JDUubG9WUHJX+URk1irfudDlCGX99SViCzWv2kUFmwyUngn8VcnSAFVeL/pW2z1Kqut wVdiz79tOwetvLgC1KxibP1kBmEfi9KOFJWrf+UTygGEdjb3m43fTOUiGo8bDo79CZSzhS YBtRzOv9LGYJt/ejlmEwLWcAFqiynd+QK5Qk1+cqKcpJ15GUDAegzyTxjxKWJjw7YjxSHQ 9U9geiH2Bw4M8I2Wab5kpCHhhLTMuLpwTkXTUi0cw0ZMcW5liZ7HRg1YcMqczQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760680057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dT8CADMyLa9uZZPaTHyhSp7Up+az5L7bNBhvFCY3O+I=; b=oTR0LLnSWXmgaa5NCBtQWyCwPwyM5xWupUM1et2ttp8OuXdEmHejiHp4waIeWxLk62avQu rMo52iKuePofBjzNGwHd0ZEPKQYWrXGaz66pXKtXFKUQumf/Smy+utRlxonaMZep/mWx/1 U7JeNn9cWlyLvXlOVY3Em5wozRkNInjfF8l4wW8qySW4yNoGrdmstmaeQhwCJFosc74TBR iIw/U3FEIq45PpsZXa9xBz7aW+sD+c0dc0xFp3uaZgk26G7UBvA69Zdbk/3W2RmZFClkvh Mc/jGO+XDT68GoG3sF8dMJ16Rv0UlRzSbfp+qMvMIoCOLFP5RmatldFjEVgobg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760680057; a=rsa-sha256; cv=none; b=P4wdKlUh599sVDdD5oGYp8atMBA1Js/Ydv+MpOxPVHL2k/8r3g6p9xVYyaKHy79tF6szke 7ouGRDYDdULYCu99I8EFGLbqjPCT+xcBloYI4vqXg1T+smL4y5x3c2mVIxhB19qB5lEOAF QqyRp1tNNetDKc913PomlA39/bw7yYdSra0WkeyRpPx3/QFu0cMYYmWm+35xDw7CuJv2xW 0HupsztgxBYIJB6XAk3DpkCbZPzsXp5/klxGnelGiFPMQRxGYjOSCIlRxhpWip3IRfu/4e 3Kwn2OGVn98T1YwjzgcGaLJPzIAbIRRB0gpvU4xj866vM3llFImX/bY3lhvmLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cnv3s17RDzjGq; Fri, 17 Oct 2025 05:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59H5lbJI010313; Fri, 17 Oct 2025 05:47:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59H5lb6n010310; Fri, 17 Oct 2025 05:47:37 GMT (envelope-from git) Date: Fri, 17 Oct 2025 05:47:37 GMT Message-Id: <202510170547.59H5lb6n010310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f6923c0a68a6 - stable/15 - sockstat: improve handling of path state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: f6923c0a68a67d69762e188273f0e87f231ec964 Auto-Submitted: auto-generated The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f6923c0a68a67d69762e188273f0e87f231ec964 commit f6923c0a68a67d69762e188273f0e87f231ec964 Author: Michael Tuexen AuthorDate: 2025-10-14 06:39:37 +0000 Commit: Michael Tuexen CommitDate: 2025-10-17 05:46:53 +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") Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D53005 (cherry picked from commit 97e858f5b335ae8f98619f9cee8ab9a0501cd06d) --- 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 Fri Oct 17 06:37:30 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnxWz1L5kz6Cq3m for ; Fri, 17 Oct 2025 07:38:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) (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 4cnxWy63Bfz3jlk for ; Fri, 17 Oct 2025 07:38:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-b593def09e3so1126533a12.2 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=AXyiPygMSOl+a5DvUIQ/ebjboCh+VSE8WwAP28f3z3mFTmjFdtKneT0bQEpKSCaedr kN0kjbI/gtoYznzSNRBAdssxq52MBKw8SDYvrKupdXdD2yI4bi2IN9t8ATz1sx+vSBjz aeETH/1WWKCwuIc8H+ETokUQLhsQBZzD+iXo/e1uiGCIy9N4fskacUmVJR7AnaqIAXkn LYYybv9K3lPmrBC9CwjJiXL1yUaAl4zgbJGwxV6yPUoKlIZ+8kOHD0EuRmRji8gE++kl YjTJwH2whVTugAOMrZr5/+tpK2B1xRW2kzrRDDjlHrr6ckZExkYqUDCwbIaFSF+8KhlT CxNQ== X-Forwarded-Encrypted: i=1; AJvYcCXEV7WfvpJEvY/ml/9f8KjF5eki0r7szBkLh34BnlM8I1AH7ez+6V+OsFIos5V2z9bClHMF9dY5cu8zSmjzzBMYF+uv@freebsd.org X-Gm-Message-State: AOJu0Yyj+wkT3DJy6II+TZ6JIptIVMhrGfHFzdQJPOoNnXh/aCpgcxeb mBIDN4UVUOMod7yw1nbJMh+olmHsSck/FqMPtUE08o8NEmTX/XQBKmxV X-Gm-Gg: ASbGnctYZsFKMGX147usgrgm8kuB2aiz6Q/1WAs1V8iPocCuDB+zju29PBaOcy5nae8 tqoE6oZtK5H2SUGpJ2NcfJsuW7z2fgUGmWnTamaN0ebSm8jrH4x/b/og/ggmcJpWBsMxscv5h0+ 5XjRtp+ItijKTZC6yqJAz3itMvh4k37eeNmVk1oTQWpSIrGEKryP4peTihANAHow5CcfgCY+Sj3 lCO9Od91C1iYn2CVdzr6nhDE8IIOJDLsmdmGG3Db8NDtnzW1/iEDJt849JhdRfinO79aqv/51D7 RjvCtCBMG7r+jVUUK1Lcjr6kJElruKdpU7LrHrtUp8s8EQwCLe64NiLQNQJueB1SLwcBWg95LSf hkOLvysW2FZORXNYtEKdgABoTnZJJM2IUa2TQj63mkae3BDE97a0WrQJw5b0RF7TN8G/mA+/PHO 6GlgCJxFY+IzmgCTJL1doo1sgK+d6IXpw= 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4cnxWy63Bfz3jlk --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-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cnxXt751Vz6Cq13 for ; Fri, 17 Oct 2025 07:39:26 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (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 4cnxXt5FnYz3k6P for ; Fri, 17 Oct 2025 07:39:26 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-b5507d3ccd8so1328968a12.0 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=Y7cqVZi9gYgEYKGzf9lwvm8nxZl57tBILC7MtREjjeEsByb4YXS6yp0UhpHO8cFH8M juCdFuZlS9VgOZM80HdC5IhERjl2F9LL+4InhnkqCYhRy0sSO0ZpC5qxRmiM8E2ZnXkG eNG7VyGTO5q8hdWuP+DVCFGf0wI4K43H1JsmMfH2qmPKubT8c1qf9RBYexmyzxv9ZiD+ xhGowQkSol5xH0xXkb960HuCYqOgy2ghSH7T/lZiJFe5dpAXULadaBpjhB6D2HW3UQIG CPGsvgQZqqmhUtdW8jIE6bRYJtqdKWgvYmOHJQyZGWRaR9t5Q04eaQQzeyOsKfl/4OKj 9SnQ== X-Forwarded-Encrypted: i=1; AJvYcCX+5cYuQgSKtYxs3hlafUY5+ZOXMQLv8YYzkxbmmYlV4XFRtBwZ6UTIEPo4Ys8iMfO0tynzFatdmSfE8TFI4WsWKu7k@freebsd.org X-Gm-Message-State: AOJu0Yx7Y4wwKcN6Evcxiu05/9U1KFqMygEMvSXp/O3Cqyz8m/9HT9nB JMLJROxBueFhzl0t3gj1XYGReY6U8JXkHYk3AW4icsu9i2PFV2DVVyhUjUcanhUWYlg= X-Gm-Gg: ASbGnctQkwR2Ymnd2Eo0+NKz/9cscwTPmLK1RQZBGZumu563gIVIrOPc/voqWYdwrN8 +I9DKTrszR7UGTUnv5WFiHr4bc4g0TbTJVPLJ1XW2JyiYDveLwM5BMr93JXEdhwIMy4YLLW0X6z x0hFMGlM7Vm3aufPIw/ElsnBr3zKEiVF/Rq4r/uygwH9NB4fwAtdpDbk+Dy6rPqCPDSXrniAplK XcQWuE7WvebL5tcML5imYDIJnb1ed3+m05F/7XRCX8L2HJjlxhJORi4oPIfHVOoXgAPhzKRg3DJ Y5m85f5pTOeoOm/CZy4zeB3Nizlm8bxRIID3ZXgUSupvs85CxNsEUGLSWcQUeucTgzwWMp/hJhO QOqhv2TMeyOMV7rCY8XYhyJ6tnThM9FzPyb20A+vVMYp4rh84ukVFQPqCn3bG6qCTdKfd7WS6iC jkIs0zqu6Kau2I+UxVKtZF 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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)[]; 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: 4cnxXt5FnYz3k6P --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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:13:56 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp6J51J7Xz6DLd3; Fri, 17 Oct 2025 14: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 4cp6J50MxKz3sFq; Fri, 17 Oct 2025 14: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=1760710437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OGyuWdpCoG1rBzLl4Ho8J3cFZHyXQeqFdGniYVXkR7c=; b=qnesI44yXb8HoujZ9/6iwKrUGQj40KaWIguANp6VC5ZTWAwxdf0L4rzhM3PylGV4zhI+MG fOcgXTtSdHKH2qce32YbqcjdsV+Gest3yHt4ikXxIu7cdaoRdNJDAkkkjrAM8bWigSL7d2 O1VVsnL0nYz+UgY/SxwteOuA84F4wCzR4BvzhEAxwRELGDQTglEbyMnfYHoByy2d4bPJHG xH6+0c6ro69Zij67glwGh2QN++80/IbqKXwt+Jp589t7tuE1Z2pnvvmg0keFDhzbMXkod+ Hd7+qOP7f8/3BUeMYaHf+wtSZUM0404O05v2m2vHyBvRL7On2ym6li7f10RFqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760710437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OGyuWdpCoG1rBzLl4Ho8J3cFZHyXQeqFdGniYVXkR7c=; b=Zcyq6LpYkRoMSKPWhNJFv5hee3dKNuZsDRtP7t8aj7UnqEBT1e2ohy9gmUv/O1T6N6gMvF rt+M1HWghrbZu5tdLj3MzkajOiPXZWuTR5BcSOx9+P/OzxmiueeZTvvk57+Q8FFTLFEtIZ jgjCgnQKbKVFExh1SnAG69f7iOIdIbNpmRESkRH99780KdEk1XPf82RrR6iGbGoX6JjhGD IS8rJbi9p7F3vStRdxJ7CwJlwpXg6r3Fc6ntfMIuX6zJ437XcPGddxDX1Hi4LmYoFMrGXU an5p0G4+J4raysj8gFsuz6gfICsjtuYrH0juOTSswOGa8szOpUe6JfyHd4yyDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760710437; a=rsa-sha256; cv=none; b=KpUYKss7zyhGpWYOcesI5D3SavwrWmC2ykAqpJ7QD/7qQ9ODtYg5JVJEj+2C6NPskP+0Uf 9ONdODG4rxKhVH3EDcimRDA1cjrzUJGNOSexf0Subxx/DDQISdijEDbgn0BRzDRszz9Fau ufI/RHOQ2iPMZmbv4L5X4oZ0dLswIfiq8EGw6btjMdelLNbhVSqSCnYdKbVSRq6fMM7e84 BA8KEqoD0TlKaAak2xlBS+rmegf2uFYu1CXFB0br91Nbkt38+FI1FuP1or5omMiEdVkKsK OSt0GukAXo/Es2V59gXlH+f6/fG8WbAxrmFpPiD/qwNe3Dw9nsgLHDCsZabANA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp6J46rVKzyDQ; Fri, 17 Oct 2025 14: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 59HEDu9D069062; Fri, 17 Oct 2025 14: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 59HEDuZu069059; Fri, 17 Oct 2025 14:13:56 GMT (envelope-from git) Date: Fri, 17 Oct 2025 14:13:56 GMT Message-Id: <202510171413.59HEDuZu069059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1de06221ccec - stable/15 - certctl.8: Update documentation of BUNDLE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1de06221ccec1deb338b57c235009e2cd94676c8 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1de06221ccec1deb338b57c235009e2cd94676c8 commit 1de06221ccec1deb338b57c235009e2cd94676c8 Author: Mark Johnston AuthorDate: 2025-10-14 13:32:46 +0000 Commit: Mark Johnston CommitDate: 2025-10-17 12:41:29 +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 (cherry picked from commit ec8e07e8fa94767dceb409c4c7c1840bba39172b) --- 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 Fri Oct 17 14:13:57 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp6J62Bgyz6DLhy; Fri, 17 Oct 2025 14: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 4cp6J60XR0z3shx; Fri, 17 Oct 2025 14: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=1760710438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iLle8AA00s/+UnepSZ15ojvdppJ9bNvnZvfdntL9IGs=; b=FB+KctOmFTgLORYgzHZYHsE57BCG6JpkME2Bgd5gqzIKyMIod2BqDmYtR6/MT+cAeoY/Po U/yOpDVim39sFTcVzK4F6uy+f51/nSbEOYcM22OJzrK0zjVf+TKmQASkNj2/OFHtL5fLW2 zHrT/eGLmII042DFVQi+IfypsZCJSksqnicB5JP7TMASDMzSg7zPSg8studsry6wp1AyW1 GOmBl/GpkuBpSkjYyyfHrE2ODBWqT2UpN82QATZ1t14izVW5xIWN0270fBCz1ydxh+zRzZ wVWUR8kRsfgBzRF7VYC3wp2rdJVkGzOmM3kwuireXewLEPkt1+X52lbkQllijg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760710438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iLle8AA00s/+UnepSZ15ojvdppJ9bNvnZvfdntL9IGs=; b=PVGNo9kVI4TQlTVmLI60QATjBT9rpC8tlWHSboSfp4fGYvnt7V1OMX3w/RX18c7mpHVkWC sXnPqTakLgsJfsyY/I834pyXDOL/yxRhvb7nBu9XsTDbRZXrR67W/SMBF8e0NyqAe0GeS5 kx56K8CQzA3vywBvWOKFwRFzfWSa3pPvvy57AcUaTdlXNR7YV3nK8qTZllge74XxbBYSDD 4Ihb5sozhX7iwofiE7Ha+3FbNVe3rLv6BO8+ZXa9O5vpTVfIiB6+6NfgmwEmMwfUwtkwYE vdnGnlqgl6E4WJ+ijFV0q/hrsdFUlKwdEybO52YChI/m4St0jcU6eT1rFxgeqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760710438; a=rsa-sha256; cv=none; b=V3huyiId0ZM0BQPCCfkP6XlDbvuuhD4k+6bANascic7GdHZ6lHT32sXAxfMiBUl8acZdeF vQpityaE5eFJG+L1uwtE1ONkJQ0C7RXWiQGfq8by/BXKHwOGJr6nplIvO2pugEbHDyJVxi Dr9tVRQ74xQdfO6rGJLWRZW+18YwzotZQvXUxAQgMqF34mf1GaIk3HoJOct8a9HaDT2vXW ymo9DdDmjszDBq1BeTph31hgxdtdTNZZfQpuOL9epoEjkr6aDBKL59ckROjIpvtgv+iA0o omxCMTdj5liHuFOVoNAILBvjAwSjYjkxBFRiaMZxhyi6MgCnXi3jTevWeSo+ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp6J603M9zxZr; Fri, 17 Oct 2025 14: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 59HEDvSV069100; Fri, 17 Oct 2025 14: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 59HEDvfP069097; Fri, 17 Oct 2025 14:13:57 GMT (envelope-from git) Date: Fri, 17 Oct 2025 14:13:57 GMT Message-Id: <202510171413.59HEDvfP069097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 838c8027f9d8 - stable/15 - libexec/kgdb: Add new modules and install them together with debug info List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 838c8027f9d83abc7644f0cc44daebb8b80a7417 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=838c8027f9d83abc7644f0cc44daebb8b80a7417 commit 838c8027f9d83abc7644f0cc44daebb8b80a7417 Author: Mark Johnston AuthorDate: 2025-10-03 14:25:53 +0000 Commit: Mark Johnston CommitDate: 2025-10-17 12:41:58 +0000 libexec/kgdb: Add new modules and install them together with debug info This change simplifies integration of gdb python scripts with our kernel debugging infrastructure. Rather than putting debugging scripts in /usr/libexec/kgdb, move them to /gdb, and add a kernel-gdb.py which automatically loads modules from that directory. kernel-gdb.py will be automatically executed by kgdb when loading kernel debug symbols (assuming a default configuration), so one no longer needs to do anything to use these modules. The change also adds a couple of new modules, vnet.py and pcpu.py, for conveniently accessing VNET symbols and PCPU/DPCPU fields, respectively. Note that these require a change to the kernel linker when accessing symbols from a loadable kernel module. sys/tools/gdb/README.txt describes the scheme in more detail and provides some rudiementary documentation for the commands and functions added by these modules. It should be updated when adding new features. sys/tools/gdb/selftest.py can be used to do some primitive testing of the modules. All it does is execute a number of gdb commands making use of commands and functions added by these modules. The developer is expected to verify that the commands complete without errors and that the output looks sane. Discussed with: kp, avg, jhb, glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50825 (cherry picked from commit ea675a43f09ba569adf1dd17b4f1ced970e48de4) --- ObsoleteFiles.inc | 7 ++ etc/mtree/BSD.usr.dist | 2 - libexec/Makefile | 1 - libexec/kgdb/Makefile | 5 -- sys/conf/kern.post.mk | 15 +++++ sys/tools/gdb/README.txt | 21 ++++++ {libexec/kgdb => sys/tools/gdb}/acttrace.py | 41 ++++-------- sys/tools/gdb/freebsd.py | 75 +++++++++++++++++++++ sys/tools/gdb/pcpu.py | 77 +++++++++++++++++++++ sys/tools/gdb/selftest.py | 31 +++++++++ sys/tools/gdb/selftest.sh | 23 +++++++ sys/tools/gdb/vnet.py | 100 ++++++++++++++++++++++++++++ sys/tools/kernel-gdb.py | 15 +++++ usr.sbin/crashinfo/crashinfo.sh | 3 - 14 files changed, 377 insertions(+), 39 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 32b3a2607150..34b72c9c88ed 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -54,6 +54,13 @@ # 20251006: Remove libnss_tacplus.a (it never should have been installed) OLD_FILES+=usr/lib/libnss_tacplus.a +# 20251003: kgdb python scripts moved +OLD_FILES+=usr/libexec/kgdb/acttrace.py +OLD_DIRS+=usr/libexec/kgdb + +# 20251001: test helper sendto-IP_MULTICAST_IF renamed +OLD_FILES+=usr/tests/sys/netinet/sendto-IP_MULTICAST_IF + # 20250930: Rename wlanstats to wlanstat OLD_FILES+=usr/sbin/wlanstats OLD_FILES+=usr/share/man/man8/wlanstats.8.gz diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 7d5b8620e5c4..6a8c155e5e73 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -181,8 +181,6 @@ .. hyperv .. - kgdb - .. lpr ru .. diff --git a/libexec/Makefile b/libexec/Makefile index c4a5bc198ab0..180dd10b5d29 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -10,7 +10,6 @@ SUBDIR= ${_atf} \ flua \ getty \ ${_hyperv} \ - kgdb \ ${_mail.local} \ ${_makewhatis.local} \ ${_mknetid} \ diff --git a/libexec/kgdb/Makefile b/libexec/kgdb/Makefile deleted file mode 100644 index f6b255ab4f60..000000000000 --- a/libexec/kgdb/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -FILESDIR?= /usr/libexec/kgdb - -FILES= acttrace.py - -.include diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index bb3c7af82a4d..7cdfd17778db 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -398,6 +398,14 @@ CFLAGS+= -fdebug-prefix-map=./${_link}=${PREFIX_SYSDIR}/${_link}/include .endif .endfor +# Install GDB plugins that are useful for kernel debugging. See the +# README in sys/tools/gdb for more information. +GDB_FILES= acttrace.py \ + freebsd.py \ + pcpu.py \ + selftest.py \ + vnet.py + ${_ILINKS}: @case ${.TARGET} in \ machine) \ @@ -447,6 +455,13 @@ kernel-install: .PHONY .if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" mkdir -p ${DESTDIR}${KERN_DEBUGDIR}${KODIR} ${INSTALL} -p -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/ + ${INSTALL} -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} \ + $S/tools/kernel-gdb.py ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/${KERNEL_KO}-gdb.py + mkdir -p ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/gdb +.for file in ${GDB_FILES} + ${INSTALL} -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} \ + $S/tools/gdb/${file} ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/gdb/${file} +.endfor .endif .if defined(KERNEL_EXTRA_INSTALL) ${INSTALL} -p -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR}/ diff --git a/sys/tools/gdb/README.txt b/sys/tools/gdb/README.txt new file mode 100644 index 000000000000..8c31565ddc42 --- /dev/null +++ b/sys/tools/gdb/README.txt @@ -0,0 +1,21 @@ +This directory contains Python scripts that can be loaded by GDB to help debug +FreeBSD kernel crashes. + +Add new commands and functions in their own files. Functions with general +utility should be added to freebsd.py. sys/tools/kernel-gdb.py is installed +into the kernel debug directory (typically /usr/lib/debug/boot/kernel). It will +be automatically loaded by kgdb when opening a vmcore, so if you add new GDB +commands or functions, that script should be updated to import them, and you +should document them here. + +To provide some rudimentary testing, selftest.py tries to exercise all of the +commands and functions defined here. To use it, run selftest.sh to panic the +system. Then, create a kernel dump or attach to the panicked kernel, and invoke +the script with "python import selftest" in (k)gdb. + +Commands: +acttrace Display a backtrace for all on-CPU threads + +Functions: +$PCPU([, ]) Display the value of a PCPU/DPCPU field +$V([, ]) Display the value of a VNET variable diff --git a/libexec/kgdb/acttrace.py b/sys/tools/gdb/acttrace.py similarity index 62% rename from libexec/kgdb/acttrace.py rename to sys/tools/gdb/acttrace.py index 3229ff708de1..147effbbddf1 100644 --- a/libexec/kgdb/acttrace.py +++ b/sys/tools/gdb/acttrace.py @@ -1,38 +1,23 @@ -#- +# # Copyright (c) 2022 The FreeBSD Foundation # # This software was developed by Mark Johnston under sponsorship from the # FreeBSD Foundation. # +# SPDX-License-Identifier: BSD-2-Clause +# import gdb - - -def symval(name): - return gdb.lookup_global_symbol(name).value() - - -def tid_to_gdb_thread(tid): - for thread in gdb.inferiors()[0].threads(): - if thread.ptid[2] == tid: - return thread - else: - return None - - -def all_pcpus(): - mp_maxid = symval("mp_maxid") - cpuid_to_pcpu = symval("cpuid_to_pcpu") - - cpu = 0 - while cpu <= mp_maxid: - pcpu = cpuid_to_pcpu[cpu] - if pcpu: - yield pcpu - cpu = cpu + 1 - +from freebsd import * +from pcpu import * class acttrace(gdb.Command): + """ + Register an acttrace command with gdb. + + When run, acttrace prints the stack trace of all threads that were on-CPU + at the time of the panic. + """ def __init__(self): super(acttrace, self).__init__("acttrace", gdb.COMMAND_USER) @@ -40,13 +25,13 @@ class acttrace(gdb.Command): # Save the current thread so that we can switch back after. curthread = gdb.selected_thread() - for pcpu in all_pcpus(): + for pcpu in pcpu_foreach(): td = pcpu['pc_curthread'] tid = td['td_tid'] gdb_thread = tid_to_gdb_thread(tid) if gdb_thread is None: - print("failed to find GDB thread with TID {}".format(tid)) + raise gdb.error(f"failed to find GDB thread with TID {tid}") else: gdb_thread.switch() diff --git a/sys/tools/gdb/freebsd.py b/sys/tools/gdb/freebsd.py new file mode 100644 index 000000000000..81ea60373348 --- /dev/null +++ b/sys/tools/gdb/freebsd.py @@ -0,0 +1,75 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import gdb + +def symval(name): + sym = gdb.lookup_global_symbol(name) + if sym is None: + sym = gdb.lookup_static_symbol(name) + if sym is None: + raise gdb.GdbError(f"Symbol '{name}' not found") + return sym.value() + + +def _queue_foreach(head, field, headf, nextf): + elm = head[headf] + while elm != 0: + yield elm + elm = elm[field][nextf] + + +def list_foreach(head, field): + """sys/queue.h-style iterator.""" + return _queue_foreach(head, field, "lh_first", "le_next") + + +def tailq_foreach(head, field): + """sys/queue.h-style iterator.""" + return _queue_foreach(head, field, "tqh_first", "tqe_next") + + +def linker_file_foreach(): + """Iterate over loaded linker files.""" + return tailq_foreach(symval("linker_files"), "link") + + +def pcpu_foreach(): + mp_maxid = symval("mp_maxid") + cpuid_to_pcpu = symval("cpuid_to_pcpu") + + cpu = 0 + while cpu <= mp_maxid: + pcpu = cpuid_to_pcpu[cpu] + if pcpu: + yield pcpu + cpu = cpu + 1 + + +def tid_to_gdb_thread(tid): + """Convert a FreeBSD kernel thread ID to a gdb inferior thread.""" + for thread in gdb.inferiors()[0].threads(): + if thread.ptid[2] == tid: + return thread + else: + return None + + +def tdfind(tid, pid=-1): + """Convert a FreeBSD kernel thread ID to a struct thread pointer.""" + td = tdfind.cached_threads.get(int(tid)) + if td: + return td + + for p in list_foreach(symval("allproc"), "p_list"): + if pid != -1 and pid != p['p_pid']: + continue + for td in tailq_foreach(p['p_threads'], "td_plist"): + ntid = td['td_tid'] + tdfind.cached_threads[int(ntid)] = td + if ntid == tid: + return td +tdfind.cached_threads = dict() diff --git a/sys/tools/gdb/pcpu.py b/sys/tools/gdb/pcpu.py new file mode 100644 index 000000000000..aadc4b2d42df --- /dev/null +++ b/sys/tools/gdb/pcpu.py @@ -0,0 +1,77 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import gdb +from freebsd import * + +class pcpu(gdb.Function): + """ + Register a function to lookup PCPU and DPCPU variables by name. + + To look up the value of the PCPU field foo on CPU n, use + $PCPU("foo", n). This works for DPCPU fields too. If the CPU ID is + omitted, and the currently selected thread is on-CPU, that CPU is + used, otherwise an error is raised. + """ + def __init__(self): + super(pcpu, self).__init__("PCPU") + + def invoke(self, field, cpuid=-1): + if cpuid == -1: + cpuid = tdfind(gdb.selected_thread().ptid[2])['td_oncpu'] + if cpuid == -1: + raise gdb.error("Currently selected thread is off-CPU") + if cpuid < 0 or cpuid > symval("mp_maxid"): + raise gdb.error(f"Currently selected on invalid CPU {cpuid}") + pcpu = symval("cpuid_to_pcpu")[cpuid] + + # Are we dealing with a PCPU or DPCPU field? + field = field.string() + for f in gdb.lookup_type("struct pcpu").fields(): + if f.name == "pc_" + field: + return pcpu["pc_" + field] + + def uintptr_t(val): + return val.cast(gdb.lookup_type("uintptr_t")) + + # We're dealing with a DPCPU field. This is handled similarly + # to VNET symbols, see vnet.py for comments. + pcpu_base = pcpu['pc_dynamic'] + pcpu_entry = symval("pcpu_entry_" + field) + pcpu_entry_addr = uintptr_t(pcpu_entry.address) + + for lf in linker_file_foreach(): + block = gdb.block_for_pc(lf['ops']['cls']['methods'][0]['func']) + elf_file_t = gdb.lookup_type("elf_file_t", block).target() + ef = lf.cast(elf_file_t) + + file_type = lf['ops']['cls']['name'].string() + if file_type == "elf64": + start = uintptr_t(ef['pcpu_start']) + if start == 0: + continue + end = uintptr_t(ef['pcpu_stop']) + base = uintptr_t(ef['pcpu_base']) + elif file_type == "elf64_obj": + for i in range(ef['nprogtab']): + pe = ef['progtab'][i] + if pe['name'].string() == "set_pcpu": + start = uintptr_t(pe['origaddr']) + end = start + uintptr_t(pe['size']) + base = uintptr_t(pe['addr']) + break + else: + continue + else: + path = lf['pathname'].string() + raise gdb.error(f"{path} has unexpected linker file type {file_type}") + + if pcpu_entry_addr >= start and pcpu_entry_addr < end: + obj = gdb.Value(pcpu_base + pcpu_entry_addr - start + base) + return obj.cast(pcpu_entry.type.pointer()).dereference() + +# Register with gdb. +pcpu() diff --git a/sys/tools/gdb/selftest.py b/sys/tools/gdb/selftest.py new file mode 100644 index 000000000000..41e9211c4bb3 --- /dev/null +++ b/sys/tools/gdb/selftest.py @@ -0,0 +1,31 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import gdb + +cmds = ["acttrace", + "p $V(\"tcbinfo\")", + "p $V(\"tcbinfo\", vnet0)", + "p $V(\"pf_status\")", + "p $V(\"pf_status\", \"gdbselftest\")", + "p $PCPU(\"curthread\")", + "p $PCPU(\"curthread\", 0)", + "p/x $PCPU(\"hardclocktime\", 1)", + "p $PCPU(\"pqbatch\")[0][0]", + "p $PCPU(\"ss\", 1)", + ] + +for cmd in cmds: + try: + print(f"Running command: '{cmd}'") + gdb.execute(cmd) + except gdb.error as e: + print(f"Command '{cmd}' failed: {e}") + break + +# We didn't hit any unexpected errors. This isn't as good as actually +# verifying the output, but it's better than nothing. +print("Everything seems OK") diff --git a/sys/tools/gdb/selftest.sh b/sys/tools/gdb/selftest.sh new file mode 100644 index 000000000000..252fae14af17 --- /dev/null +++ b/sys/tools/gdb/selftest.sh @@ -0,0 +1,23 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +set -e + +n=$(sysctl -n hw.ncpu) +if [ $n -lt 2 ]; then + echo "This test requires at least 2 CPUs" + exit 1 +fi + +# Set up some things expected by selftest.py. +kldload -n pf siftr +pfctl -e || true +jail -c name=gdbselftest vnet persist + +echo "I'm about to panic your system, ctrl-C now if that's not what you want." +sleep 10 +sysctl debug.debugger_on_panic=0 +sysctl debug.kdb.panic=1 diff --git a/sys/tools/gdb/vnet.py b/sys/tools/gdb/vnet.py new file mode 100644 index 000000000000..36b4d512a3eb --- /dev/null +++ b/sys/tools/gdb/vnet.py @@ -0,0 +1,100 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import gdb +import traceback +from freebsd import * + +class vnet(gdb.Function): + """ + Register a function to look up VNET variables by name. + + To look at the value of a VNET variable V_foo, print $V("foo"). The + currently selected thread's VNET is used by default, but can be optionally + specified as a second parameter, e.g., $V("foo", ), where is a + pointer to a struct vnet (e.g., vnet0 or allprison.tqh_first->pr_vnet) or a + string naming a jail. + """ + def __init__(self): + super(vnet, self).__init__("V") + + def invoke(self, sym, vnet=None): + sym = sym.string() + if sym.startswith("V_"): + sym = sym[len("V_"):] + if gdb.lookup_symbol("sysctl___kern_features_vimage")[0] is None: + return symval(sym) + + # Look up the VNET's base address. + if vnet is None: + vnet = tdfind(gdb.selected_thread().ptid[2])['td_vnet'] + if not vnet: + # If curthread->td_vnet == NULL, vnet0 is the current vnet. + vnet = symval("vnet0") + elif vnet.type.is_string_like: + vnet = vnet.string() + for prison in tailq_foreach(symval("allprison"), "pr_list"): + if prison['pr_name'].string() == vnet: + vnet = prison['pr_vnet'] + break + else: + raise gdb.error(f"No prison named {vnet}") + + def uintptr_t(val): + return val.cast(gdb.lookup_type("uintptr_t")) + + # Now the tricky part: compute the address of the symbol relative + # to the selected VNET. In the compiled kernel this is done at + # load time by applying a magic transformation to relocations + # against symbols in the vnet linker set. Here we have to apply + # the transformation manually. + vnet_data_base = vnet['vnet_data_base'] + vnet_entry = symval("vnet_entry_" + sym) + vnet_entry_addr = uintptr_t(vnet_entry.address) + + # First, which kernel module does the symbol belong to? + for lf in linker_file_foreach(): + # Find the bounds of this linker file's VNET linker set. The + # struct containing the bounds depends on the type of the linker + # file, and unfortunately both are called elf_file_t. So we use a + # PC value from the compilation unit (either link_elf.c or + # link_elf_obj.c) to disambiguate. + block = gdb.block_for_pc(lf['ops']['cls']['methods'][0]['func']) + elf_file_t = gdb.lookup_type("elf_file_t", block).target() + ef = lf.cast(elf_file_t) + + file_type = lf['ops']['cls']['name'].string() + if file_type == "elf64": + start = uintptr_t(ef['vnet_start']) + if start == 0: + # This linker file doesn't have a VNET linker set. + continue + end = uintptr_t(ef['vnet_stop']) + base = uintptr_t(ef['vnet_base']) + elif file_type == "elf64_obj": + for i in range(ef['nprogtab']): + pe = ef['progtab'][i] + if pe['name'].string() == "set_vnet": + start = uintptr_t(pe['origaddr']) + end = start + uintptr_t(pe['size']) + base = uintptr_t(pe['addr']) + break + else: + # This linker file doesn't have a VNET linker set. + continue + else: + path = lf['pathname'].string() + raise gdb.error(f"{path} has unexpected linker file type {file_type}") + + if vnet_entry_addr >= start and vnet_entry_addr < end: + # The symbol belongs to this linker file, so compute the final + # address. + obj = gdb.Value(vnet_data_base + vnet_entry_addr - start + base) + return obj.cast(vnet_entry.type.pointer()).dereference() + + +# Register with gdb. +vnet() diff --git a/sys/tools/kernel-gdb.py b/sys/tools/kernel-gdb.py new file mode 100644 index 000000000000..8a41ef6efab1 --- /dev/null +++ b/sys/tools/kernel-gdb.py @@ -0,0 +1,15 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(__file__), "gdb")) + +# Import FreeBSD kernel debugging commands and modules below. +import acttrace +import pcpu +import vnet diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh index 3bb1e1456462..68115f09f9d4 100755 --- a/usr.sbin/crashinfo/crashinfo.sh +++ b/usr.sbin/crashinfo/crashinfo.sh @@ -217,10 +217,7 @@ echo file=`mktemp /tmp/crashinfo.XXXXXX` if [ $? -eq 0 ]; then - scriptdir=/usr/libexec/kgdb - echo "bt -full" >> $file - echo "source ${scriptdir}/acttrace.py" >> $file echo "acttrace" >> $file echo "quit" >> $file ${GDB%gdb}kgdb -q $KERNEL $VMCORE < $file From nobody Fri Oct 17 14:13:59 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp6J73Zjgz6DLfx; Fri, 17 Oct 2025 14: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 4cp6J71CnTz3sfj; Fri, 17 Oct 2025 14: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=1760710439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gj9bYz6/g6rAGI6Dmp5EaQqCYnRS82eE9iX2ud0tyaw=; b=S75LajhvktjkZ4I2HwzJ0eqsFdD2z8bKVoxTitURaMb/WrVTcTbGtZR6rrKV6Vj7hKuUgd +Y8Vx1rnu8ifTf/sJvsq18TSgSYztyj0PnhuI/xDHrgjAScPbtX0c8scyuscG7OM7GVWKl bDL2BsM/yAtxsDxJxwdBGfgczs3e2tmi5M+Dxlf8bRCkk5T5VlYcc+hbTsqRAEK2v/WvXX FGjOuG91hQh2TMTbZdcfxOw4M/+NMPi+RdgEsIIbiEYnbnrfQecRa/2E/skuamcy4qEjCc uWEO6qy9cAw2355tSsGiyDuGmQaqmigjUxLyGK7pBu78EJupuuQtxz6oj7eFkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760710439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gj9bYz6/g6rAGI6Dmp5EaQqCYnRS82eE9iX2ud0tyaw=; b=TwyrDZm3FNrxMFjJWR31E6EAXOqtCogLySH3T4uCr7zH0gSMZ+7vlRbHYZ51W4C6eqrPjx /O6nxec4abR0Ix21owdZ5HoIJnzyrxyFsW5LG/gubFHEtfAkN7uuemZIBYugFNpWqhQGGv 0XZkJKIBAfRsdlTWnDESr10VcY71diX+byN4//BUjwv73XXDCK2JI6+PSNnXgaY4C9PDlr 1H0KwQVP+EFim5q1C8+UY+R3JNhtCPCDPl9eQ5Y7C6GkIzAhpQBIqgLQWXLiH6Ws7WeWHh pFrenNZE6+UklRyV0HxO2jZbv0nstb4Um06lfbnS7qURN+tb49PbFYBkoOeXNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760710439; a=rsa-sha256; cv=none; b=prp28mB4MXsOoyBiyqy6WFIFw8ozT5E7ESu1dhuP2G8283PkSx0Q61L8P6Z525YnMdr+zp i2uyn2OiU+ldif2Cfp3VL+edECx/vLpcOvm7Ssu1ac5KhPz8V0PCn4Bu02XYHkq2vHZ/re 9+jbE3qZpkHkkr3ruDO9sQxBFtzP1c2PgjH9ipSjUF4L7x2lnaAV4w/gwT4blgEBZPxGJR aujh/cse4Idz3Ngfzcr4NoB4mld2QHpHcKa/OCzz6Ku6byxTQQ5ceFweHVHLOI+JDJadG9 HX21NOF6G/Pkr+M/HDgwgWsEYawMR4eMQL9y3/H5JPB20rBV3x0RMGGCHbTZyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp6J70pHxzy4D; Fri, 17 Oct 2025 14: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 59HEDx4A069134; Fri, 17 Oct 2025 14: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 59HEDxTi069131; Fri, 17 Oct 2025 14:13:59 GMT (envelope-from git) Date: Fri, 17 Oct 2025 14:13:59 GMT Message-Id: <202510171413.59HEDxTi069131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 55ad7c573e5b - stable/15 - vm_object: Reset kvo_path on each iteration in vm_object_list_handler() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 55ad7c573e5b7b8fa25dd368ccad1d1774c77824 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=55ad7c573e5b7b8fa25dd368ccad1d1774c77824 commit 55ad7c573e5b7b8fa25dd368ccad1d1774c77824 Author: Mark Johnston AuthorDate: 2025-10-10 13:26:29 +0000 Commit: Mark Johnston CommitDate: 2025-10-17 12:42:44 +0000 vm_object: Reset kvo_path on each iteration in vm_object_list_handler() Otherwise we print a bogus path for anonymous objects. Reviewed by: kib MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52997 (cherry picked from commit 13d866b314f87df901c0a1cbbbc56d56ee0d7b7c) --- sys/vm/vm_object.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 6d9ea8bf9d93..fe84523b7a8f 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2522,15 +2522,13 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) continue; } mtx_unlock(&vm_object_list_mtx); + + memset(kvo, 0, sizeof(*kvo)); kvo->kvo_size = ptoa(obj->size); kvo->kvo_resident = obj->resident_page_count; kvo->kvo_ref_count = obj->ref_count; kvo->kvo_shadow_count = atomic_load_int(&obj->shadow_count); kvo->kvo_memattr = obj->memattr; - kvo->kvo_active = 0; - kvo->kvo_inactive = 0; - kvo->kvo_laundry = 0; - kvo->kvo_flags = 0; if (!swap_only) { vm_page_iter_init(&pages, obj); VM_RADIX_FOREACH(m, &pages) { @@ -2552,9 +2550,6 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) } } - kvo->kvo_vn_fileid = 0; - kvo->kvo_vn_fsid = 0; - kvo->kvo_vn_fsid_freebsd11 = 0; freepath = NULL; fullpath = ""; vp = NULL; From nobody Fri Oct 17 14:14:00 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp6J860Btz6DLRN; Fri, 17 Oct 2025 14: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 4cp6J82596z3scD; Fri, 17 Oct 2025 14: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=1760710440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Flz33UQGyrUvCUXRmAhfl6l6L2aO69I1tR1DY+ozKk=; b=x7ak/uSMd4JgdAuhIukhpftVmkiPq807sisO++af+bn3on/cvQiWudXtK5qpkzydozBgem 0cm+NU6ls03g1UnT7lZnQ6NMOflgCHSkhDxcCCNl3C7hLZZgwsL5JsYuLVzCzAstTm4De0 xLF9wvFDcxCoYDOIiR7YTxIdZdHgfD1k8PqfC38ZtRfrCyEEd0EW3BPH3bEeLfbqRIZ0iR mG/bAmf/e98EEbeG9hviVi8y0A71DCOt0dcX0jT7B4OM2PbCqsZ1WwzfGHKxHiEQmX/Fb9 ++iVbWefOe6hxB94AopdVyENiWfbSynjN4idWgXq7D1f3514koWzzapxf/72mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760710440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Flz33UQGyrUvCUXRmAhfl6l6L2aO69I1tR1DY+ozKk=; b=n1tOsB0K5SvB7/QWWvRNSfYpxkwbIIpPJL+Z1zqZ7tyQhCQnByy/55aqGSZDn6tI3YlmgN PlH/DT6X7go2cgeJSOQQaSLWvizeiAWMkTRnKWtY+6ltRCgrjeMHd2WJ2pck5z7AgG36K2 yk2NsA//Fc57WhTXM6EZXK811237+NGv/izt6IepLw2GlDJaJsqksGQg7CusNYHkcQ7ME5 0SlqizUchcy3NQWWJZHcTuvDqK5tq9UOWpTF5URFXPlOWKVXpz0QtpJ7owvKfFoOu0nXEg YUrg6cXfSGDoxY4kdlWC+Rlj+6l59o50CUgw3ea70waLoXts7aKgRKbNzUlPRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760710440; a=rsa-sha256; cv=none; b=yY4oKzh0zf8C0B2ygUIXs3+VDyMukoaHiRoPwuuR/rxHmInm6neXnN0Dl6VT/ldDZdPx42 mfdIsMwQNvec/8VuQU4TMz+8/LYf5wXe05g7LP2MeNLCuWR0YvSnI/wLaUX1Jo7FJzctLZ 74wGOnUnKx/s2XvRJmpiQGCIssUqp7RIbK4Wc0iyaGdykS8dMGfNGPjc0BB4k+l8BD/VUw R7DcHkGZrwRlKWmcRPPVa41O38d/IuKytartYbygx6Nb6mxkJMAi0aIGySYVCWfA928oRU G1eJsxVumZ4XhCIb6v6ku8ZhMtCP92+d+JDzZ91S16BtPSKG9jz6ThaR3CMjMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp6J81SldzyDV; Fri, 17 Oct 2025 14: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 59HEE0Bw069175; Fri, 17 Oct 2025 14: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 59HEE0Ee069172; Fri, 17 Oct 2025 14:14:00 GMT (envelope-from git) Date: Fri, 17 Oct 2025 14:14:00 GMT Message-Id: <202510171414.59HEE0Ee069172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2eaee0dbc28c - stable/15 - vm_object: Export the number of wired pages in vm_object_list_handler() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2eaee0dbc28c6f8f61b37f93026ef1623dc4047d Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2eaee0dbc28c6f8f61b37f93026ef1623dc4047d commit 2eaee0dbc28c6f8f61b37f93026ef1623dc4047d Author: Mark Johnston AuthorDate: 2025-10-10 13:26:50 +0000 Commit: Mark Johnston CommitDate: 2025-10-17 12:42:56 +0000 vm_object: Export the number of wired pages in vm_object_list_handler() Reviewed by: alc, kib MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53008 (cherry picked from commit ffca0c44ffe84352f6fdd24862c070d348d783d4) --- sys/sys/user.h | 3 ++- sys/vm/vm_object.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/sys/user.h b/sys/sys/user.h index 3183f0792256..1704bc089d85 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -617,7 +617,8 @@ struct kinfo_vmobject { } kvo_type_spec; /* Type-specific union */ uint64_t kvo_me; /* Uniq handle for anon obj */ uint64_t kvo_laundry; /* Number of laundry pages. */ - uint64_t _kvo_qspare[5]; + uint64_t kvo_wired; /* Number of wired pages. */ + uint64_t _kvo_qspare[4]; uint32_t kvo_swapped; /* Number of swapped pages */ uint32_t kvo_flags; uint32_t _kvo_ispare[6]; diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index fe84523b7a8f..5b4517d2bf0c 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2547,6 +2547,9 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) kvo->kvo_inactive++; else if (vm_page_in_laundry(m)) kvo->kvo_laundry++; + + if (vm_page_wired(m)) + kvo->kvo_wired++; } } From nobody Fri Oct 17 14:14:01 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp6J96vlFz6DLj4; Fri, 17 Oct 2025 14: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 4cp6J93wWQz3sg9; Fri, 17 Oct 2025 14: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=1760710441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBiAoOrMTeySslkYe0QcrCcfR2Ot7mzQuvGEn1lmGcI=; b=qUm+Ch1ydEOe+vVmiqaqpecfYpciGxfC19lyWRBEX0T6Rt0yFjMaqXcCzkcE/E/v+mmjbt ykTTfbRqwFazxbuqEVaiMciZpiTuu2kX3mcWNpC3r0ZML+CDf0DuPhMqt/QLOPqLVHVu93 yN2oosyhYzBHoneM6ki0FbQS0nfJejnDrwcnx07Gx21x6vDLz+JRAd1b9mQ4s2Ai/EOzuD 37QJb3/0HSB4V9jmeczzsYfgIQfxfdLnGu690L1TjsfE8CH0xzUb/Di0wtFhwos+rTAT0I RxRiB99EZ8iLWobd2XjlnUGLEBruX3GpV0xM8/RXPJOuP4r05vM5GFI9kI821Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760710441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBiAoOrMTeySslkYe0QcrCcfR2Ot7mzQuvGEn1lmGcI=; b=Gaq4nOD6XcqWcSjfjrTUF2Rq37FEz0LXA/w2AMlf50QoB1CV3lg6mJG08ElM/DzwBeK3p0 yt76aFps+KmAwtTGmKI9r/CDM5bZODpDHMJTB0VoyxPNm8neatW0ZXZF5QgRcSgJ+REkmy C/5CAkoxtKyAx+Sgx7U7z5PLiJFwxfbFDRjtqdyxmzK9NRy4BwhEcgycRJuR0wiqSfJ9HG uRfvQM7cqh1T4pz42BiLVCs4FjinifcAzTD/BZUCqINvWNOYavo6TmpRksNmhnbVot+/uN lkoAry/AM5mk4AyDJpU7UjRnQFrxkqHv9W3lQ8bihRVs+yHDmtxMLAIlsLsp2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760710441; a=rsa-sha256; cv=none; b=XFVCEkvnkByo7EEddw+1MSjyuNQTLocYCcR51cDeoaZODZngZOqXl0QH3FzGj4cWT3cUbp THYjzPjelohW3oNdSI2qhRDq2HghND4rN1Bd2pgDQypemb2HLRKfpwHHVwC5AulP/Pj7uu 85oeSsYPEq4xNDcP8fj4qrKzdK5r8244SJ5Lfa8Vx1VzENkuZJsTiMpPWKjpSeSfkovEOV 8zDLv6EkByBV8jt0SSnG3x9al+4DCkbg0PtwZTh1QUZhjv5gr5YylE+ZPSZiIWbUgxqlkU lFjC+TEat2keWw6nQQ90BSuOR0JEnLi3sCZuuVpcVkWgrsIcmAvGdT4IsH46kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp6J92m2TzxKs; Fri, 17 Oct 2025 14: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 59HEE10B069209; Fri, 17 Oct 2025 14:14:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HEE1Rw069206; Fri, 17 Oct 2025 14:14:01 GMT (envelope-from git) Date: Fri, 17 Oct 2025 14:14:01 GMT Message-Id: <202510171414.59HEE1Rw069206@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5bc5ce6e61e6 - stable/15 - vmstat: Print the number of wired pages in each object List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5bc5ce6e61e6ccf5a9386aa15936f4a9a51055b3 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5bc5ce6e61e6ccf5a9386aa15936f4a9a51055b3 commit 5bc5ce6e61e6ccf5a9386aa15936f4a9a51055b3 Author: Mark Johnston AuthorDate: 2025-10-10 13:28:01 +0000 Commit: Mark Johnston CommitDate: 2025-10-17 12:43:08 +0000 vmstat: Print the number of wired pages in each object Reviewed by: alc, kib MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53008 (cherry picked from commit f66bb825f5895eed98c959cd2b612453b4d1aa6c) --- usr.bin/vmstat/vmstat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 7a7c83fe1ac8..9b4d3a25ee07 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1465,6 +1465,7 @@ display_object(struct kinfo_vmobject *kvo) xo_emit("{:active/%5ju} ", (uintmax_t)kvo->kvo_active); xo_emit("{:inactive/%5ju} ", (uintmax_t)kvo->kvo_inactive); xo_emit("{:laundry/%5ju} ", (uintmax_t)kvo->kvo_laundry); + xo_emit("{:wired/%5ju} ", (uintmax_t)kvo->kvo_wired); xo_emit("{:refcount/%3d} ", kvo->kvo_ref_count); xo_emit("{:shadowcount/%3d} ", kvo->kvo_shadow_count); @@ -1568,7 +1569,8 @@ doobjstat(void) return; } xo_emit("{T:RES/%5s} {T:ACT/%5s} {T:INACT/%5s} {T:LAUND/%5s} " - "{T:REF/%3s} {T:SHD/%3s} {T:CM/%2s} {T:TP/%3s} {T:PATH/%s}\n"); + "{T:WIRED/%5s} {T:REF/%3s} {T:SHD/%3s} {T:CM/%2s} {T:TP/%3s} " + "{T:PATH/%s}\n"); xo_open_list("object"); for (i = 0; i < cnt; i++) display_object(&kvo[i]); From nobody Fri Oct 17 14:14:02 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp6JC1gVWz6DLRP; Fri, 17 Oct 2025 14:14: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 4cp6JB48tnz3sZZ; Fri, 17 Oct 2025 14: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=1760710442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V6O5VlMwUWfa8T98sritD+v4gKukS6l+0k4g5LjUPuI=; b=fFFf0N/P2GI31BvAqDx+Wn3W2xenTyEIgpclVesSbZQ4+7xCx29fdO1juCR8XnthgDtHyT sjUZf2pfL5KOGiolGDexMKFF4jeOK1kkVGFNXtFqFseaWppBuXe0b9wkxpMzW9Pc7Uzvy0 VyiBLu6OCxoLmC2zKweUmg+nVFNnZ2JPVNCZYSvo2W2DjDChJr5bcRZUqWpWe/7z4QNpo3 x4sdt0SEsxCz+pXG8rTY3gMKmLXL3kQt46k5VKIDanriEGdBBBGMA+Bi58O9jjyuc/Mn4Q dQWnOBGCeadwH0dO0WlHR/sDkP4d3Wyc3mQVlrhiVtrC/dFhSKXoqLAoV2j75Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760710442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V6O5VlMwUWfa8T98sritD+v4gKukS6l+0k4g5LjUPuI=; b=fDxbOAL6M0O8nOMBhj/cz3wAiAYboRQQqoHs8Z0X+jnVgtgYMusGpzTKv07FSFT/1VPe9+ /7qF2OA+jhlT2OeQPi4rIs+XLL/7qchREQT3Rgai7t/6HfvoCU652/HoxPAi0q+xp/71Hi b4Bkc2cSO9l0HQ6ENiCYi37EMqM4Ze/gHp6KCafGtqycXOU7Uh8tz5KpZHB0DiJEVzuL1c 908cofMudyO5346EsURzJIwgdECH6bgHD1ZkWiRvYBvBq+aJ9JbE/TWW5KYuoxGTYfLTt+ QfS7a4dgexK6gbjbdmSCq8ze38NPWonQc4jRDPX17bprMKB8kYvRJi67dLCRvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760710442; a=rsa-sha256; cv=none; b=o8sVPNucHgAiTzjpGfTtAWFOnfZh/3zXPtV7pI2C8LGhO7McON1AAhd1NwwqQ9TRSXAKVt CZ9BTzXLbIaihlIgXDTCBazSxJw1A/9N0aChzOBLQCx/3OGFu8NkddDJnTukE2hIGZTMLf vXx0+eObQH8yUEAaa89r4HZqQty2FqZyjqxWuIB61ois2XQjy68wgmH0a5bevRwC3Z++Dw 1U/iRhd26oQkBFp5Ib+QDIIid+dEaq4/5MOv/LzldVptsdv+quCDKn75hdTyHhqI0AMFDM CzmgWsYovIDdiF8/vFec35fj5T3VFs7KU3x5yJ4bNkpflInZB/ku38SVyu0itQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp6JB3kg4zy2F; Fri, 17 Oct 2025 14: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 59HEE2DB069243; Fri, 17 Oct 2025 14: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 59HEE2Gg069240; Fri, 17 Oct 2025 14:14:02 GMT (envelope-from git) Date: Fri, 17 Oct 2025 14:14:02 GMT Message-Id: <202510171414.59HEE2Gg069240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5a926b3cd53b - stable/15 - linker: Make it easier to find the VNET section layout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5a926b3cd53b6c4516ad59c4693d7a999549c34c Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5a926b3cd53b6c4516ad59c4693d7a999549c34c commit 5a926b3cd53b6c4516ad59c4693d7a999549c34c Author: Mark Johnston AuthorDate: 2025-10-03 14:25:38 +0000 Commit: Mark Johnston CommitDate: 2025-10-17 12:43:16 +0000 linker: Make it easier to find the VNET section layout When trying to find the address of a VNET variable from a debugger, it helps to have the original address of the VNET section. In particular, given the address of a vnet_entry_foo symbol, one wants to easily find the linker file that the symbol belongs to. In link_elf_obj.c, the section address for VNET and DPCPU sections is overwritten in link_elf_link_preload() and link_elf_load_file(). Add an "origaddr" field to store the original absolute address of the section base. In link_elf.c the elf_file_t already has the fields we want, but they were not getting filled out for the kernel itself. Fix that too, since that simplifies things for debuggers and improves consistency. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52730 (cherry picked from commit 07747afd516e710814fdc65afb0e5000d046f28f) --- sys/kern/link_elf.c | 6 ++++++ sys/kern/link_elf_obj.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index bbebadc4c395..ebd203858b66 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -518,9 +518,15 @@ link_elf_init(void* arg) (void)link_elf_link_common_finish(linker_kernel_file); linker_kernel_file->flags |= LINKER_FILE_LINKED; TAILQ_INIT(&set_pcpu_list); + ef->pcpu_start = DPCPU_START; + ef->pcpu_stop = DPCPU_STOP; + ef->pcpu_base = DPCPU_START; #ifdef VIMAGE TAILQ_INIT(&set_vnet_list); vnet_save_init((void *)VNET_START, VNET_STOP - VNET_START); + ef->vnet_start = VNET_START; + ef->vnet_stop = VNET_STOP; + ef->vnet_base = VNET_START; #endif } diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 151aab96f9be..a3a53a39bfd6 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -70,6 +70,7 @@ typedef struct { void *addr; + void *origaddr; /* Used by debuggers. */ Elf_Off size; int flags; /* Section flags. */ int sec; /* Original section number. */ @@ -492,7 +493,8 @@ link_elf_link_preload(linker_class_t cls, const char *filename, case SHT_FINI_ARRAY: if (shdr[i].sh_addr == 0) break; - ef->progtab[pb].addr = (void *)shdr[i].sh_addr; + ef->progtab[pb].addr = ef->progtab[pb].origaddr = + (void *)shdr[i].sh_addr; if (shdr[i].sh_type == SHT_PROGBITS) ef->progtab[pb].name = "<>"; #ifdef __amd64__ @@ -1088,6 +1090,8 @@ link_elf_load_file(linker_class_t cls, const char *filename, ef->progtab[pb].name = "<>"; if (ef->progtab[pb].name != NULL && !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) { + ef->progtab[pb].origaddr = + (void *)(uintptr_t)mapbase; ef->progtab[pb].addr = dpcpu_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { @@ -1101,6 +1105,8 @@ link_elf_load_file(linker_class_t cls, const char *filename, #ifdef VIMAGE else if (ef->progtab[pb].name != NULL && !strcmp(ef->progtab[pb].name, VNET_SETNAME)) { + ef->progtab[pb].origaddr = + (void *)(uintptr_t)mapbase; ef->progtab[pb].addr = vnet_data_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { From nobody Fri Oct 17 14:24:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp8Xt40g3z6CFtZ for ; Fri, 17 Oct 2025 15:55:10 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 4cp8Xt1PZpz487t 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-xd2f.google.com with SMTP id ca18e2360f4ac-93e7ece3025so28503139f.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=YxLAkXoNKqsdAW9Tg2UoXUZhKrw0bs8GPNe+zOPvAhGqpfFVXTw++KgGliJvem1al6 U2zDuj68xATHQtbzW7I/fMjYhbEv/u76gSZDc0u67oEg1TlZKOKPwzNcAg0m8CnDw+2+ jtLfRKipTWvK7omtWY/GxQk5rjtQevZvxP2yfMm32Ju1yowkwqihTXQ3EfOopyZD4N+J JLwjWfLI+5eRoGD/aGpkxmKJJ6PksSpJP1Msp/c16YDwJ0+NkoYzDT8ObS/p0szYeKfB FcomqSce9D15ixpAogte7zfcdRQtYpVxP4F4i9muE6Ct7V/hGntA5/iuf152Dap3e25j Cpzw== X-Forwarded-Encrypted: i=1; AJvYcCWe+amCtjvqurmxsVIDr7787BaVAQg2/PzEreYA5Rnfbcx55BoVZoNDaMJB+pqhdFfQGKUxgyRh1UvWZ1jsG9HEV0DN@freebsd.org X-Gm-Message-State: AOJu0Ywd0iFQGnYWS6yp3TRR0tISg9IPdGE3nyC4hgyZwTbilKu8sdX7 grmW1d1KX6VqT8sm/3AqSKkPMJlXgj3AfRGDEfXpdayxUBC01drt80iHUlC2wGxc6AlyL7Jz76j WJsuA4GRWfMzxzBBkSgcMGJep9WcA9XoM X-Gm-Gg: ASbGnctZMjf4Yk+QV7R0Nxa6s2HU0ilmVRQRM3ycjSQSLG9O9yvfXZQrICTJ4mL8dlk hUCpN69KEJGnrkqbzIXH35H3hnFsfJvUxSGw+W+wHhNKRFMBojVQBr8tMujFsMo9S4+umY26sTq 3I2Uu4/spAt7WX2xEKcK0+Xf3kbMk0hJMfM1oqU28imc6NNQY+87ymxhPV62OL/jUIkfRDsZ3R/ QqVZ85Q/o/yWkoLb+Ariy5MkaeIt4eEcn54FH5aPDVgIxTMaji/tzmryWg= 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <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: 4cp8Xt1PZpz487t 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9cj6Q7pz6CKCN for ; Fri, 17 Oct 2025 16:43:33 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yx1-f54.google.com (mail-yx1-f54.google.com [74.125.224.54]) (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 4cp9cj4LFdz3K8Z for ; Fri, 17 Oct 2025 16:43:33 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yx1-f54.google.com with SMTP id 956f58d0204a3-63e17c0fefbso1359704d50.1 for ; Fri, 17 Oct 2025 09:43:33 -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=LAdXihxyhS4V1QRKv7rF6LEGEmvoCUC1f9oT/4KBtoFkh4vR0l9PnZZmbwnFDQpIhS f2znafqMani2Pg92UtN7oPuz28hV9+8elWbp14dNwQuxsN0ZjJMwaYoMcSCSNbQizsVq c9JHZ5CwT5GiERpmPgmsOKkUf6O4D7e4XUrl45SrGH1LLqM6CS8gD29cA9Dwk7cBiioB xZ5DWt4aM7JgiZsEf5gkKVBkG/kHYFfL+oSE16wj4d4C12QgxpoTtt0CSZlu59UyVpir GR7DCOti/D5WjLLEwD26fpcciaM5Lt9fhlrNaRx/bCMqZWjjDpejfnauJ2s3RAkzAZkF C/Pg== X-Forwarded-Encrypted: i=1; AJvYcCWlJwVz4WyQjMqg5WK/M+hNPyGJW64OCIOtsRBeL6HTN5E1ifMM/11+WPdXhElS7nitufjCnFjSrpwVjltpAhAOjl3K@freebsd.org X-Gm-Message-State: AOJu0Yy8WVN5iQAlau3G2Ic6SpSk7hT7icLKj5W4q8f2i9PntqWGePY4 9KgEddKbH1H3M+F5SuxJN39tyV3jwoOHfpuLh+9uoo6lWUWai8wK3sFDyshCS6kt X-Gm-Gg: ASbGncvxwylM8E+0SrnsnosuE+Za82le58jB0XXJFEuyUQ9dTXRtwTBDbOWOFJx8PrH VK/2kX5eGtWqYeuPL4y77Ldnxy2UsRe0yt9iR7D21IOeqVCm0JdYav5XxKlWjXEHqd692LYw+9W LqRzxjvptXUt7CgCuDpYS1r5g6RNoletmes0uOIwZ0yBb5wN3F0mtF34Qb2NIB93x/of59xs2Lb z+r7OqXsB8qkO1GfIivaNh0UbmaGfupVVsxjGNck9d0h4Kpi+8tW4GwayIj5aYEaWLMFsZFG69S DPmX/9BeELHCYR14WXFoERDmaEKehK37W/pAQo97fuMP5YGfxKb4h9FV/a+Vz1P+m45U68zxKVw OQNXmbfmRxYM8CSIqfUWjoAvvJ8dwivWKXxAoNncRmXWhkHgPEPfwCKLwZG0zww3GDGEdbOsJN1 wu2wearOtm0WSJeKHIOMpsPzh6uDtFpkzViTbtpr2H56lH5dFBYase9F9R X-Google-Smtp-Source: AGHT+IG4ttfNB2BeAysmkvTBNLLSETn9nuIjBdPT4mnfa7mjK24RygzjgyzJQA9eCBHexWMRSPt4Fg== X-Received: by 2002:a05:690e:1b55:b0:63c:f5a6:f2fd with SMTP id 956f58d0204a3-63e161f759fmr2938768d50.63.1760719412620; Fri, 17 Oct 2025 09:43:32 -0700 (PDT) Received: from mail-yx1-f46.google.com (mail-yx1-f46.google.com. [74.125.224.46]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-63e267fe371sm24996d50.19.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-yx1-f46.google.com with SMTP id 956f58d0204a3-635c9db8a16so2097556d50.0 for ; Fri, 17 Oct 2025 09:43:32 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCX08kHDjJdZwLeDbvjwRdEltqyF64KjHWkR4B3PsJnP9MRMPZj8OEv0KngpXBXCckKXpimIPm88MrivsI9HrEULz6bj@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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <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:74.125.0.0/16, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cp9cj4LFdz3K8Z 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:20 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9r02qZbz6CLBh; Fri, 17 Oct 2025 16:53: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 4cp9r02HmJz3Npk; Fri, 17 Oct 2025 16:53:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EdH77Z/bcJ7/EH/xTf3EKX7EvypO/2pbvThR26e/x2M=; b=Z6IXeXQeHNZmUe5WvShnH5s0wwG7eo0eBkb2at01DYBG+rtYOOQMqFp6VTashL+2reptIl 42JIMeblU9gkabLBTdkXEWos5niCdEZM8/UYtj4SZXZdJxB0yeirg9WTygE8Hp6UHW3isx VJZK20dBOB+TIZVpdhGM62HRlxtJ1oVtp4TT7B5Rvj/RfESqkKa+yQeLzGDAA93AXAp/ke 8J7Z4yryET1EtVntropJgY1vl3gWEcmVbFNpflYTrKiCQlsJo4F9sSc+byWOyGogsA/sK5 gHFouPZK6YNjU6lV533+UbzmcxFFjxFl/xajuKw1MVc8CCfzJmC+gSPZNSRrVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EdH77Z/bcJ7/EH/xTf3EKX7EvypO/2pbvThR26e/x2M=; b=XQ9C3XJX3GohGVajU/poD1ztY5UwR8WVcNHCCO+1mn2oYn4Hu3Xb04BU7aQe2z2kB8xSJF GDHjvZKDBUioePJ5HTD5FoTCwpdA14RVnKUT3lEz5f5bTxccZmvKGJWRb13uPp3Sk5bS2M rftLCCJkYpZ/bWMZiQwP3TRfrRZSLu0EUejbn6Reyj1GQYm0rZ+LMgMEF0sOWdwZ+e2XbY 1ORejeiFO2JK5nj8HMWsIVWk0+EiDDJqXqbYqteWgmkUN/VtEwl+OXlmsXpT1gu9OAjCZV sMboGQrpX7BUhBh3AnjbVHiHw9aBQ0kENSZPQN9x4tGVpdcjAPO2bdKmxeXkcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760720000; a=rsa-sha256; cv=none; b=i9lpuPQ751xhKeFvU7DM2C2OfaextNYe2JqnKLcdgA64AskhrLY77KEzPTi1N139SFR6sl qo4h6U84Z4GEpLdZ8le60DNYtCDikab3IPHn2rNAXO3nPzWu9LFjP4QDWR1g41xDWzoVKV itMk8gcMMFlUSazJ33u2Zlsm8JcrxwUX60Iubh6ZEGHB37BpSU62jfr3PaJOPNSEXzh8uE GRPzECWQiTvaii/E6/Eim772+xlDWbQaupb4A2WL7VYbZBQ1oaQDF+8o3Zpqa0cbjoaezp Y1VhPrkeYdaEHy6z0tnMPQz/W8q083lIH+FMVhgg6y+rQQqhW/RK7iCZgXgVxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp9r01kqxz13Sh; Fri, 17 Oct 2025 16:53: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 59HGrKak070579; Fri, 17 Oct 2025 16:53:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HGrKeY070576; Fri, 17 Oct 2025 16:53:20 GMT (envelope-from git) Date: Fri, 17 Oct 2025 16:53:20 GMT Message-Id: <202510171653.59HGrKeY070576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 7ce5d908fd6b - stable/15 - vmimage.subr: Add missing directories to METALOG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7ce5d908fd6b51dc89d9b89f4c009e44cb932b55 Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7ce5d908fd6b51dc89d9b89f4c009e44cb932b55 commit 7ce5d908fd6b51dc89d9b89f4c009e44cb932b55 Author: Colin Percival AuthorDate: 2025-10-17 07:01:33 +0000 Commit: Colin Percival CommitDate: 2025-10-17 16:53:11 +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 (cherry picked from commit 71b2f9853529b1d1a160eaaa202e93a14f91eed1) --- 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 16:53:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cp9rb5qnHz6CLBK; Fri, 17 Oct 2025 16:53: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 4cp9rb5GcTz3PNL; Fri, 17 Oct 2025 16:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wTWntImuvBShn/dG812K38SaEmW2mqdnzVVjxBjU4DY=; b=hRcyTsIi9U1oJk3ozlszmIoQSRG0nA4xMnd0gH2pIRErXdXSQzp0Ll5obCfNgbu5PCNs7B B6a7027UbYjnXi2r/Nec/URfgXFIfldMPFO78gJSeAD5qgkEyxhnN24lnL3ZuQCEn/JzI5 hvrVRQVS4fcB43IhWvzJhTdyryev7ul5LMbIWCCd8RNl/n0oaZldxq3X0QPBWU3HMS2tdZ n8SEsOReE1I4himSktKfXIcF9qfB015Ym6S7g59zSm0xDhzGPtdlx5ldyOVa+bb6yh9Wcu jiMaua5uoPjmufGBH8xmis6JnvaRrWafawyCcuxTNUOqXHTEmsCvaj7Tvr5Avw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760720031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wTWntImuvBShn/dG812K38SaEmW2mqdnzVVjxBjU4DY=; b=roqJQh7EWqZc+AhF3aIRNreS7saBXfp+m3OHg6wAVJ3f9IuKZCLBxoCXA0+lsGT0bNZ+CK 4CNKr6gGpDE9rOGDBCP4tdeCrCxqO72c6xu4rMyZZyZuTiQ064ocycYTxzQbYjoHl7lDJt WkZ5QSUOSxwZhZ7Z8BbpVsEEhDQzTC0ODaLL69xo6k0oVT2aKeOlF2vWakHpBwXc33vurI H31CEGLTda0c6Iuyuyzp43OJCwok7ZZ4bwAx1Jt+qnnwRFFnf7DLmrb9rFmpcvjel5JM4m u7DJx2beyruVFOBGzPsaEP/Bu2cu5HLC928nN+XsLMwhLrt0XY+OrX73dK0agw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760720031; a=rsa-sha256; cv=none; b=eQ/Is/O+55FN7jPYLLAr8HDugBlupZ0I9KtVWeN6xtVNIuM/udWqS+LdBXAmA7gbqbzMNy EAvrtPaYpT/pTbadz3kvzkOddj21qGoSwi2pkDGy9R8umirrt8IvOYozNxrwMB2Nj8jQiN F/MQ05QYnl3xzKlv/bLPPXFBNPJWBjxMv9LiBmVdnf9pcG4dcZLlR+1HdnKb/yq7qGJkOw SkTs9FYlQtK8e2gBPZSz8/M7XI7T/LFsboIEylkYRKhRqV2V+lDlaen+yqhj8iaknyBL5Z bZOXqn2omxWaJ4ObyaC9++aoTJgInB3AWKYGYYNtXyYApHa/EXFUo80jNkxRJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cp9rb4VCgz13QF; Fri, 17 Oct 2025 16:53: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 59HGrpai070979; Fri, 17 Oct 2025 16:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HGrpHk070976; Fri, 17 Oct 2025 16:53:51 GMT (envelope-from git) Date: Fri, 17 Oct 2025 16:53:51 GMT Message-Id: <202510171653.59HGrpHk070976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 8d2dcf925d33 - releng/15.0 - vmimage.subr: Add missing directories to METALOG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 8d2dcf925d335e29dcc1699e08a33bbd8102a833 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8d2dcf925d335e29dcc1699e08a33bbd8102a833 commit 8d2dcf925d335e29dcc1699e08a33bbd8102a833 Author: Colin Percival AuthorDate: 2025-10-17 07:01:33 +0000 Commit: Colin Percival CommitDate: 2025-10-17 16:53:40 +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. Approved by: re (cperciva) Reviewed by: bapt, emaste, ivy Sponsored by: https://www.patreon.com/cperciva MFC after: 5 minutes Differential Revision: https://reviews.freebsd.org/D53153 (cherry picked from commit 71b2f9853529b1d1a160eaaa202e93a14f91eed1) (cherry picked from commit 7ce5d908fd6b51dc89d9b89f4c009e44cb932b55) --- 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 17:03:53 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 17:46:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpC115FhTz6CQlf; Fri, 17 Oct 2025 17:46: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 4cpC114RTKz3V8L; Fri, 17 Oct 2025 17:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tti6VmEm2b36P0WAmEL1TBEWwcu8XUgsyRSBN4VXU4I=; b=DhrJuZ2gbUaUstlOd8utZsIvyx0Sr0FHG6wIpzORpBY5bGRTQq5XTbbau1HlkwW7Q/q7rf RuE2MQHIHtPm6kzDroBVyp1Ec9bWoty9XX9xU5LCjlszHzkdX1mCR6lU8MuONSkXY9+sT+ oF1HBK6oEBmifmZbHVmsNGyjsuLi2E2TCbUvVvw0jdzH9e86KWV6qUUVoigM8iuIAFKPnB 2UawD3yYewonTj2yC/zAfxtfEDzDaupdbUOE/fbXc68718HvR279WH18olvAXJt+e/EauH T2n3O3zfMnuzn4FVw+qHzidbva6GBDZ+xNGsOvCMGbuPk2WCayz6ZqHmQemPPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tti6VmEm2b36P0WAmEL1TBEWwcu8XUgsyRSBN4VXU4I=; b=bvi1bIHW4TqyKBO9vIrvB+TpcZ9oSUyQjVFAlqodC7KCIanhir77GOaOCQqHAp+l6zMOfj NFs5P6ku+mTTsl+4bur2bZy11sjyRMCerHqZok+6YbZm8tx5nitZRxj+vh0JhaYBN+2Gwh yQ4jbCTNiQ10DnOjYHErQV6rw1UtlUO756LQS4+YBZ6NoTgTMXEXUHbbfEutAmuC0qK8gw LrBchcjrPkuB+tdNsOd0MlN5PYeVx+w03RE9XOc4mfiymfhXv9mGrWPcjhoLyyosz8Sy3Y IiPFb8a9iEp/Eq21oYMEiHbzdFgsNvk+h9N1daYY6bIOiWtY6g/jWQDqNHIQCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723173; a=rsa-sha256; cv=none; b=sRO8FWMuWiXsjf4Vw0fvYtfOU7wMVttj78ro7ClVGTIEaB6rg4LZKxabzV5DuL6PgR5ixe xOeL+DCPJjpnFH/eRQ9yip26KC8623Fe0l04tju7lYAMe8oZ6jL02xs/AGX60HHW3wTsJ4 pPtJzY8UGXM4UiDS94vg7hU+djCX7czQisib1ukTON6J0yJs6fOurZm8FzGFRm4LiDbHn4 aDifmy/orRVfYoY59R4zg04aSkvqbBQy0X7RMpDgzzbsyxpG+6f5DqS/Uwld8L1ZO6iEWX nn7mJL4YBHkhcdI3XsDvpx7YelozrNm2jOp/uT+p2Qs8Gw59FzGLk++dBqULbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpC113brHz14fP; Fri, 17 Oct 2025 17:46: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 59HHkDXv066582; Fri, 17 Oct 2025 17:46:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHkDmf066579; Fri, 17 Oct 2025 17:46:13 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:46:13 GMT Message-Id: <202510171746.59HHkDmf066579@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: bf65752dcec9 - stable/15 - usbhid.4: Note where debug messages go List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bf65752dcec9f246eaf4fad6160ec9e7954d5f19 Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=bf65752dcec9f246eaf4fad6160ec9e7954d5f19 commit bf65752dcec9f246eaf4fad6160ec9e7954d5f19 Author: Ed Maste AuthorDate: 2025-10-02 16:50:15 +0000 Commit: Ed Maste CommitDate: 2025-10-17 17:46:03 +0000 usbhid.4: Note where debug messages go PR: 280377 Sponsored by: The FreeBSD Foundation (cherry picked from commit 44f3e9f7f6c9afed33d2967c1ed48361bb6b404b) --- share/man/man4/usbhid.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man4/usbhid.4 b/share/man/man4/usbhid.4 index 4c7f254bdace..0b2e7230e3f4 100644 --- a/share/man/man4/usbhid.4 +++ b/share/man/man4/usbhid.4 @@ -67,6 +67,8 @@ Default is 1. Debug output level, where 0 is debugging disabled and larger values increase debug message verbosity. Default is 0. +Debug messages are printed on the system console and can be viewed using +.Xr dmesg 8 . .El .Sh SEE ALSO .Xr ehci 4 , From nobody Fri Oct 17 17:59:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCJM73VQz6CRVB; Fri, 17 Oct 2025 17:59:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpCJM6Wdjz3WSL; Fri, 17 Oct 2025 17:59:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ofYXSFmvrmGJxl0W3UAWTwflyROBoIPe2aFxDgsGvYY=; b=EI/ZUeIg4H6OBPxJPZ71R1iNpEVdcP3qq8q4FPDkN1oyD+7pQO01aEgv3luxp3IXYU3FCd H2Ipj6r5aHYGqFzEv8/PzUaZmr53wFjn9ciPIhWINeRC958kzGn+67HeausVRntI1w2+aD T68yBc95MgsfkWRxhGi/zaFnG+MJ3AUOixg07HJIeXF/uRSYiWhUp25oPw1j6MFD7L4MvY ulvY7cxLZiEz7+zg4tnQ9Wcs7Xdg7TczsDtD/FwNUTR+ftxCtnT+auzzsF4nmwOpFH88He K3vDl0pUgpYbCk7J1o0abuNEhSy5izgxoiVU2Zhgdl8kyKT366aaWu8uAy2wtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ofYXSFmvrmGJxl0W3UAWTwflyROBoIPe2aFxDgsGvYY=; b=FWrSLFjhfDBAYKquFQnDb8L3E1Prk/sLb29AemgF4C0qatjSaFoADPBUR4RfW7vB62sRQ9 UEg9bnlcopxI5TD/e1NbALzrle21280iu7aJ52bF4WPQKMyRJgVxCjzOOlW++zRjOcBwUV xEzArOTc6p5jsdm1pqyqqQJKunchyAI5c17M0Iq44B1z3WKnKzSHDivNOI7Zp2c9EllIyS B6L8nKVnABkt/d82X8aeTKYN44ubigRhIwFDVtOV8R1YEgq5sGGakhM54yeq/jGDtE8phk LGEJhrasEejxb/nANiJTtuJO3z313IfTG4jfIYgxNaFYsOLv8kBAMJ8LBjOyEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723971; a=rsa-sha256; cv=none; b=wjzVbcaltv17nzftt/BzPvA75EDNh3PbbyV/cKIo2SdrnegjmX7anCRfguuboEhx7NCMqn jOHLXlVM7W95r6BGsiXvGwBSPgd0+J4IU1JQ6nWnAHCGdGI8gEcXJzqLHUKsxPvl7+g35K 97H7HdgVmmt8c9BE0DX5G7rM/WVGSnO/UN1yEtPifCWpRiZ9hmQkxZqHU80DyRZimBc386 ANE01Se274GCoK32KHRNobU1Y2gtlZJM2aRmlZIltv1aPLCtEfO5knOhjgDrLgv/Ix5qDu fKYXFQU7yxpDjJDjj2XXoSgSjfSoI2ZGHWLy5uwwXS3BAa+moKPcBMudwF0VYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCJM5sytz14Gw; Fri, 17 Oct 2025 17:59:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59HHxVDv086068; Fri, 17 Oct 2025 17:59:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHxVOl086065; Fri, 17 Oct 2025 17:59:31 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:59:31 GMT Message-Id: <202510171759.59HHxVOl086065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: b05f153cd220 - releng/15.0 - unix/stream: repair SO_SNDTIMEO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: b05f153cd22081bbcbcf41439219ffea6750ba46 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b05f153cd22081bbcbcf41439219ffea6750ba46 commit b05f153cd22081bbcbcf41439219ffea6750ba46 Author: Gleb Smirnoff AuthorDate: 2025-10-15 00:29:31 +0000 Commit: Colin Percival CommitDate: 2025-10-17 17:58:38 +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. Approved by: re (cperciva) Reported by: phk Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D53081 Fixes: d15792780760ef94647af9b377b5f0a80e1826bc (cherry picked from commit ead721935251ab5640ea736d4269814b7f9d2f64) (cherry picked from commit bbfaff26bf365126cb4d38fda99a2100a256d9bd) --- 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 Fri Oct 17 17:59:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCJP1Hz4z6CR7C; Fri, 17 Oct 2025 17:59: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 4cpCJP0bvzz3WLF; Fri, 17 Oct 2025 17:59:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RV51E55qgizmTEbONuHG6wPmSQ29Un/QLdBQ+lwez28=; b=dhQHO42CqbRuYe8gqTNj+nt9GWnL787U0e59VARNcit8HURRn/hea8g9EDflfbTEXvo6SZ xYPCak2hHLVofwn5gpLjxFSb4CvCax/l1ZvJxFXIlusFIfheEb6Cbog8phiwpRoUjsMMfe LQnj4lkB1Mhe7ui4OAbzOeivfdqLqQxU2Lwo8QZB827q4z0XTfJ/eNxb8C61C0AGfXWStR PjI8LhlK5hyPyWq/KN58MCrt4Kg4zbTmz+wVVxsy2Ycymsog+1HkOpLJThV6JikuaxLhE3 90zTHuNKY5oiYM1GYXUuWTA4DdT91HQp9282uJ7x5PBfdxIjGn0GzOMGN9GzyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RV51E55qgizmTEbONuHG6wPmSQ29Un/QLdBQ+lwez28=; b=hKIe6+uL+bDpAnBhvah+hRtHucb3RY/jJ2d0dTWaujzy0po36+Uid8LiXqQNs2q3PzWgSW KE4SzS1tZVYvfa2+7CbwomwO2qXz+JV7MuMgV6r8lDj3aDNxhs1Fma0wuwIDr5G4EGL1Iw Rm4Q3aNmRpPK4ir54TYYqlXjarWr0iE3o9XZI2E9qk4IfJG0io/Khmy94272ZVQmUdhhwK Fdubho5Nsnm/Qj6U560uOhpNecoesYkcLCwZjDYgZXONpn0s3Xb6IRUoYGH0WYlDruEiGm Mbc3rBlAa/9mWF3YmuKAamUN9BH3xe9UrfX7NkB6UeTKRF+hHD579LDat9MuhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723973; a=rsa-sha256; cv=none; b=Bybr8+FrZrterVFvK91g69IFrd8sIl6C+ckumQWeawipJuZN/j0p6jpbN/6puG9m+ZF+gC tsx81IWQFBzDLAftleHEgLTI2WobIsyfbxXljCLU6cXuubYQ/p/W7kqUfAyDGjQpRiFwvp gYCZifZE2lfbGA4OZrLLwt7VfBs5bm3csizxffzYAYXTUFRe22MQfwzodHzVD6ZZDeKrwD kb2kLw8Y+wBLVoK3Wn+8HPT/DTDsGYnXpZqU/YeFt7oz7PslmIwtBrWOWXxaRSEP5XCskY 4tZFPRInqKrC4PCf9Tfbq+KMYANMTIbmPHKf4WaUgor85rT+HiLbaTfzDkvUvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCJP00hvz150D; Fri, 17 Oct 2025 17:59: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 59HHxWBi086102; Fri, 17 Oct 2025 17:59:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHxWV1086099; Fri, 17 Oct 2025 17:59:32 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:59:32 GMT Message-Id: <202510171759.59HHxWV1086099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 4940dc8c3526 - releng/15.0 - socket(2): refactor the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 4940dc8c352679a516ddc4463fb28e97ec9faddf Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=4940dc8c352679a516ddc4463fb28e97ec9faddf commit 4940dc8c352679a516ddc4463fb28e97ec9faddf Author: Gleb Smirnoff AuthorDate: 2025-10-14 18:41:25 +0000 Commit: Colin Percival CommitDate: 2025-10-17 17:58:47 +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 Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D52771 (cherry picked from commit 86d17239233ea4f5766bee68ba6355804525cefa) (cherry picked from commit ad13fd5a8fa1607805d11ced3428e86dbd94778e) (cherry picked from commit a091d6919c3175f2385719e7b1c6fbd8576134f9) --- 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 b211611c6354..16317fcd3aa5 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 fulfill +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 Fri Oct 17 17:59:33 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCJQ3MBKz6CRd3; Fri, 17 Oct 2025 17:59: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 4cpCJQ1H6Rz3WN4; Fri, 17 Oct 2025 17:59:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zakjfN5Vnj7TupeEa5hgyNtXtm1cXzwFEIPRiAk4rTQ=; b=FpF9z10q2HtinyCcRDqy0pWQZ478vLZMvM7ed1S+WxiaIJ0zZOd88l+BkjeJRtT6hCPRX2 JH2bARUPVoIjOfEHN2RCSQ4lsMDyAombVdJzbRrp5BudW9Gzi9BUQfVEdSy0F1aXJU04Ur Gv3EvwYu0SrcfnzDgCRDW0hxXCQL6RBlS+wmIGRoIcKNIfzO3EDdGjxhDk5rqovkMJ1GsA R3Fv8VKr2sAEtDLzG/BsFGeVBrpPAEM/Ceyf1bNDw7im4yX2+MeoIchzEDZP+OpNRZcO28 ElRgSmjy1+X8/3dXMD/ASiNO0cN279rTtFku2Ol9BuSWA55lYNAkl64QNjLnvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zakjfN5Vnj7TupeEa5hgyNtXtm1cXzwFEIPRiAk4rTQ=; b=oPN+HX7EC6/HZwQWJi+0GdmAZVi8+zHtbL8eWeG+lTAWG5pTdbXbPjOKn1ciHHTFt5rxr6 p2/nritFuLHM+GFz+YY+j5u+RLrEf5YVWG0t+sCgRaHGodo5iIswdYbC7qDmhm8RASgDMu sHMaNzXKAevcHLySq4n2/b8H683GFyYe9rdRUfsr7vS+1A1SvC1QD8T+MKcEWFEM+th+Ni l518+hCvpt+9a28NyI/+F0I9cQrGZOpjhcTpsGDwomDhgIj4gqDH5+wMg4egbfq9DOOU2+ 7RFnbFKz1E/4RP51L537AlbFgaEETZkOlQJWBHyd/Il7PUeKEp2a87NUgspXWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723974; a=rsa-sha256; cv=none; b=x2kMxM5ekjp2DgFXWGEqc6KPRNlDu8cMAqI1vlQ+jNVTP0awFzpV7PPcxUPm+HS1e/d/Mj yJqpaeeNUnAQmUUN9ICnjMBsrAj7yURDegKSd680s5unHxSyjSA/9FcCcauk7SL/NFkhNh Q2MMYN+i4dynViLXrOZHQMHHNbISj2l084O38I8OR8jVPhFMzzGjlTWot0W8DIv5KDXQSA NlK9+txMEkJfoNg0ZEEXIyJgUaZQSejMs7SQGXAnXY14MhMtoE0DWZxt5pWwlvjAscd8M5 8aXQeNtuDp5HA9Z4NUsq/3vDvkbl8WifXrB3JZ9u0hTFwAW26/qTmyuwGB7sfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCJQ0kCgz150F; Fri, 17 Oct 2025 17:59: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 59HHxX8x086136; Fri, 17 Oct 2025 17:59:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHxXrm086133; Fri, 17 Oct 2025 17:59:33 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:59:33 GMT Message-Id: <202510171759.59HHxXrm086133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 46d39e9f09a4 - releng/15.0 - sockstat: show path state column only when useful List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 46d39e9f09a4e7e97984933466228c3fc11600a6 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=46d39e9f09a4e7e97984933466228c3fc11600a6 commit 46d39e9f09a4e7e97984933466228c3fc11600a6 Author: Michael Tuexen AuthorDate: 2025-10-09 19:16:38 +0000 Commit: Colin Percival CommitDate: 2025-10-17 17:58:52 +0000 sockstat: show path state column only when useful Showing the path state column is only useful, if there is at least one SCTP endpoint shown, which is not in the state CLOSED or LISTEN. Don't show it when it is not useful. Approved by: re (cperciva) Reviewed by: rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52986 (cherry picked from commit 746eadecaa7dc8913721cbaa9be4e603bd36ea49) (cherry picked from commit 9a0a114b7f10c9510f6e2d4e5d1c5e40218f383b) --- usr.bin/sockstat/main.c | 8 ++++++-- usr.bin/sockstat/sockstat.1 | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index f0eb83eb3e9f..7fedfd5b8724 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -103,6 +103,7 @@ static bool opt_u; /* Show Unix domain sockets */ static u_int opt_v; /* Verbose mode */ static bool opt_w; /* Automatically size the columns */ static bool is_xo_style_encoding; +static bool show_path_state = false; /* * Default protocols to use if no -P was defined. @@ -584,6 +585,7 @@ gather_sctp(void) !(local_all_loopback || foreign_all_loopback))) { RB_INSERT(socks_t, &socks, sock); + show_path_state = true; } else { free_socket(sock); } @@ -1485,7 +1487,7 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) } else if (!is_xo_style_encoding) xo_emit(" {:encaps/%*s}", cw->encaps, "??"); } - if (opt_s) { + if (opt_s && show_path_state) { if (faddr != NULL && s->proto == IPPROTO_SCTP && s->state != SCTP_CLOSED && @@ -1632,7 +1634,9 @@ display(void) if (opt_U) xo_emit(" {T:/%*s}", cw.encaps, "ENCAPS"); if (opt_s) { - xo_emit(" {T:/%-*s}", cw.path_state, "PATH STATE"); + if (show_path_state) + xo_emit(" {T:/%-*s}", cw.path_state, + "PATH STATE"); xo_emit(" {T:/%-*s}", cw.conn_state, "CONN STATE"); } if (opt_b) diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1 index dabb3042bfd4..d14eb967ad0f 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 7, 2025 +.Dd October 9, 2025 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -205,6 +205,7 @@ 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. .It Li CONN STATE The connection state if .Fl s From nobody Fri Oct 17 17:59:35 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCJR3NHBz6CR9p; Fri, 17 Oct 2025 17:59: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 4cpCJR2Fwkz3WXq; Fri, 17 Oct 2025 17:59:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9SAMeYJ97Y6h+rQLYxe5QeP4kaLYvZfzMyHUpcSkag=; b=Z6n9MvKEXZgM0+fPkdsMrS3OkxvJkNZnT+bi5J1zgpI49Ypp9koTu75F4eYPNS7zolni46 eYF1r3fYMZxj8uPyo8Z4hbYhiogTOcDOBkdZOEjLTzW//wOvk4SWB37eaIPlwVpWBzRl2a kfUQQEsYqJJLHTPMNN0e81LPDw5DMxSoZ2wXprGEeAvNtI/MnYru5oTZ11xhKy9dmYz1pm kdf7XMDcQRhg6zLYaoDjZkR9wpcQrT2FKdSG8ryTslkd15guIabAOJEnToQotuqAHf+uVq tQgEizdVGjlUIBRty/lg1aOOUbl0rJ4NBtnSxobAb3hoxJ0PPe140mAyQ5gpGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9SAMeYJ97Y6h+rQLYxe5QeP4kaLYvZfzMyHUpcSkag=; b=jtx2TmAekTQAaTWeSKunt0/L2eoqQTgoGgneiB5gs9/qfFRaemtpd/beSzFABaotC5o37N o+PtW48jjyLZEIXnMH3KLnESPoSDd0eZVPjJRLmoGBTM/PsTIwyVX0fA9rbZvzJOo/kopn qPLvgRGEiGoP79h5Cd+qjGWkCXjjueuLNyQLrYYbVN9FSYISqr5/M0RJpsURv5ypRejh8y Q0xBh6RnGNMpxkhBGxasy7Tom7kdGl2xtzovSskJVtftpmt0A98MKP0A/M9pzfblNFnKKS TP/th/xdnnzQjD8kA7RunCMDTP+kV8KDuAadI/j7zlSHOFpO5T6dzmqVOgLFwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723975; a=rsa-sha256; cv=none; b=BO5vtAfMDxQpEKPi5hfnwyGLp/xw46tsZnq5YxrfYUpfr+RTJBjK6/Ujfgp89XCcR3UE/9 THLYJdBPtgyfsgdceCOR6p27gnWc4j3b3UGyHC5KjXRzfLetWhJsZkWcPGcsLoFLzAeQzv KOeeyRIh3i9y84x/pKi9XE4LVgKNoaBzRV8bSr2B2asl+stKckOzdZvnKKBrEfqDGlTPwC JBBnmA/Sh6BKERBF2JR+1lJW7VLUmmtkrpOB6Pwtwh8ojvnLQvxi1IvfuzGsW4OXZKO2mN te0Px5xdGnxZ/qLT4xODuGqUkR5msf8vff3hN8DmzFxRtKzt5gri4jMz8Rip2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCJR1fNxz14Gx; Fri, 17 Oct 2025 17:59: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 59HHxZB1086170; Fri, 17 Oct 2025 17:59:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHxZTj086167; Fri, 17 Oct 2025 17:59:35 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:59:35 GMT Message-Id: <202510171759.59HHxZTj086167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 25d7786e3290 - releng/15.0 - sockstat: improve handling of path state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 25d7786e32907f27929ae7a3af6a19f341cfe8be Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=25d7786e32907f27929ae7a3af6a19f341cfe8be commit 25d7786e32907f27929ae7a3af6a19f341cfe8be Author: Michael Tuexen AuthorDate: 2025-10-14 06:39:37 +0000 Commit: Colin Percival CommitDate: 2025-10-17 17:58:57 +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. Approved by: re (cperciva) Reviewed by: asomers Fixes: 746eadecaa7d ("sockstat: show path state column only when useful") Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D53005 (cherry picked from commit 97e858f5b335ae8f98619f9cee8ab9a0501cd06d) (cherry picked from commit f6923c0a68a67d69762e188273f0e87f231ec964) --- 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 Fri Oct 17 17:59:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCJS5dNjz6CRRy; Fri, 17 Oct 2025 17:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpCJS2pdRz3WNV; Fri, 17 Oct 2025 17:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDcYpiaTMDCYs3nJXyDvUjScRbq/BxAj4IA3pu+Eh+4=; b=qNJB9YhODu8jZ0FWUGhGQRThbnNWHu++FTpXi+mftRavZvWPpAn2WYcwJvmLhhQPvG0rTf ytq0H5ZLo438cbIrbVatf2scoQO+FDAYPkwZLrin+/fOoCK4QGmoU7A9tw6NljwKR47/tQ zHgFugDsGMKX40X1leWHpbpgsZJkYiznPJc6qsQPVzq1zZ9Ovm0JflZBOjvTMaMbjFEyd1 1G47EwXlLmF3gCd1EHGNxaLQk/vHbsA6i9vTKVAHIIikrQAmnONgyAcPYmCob1xoqWU5yQ WWRWCktxMgUcnGnxevO51uzwtTJ/THAUWYTDgnvpf+r47/HoGUBDIwAlVqW7BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDcYpiaTMDCYs3nJXyDvUjScRbq/BxAj4IA3pu+Eh+4=; b=pcIOBjjrrsS1kfqM6fpLYSxN5v7IEMRODNdORgQgG01eHRSBXFi1TStvbVpygzHtkSF/X3 Bcxkeryr3zbxG3A4HyLFTcv8Mfz7QI2UxdJJ5XJZ9h8UPg2PMSE/0VQrLb6WJ+p59qTJGZ tOkiOjzDaGAno9r0C7wiij3huzdEJfvvSiRzWFA5Y+qmZ1J6NR1xc4Qus17Yre+2cHvE7t uJ7ZOlLaNq4hIxAVVi58x9aB4aq8LBN0AlyCkj1zl9AXpkFWwWa3FWZqB108aGCSLjAJDA bjGM3ouh6rehTqegcKIePkIDUHKcr0Zr+wUL6ebJ56nPidhowdPhSEtKOpElcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723976; a=rsa-sha256; cv=none; b=iU9pODmsAsuqXTy9MpR4GndUJCT1MTC2eU2C/KNhpyGZLnZUF6vSLdc+GQKIxn3agzzZl1 pF1KNNNUOPYbqdxQaUtDbkgF8waAvLvEA2yrPmpDxWXtBCDsI/tGlT/qViiQdzY4vAT2yI nGKVZNtFzVk/jxAM4thVL3HT6m1KXg+qqW2eMsELm4VnjitYTFGxij5dmfkKQMe3VuTgRe DrUTupn8MA/S0fM3+a8uS6/pfD7psuMEcXTITCF24hoOisS3mM+0+2Uu6otZ+ePYmAsYlC lIppEGI7v4nSUwLaV4TFm6kYV7LnxxN/RtKHhXtP3XBY8r9Q663u4hj8Xp/N8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCJS2Mxfz14Gy; Fri, 17 Oct 2025 17:59: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 59HHxa49086207; Fri, 17 Oct 2025 17:59:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHxaGX086204; Fri, 17 Oct 2025 17:59:36 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:59:36 GMT Message-Id: <202510171759.59HHxaGX086204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 7060c79d2403 - releng/15.0 - vm_object: Reset kvo_path on each iteration in vm_object_list_handler() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 7060c79d2403431940e9cc79c71959f8c0f7f6f1 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7060c79d2403431940e9cc79c71959f8c0f7f6f1 commit 7060c79d2403431940e9cc79c71959f8c0f7f6f1 Author: Mark Johnston AuthorDate: 2025-10-10 13:26:29 +0000 Commit: Colin Percival CommitDate: 2025-10-17 17:59:00 +0000 vm_object: Reset kvo_path on each iteration in vm_object_list_handler() Otherwise we print a bogus path for anonymous objects. Approved by: re (cperciva) Reviewed by: kib MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52997 (cherry picked from commit 13d866b314f87df901c0a1cbbbc56d56ee0d7b7c) (cherry picked from commit 55ad7c573e5b7b8fa25dd368ccad1d1774c77824) --- sys/vm/vm_object.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 6d9ea8bf9d93..fe84523b7a8f 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2522,15 +2522,13 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) continue; } mtx_unlock(&vm_object_list_mtx); + + memset(kvo, 0, sizeof(*kvo)); kvo->kvo_size = ptoa(obj->size); kvo->kvo_resident = obj->resident_page_count; kvo->kvo_ref_count = obj->ref_count; kvo->kvo_shadow_count = atomic_load_int(&obj->shadow_count); kvo->kvo_memattr = obj->memattr; - kvo->kvo_active = 0; - kvo->kvo_inactive = 0; - kvo->kvo_laundry = 0; - kvo->kvo_flags = 0; if (!swap_only) { vm_page_iter_init(&pages, obj); VM_RADIX_FOREACH(m, &pages) { @@ -2552,9 +2550,6 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) } } - kvo->kvo_vn_fileid = 0; - kvo->kvo_vn_fsid = 0; - kvo->kvo_vn_fsid_freebsd11 = 0; freepath = NULL; fullpath = ""; vp = NULL; From nobody Fri Oct 17 17:59:37 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCJV156Mz6CRZW; Fri, 17 Oct 2025 17:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpCJT3zDFz3WNj; Fri, 17 Oct 2025 17:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qDB69c6i6q55VWKtTR4+zFnPVSwQ5fbSpVBL4LFe+VQ=; b=nPup0TQCHGHjlhCX+ahZQBmnJuu1dgNa3wENS9qJQcWK06h33BYlQOZKi8BciXyRNDRLZF crz22m4RBMVm3u53sx6mJcrBKRw9zGxNU7KIp5RlaPuBrXv6o/T1ZwcY+F4yxoPyU5RKXp xmdufWnmxajQltfF1hxFzmqIgf8zibvRQajvnHngcjLupnJbMzjgJzwGQqwEaIcDnc8aR5 HhrXzsAgYu4FIV4KtqPJ3cJAIZDyiqk+fEIbbL2fnR7y91qGWln/5OcSTZVBR7GCg6mGzs xTosxCFXvpQMGdg/skBYP6ET3vyMXJtm7G39oJWxO3tD37sSoNk673/VNVW39Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qDB69c6i6q55VWKtTR4+zFnPVSwQ5fbSpVBL4LFe+VQ=; b=xBVblgLe12VoZJghaFgBRmXvqHaEClauKa2RNrFtKgPOHaogIVyRwwGkuSKjiyQhqiGNmK jhzxeYwIvc686RO8XZRoY7iv+xEMuUrisaOoA0yNyVuCajQQC6ONHNXi2sAlPfxRbL17WI wF7Q+EmfzkLYvi7nZwtr69ktr6xsZNKeEioMupqvsRolViXTMUFmxzK+ZHUaWcamxhkzSt tDf8Sj3UjRLlkPQxhZxb3ds2kJjjUCg37ovIXYohQIM0ywsazwXfOF7f+ttUvaEfCvCGZo n+Xe+/scOQ7E4noWDDr4kT82uHNmHnM/qGl3qTO/5dyurajvJCvWXanx67Lakw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723977; a=rsa-sha256; cv=none; b=E0j55HurXGLaxmoUW1DWF/wG4gAYtajF8z2mYtN6ut2NvBVLXbsG5BXwc7kNbi+EMvx+KU z0JSjGBoerp2/hIj+EXwoJLpV+hKIJQCdCdXcusDpgmGG0PBsaX1Z3iAQv/kTy1DxDBns2 IozUD5J4b5s0CCrZfIeLQdxo/e2d27HK4/8fhD44BRpta+mD48vrRhTsKoXsOtQrpGdrmm nSWNyP/GDpRYUNLM8TyikckUveverlwuZIYHnbVU5nCrgOu94WYvvDa0Pg4b87xglBnAeL 6om8vMehzCq4xbBGnnLwse2uAY+f8rgphHYiClHIwfWKqAbtBivT7yRw93FFBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCJT3Kxtz149x; Fri, 17 Oct 2025 17:59: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 59HHxb04086244; Fri, 17 Oct 2025 17:59:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHxbTM086241; Fri, 17 Oct 2025 17:59:37 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:59:37 GMT Message-Id: <202510171759.59HHxbTM086241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: cb752719c7df - releng/15.0 - vm_object: Export the number of wired pages in vm_object_list_handler() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: cb752719c7dfe73d218e95c893424d6b21bada45 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=cb752719c7dfe73d218e95c893424d6b21bada45 commit cb752719c7dfe73d218e95c893424d6b21bada45 Author: Mark Johnston AuthorDate: 2025-10-10 13:26:50 +0000 Commit: Colin Percival CommitDate: 2025-10-17 17:59:04 +0000 vm_object: Export the number of wired pages in vm_object_list_handler() Approved by: re (cperciva) Reviewed by: alc, kib MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53008 (cherry picked from commit ffca0c44ffe84352f6fdd24862c070d348d783d4) (cherry picked from commit 2eaee0dbc28c6f8f61b37f93026ef1623dc4047d) --- sys/sys/user.h | 3 ++- sys/vm/vm_object.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/sys/user.h b/sys/sys/user.h index 3183f0792256..1704bc089d85 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -617,7 +617,8 @@ struct kinfo_vmobject { } kvo_type_spec; /* Type-specific union */ uint64_t kvo_me; /* Uniq handle for anon obj */ uint64_t kvo_laundry; /* Number of laundry pages. */ - uint64_t _kvo_qspare[5]; + uint64_t kvo_wired; /* Number of wired pages. */ + uint64_t _kvo_qspare[4]; uint32_t kvo_swapped; /* Number of swapped pages */ uint32_t kvo_flags; uint32_t _kvo_ispare[6]; diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index fe84523b7a8f..5b4517d2bf0c 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2547,6 +2547,9 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) kvo->kvo_inactive++; else if (vm_page_in_laundry(m)) kvo->kvo_laundry++; + + if (vm_page_wired(m)) + kvo->kvo_wired++; } } From nobody Fri Oct 17 17:59:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCJV5ydgz6CRd6; Fri, 17 Oct 2025 17:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpCJV3xnQz3WhV; Fri, 17 Oct 2025 17:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LxQ2HFStQq8Fq7Vo2GO5VXglQTwZuMadkX6D3KMs9Fo=; b=y4VkfS7ULaKAzdS3dappu6F5myfhJfeNWKiu0TZDlrykh3tGLlNE22UV/RX5bI0MCP6spx m2+MR9aJqlss9ZJd72TcGZWP/aKb+ldEf08LPZUQyAmKxcX0HGKbf+uNY9FFYq0A2ZJxUE uzcNEyIlLw88xKZzpGtISovbcC28LZBH3LwE0LJQDqSiR41KL9yoOL2LmDiJgqKYm5KDCB 2OpNx4X4g7lqu81Ig0AWx5TDFTIenfuTgn8AnLQ3vL/JTYBhG1UDKEevMgJGwdIPtb5sDT rjDqBctg/EuPHZ5kRHZofDAsxQKuehvNg37C54CayIwW7bwvsTjpH3za47ZdRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LxQ2HFStQq8Fq7Vo2GO5VXglQTwZuMadkX6D3KMs9Fo=; b=P+qBssMfKmc8ye7svyUiV1sKV0ze0ztXMypROtTXvU+AROtEqxPCvoVsGHplCI4rpMk/aT 2PeXg1DfDgSoroln/9fcLUm2k2EyYmNHPMBVB7RuOqjhH+NyRyg9nqH7a+Ny+HNhrMjOcg lk3kxfcqxyCEyWF2+wTxX3aLWj5CGONcHJ3+CUzOQKD5uuiAZCXBT2zcoqpCSkTDttRiq1 2Yz6AjEDyTHcAii/vToss7ewbi7hQ8TELUWA7gbrm4n/M9WIMbqyvOQj6KaMB/R+4NJcbL CGYHBvwGwzOIv0YYP3vFvpdT9nMDt68g4U3USzTEVXQhVlsvZ+fZRzriFV/Dig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723978; a=rsa-sha256; cv=none; b=hyBsLj0LD8GJanKn0COMZt0P4ftOEXv/vD6o+hHyUmd1MNQz7q+coMGLY+s74eIBPohVTH nBQGiH9NJ+5REO9n9jx/xE15HkBUNfKGEdzXy6YjUxPB08+OiejOYOJhsWREA24U0cWQFT V1raeotlTMq/zh1DPrmPUlwHvRyroEk41vW7vHhdzi+eUfY183xEkl2+2OWThTl1e8Dugy e5Xii0Fw2JU03LL7NIseagS6XhZljdJOCuQ76VYYIoEwPGfVbrDN4sX9z9m0NfoXTEXgO5 AZH6QyE/9dx0/zCbd58RzT4l/Sf6QL3aRYnZij/LNKzh6c0PySYxZ89cbceYuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCJV3WyDz14WW; Fri, 17 Oct 2025 17:59: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 59HHxcA3086283; Fri, 17 Oct 2025 17:59:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHxcRN086279; Fri, 17 Oct 2025 17:59:38 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:59:38 GMT Message-Id: <202510171759.59HHxcRN086279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: ecce77b7c975 - releng/15.0 - vmstat: Print the number of wired pages in each object List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: ecce77b7c97588814d86d83ae2d9293ee26db7a0 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=ecce77b7c97588814d86d83ae2d9293ee26db7a0 commit ecce77b7c97588814d86d83ae2d9293ee26db7a0 Author: Mark Johnston AuthorDate: 2025-10-10 13:28:01 +0000 Commit: Colin Percival CommitDate: 2025-10-17 17:59:08 +0000 vmstat: Print the number of wired pages in each object Approved by: re (cperciva) Reviewed by: alc, kib MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53008 (cherry picked from commit f66bb825f5895eed98c959cd2b612453b4d1aa6c) (cherry picked from commit 5bc5ce6e61e6ccf5a9386aa15936f4a9a51055b3) --- usr.bin/vmstat/vmstat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 7a7c83fe1ac8..9b4d3a25ee07 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1465,6 +1465,7 @@ display_object(struct kinfo_vmobject *kvo) xo_emit("{:active/%5ju} ", (uintmax_t)kvo->kvo_active); xo_emit("{:inactive/%5ju} ", (uintmax_t)kvo->kvo_inactive); xo_emit("{:laundry/%5ju} ", (uintmax_t)kvo->kvo_laundry); + xo_emit("{:wired/%5ju} ", (uintmax_t)kvo->kvo_wired); xo_emit("{:refcount/%3d} ", kvo->kvo_ref_count); xo_emit("{:shadowcount/%3d} ", kvo->kvo_shadow_count); @@ -1568,7 +1569,8 @@ doobjstat(void) return; } xo_emit("{T:RES/%5s} {T:ACT/%5s} {T:INACT/%5s} {T:LAUND/%5s} " - "{T:REF/%3s} {T:SHD/%3s} {T:CM/%2s} {T:TP/%3s} {T:PATH/%s}\n"); + "{T:WIRED/%5s} {T:REF/%3s} {T:SHD/%3s} {T:CM/%2s} {T:TP/%3s} " + "{T:PATH/%s}\n"); xo_open_list("object"); for (i = 0; i < cnt; i++) display_object(&kvo[i]); From nobody Fri Oct 17 17:59:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCJX3D09z6CRgj; Fri, 17 Oct 2025 17:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpCJW4zfSz3Whq; Fri, 17 Oct 2025 17:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D97v9D4673jqfMDVPnq1a0hMno3XBUfo37RLuqNA+ao=; b=JNYUN1JYzIrMSa+JWW5DWTsc7Y3QlB4X6BUkUO33WVHOboWER7sC7jzeDhG9J3r+jy47x7 HaoXOdHBKmI+PL+ydZVleXJA/1JYhKwbS4rZjldXWlfKEokNdU27N+cdhniclcqMX1Eyg3 4thvamzZBrkaIHc3RKqDdqZHbeLlcJb29VBiSRhlI9suF+KPKw9ghUo9JI//JVX3ACMF6/ WmTqoB6SAIlxU7tg0i4KqgYNtAxRQRxXdzi877CB3XzxZZ3SZb/hWODFa6X+a/OjoTHOEn 3SXyyVqKaNihQWnsEh8k9A0WRnwATS4HkghjVH2l4+JKVwpg0mASSPSdwmGm5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D97v9D4673jqfMDVPnq1a0hMno3XBUfo37RLuqNA+ao=; b=R7jAEp3c6pu0koal3YGbY3uya6iJBYPfebrxjndOhtsDPl/UcFjHYgCKdLdyv9WaUJMI3w BYpcEO7khi2ads/brRTLIRthG1ydlw1qUZAtn78ej21Rycw/CjTU+csnQ2ST7FgFg3vDTS qwLozpIuqy/3muLug3Q5MKzPmOpYFOWQ6KlJJ+MH36FlkS4mD4N+CwFP1O2vDln4MmR0Gb S7uHmmH2lVVfVetQs38MIcYpTvPCrQYVpTIKAyLNJjRtDas4N0zrCcbJ91dbW0WTkgjuVy NUS7VLz2D8Ie70UNOsyh1zdbPjQbHoOboyT50wVn4aNk5b626WdiROTpcM8+dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723979; a=rsa-sha256; cv=none; b=ISFmq0psX2JkHXzC/Bc8L6JWD7QsdTVU2iT1NM5Cx6yepF6sIsYXhpJ0r/Bzy74GaYRpR4 NmZsZTzvok63Ox+f1v0ScZdVWnc05HIDgI2VtV1XqWtPFoJMA7e0CafwKeEyB0h5HfZ2hW D10xSMfLvyfOlNNzs67Ec4PPy26/9HQhuKx+sFack3D4OOm7DzCQh4t/1k2Sm/Qnz6NPk4 xMckIJPlb7V9eiKFEFqZg3HBRrPJcQUtX2YxCNqrfNFtMuxqq5ZsonrTCV5PaXtwjujKrq TX4iri/I4ZpXv+N+iQ9FmadHHGlZmqs+08UsdFJuGxAJNZXYihNKxfXDd9/1Cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCJW4THxz14H1; Fri, 17 Oct 2025 17:59: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 59HHxdwB086320; Fri, 17 Oct 2025 17:59:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHxdoN086317; Fri, 17 Oct 2025 17:59:39 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:59:39 GMT Message-Id: <202510171759.59HHxdoN086317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: bdb41ce6077a - releng/15.0 - certctl.8: Update documentation of BUNDLE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: bdb41ce6077a122e21e8ca1555f214fc9dc4131f Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bdb41ce6077a122e21e8ca1555f214fc9dc4131f commit bdb41ce6077a122e21e8ca1555f214fc9dc4131f Author: Mark Johnston AuthorDate: 2025-10-14 13:32:46 +0000 Commit: Colin Percival CommitDate: 2025-10-17 17:59:12 +0000 certctl.8: Update documentation of BUNDLE - Fix a typo. - Provide the default path. Approved by: re (cperciva) Reviewed by: des MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53001 (cherry picked from commit ec8e07e8fa94767dceb409c4c7c1840bba39172b) (cherry picked from commit 1de06221ccec1deb338b57c235009e2cd94676c8) --- 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 Fri Oct 17 17:59:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpCJY39dqz6CRVM; Fri, 17 Oct 2025 17:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpCJX69hcz3WnK; Fri, 17 Oct 2025 17:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnjX90eWIPJbeSIkDAgunYidDltkJmV56ux5uKJlEFg=; b=PfVp5MbfXFs++OQZw4mudwWs/rYxnV940CvgBdJgknO6sMjkHOZnTQwka5jVb6/6GG6+c7 Kq3Cry299F+/eFkeM9WR+beYMbNkMGMMO3bilIgNY4r9uP4uQUyJCS5Vuw3O1XjNpN03lk 5YY5zS1WAK2SUeZxBf2njAC+FORBJfceGUbgiwFpN3F+ZR/EqB7IUbI/nKmuj5U8vLuP0H EI43bvWy8FMWoXoPpNqfMu8tZL16PVY+SnlE+RN95l01/Xw/fBMvS7j4Y6pJu54kWwx1a8 IrekoWMPpZki2z1ymqyC6bb/9XjnQYxVtmkwpRzBtIDGxkCZkCWGtBhmO+Oqkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760723980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnjX90eWIPJbeSIkDAgunYidDltkJmV56ux5uKJlEFg=; b=kUBB5JapFy50Vt04tZfQBa2rCICA3X5UwgbOSc/NvZ70cJPghzoO9Rzw50tsXGHRcAqreI nxZujSt0Gah0ovd2gSWQwERpPIr8ViqbPNskLqgIe29XYwBeZ4sPlldU6F/NNDiwvWZk0x e09FKVqlYbv+fAjcDWfxY00c/3e5K3iwZ/bqlCn+H+dHYYKSa5giOfcVWoa8f5vjNil5pZ eXRZBC5XsTF8CPJF0jHHhyIDVpNfpFG6sYGBTDOrAgirvvd4pzNXIt4dC1MABdutquIU1L n9CSKDpuqTnuve9hnISvqlUwWVk/UQaWKzjgos0ETHQPuPeYWhB12Eto9FnSsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760723980; a=rsa-sha256; cv=none; b=fS5TbTxHXOpTrFIMdpDX215FH/+MUcespsYUKV6HEXkcFxYUDAKh81E2ch3pactCHPLE8S Ucsz/lfReAtRqvOiPoJRxWRvxAZEl1fWKoyaepDOxZrPIbIYajUdtjfHFFha96S+ke8EQu knOYi2RutcimLvQNSTplHTNDf+iGd74vb1Ql25n4Nez62EkwpZECL26LeaBrQTPme/utz3 330lUBjsGIKTnm3rMt5O/yZfkoLrBaz9JHLs5PXKaK3K+Ib1Bsgpr55vcwhWgmJwqfb5WO 6wFpNz/LxuXjWCsS8bfSjxtMIiJkyQWb3v0AUr8qbc81BHQ97FS7NYxurI8rZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpCJX5Gpkz149y; Fri, 17 Oct 2025 17:59: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 59HHxe7c086354; Fri, 17 Oct 2025 17:59:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HHxeLn086351; Fri, 17 Oct 2025 17:59:40 GMT (envelope-from git) Date: Fri, 17 Oct 2025 17:59:40 GMT Message-Id: <202510171759.59HHxeLn086351@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 1ae34f2dd8c0 - releng/15.0 - linker: Make it easier to find the VNET section layout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 1ae34f2dd8c0d407f6764822671f9409620ffad9 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1ae34f2dd8c0d407f6764822671f9409620ffad9 commit 1ae34f2dd8c0d407f6764822671f9409620ffad9 Author: Mark Johnston AuthorDate: 2025-10-03 14:25:38 +0000 Commit: Colin Percival CommitDate: 2025-10-17 17:59:15 +0000 linker: Make it easier to find the VNET section layout When trying to find the address of a VNET variable from a debugger, it helps to have the original address of the VNET section. In particular, given the address of a vnet_entry_foo symbol, one wants to easily find the linker file that the symbol belongs to. In link_elf_obj.c, the section address for VNET and DPCPU sections is overwritten in link_elf_link_preload() and link_elf_load_file(). Add an "origaddr" field to store the original absolute address of the section base. In link_elf.c the elf_file_t already has the fields we want, but they were not getting filled out for the kernel itself. Fix that too, since that simplifies things for debuggers and improves consistency. Approved by: re (cperciva) Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52730 (cherry picked from commit 07747afd516e710814fdc65afb0e5000d046f28f) (cherry picked from commit 5a926b3cd53b6c4516ad59c4693d7a999549c34c) --- sys/kern/link_elf.c | 6 ++++++ sys/kern/link_elf_obj.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index bbebadc4c395..ebd203858b66 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -518,9 +518,15 @@ link_elf_init(void* arg) (void)link_elf_link_common_finish(linker_kernel_file); linker_kernel_file->flags |= LINKER_FILE_LINKED; TAILQ_INIT(&set_pcpu_list); + ef->pcpu_start = DPCPU_START; + ef->pcpu_stop = DPCPU_STOP; + ef->pcpu_base = DPCPU_START; #ifdef VIMAGE TAILQ_INIT(&set_vnet_list); vnet_save_init((void *)VNET_START, VNET_STOP - VNET_START); + ef->vnet_start = VNET_START; + ef->vnet_stop = VNET_STOP; + ef->vnet_base = VNET_START; #endif } diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 151aab96f9be..a3a53a39bfd6 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -70,6 +70,7 @@ typedef struct { void *addr; + void *origaddr; /* Used by debuggers. */ Elf_Off size; int flags; /* Section flags. */ int sec; /* Original section number. */ @@ -492,7 +493,8 @@ link_elf_link_preload(linker_class_t cls, const char *filename, case SHT_FINI_ARRAY: if (shdr[i].sh_addr == 0) break; - ef->progtab[pb].addr = (void *)shdr[i].sh_addr; + ef->progtab[pb].addr = ef->progtab[pb].origaddr = + (void *)shdr[i].sh_addr; if (shdr[i].sh_type == SHT_PROGBITS) ef->progtab[pb].name = "<>"; #ifdef __amd64__ @@ -1088,6 +1090,8 @@ link_elf_load_file(linker_class_t cls, const char *filename, ef->progtab[pb].name = "<>"; if (ef->progtab[pb].name != NULL && !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) { + ef->progtab[pb].origaddr = + (void *)(uintptr_t)mapbase; ef->progtab[pb].addr = dpcpu_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { @@ -1101,6 +1105,8 @@ link_elf_load_file(linker_class_t cls, const char *filename, #ifdef VIMAGE else if (ef->progtab[pb].name != NULL && !strcmp(ef->progtab[pb].name, VNET_SETNAME)) { + ef->progtab[pb].origaddr = + (void *)(uintptr_t)mapbase; ef->progtab[pb].addr = vnet_data_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { From nobody Fri Oct 17 18:16:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpChV5DYZz6CSbZ; Fri, 17 Oct 2025 18:16: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 4cpChV4XSfz3bBW; Fri, 17 Oct 2025 18:16:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760725018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9gHG9BX/J5jGRLhghSV7ZgnZkDtZNOZC+PkuCdYLrOQ=; b=cCPVmdH7jBAP/IuSTt3/pKgjFgZdcDr0/PIsat/n/FyAmGJHfOQm6RxXMSKl0C5WcjZkXS FFYx0EASq+yhYr19VV3/IzJNVoi0ScNHH46vwDYkOfW4yygl5eCqocQ6TylLT1j2d3TlxZ 1DnVHiES6Jn5eokiAPvQaJoYUpa/IcTctKqRC/KaYwPUgjjg0XVji/yuqkoRRpX724pAVN fycACaHAPM67+C9u4/AfTmHNOwyoHQcDFOaqrJxmeV9hmP1NvUJFYfsse/3cQXqjEUdxx7 CU8JP7TWDToOBiAiwenCuXgV9PeBaaOcBIUFGUJNBT566+lgTmlyj12H1rd11g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760725018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9gHG9BX/J5jGRLhghSV7ZgnZkDtZNOZC+PkuCdYLrOQ=; b=hr6bX3+Lzl22P5txkwOZJFZH8c5MOuHB6KNYXxhXQtv7Pfxb1OgTps8nLPilYYE6FRBR0z E3KiBtfIvSrWPsUgdq5yWQ+TQ151uT1cbZ5SebX12lE633bmUr5Colol/bhRrGP13wb/SU wSiAgRbLBpFgRREn6OjgNVdAvnmvS7yOvx6q0bLDM+eCvxG5xFFHcM5FLBajTyty6Srefp 1MNW57wL/1/JUjftQMUc3QJizVdPeP0IWXYHu2plkBH6Ok9fs4TmyBbWhLdXxtDZ9eunz9 zw+3+8Cfz/+kK15Z0I22Bs10QIibAb4AgtrqEZH07vTYqjrTAwS13CJwWO4VYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760725018; a=rsa-sha256; cv=none; b=vfwChMoq7lUGAPMiIhRw9G979eYMQFBv6XYSuW6YgSaOGHlxfCt/FswONnD6O8l8OYTE2G GyeQk7P3G6Ed4eSDkhmu2wthFBUQyMmBjgpeDKqldPt4FOfA4H5IxX4jk0+kGwae6SJP0W Sxm4ElIV+wU214PSzNjpVmTgIyiJRCfOKsQmohfbrGMQdUHtmkWCB4LKe3FA6yQ88d66nB b0fbfYM7vn0G2/fBo2BreGjZefc1Jho0VAdGKuQn6vhQO19nZx3PBOKGvNjOP2XPSZCuZh pSV2cGdWB3QZnF2WYf0EQ3HyVmRN5UNl7Z1a/Y+RKEpNva8nYY/KLjusnACpYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpChV40hrz15NQ; Fri, 17 Oct 2025 18:16: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 59HIGwPB023737; Fri, 17 Oct 2025 18:16:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59HIGwjF023734; Fri, 17 Oct 2025 18:16:58 GMT (envelope-from git) Date: Fri, 17 Oct 2025 18:16:58 GMT Message-Id: <202510171816.59HIGwjF023734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 3edefa72bc4e - releng/15.0 - 15.0: Update to BETA2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 3edefa72bc4e3f85681aeccaf73981ab38530a53 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=3edefa72bc4e3f85681aeccaf73981ab38530a53 commit 3edefa72bc4e3f85681aeccaf73981ab38530a53 Author: Colin Percival AuthorDate: 2025-10-17 18:16:15 +0000 Commit: Colin Percival CommitDate: 2025-10-17 18:16:15 +0000 15.0: Update to BETA2 Approved by: re (implicit) Sponsored by: https://www.patreon.com/cperciva --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index d933d23c1639..746b799a908d 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -51,7 +51,7 @@ TYPE="FreeBSD" REVISION="15.0" -BRANCH="BETA1" +BRANCH="BETA2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Oct 17 18:25:55 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpJgP4jCKz6Cmsf for ; Fri, 17 Oct 2025 22:01:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yx1-xb12f.google.com (mail-yx1-xb12f.google.com [IPv6:2607:f8b0:4864:20::b12f]) (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 4cpJgP2lWxz41fr 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-xb12f.google.com with SMTP id 956f58d0204a3-63bcfcb800aso2672745d50.0 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=D2i/dQxm2MBqtehuWYiiZ+4VbR1IZ3kymOgkDMKhXal1BzS/EFTRrClPViwaeJpDrO DWhSOu/vqFocCqmbPA0tmkdhPVKpKRQVnkuwzSc1co7nONkmPITQjS/oduD67wVQXtQo xOiT8hqyWXTGL5eSVMzNCWyjzhWIwZj45d1U1HCyPtXYSGGtvGLJ4BEkzaPg/eOr5SRt l2Enq9Vt1LmOCBfcVxtyF904O1JFBURkuqsoZbnfEAv1xFmxKKZnWQhb/jK1KUWR6Bvj njLAQ/PWT/OM7SKg32OF+mCOTgUzkjfA+9KtVCNlalnintcXETZDm88Ub9nsR6CdOW0B YJng== X-Forwarded-Encrypted: i=1; AJvYcCV2bUUMxdDJ3zzVj1Uhg8gYKA0NAGHaclIE4MWJlvdP5RCnW4ujyaBDr9qvtG4+/teZnMRvVbhLh4GOCTsUtfXXCbg5@freebsd.org X-Gm-Message-State: AOJu0YxBqlb3AE2RHoEnymGDJluwSDC3Lg2AkPh9qDptmurLGfcmjXwH Us/BxBGukwTPI7yAJzfIOkl+ch7ANQgQBIu/pkZS9CQv+nQ65cZeKDNKj2hOogyTvZ+AYwH1mk0 uRCr/d0tVhfPx2G3oi4FwGWILKXXVH70= X-Gm-Gg: ASbGncvu4ltEs7PtJaqfCzfwIxADEP7VivngJVutQQzuH6ZXpQL0bFypJFHGbfn4nj1 jlLgNz+IhWTsnGwBKIVJ2Hle+25Xh/ifKgam50BuWzYWWMlqg7IloLI5L9B85gAZA3bAn5ZnTyr 0cBuyj46l1Yu3zWodTf+etjFMXV7S9jfKv14kzx2QFgFK7mpWoi13dVcyraVOSLmhremK3dBKzr Y6OjRbJKOBrLm7Pcalry5CtmH3XdMzHx0nPl5BSWGzsZsANfl0kRtBUqEqpmPmRTFj4b66smTmq HqDRDzaCe5xxnQFxvg== 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <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: 4cpJgP2lWxz41fr 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:18 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 05:14:19 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 07:59:22 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 12:02:10 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpgKZ3WdTz6D2hJ; Sat, 18 Oct 2025 12:02: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 4cpgKZ3J3gz4B8N; Sat, 18 Oct 2025 12:02:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760788930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0z0VwAv1VcNbmgFeDimOQZmWiq6QduiRmkoryIXtvEk=; b=R19yrZraOa69pw+X121WYr3dcW73mIBeH8iZFGUrs2L550IMCTdfe4Vky2PcZB1YVQW8VF ifi7A8yNsH2gmnkGS+s/sOZczpupy+p5bmqKS2zc0Xnd/ajdBggR/oXR6rW4KZVG5P+IrB 4zyAXoZrieJn6DqovG/xRigMygolIz4xtkAZujVujzT1qtmXLFsZXdXK6+oE1AqZAX9T6j BW6qGs8+BYUSOXUlkDF4E9eNfNGjkz1r3lShSIl9abz7qNi/rMev4nFzoutEwuLbQCOHr5 DqWXJ5qNRonlyQ7EUWRr9VBQH6tC6xZY2yBYjT3rFwTxOG0DA3pH99KOxTuLfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760788930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0z0VwAv1VcNbmgFeDimOQZmWiq6QduiRmkoryIXtvEk=; b=YDgQR0c6bUGQyJFaKnCRKAFQwQaeVlN3ljhNx/9/7yZXOWx0NzJ6vyRlyuFpSIT4pGWe86 cUM4YkiPSRlI9Frf+mY4aJe1oItgHLlTZohkrEeVrZni3G/EfimytoTPTS6rOXkp7aX+Dq pdvqBb5mwvNXHJkBgrUYI9aw0SfKYxkgNKLtZjyGGyrac4lpuCtL5bFKAt0AlxR9aqxkc+ ob1S+re6yHZOBSWn8gVd00eDoBuWQyGORtsIDeFrb+JWb55r0ZaYjm83Jaih5v9T9U4KUA XP1+EWbsKDITiW1SqCBtrNwdS3gCvaE9Y9Af8iTD1G+V8l98LtxE2x44Le1Sbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760788930; a=rsa-sha256; cv=none; b=H/smmRWfIUOuSaF9a6h81VQsQyWtDlFWG/fVJKV3M/cqTeGMBpZiDuJ2MxDrdspzfKzq+n VrWaLTDaDDeiOpTehPa2jv9lcpVte2Ifsh5s2ogGTMa+SCaU2Fy3vp8Tz4B5RsEy0QYKPF H9An+g5bg5PWPbFwEtCKL5PUwAZUJA609RbNJzPuy2o170PasFTq9CYxZjZtcdVXzUnnYX DdZO43J4m0Pvq4hz46f0z8tpwmgBfbxyaIMqxNs37CfAiieMNuHd8gGBiP/q6kk74MR9hN 1SQ8mNF0bs7zQd/TgqC1pYZ65Oxpe8UYbYGJmYYrSXsfuPcKlhJHnQoooOHBtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpgKZ2qp3zh6v; Sat, 18 Oct 2025 12:02: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 59IC2ALe028471; Sat, 18 Oct 2025 12:02:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IC2Af6028468; Sat, 18 Oct 2025 12:02:10 GMT (envelope-from git) Date: Sat, 18 Oct 2025 12:02:10 GMT Message-Id: <202510181202.59IC2Af6028468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 2efda1b8c0f9 - stable/15 - carp6: revise the generation of ND6 NA List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2efda1b8c0f9583f01273ee21902a08dda9cb8bb Auto-Submitted: auto-generated The branch stable/15 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=2efda1b8c0f9583f01273ee21902a08dda9cb8bb commit 2efda1b8c0f9583f01273ee21902a08dda9cb8bb Author: Andrey V. Elsukov AuthorDate: 2025-10-03 07:57:44 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-10-18 12:01:21 +0000 carp6: revise the generation of ND6 NA * use ND_NA_FLAG_ROUTER flag in carp_send_na() when we work as router. * use in6addr_any as destination address for nd6_na_output(), then it will use ipv6-all-nodes multicast address. * add in6_selectsrc_nbr() function that accepts additional argument ip6_moptions. Use this function from ND6 code to avoid cases when nd6_na_output/nd6_ns_output can not find source address for multicast destinations. * add some comments from RFC2461 for better understanding. * use tlladdr argument as flags and use ND6_NA_OPT_LLA when we need to add target link-layer address option, and ND6_NA_CARP_MASTER when we know that target address is CARP master. Then we can prepare correct CARP's mac address if target address is CARP master. * move blocks of code where multicast options is initialized and use it when destination address is multicast. Reviewed by: kp Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D52825 (cherry picked from commit 716acd9367df49d44f29eeb783706025f3a04c65) --- sys/netinet/ip_carp.c | 27 ++++++++--- sys/netinet6/in6_src.c | 54 ++++++++++++++++------ sys/netinet6/ip6_var.h | 2 + sys/netinet6/nd6.h | 4 ++ sys/netinet6/nd6_nbr.c | 121 ++++++++++++++++++++++--------------------------- 5 files changed, 119 insertions(+), 89 deletions(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index d3d7957cf087..4f553b9aac5e 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1640,18 +1640,31 @@ carp_iamatch(struct ifaddr *ifa, uint8_t **enaddr) static void carp_send_na(struct carp_softc *sc) { - static struct in6_addr mcast = IN6ADDR_LINKLOCAL_ALLNODES_INIT; struct ifaddr *ifa; - struct in6_addr *in6; + int flags; + /* + * Sending Unsolicited Neighbor Advertisements + * + * If the node is a router, we MUST set the Router flag to one. + * We set Override flag to one and send link-layer address option, + * thus neighboring nodes will install the new link-layer address. + */ + flags = ND_NA_FLAG_OVERRIDE; + if (V_ip6_forwarding) + flags |= ND_NA_FLAG_ROUTER; CARP_FOREACH_IFA(sc, ifa) { if (ifa->ifa_addr->sa_family != AF_INET6) continue; - - in6 = IFA_IN6(ifa); - nd6_na_output(sc->sc_carpdev, &mcast, in6, - ND_NA_FLAG_OVERRIDE, 1, NULL); - DELAY(1000); /* XXX */ + /* + * We use unspecified address as destination here to avoid + * scope initialization for each call. + * nd6_na_output() will use all nodes multicast address if + * destinaion address is unspecified. + */ + nd6_na_output(sc->sc_carpdev, &in6addr_any, IFA_IN6(ifa), + flags, ND6_NA_OPT_LLA | ND6_NA_CARP_MASTER, NULL); + DELAY(1000); /* RetransTimer */ } } diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index dd6864482b3c..3e55c6e5fc05 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -132,8 +132,8 @@ static int in6_selectif(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct ifnet **, struct ifnet *, u_int); static int in6_selectsrc(uint32_t, struct sockaddr_in6 *, - struct ip6_pktopts *, struct inpcb *, struct ucred *, - struct ifnet **, struct in6_addr *); + struct ip6_pktopts *, struct ip6_moptions *, struct inpcb *, + struct ucred *, struct ifnet **, struct in6_addr *); static struct in6_addrpolicy *lookup_addrsel_policy(struct sockaddr_in6 *); @@ -173,8 +173,8 @@ static struct in6_addrpolicy *match_addrsel_policy(struct sockaddr_in6 *); static int in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, - struct ip6_pktopts *opts, struct inpcb *inp, struct ucred *cred, - struct ifnet **ifpp, struct in6_addr *srcp) + struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct inpcb *inp, + struct ucred *cred, struct ifnet **ifpp, struct in6_addr *srcp) { struct rm_priotracker in6_ifa_tracker; struct in6_addr dst, tmp; @@ -186,7 +186,6 @@ in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, u_int32_t odstzone; int prefer_tempaddr; int error; - struct ip6_moptions *mopts; NET_EPOCH_ASSERT(); KASSERT(srcp != NULL, ("%s: srcp is NULL", __func__)); @@ -205,13 +204,6 @@ in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, *ifpp = NULL; } - if (inp != NULL) { - INP_LOCK_ASSERT(inp); - mopts = inp->in6p_moptions; - } else { - mopts = NULL; - } - /* * If the source address is explicitly specified by the caller, * check if the requested source address is indeed a unicast address @@ -552,10 +544,13 @@ in6_selectsrc_socket(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, uint32_t fibnum; int error; + INP_LOCK_ASSERT(inp); + fibnum = inp->inp_inc.inc_fibnum; retifp = NULL; - error = in6_selectsrc(fibnum, dstsock, opts, inp, cred, &retifp, srcp); + error = in6_selectsrc(fibnum, dstsock, opts, inp->in6p_moptions, + inp, cred, &retifp, srcp); if (error != 0) return (error); @@ -583,7 +578,7 @@ in6_selectsrc_socket(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, * Stores selected address to @srcp. * Returns 0 on success. * - * Used by non-socket based consumers (ND code mostly) + * Used by non-socket based consumers */ int in6_selectsrc_addr(uint32_t fibnum, const struct in6_addr *dst, @@ -602,13 +597,42 @@ in6_selectsrc_addr(uint32_t fibnum, const struct in6_addr *dst, dst_sa.sin6_scope_id = scopeid; sa6_embedscope(&dst_sa, 0); - error = in6_selectsrc(fibnum, &dst_sa, NULL, NULL, NULL, &retifp, srcp); + error = in6_selectsrc(fibnum, &dst_sa, NULL, NULL, + NULL, NULL, &retifp, srcp); if (hlim != NULL) *hlim = in6_selecthlim(NULL, retifp); return (error); } +/* + * Select source address based on @fibnum, @dst and @mopts. + * Stores selected address to @srcp. + * Returns 0 on success. + * + * Used by non-socket based consumers (ND code mostly) + */ +int +in6_selectsrc_nbr(uint32_t fibnum, const struct in6_addr *dst, + struct ip6_moptions *mopts, struct ifnet *ifp, struct in6_addr *srcp) +{ + struct sockaddr_in6 dst_sa; + struct ifnet *retifp; + int error; + + retifp = ifp; + bzero(&dst_sa, sizeof(dst_sa)); + dst_sa.sin6_family = AF_INET6; + dst_sa.sin6_len = sizeof(dst_sa); + dst_sa.sin6_addr = *dst; + dst_sa.sin6_scope_id = ntohs(in6_getscope(dst)); + sa6_embedscope(&dst_sa, 0); + + error = in6_selectsrc(fibnum, &dst_sa, NULL, mopts, + NULL, NULL, &retifp, srcp); + return (error); +} + static struct nhop_object * cache_route(uint32_t fibnum, const struct sockaddr_in6 *dst, struct route_in6 *ro, uint32_t flowid) diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 12b00d4f9934..cc6f9efbe4b4 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -428,6 +428,8 @@ int in6_selectsrc_socket(struct sockaddr_in6 *, struct ip6_pktopts *, struct inpcb *, struct ucred *, int, struct in6_addr *, int *); int in6_selectsrc_addr(uint32_t, const struct in6_addr *, uint32_t, struct ifnet *, struct in6_addr *, int *); +int in6_selectsrc_nbr(uint32_t, const struct in6_addr *, + struct ip6_moptions *, struct ifnet *, struct in6_addr *); int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct nhop_object **, u_int, uint32_t); diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 9cb2571da58b..ae1de36f73e0 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -170,6 +170,10 @@ struct in6_ndifreq { #define NDPRF_ONLINK 0x1 #define NDPRF_DETACHED 0x2 +/* ND6 NA output flags */ +#define ND6_NA_OPT_LLA 0x01 +#define ND6_NA_CARP_MASTER 0x02 + /* protocol constants */ #define MAX_RTR_SOLICITATION_DELAY 1 /* 1sec */ #define RTR_SOLICITATION_INTERVAL 4 /* 4sec */ diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 640348a1d198..45ab5841b291 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -244,10 +244,9 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) * In implementation, we add target link-layer address by default. * We do not add one in MUST NOT cases. */ - if (!IN6_IS_ADDR_MULTICAST(&daddr6)) - tlladdr = 0; - else - tlladdr = 1; + tlladdr = 0; + if (IN6_IS_ADDR_MULTICAST(&daddr6)) + tlladdr |= ND6_NA_OPT_LLA; /* * Target address (taddr6) must be either: @@ -256,9 +255,11 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) * (3) "tentative" address on which DAD is being performed. */ /* (1) and (3) check. */ - if (ifp->if_carp) + if (ifp->if_carp) { ifa = (*carp_iamatch6_p)(ifp, &taddr6); - else + if (ifa != NULL) + tlladdr |= ND6_NA_CARP_MASTER; + } else ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6); /* (2) check. */ @@ -321,33 +322,29 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) goto freeit; } + /* + * If the Target Address is either an anycast address or a unicast + * address for which the node is providing proxy service, or the Target + * Link-Layer Address option is not included, the Override flag SHOULD + * be set to zero. Otherwise, the Override flag SHOULD be set to one. + */ + if (anycast == 0 && proxy == 0 && (tlladdr & ND6_NA_OPT_LLA) != 0) + rflag |= ND_NA_FLAG_OVERRIDE; /* * If the source address is unspecified address, entries must not * be created or updated. - * It looks that sender is performing DAD. Output NA toward - * all-node multicast address, to tell the sender that I'm using - * the address. + * It looks that sender is performing DAD. nd6_na_output() will + * send NA toward all-node multicast address, to tell the sender + * that I'm using the address. * S bit ("solicited") must be zero. */ - if (IN6_IS_ADDR_UNSPECIFIED(&saddr6)) { - struct in6_addr in6_all; - - in6_all = in6addr_linklocal_allnodes; - if (in6_setscope(&in6_all, ifp, NULL) != 0) - goto bad; - nd6_na_output_fib(ifp, &in6_all, &taddr6, - ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | - rflag, tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL, - M_GETFIB(m)); - goto freeit; + if (!IN6_IS_ADDR_UNSPECIFIED(&saddr6)) { + nd6_cache_lladdr(ifp, &saddr6, lladdr, lladdrlen, + ND_NEIGHBOR_SOLICIT, 0); + rflag |= ND_NA_FLAG_SOLICITED; } - nd6_cache_lladdr(ifp, &saddr6, lladdr, lladdrlen, - ND_NEIGHBOR_SOLICIT, 0); - - nd6_na_output_fib(ifp, &saddr6, &taddr6, - ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | - rflag | ND_NA_FLAG_SOLICITED, tlladdr, + nd6_na_output_fib(ifp, &saddr6, &taddr6, rflag, tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL, M_GETFIB(m)); freeit: if (ifa != NULL) @@ -439,13 +436,6 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, return; M_SETFIB(m, fibnum); - if (daddr6 == NULL || IN6_IS_ADDR_MULTICAST(daddr6)) { - m->m_flags |= M_MCAST; - im6o.im6o_multicast_ifp = ifp; - im6o.im6o_multicast_hlim = 255; - im6o.im6o_multicast_loop = 0; - } - icmp6len = sizeof(*nd_ns); m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len; m->m_data += max_linkhdr; /* or M_ALIGN() equivalent? */ @@ -470,6 +460,12 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0) goto bad; } + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { + m->m_flags |= M_MCAST; + im6o.im6o_multicast_ifp = ifp; + im6o.im6o_multicast_hlim = 255; + im6o.im6o_multicast_loop = 0; + } if (nonce == NULL) { char ip6buf[INET6_ADDRSTRLEN]; struct ifaddr *ifa = NULL; @@ -491,20 +487,16 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, saddr6); if (ifa == NULL) { int error; - struct in6_addr dst6, src6; - uint32_t scopeid; - in6_splitscope(&ip6->ip6_dst, &dst6, &scopeid); - error = in6_selectsrc_addr(fibnum, &dst6, - scopeid, ifp, &src6, NULL); + error = in6_selectsrc_nbr(fibnum, &ip6->ip6_dst, &im6o, + ifp, &ip6->ip6_src); if (error) { nd6log((LOG_DEBUG, "%s: source can't be " "determined: dst=%s, error=%d\n", __func__, - ip6_sprintf(ip6buf, &dst6), + ip6_sprintf(ip6buf, &ip6->ip6_dst), error)); goto bad; } - ip6->ip6_src = src6; } else ip6->ip6_src = *saddr6; @@ -967,7 +959,9 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) * - proxy advertisement delay rule (RFC2461 7.2.8, last paragraph, SHOULD) * - anycast advertisement delay rule (RFC2461 7.2.7, SHOULD) * - * tlladdr - 1 if include target link-layer address + * tlladdr: + * - 0x01 if include target link-layer address + * - 0x02 if target address is CARP MASTER * sdl0 - sockaddr_dl (= proxy NA) or NULL */ static void @@ -980,8 +974,7 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, struct ip6_hdr *ip6; struct nd_neighbor_advert *nd_na; struct ip6_moptions im6o; - struct in6_addr daddr6, dst6, src6; - uint32_t scopeid; + struct in6_addr daddr6; NET_EPOCH_ASSERT(); @@ -1005,13 +998,6 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, return; M_SETFIB(m, fibnum); - if (IN6_IS_ADDR_MULTICAST(&daddr6)) { - m->m_flags |= M_MCAST; - im6o.im6o_multicast_ifp = ifp; - im6o.im6o_multicast_hlim = 255; - im6o.im6o_multicast_loop = 0; - } - icmp6len = sizeof(*nd_na); m->m_pkthdr.len = m->m_len = sizeof(struct ip6_hdr) + icmp6len; m->m_data += max_linkhdr; /* or M_ALIGN() equivalent? */ @@ -1023,26 +1009,24 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, ip6->ip6_vfc |= IPV6_VERSION; ip6->ip6_nxt = IPPROTO_ICMPV6; ip6->ip6_hlim = 255; + if (IN6_IS_ADDR_UNSPECIFIED(&daddr6)) { /* reply to DAD */ - daddr6.s6_addr16[0] = IPV6_ADDR_INT16_MLL; - daddr6.s6_addr16[1] = 0; - daddr6.s6_addr32[1] = 0; - daddr6.s6_addr32[2] = 0; - daddr6.s6_addr32[3] = IPV6_ADDR_INT32_ONE; + daddr6 = in6addr_linklocal_allnodes; if (in6_setscope(&daddr6, ifp, NULL)) goto bad; flags &= ~ND_NA_FLAG_SOLICITED; } - ip6->ip6_dst = daddr6; + if (IN6_IS_ADDR_MULTICAST(&daddr6)) { + m->m_flags |= M_MCAST; + im6o.im6o_multicast_ifp = ifp; + im6o.im6o_multicast_hlim = 255; + im6o.im6o_multicast_loop = 0; + } - /* - * Select a source whose scope is the same as that of the dest. - */ - in6_splitscope(&daddr6, &dst6, &scopeid); - error = in6_selectsrc_addr(fibnum, &dst6, - scopeid, ifp, &src6, NULL); + ip6->ip6_dst = daddr6; + error = in6_selectsrc_nbr(fibnum, &daddr6, &im6o, ifp, &ip6->ip6_src); if (error) { char ip6buf[INET6_ADDRSTRLEN]; nd6log((LOG_DEBUG, "nd6_na_output: source can't be " @@ -1050,28 +1034,31 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, ip6_sprintf(ip6buf, &daddr6), error)); goto bad; } - ip6->ip6_src = src6; nd_na = (struct nd_neighbor_advert *)(ip6 + 1); nd_na->nd_na_type = ND_NEIGHBOR_ADVERT; nd_na->nd_na_code = 0; nd_na->nd_na_target = *taddr6; in6_clearscope(&nd_na->nd_na_target); /* XXX */ + /* + * If we respond from CARP address, we need to prepare mac address + * for carp_output(). + */ + if (ifp->if_carp && (tlladdr & ND6_NA_CARP_MASTER)) + mac = (*carp_macmatch6_p)(ifp, m, taddr6); /* * "tlladdr" indicates NS's condition for adding tlladdr or not. * see nd6_ns_input() for details. * Basically, if NS packet is sent to unicast/anycast addr, * target lladdr option SHOULD NOT be included. */ - if (tlladdr) { + if (tlladdr & ND6_NA_OPT_LLA) { /* * sdl0 != NULL indicates proxy NA. If we do proxy, use * lladdr in sdl0. If we are not proxying (sending NA for * my address) use lladdr configured for the interface. */ if (sdl0 == NULL) { - if (ifp->if_carp) - mac = (*carp_macmatch6_p)(ifp, m, taddr6); if (mac == NULL) mac = nd6_ifptomac(ifp); } else if (sdl0->sa_family == AF_LINK) { @@ -1081,7 +1068,7 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, mac = LLADDR(sdl); } } - if (tlladdr && mac) { + if ((tlladdr & ND6_NA_OPT_LLA) && mac != NULL) { int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen; struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_na + 1); From nobody Sat Oct 18 12:03:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpgM85qwkz6D34V; Sat, 18 Oct 2025 12:03: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 4cpgM85c47z3C3N; Sat, 18 Oct 2025 12:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760789012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HE+fnS3r6azAwq3Ivc5O0xLKvXqoYepuGH+ZqxNNfUY=; b=B4w6L9BRlxvgedmasjYWaxG9BYoPLiRmvnKpBgGfiDN/R1fS0wXST3xxCMO4rvz8fvlzHC qGlF+EYJikj34U1IBOlmshvwpAfHKJ52gVaNfSTuCrfjfsGtq5htC9r1TWb8EJDAkeeGlz MbrEV4ECXHv1xNJc4MBPBQef5ct9wkxFUahAq2J4to83rsmjZc9cVWnCg0hM9BrVfiIrto UsPw2C825hCzXk8oOxl2DHttuQexreVj0gfna2FXtdV9394MPJEDND3XqZW6TadtaCz+os jWnUrFf5cjcBs0mcjzRmOKaQ1LFzTshM8SsXJ5fNqD3SeSaGDWFRfegyPB/7gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760789012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HE+fnS3r6azAwq3Ivc5O0xLKvXqoYepuGH+ZqxNNfUY=; b=Cr2+sFJK4o9xK0z+ndRbzHjHdmFK00RQUab0PxGFJZcJaZKI363owKJjCwiAkeuog/q/ym rrUj0OQpbOuUvGZghBmUC0VxH+VxYPLb23yQEz2SzAYQZHROcKkXqog4k+qUxCOF80crxL wuhnO9mWlu4SH0UR9BOubxZC4mnnArVbnYoWjiQAOsCH3g2xIkE3NWen82mUdPYI34oDxE 7bQdzoqz7Qq7hPCHwbqmNgbLrcc46cgaPAEmvCsjZW45ENC/e5WLbVUcEGAbbmgao7Pqgw I5Klmf9PzRXfF14ZMFuctHmTwA1GIzz54fZiaMmZbVqxUst7AJPkgq7r0TX6rQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760789012; a=rsa-sha256; cv=none; b=V+dbJ1iMU9ovA7rUwzbUS0Cim82iWtJN9v0DGBaw9vmHCvQCApYO2AECBtP6vQssQvC93w LHDLjH+VJuGm8+L2d24delZBDpXm84An+M5jXxB8RD/hMTnjui5/k9MSnTuImxpZ1DjBrN uYJlzSWSe4P5JOsX9t6XZwejJJWoZpnfoOQ80ObaI5bw1ao9o50GIvgUG8dgoHpyBKMhS6 IeKq75OemUAfCgn6+m/GURY02vhTiKKlUMhXh8r7nmGr/Fyi/0heBCR1UGtylnCh/NxjA2 S2xXmzX8KzslhtsqQTnktGkVONlIW8NOs0pIa6eOb+/AKHnRLC2fFd7/tIOzTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpgM84x6Vzh8r; Sat, 18 Oct 2025 12:03: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 59IC3W3Q032257; Sat, 18 Oct 2025 12:03:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IC3W9m032254; Sat, 18 Oct 2025 12:03:32 GMT (envelope-from git) Date: Sat, 18 Oct 2025 12:03:32 GMT Message-Id: <202510181203.59IC3W9m032254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 7a2a874a0b46 - stable/14 - carp6: revise the generation of ND6 NA List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7a2a874a0b46db3c3829151b207f738852bd77c0 Auto-Submitted: auto-generated The branch stable/14 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=7a2a874a0b46db3c3829151b207f738852bd77c0 commit 7a2a874a0b46db3c3829151b207f738852bd77c0 Author: Andrey V. Elsukov AuthorDate: 2025-10-03 07:57:44 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-10-18 12:02:49 +0000 carp6: revise the generation of ND6 NA * use ND_NA_FLAG_ROUTER flag in carp_send_na() when we work as router. * use in6addr_any as destination address for nd6_na_output(), then it will use ipv6-all-nodes multicast address. * add in6_selectsrc_nbr() function that accepts additional argument ip6_moptions. Use this function from ND6 code to avoid cases when nd6_na_output/nd6_ns_output can not find source address for multicast destinations. * add some comments from RFC2461 for better understanding. * use tlladdr argument as flags and use ND6_NA_OPT_LLA when we need to add target link-layer address option, and ND6_NA_CARP_MASTER when we know that target address is CARP master. Then we can prepare correct CARP's mac address if target address is CARP master. * move blocks of code where multicast options is initialized and use it when destination address is multicast. Reviewed by: kp Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D52825 (cherry picked from commit 716acd9367df49d44f29eeb783706025f3a04c65) --- sys/netinet/ip_carp.c | 27 ++++++++--- sys/netinet6/in6_src.c | 54 ++++++++++++++++------ sys/netinet6/ip6_var.h | 2 + sys/netinet6/nd6.h | 4 ++ sys/netinet6/nd6_nbr.c | 121 ++++++++++++++++++++++--------------------------- 5 files changed, 119 insertions(+), 89 deletions(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 97815ea089b5..cf8ebd8d4bfc 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1200,18 +1200,31 @@ carp_iamatch(struct ifaddr *ifa, uint8_t **enaddr) static void carp_send_na(struct carp_softc *sc) { - static struct in6_addr mcast = IN6ADDR_LINKLOCAL_ALLNODES_INIT; struct ifaddr *ifa; - struct in6_addr *in6; + int flags; + /* + * Sending Unsolicited Neighbor Advertisements + * + * If the node is a router, we MUST set the Router flag to one. + * We set Override flag to one and send link-layer address option, + * thus neighboring nodes will install the new link-layer address. + */ + flags = ND_NA_FLAG_OVERRIDE; + if (V_ip6_forwarding) + flags |= ND_NA_FLAG_ROUTER; CARP_FOREACH_IFA(sc, ifa) { if (ifa->ifa_addr->sa_family != AF_INET6) continue; - - in6 = IFA_IN6(ifa); - nd6_na_output(sc->sc_carpdev, &mcast, in6, - ND_NA_FLAG_OVERRIDE, 1, NULL); - DELAY(1000); /* XXX */ + /* + * We use unspecified address as destination here to avoid + * scope initialization for each call. + * nd6_na_output() will use all nodes multicast address if + * destinaion address is unspecified. + */ + nd6_na_output(sc->sc_carpdev, &in6addr_any, IFA_IN6(ifa), + flags, ND6_NA_OPT_LLA | ND6_NA_CARP_MASTER, NULL); + DELAY(1000); /* RetransTimer */ } } diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 52fe78a1a83b..91e75b1925b5 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -134,8 +134,8 @@ static int in6_selectif(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct ifnet **, struct ifnet *, u_int); static int in6_selectsrc(uint32_t, struct sockaddr_in6 *, - struct ip6_pktopts *, struct inpcb *, struct ucred *, - struct ifnet **, struct in6_addr *); + struct ip6_pktopts *, struct ip6_moptions *, struct inpcb *, + struct ucred *, struct ifnet **, struct in6_addr *); static struct in6_addrpolicy *lookup_addrsel_policy(struct sockaddr_in6 *); @@ -175,8 +175,8 @@ static struct in6_addrpolicy *match_addrsel_policy(struct sockaddr_in6 *); static int in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, - struct ip6_pktopts *opts, struct inpcb *inp, struct ucred *cred, - struct ifnet **ifpp, struct in6_addr *srcp) + struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct inpcb *inp, + struct ucred *cred, struct ifnet **ifpp, struct in6_addr *srcp) { struct rm_priotracker in6_ifa_tracker; struct in6_addr dst, tmp; @@ -188,7 +188,6 @@ in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, u_int32_t odstzone; int prefer_tempaddr; int error; - struct ip6_moptions *mopts; NET_EPOCH_ASSERT(); KASSERT(srcp != NULL, ("%s: srcp is NULL", __func__)); @@ -207,13 +206,6 @@ in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, *ifpp = NULL; } - if (inp != NULL) { - INP_LOCK_ASSERT(inp); - mopts = inp->in6p_moptions; - } else { - mopts = NULL; - } - /* * If the source address is explicitly specified by the caller, * check if the requested source address is indeed a unicast address @@ -554,10 +546,13 @@ in6_selectsrc_socket(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, uint32_t fibnum; int error; + INP_LOCK_ASSERT(inp); + fibnum = inp->inp_inc.inc_fibnum; retifp = NULL; - error = in6_selectsrc(fibnum, dstsock, opts, inp, cred, &retifp, srcp); + error = in6_selectsrc(fibnum, dstsock, opts, inp->in6p_moptions, + inp, cred, &retifp, srcp); if (error != 0) return (error); @@ -585,7 +580,7 @@ in6_selectsrc_socket(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, * Stores selected address to @srcp. * Returns 0 on success. * - * Used by non-socket based consumers (ND code mostly) + * Used by non-socket based consumers */ int in6_selectsrc_addr(uint32_t fibnum, const struct in6_addr *dst, @@ -604,13 +599,42 @@ in6_selectsrc_addr(uint32_t fibnum, const struct in6_addr *dst, dst_sa.sin6_scope_id = scopeid; sa6_embedscope(&dst_sa, 0); - error = in6_selectsrc(fibnum, &dst_sa, NULL, NULL, NULL, &retifp, srcp); + error = in6_selectsrc(fibnum, &dst_sa, NULL, NULL, + NULL, NULL, &retifp, srcp); if (hlim != NULL) *hlim = in6_selecthlim(NULL, retifp); return (error); } +/* + * Select source address based on @fibnum, @dst and @mopts. + * Stores selected address to @srcp. + * Returns 0 on success. + * + * Used by non-socket based consumers (ND code mostly) + */ +int +in6_selectsrc_nbr(uint32_t fibnum, const struct in6_addr *dst, + struct ip6_moptions *mopts, struct ifnet *ifp, struct in6_addr *srcp) +{ + struct sockaddr_in6 dst_sa; + struct ifnet *retifp; + int error; + + retifp = ifp; + bzero(&dst_sa, sizeof(dst_sa)); + dst_sa.sin6_family = AF_INET6; + dst_sa.sin6_len = sizeof(dst_sa); + dst_sa.sin6_addr = *dst; + dst_sa.sin6_scope_id = ntohs(in6_getscope(dst)); + sa6_embedscope(&dst_sa, 0); + + error = in6_selectsrc(fibnum, &dst_sa, NULL, mopts, + NULL, NULL, &retifp, srcp); + return (error); +} + static struct nhop_object * cache_route(uint32_t fibnum, const struct sockaddr_in6 *dst, struct route_in6 *ro, uint32_t flowid) diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 464b74c4fd88..a365c6bb6268 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -403,6 +403,8 @@ int in6_selectsrc_socket(struct sockaddr_in6 *, struct ip6_pktopts *, struct inpcb *, struct ucred *, int, struct in6_addr *, int *); int in6_selectsrc_addr(uint32_t, const struct in6_addr *, uint32_t, struct ifnet *, struct in6_addr *, int *); +int in6_selectsrc_nbr(uint32_t, const struct in6_addr *, + struct ip6_moptions *, struct ifnet *, struct in6_addr *); int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct nhop_object **, u_int, uint32_t); diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 1db1b666c60b..6d717a321027 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -170,6 +170,10 @@ struct in6_ndifreq { #define NDPRF_ONLINK 0x1 #define NDPRF_DETACHED 0x2 +/* ND6 NA output flags */ +#define ND6_NA_OPT_LLA 0x01 +#define ND6_NA_CARP_MASTER 0x02 + /* protocol constants */ #define MAX_RTR_SOLICITATION_DELAY 1 /* 1sec */ #define RTR_SOLICITATION_INTERVAL 4 /* 4sec */ diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 353db66c2323..db0894df4923 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -244,10 +244,9 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) * In implementation, we add target link-layer address by default. * We do not add one in MUST NOT cases. */ - if (!IN6_IS_ADDR_MULTICAST(&daddr6)) - tlladdr = 0; - else - tlladdr = 1; + tlladdr = 0; + if (IN6_IS_ADDR_MULTICAST(&daddr6)) + tlladdr |= ND6_NA_OPT_LLA; /* * Target address (taddr6) must be either: @@ -256,9 +255,11 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) * (3) "tentative" address on which DAD is being performed. */ /* (1) and (3) check. */ - if (ifp->if_carp) + if (ifp->if_carp) { ifa = (*carp_iamatch6_p)(ifp, &taddr6); - else + if (ifa != NULL) + tlladdr |= ND6_NA_CARP_MASTER; + } else ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6); /* (2) check. */ @@ -321,33 +322,29 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) goto freeit; } + /* + * If the Target Address is either an anycast address or a unicast + * address for which the node is providing proxy service, or the Target + * Link-Layer Address option is not included, the Override flag SHOULD + * be set to zero. Otherwise, the Override flag SHOULD be set to one. + */ + if (anycast == 0 && proxy == 0 && (tlladdr & ND6_NA_OPT_LLA) != 0) + rflag |= ND_NA_FLAG_OVERRIDE; /* * If the source address is unspecified address, entries must not * be created or updated. - * It looks that sender is performing DAD. Output NA toward - * all-node multicast address, to tell the sender that I'm using - * the address. + * It looks that sender is performing DAD. nd6_na_output() will + * send NA toward all-node multicast address, to tell the sender + * that I'm using the address. * S bit ("solicited") must be zero. */ - if (IN6_IS_ADDR_UNSPECIFIED(&saddr6)) { - struct in6_addr in6_all; - - in6_all = in6addr_linklocal_allnodes; - if (in6_setscope(&in6_all, ifp, NULL) != 0) - goto bad; - nd6_na_output_fib(ifp, &in6_all, &taddr6, - ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | - rflag, tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL, - M_GETFIB(m)); - goto freeit; + if (!IN6_IS_ADDR_UNSPECIFIED(&saddr6)) { + nd6_cache_lladdr(ifp, &saddr6, lladdr, lladdrlen, + ND_NEIGHBOR_SOLICIT, 0); + rflag |= ND_NA_FLAG_SOLICITED; } - nd6_cache_lladdr(ifp, &saddr6, lladdr, lladdrlen, - ND_NEIGHBOR_SOLICIT, 0); - - nd6_na_output_fib(ifp, &saddr6, &taddr6, - ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | - rflag | ND_NA_FLAG_SOLICITED, tlladdr, + nd6_na_output_fib(ifp, &saddr6, &taddr6, rflag, tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL, M_GETFIB(m)); freeit: if (ifa != NULL) @@ -439,13 +436,6 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, return; M_SETFIB(m, fibnum); - if (daddr6 == NULL || IN6_IS_ADDR_MULTICAST(daddr6)) { - m->m_flags |= M_MCAST; - im6o.im6o_multicast_ifp = ifp; - im6o.im6o_multicast_hlim = 255; - im6o.im6o_multicast_loop = 0; - } - icmp6len = sizeof(*nd_ns); m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len; m->m_data += max_linkhdr; /* or M_ALIGN() equivalent? */ @@ -470,6 +460,12 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0) goto bad; } + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { + m->m_flags |= M_MCAST; + im6o.im6o_multicast_ifp = ifp; + im6o.im6o_multicast_hlim = 255; + im6o.im6o_multicast_loop = 0; + } if (nonce == NULL) { char ip6buf[INET6_ADDRSTRLEN]; struct ifaddr *ifa = NULL; @@ -491,20 +487,16 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, saddr6); if (ifa == NULL) { int error; - struct in6_addr dst6, src6; - uint32_t scopeid; - in6_splitscope(&ip6->ip6_dst, &dst6, &scopeid); - error = in6_selectsrc_addr(fibnum, &dst6, - scopeid, ifp, &src6, NULL); + error = in6_selectsrc_nbr(fibnum, &ip6->ip6_dst, &im6o, + ifp, &ip6->ip6_src); if (error) { nd6log((LOG_DEBUG, "%s: source can't be " "determined: dst=%s, error=%d\n", __func__, - ip6_sprintf(ip6buf, &dst6), + ip6_sprintf(ip6buf, &ip6->ip6_dst), error)); goto bad; } - ip6->ip6_src = src6; } else ip6->ip6_src = *saddr6; @@ -967,7 +959,9 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) * - proxy advertisement delay rule (RFC2461 7.2.8, last paragraph, SHOULD) * - anycast advertisement delay rule (RFC2461 7.2.7, SHOULD) * - * tlladdr - 1 if include target link-layer address + * tlladdr: + * - 0x01 if include target link-layer address + * - 0x02 if target address is CARP MASTER * sdl0 - sockaddr_dl (= proxy NA) or NULL */ static void @@ -980,8 +974,7 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, struct ip6_hdr *ip6; struct nd_neighbor_advert *nd_na; struct ip6_moptions im6o; - struct in6_addr daddr6, dst6, src6; - uint32_t scopeid; + struct in6_addr daddr6; NET_EPOCH_ASSERT(); @@ -1005,13 +998,6 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, return; M_SETFIB(m, fibnum); - if (IN6_IS_ADDR_MULTICAST(&daddr6)) { - m->m_flags |= M_MCAST; - im6o.im6o_multicast_ifp = ifp; - im6o.im6o_multicast_hlim = 255; - im6o.im6o_multicast_loop = 0; - } - icmp6len = sizeof(*nd_na); m->m_pkthdr.len = m->m_len = sizeof(struct ip6_hdr) + icmp6len; m->m_data += max_linkhdr; /* or M_ALIGN() equivalent? */ @@ -1023,26 +1009,24 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, ip6->ip6_vfc |= IPV6_VERSION; ip6->ip6_nxt = IPPROTO_ICMPV6; ip6->ip6_hlim = 255; + if (IN6_IS_ADDR_UNSPECIFIED(&daddr6)) { /* reply to DAD */ - daddr6.s6_addr16[0] = IPV6_ADDR_INT16_MLL; - daddr6.s6_addr16[1] = 0; - daddr6.s6_addr32[1] = 0; - daddr6.s6_addr32[2] = 0; - daddr6.s6_addr32[3] = IPV6_ADDR_INT32_ONE; + daddr6 = in6addr_linklocal_allnodes; if (in6_setscope(&daddr6, ifp, NULL)) goto bad; flags &= ~ND_NA_FLAG_SOLICITED; } - ip6->ip6_dst = daddr6; + if (IN6_IS_ADDR_MULTICAST(&daddr6)) { + m->m_flags |= M_MCAST; + im6o.im6o_multicast_ifp = ifp; + im6o.im6o_multicast_hlim = 255; + im6o.im6o_multicast_loop = 0; + } - /* - * Select a source whose scope is the same as that of the dest. - */ - in6_splitscope(&daddr6, &dst6, &scopeid); - error = in6_selectsrc_addr(fibnum, &dst6, - scopeid, ifp, &src6, NULL); + ip6->ip6_dst = daddr6; + error = in6_selectsrc_nbr(fibnum, &daddr6, &im6o, ifp, &ip6->ip6_src); if (error) { char ip6buf[INET6_ADDRSTRLEN]; nd6log((LOG_DEBUG, "nd6_na_output: source can't be " @@ -1050,28 +1034,31 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, ip6_sprintf(ip6buf, &daddr6), error)); goto bad; } - ip6->ip6_src = src6; nd_na = (struct nd_neighbor_advert *)(ip6 + 1); nd_na->nd_na_type = ND_NEIGHBOR_ADVERT; nd_na->nd_na_code = 0; nd_na->nd_na_target = *taddr6; in6_clearscope(&nd_na->nd_na_target); /* XXX */ + /* + * If we respond from CARP address, we need to prepare mac address + * for carp_output(). + */ + if (ifp->if_carp && (tlladdr & ND6_NA_CARP_MASTER)) + mac = (*carp_macmatch6_p)(ifp, m, taddr6); /* * "tlladdr" indicates NS's condition for adding tlladdr or not. * see nd6_ns_input() for details. * Basically, if NS packet is sent to unicast/anycast addr, * target lladdr option SHOULD NOT be included. */ - if (tlladdr) { + if (tlladdr & ND6_NA_OPT_LLA) { /* * sdl0 != NULL indicates proxy NA. If we do proxy, use * lladdr in sdl0. If we are not proxying (sending NA for * my address) use lladdr configured for the interface. */ if (sdl0 == NULL) { - if (ifp->if_carp) - mac = (*carp_macmatch6_p)(ifp, m, taddr6); if (mac == NULL) mac = nd6_ifptomac(ifp); } else if (sdl0->sa_family == AF_LINK) { @@ -1081,7 +1068,7 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, mac = LLADDR(sdl); } } - if (tlladdr && mac) { + if ((tlladdr & ND6_NA_OPT_LLA) && mac != NULL) { int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen; struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_na + 1); From nobody Sat Oct 18 12:05:33 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpgPT4Cp4z6D390; Sat, 18 Oct 2025 12:05: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 4cpgPT3WlFz3CZc; Sat, 18 Oct 2025 12:05:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760789133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DHjZsCHBHIqiY2+w14F7jTK+0OTjS7hBfw/wPI+v58g=; b=ROunG9pWDK13u6uvM9eUdWoQA+5bOyciiVFRX523OMAN78aX72ppeY3QowniS7jLpB33sp AtBYO8bo8vtB6ynClRtdavf5TqDVp+M6++LQAGSv9QLbUE9nZ1J61QGgnEzlV9i39Fhl2z Lq/wTPIeTFDhjF0CsDzgvPhUKYrtzOaDefPgRemXVsk/JAlFrA7I/erlo17Lwfb/ETyUDa gVsJ7lE51754Z1u5CRjc92B5Ate6Cdux7lNb4Bve2bb9dIP140xBy8msUzenUcuuu+neKb 4QjOqg7vfKvrED/XhtZKieMdWXEsYfLPIpoz/+GQcB6J5B1wEdieeg2u2kHi9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760789133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DHjZsCHBHIqiY2+w14F7jTK+0OTjS7hBfw/wPI+v58g=; b=brxXIS1iDsu6tt60dR7cGounKYwMc3aN66BXGnb5zOeBQKoIt/ipP7314WlWlNeoqI+ueq n9+drnpfFwWX00eO1fnUYtOA+69XxpPmklt4wIJe8Bpko6GLIJaC2vqmca/jrC4BdEQLA+ IVzr+Rf/R2x5ZE0YcrgmiwfcuLrOU3QVZ+KYMzw1HQ9Tgu5tey5k+leTF+OeXK5PH/nzHC Ov5nBqbbTXHQS/XkKrFaoZ8YdBFphX/4eMo3C1ihYlIsEb+yEhgXQ4CdBuoAZ9kEt8Ine4 XK2GKsa263kbID2jrMGZivzcfEos1T2d4Yj6cEwskuM/Ras5LGCGSitoHlggMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760789133; a=rsa-sha256; cv=none; b=lHLHiGyjGwaRLU1DL8KUGHQKM5XP8KmwP/xcGHXSSoG3uDGRq86aezClaLMoWRNpOapZ7q fy4WxmrxL5iOf/CrYqYq8ODTsLyvaOmENCWqWktIdkkHsgVj8pG14i/Y8tkGdyMjrlBysU iSiI7A9wQhfza0bfCSl/eQp1KV0O+OhnZDMvb5zkNQFFml+oGZ5+wA9t5m/60LooTJxGcm Behq0DY+g728D+At14JnmsUv4kE7YkKlyO5kucGd6om2Sdab5G4oL0zf+VZIS0HejC+oLH Ovbs/zrAeowWO4BvgM4ff/FQE+7f10yr6bf8WCLddgOdg6/beU0+6/JNA4HpyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cpgPT2c3zzgwR; Sat, 18 Oct 2025 12:05: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 59IC5XGl032986; Sat, 18 Oct 2025 12:05:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59IC5X4q032983; Sat, 18 Oct 2025 12:05:33 GMT (envelope-from git) Date: Sat, 18 Oct 2025 12:05:33 GMT Message-Id: <202510181205.59IC5X4q032983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 317a5dd0288e - stable/15 - ipfw: do not use errno value for error reporting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 317a5dd0288e0382fc94ab44cc7b0a7918e7fe62 Auto-Submitted: auto-generated The branch stable/15 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=317a5dd0288e0382fc94ab44cc7b0a7918e7fe62 commit 317a5dd0288e0382fc94ab44cc7b0a7918e7fe62 Author: Boris Lytochkin AuthorDate: 2025-10-14 08:02:20 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-10-18 12:04:42 +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 Differential Revision: https://reviews.freebsd.org/D53050 (cherry picked from commit dfd822b1f0846bdaa9a14457346f7431a86d3a64) --- 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 Sat Oct 18 13:18:07 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-all@mlmmj.nyi.freebsd.org 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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[/