Commit Graph
304472 Commits
Author SHA1 Message Date
Alexander Ziaee 16f37d97b9 cut.1: Align option list and tag spdx
MFC after:	3 days
2025-11-03 18:21:58 -05:00
Kirk McKusick c174f518c9 Refinements to the --libxo support for geom status and list sub commands.
Changes based on comments in D53110: tags should be lowercase; rename a
few containers so that the JSON/XML output says "DISK" or "MULTIPATH"
(depending on class) instead of a generic "Geom"; adds {t:} to trim
extra whitespaces that sometimes appeared in the value fields of
JSON/XML output.

Submitted-by: Johan Söllvander
MFC-after:    1 week
Differential Revision: https://reviews.freebsd.org/D53313
2025-11-03 14:54:53 -08:00
Colin Percival 6a13aeac3c vmimage.subr: pkg autoremove after pkg install
A bug in pkg, which somehow only surfaced as a consequence of pkgbase,
results in pkg install sometimes pulling in false dependencies.  This
problem might be limited to cases when the lib32 pkgbase packages are
not installed.  In the case of EC2 "small" images, installing the
ebsnvme-id package results in binutils, gcc12-devel, gmp, indexinfo,
liblz4, mpc, mpfr, and zstd packages being installed.

These false dependencies are however not recorded as dependencies --
at some level pkg does understand that they're not needed -- so running
pkg autoremove immediately after pkg install cleans them up.

Note: This does not remove lines from METALOG corresponding to these
packages, and makefs emits an error when it attempts to create the
filesystem but cannot find the files listed in METALOG -- but makefs
does seem to complete normally despite the error messages.

This change should be reverted once the pkg issue has been located and
fixed.

Reviewed by:	ivy
MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D53543
2025-11-03 13:40:17 -08:00
Alfonso S. Siciliano f2d966f6c1 contrib/bsddialog: import 1.1
Add: slider dialog.
Imported to enable testing and to complete the geomman(8) utility.

Developed as part of the "Full Disk Administration Tool for FreeBSD"
project, Braulio Rivas (brauliorivas@), Google Summer of Code 2025.

Sponsored by:	Google LLC (GSoC 2025)

Merge commit '5a70558d32b9680c10ab579c7491652e0838cee4'
2025-11-03 21:18:46 +01:00
Braulio Rivas 5a70558d32 contrib/bsddialog: import 1.1
Add: slider dialog.
Imported to enable testing and to complete the geomman(8) utility.

Developed as part of the "Full Disk Administration Tool for FreeBSD"
project, Braulio Rivas (brauliorivas@), Google Summer of Code 2025.

Sponsored by:	Google LLC (GSoC 2025)
2025-11-03 21:14:09 +01:00
Alan Somers e8449c0e0f fusefs: respect the server's FUSE_SETXATTR_EXT flag
FUSE protocol 7.33 extended the FUSE_SETXATTR request format.  But the
extension is optional.  The server must opt-in by setting the
FUSE_SETXATTR_IN flag during FUSE_INIT.  We were wrongly using the
extended format for any server using protocol 7.33 or later.

PR:		290547
Co-authored-by:	CismonX <[email protected]>
Fixes:		d5e3cf41e8 ("fusefs: Upgrade FUSE protocol to version 7.33")
MFC after:	3 days
2025-11-03 10:14:35 -07:00
Kristof Provost cd7f3e4d9e pf.conf.5: add nat-to/rdr-to to BNF
PR:		290705
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-11-03 17:06:10 +01:00
Mateusz Piotrowski 2020e76450 dtrace_vfs.4: Document the DTrace vfs provider
Reviewed by:	bcr
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D51317
2025-11-03 16:54:11 +01:00
John Baldwin b9efaeb87a tb_pci: Don't try to attach to PCI buses that aren't below a PCI-PCI brige
This driver is a subclass of the normal PCI bus driver that is
intended to be used for the logical child bus of a Thunderbolt PCI-PCI
bridge device.  To determine if a given PCI bus's parent is a TB
bridge, it examines the PCI device IDs of the parent pcibX device.
However, this only works for pcibX devices that are actual PCI-PCI
bridges and panics for PCI buses that are children of host bridges
such as the pci0 child of pcib0.

Probably this should not be reading device IDs (as that doesn't tell
you if the device driver for the PCI-PCI bridge is actually a TB
driver).  Instead, the TB PCI-PCI driver should be exporting a new
IVAR (with a globally unique number as we do for ACPI handles) that
returns the TB generation and the probe routine for this PCI bus
driver should be checking for that IVAR (the way acpi_pci.c checks for
the presence of an ACPI handle).

This fixes a panic on boot if tb.ko is loaded at boot time (which the
driver recommends for certain chipsets).

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D53202
2025-11-03 10:24:23 -05:00
Michael Tuexen 5f43b0cb7c ddb: provide inp_flags2 when printing inpcbs
Reviewed by:		markj, Peter Lei
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53542
2025-11-03 06:17:29 -05:00
Michael Tuexen 239464e993 tcp: drop SYN ACK segment for listening sockets
When a SYN ACK is received for a listening socket, just drop it
instead of killing the SYN-cache entry and send a RST.
This closes the possibility to kill a TCP connection during its
handling in the SYN-cache.

Reviewed by:		Nick Banks, Peter Lei
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53540
2025-11-03 05:50:49 -05:00
Xin LI 40d2161838 cron: Use reallocarray() to prevent integer overflow
Apply OpenBSD env.c,v 1.24 and 1.25, which replaces manual size
calculations with reallocarray() to prevent possible integer
overflow.

MFC after:	3 days
2025-11-02 21:59:46 -08:00
Rick Macklem 088ced14a6 UPDATING: Add an entry for e5aa60d069 2025-11-02 16:20:26 -08:00
Rick Macklem b3de3c2dea param.h: Bump __FreeBSD_version for e5aa60d069
Commit e5aa60d069 changed the internal KAPI between
the NFS modules.  As such, they all need to be rebuilt
from sources.  Bump __FreeBSD_version to 1600004 for this.
2025-11-02 16:16:21 -08:00
Konstantin Belousov a6a9d97708 kern/subr_syscalls.c: declare 'traced' local variables boolean
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D53482
2025-11-02 23:22:08 +02:00
Konstantin Belousov 269b1c2388 atomic.9: provide fine details about CAS memory model MD semantic
Reviewed by:	markj
Discussed with:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D52744
2025-11-02 23:22:08 +02:00
Konstantin Belousov f26382dd72 atomic.9: fix description of acquire and release
The ordering point is not the atomic operation itself, but the load for
acquire or store for release done as part of the atomic.  This does not
matter for atomic_load_acq and atomic_store_rel, but does matter for RWM
operations.

Noted by:	alc
Reviewed by:	markj
Discussed with:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D52744
2025-11-02 23:22:08 +02:00
Michael Tuexen 25aed6401b ddb: improve printing of inpcbs
* shuffle around the inp_label to give inp_flags more space since it
  can become long.
* fix the indentation of in6p_icmp6filt, in6p_cksum, and in6p_hops.

Reviewed by:		Peter Lei
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53541
2025-11-02 12:21:01 -05:00
Rick Macklem e5aa60d069 nfs: Add support for the new _PC_CASE_INSENSITIVE name
Commit d6864221d8 added support for the _PC_CASE_INSENSITIVE
name for pathconf, to indicate if case insensitive lookups
are configured.

This patch adds support for it for both NFSv4 and
NFSv3.

It also adds a fsidp argument to nfsv4_fillattr() which
will be used in future commit(s) related to NFSv4.n
directory delegations.

MFC after:	2 weeks
2025-11-02 13:38:45 -08:00
Michael Tuexen 8e8956f7f9 ddb: use %b when showing flags for a tcpcb
This is much more compact. Thanks to markj@ for suggesting the change.

Reviewed by:		markj, Peter Lei, imp, Nick Banks
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53510
2025-11-02 11:15:47 -05:00
Michael Tuexen e8c50058e8 ddb: use %b when showing flags for an inp
This is much more compact. Thanks to markj@ for suggesting the change.

Reviewed by:		markj
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53507
2025-11-02 11:14:57 -05:00
Mateusz Piotrowski af99c4c1d0 d.7: Document strchr, strjoin, strrchr, strstr, strtok, strlen, and substr
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53417
2025-11-02 20:21:30 +01:00
Olivier Certner 2be5127c4a setcred(): Fix RACCT resource accounting on credentials change
When credentials are changed, we need to adjust the sum of resources
associated to the initial and new process' user IDs (and old and new
login classes and jails, but setcred() does not change them) for them to
stay consistent.

PR:             290352
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D53457
2025-11-02 19:15:30 +01:00
Olivier Certner f4315ff8b3 kern: Fix credentials leaks on RACCT but no RCTL
Affected system calls: setuid(), setreuid(), setresuid(), jail_attach(),
setloginclass().

In these system calls, the crhold() calls that, on RACCT, make the
just-installed process credentials survive a concurrent change of the
same credentials just after PROC_UNLOCK() were not matched by
a corresponding crfree() when RCTL is off.  In fact, in that latter
case, they are simply not necessary, so wrap them with '#ifdef RCTL'
stances.  'kern_rctl.c' causes a compile error if RACCT is not defined
but RCTL is, so ease reading by not nesting '#ifdef's.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D53456
2025-11-02 19:15:30 +01:00
Olivier Certner 9530c6f082 racct: Simplify skipping idle process in the throttling daemon
In racctd(), commit c72188d85a ("racct: Improve handling of the pcpu
resource") added a superfluous test to skip the idle process when
computing the resource usage and checking for limits, consisting of
a comparison of the considered process' pointer with that of the process of
the first CPU's idle thread.  The P_IDLEPROC flag introduced in commit
33be163204 ("racct: Fix accounting of CPU time for the system idle
process") is sufficient and simpler for this purpose.

In the second loop throttling processes based on their %CPU usage, the
test excluding processes not in PRS_NORMAL was not consistent with that
of the first loop (which tests for the idle process also).  This had no
practical consequences except a superfluous call to
racct_pcpu_available() as the RACCT_PCTCPU counter stays at 0 on the
idle process (because of the first loop).  Factor out the test in the
new racct_proc_to_skip() function.

No functional change intended.

Reviewed by:    markj
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D53455
2025-11-02 19:15:23 +01:00
Colin Percival dcb6706ba4 Makefile.incl1: .WAIT before distribute in etc
In order to make sure that man pages are all installed before we run
makewhatis to generate mandoc.db files, we have long placed etc at the
end of the list of subdirectories being recursed into by the build.
In order to support installworld -jN, a .WAIT was more recently added
here.

With the recent adoption by the release engineering team of parallel
*release* builds (aka 'make release -jN') it is now also necessary to
add the same .WAIT before recursing for the 'distribute' target, as we
otherwise end up with distribution sets containing incomplete mandoc.db
files.

Reviewed by:	bdrewery
PR:		289683
MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D53533
2025-11-02 09:45:31 -08:00
Andrey V. Elsukov 5568fba657 mld6: Properly initialize MLD packet options
After commit 530c2c30b0 we need to set flags to ensure that hop-by-hop
and hop limit options are included.

PR:		290407
Reviewed by:	zlei, markj
MFC after:	3 days
Fixes:		530c2c30b0 ("ip6_output: Reduce cache misses on pktopts")
2025-11-02 17:10:20 +00:00
Juraj Lutter 2deeed061b sockstat(1): Add "-F" parameter
Add "-F" parameter that, when specified, instructs sockstat(1) to
only display sockets for username/UID specified.

For consistency with "-j", the last occurence of "-F" is used.

Reviewed by:		asomers
Approved by:		asomers
Differential Revision:	https://reviews.freebsd.org/D53458
2025-11-02 16:17:47 +01:00
Dag-Erling Smørgrav a38c2f99f8 tzcode: Fix early tz change detection
Assume tzdata is not fresh if last_checked is zero, as comparing the
current time to last_checked less than __tz_change_interval after boot
may produce a false negative.

While here, invert the return value from tzdata_is_fresh() to better
match its new name (it was previously called recheck_tzdata(), so zero
for fresh and non-zero for stale made sense, but it doesn't now).

PR:		269207
MFC after:	3 days
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D53502
2025-11-02 14:51:42 +01:00
Dag-Erling Smørgrav 92a533ed1d id: Fix WITHOUT_AUDIT build
Rather than add more ifdefs, trust the compiler to optimize Aflag away.

Fixes:		70b72ede98 ("id: Clean up")
PR:		290740
MFC after:	3 days
2025-11-02 14:48:12 +01:00
Colin Percival c3a3af1346 release: Spell metalog_add_data conventionally
Reviewed by:	markj
MFC after:	3 days
Fixes: f1995d6fc1 ("release: Prepare GCE cloudware images for building as non-root")
Differential Revision:	https://reviews.freebsd.org/D53530
2025-11-01 17:43:22 -07:00
Rick Macklem b473bb274c pathconf.2: Document the new _PC_CASE_INSENSITIVE name
Commit d6864221d8 added support for the _PC_CASE_INSENSITIVE
name for pathconf, to indicate if case insensitive lookups
are configured.

This patch documents this new name and also updates
the description for _PC_HAS_HIDDENSYSTEM to also
include UF_ARCHIVE.

This is a content change.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53508
2025-11-01 15:20:40 -07:00
Kyle Evans c0382512bf ipfw: pmod: avoid further rule processing after tcp-mod failures
m_pullup() here will have freed the mbuf chain, but we pass back an
IP_FW_DENY without any signal that the outer loop should finish.  Thus,
rule processing continues without an mbuf and there's a chance that we
conclude that the packet may pass (but there's no mbuf remaining)
depending on the rules that follow it.

PR:		284606
Reviewed by:	ae
MFC after:	1 week
2025-11-01 12:34:11 -05:00
Adrian Chadd 0726d6e87a vchiq: fix compilation error on armv7 in CI and local armv7 builds
This happens in CI and on local armv7 builds, but not when I cross
compile to armv7 locally.

> /usr/src/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:549:71: error: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Werror,-Wformat]
>   549 |                 "free_pagelist - %zx, %d (%u bytes @%p)", (size_t)pagelist, actual, pagelist->length, bi->buf);

So just be very specific about the printf types and explicitly
cast things.
2025-11-01 10:23:12 -07:00
Lexi Winter a1806e6ff3 static_libpam: Don't install pam.d.5 twice
static_libpam's Makefile includes libpam's Makefile after setting some
variables (like MAN) to empty to avoid installing the manpages twice.
After commit 031e711647, it neglected to do this for MANNODEVLINKS,
causing pam.d.5.gz to be installed twice.  This is harmless for
installworld, but breaks some things that rely on METALOG (NO_ROOT
installs) since it causes two METALOG entries to be generated for
the same file.

Fixes:	031e711647 ("packages: Install development manpages in the -dev package")
MFC after:	3 days
PR:		290708
Reported by:	emaste
Reviewed by:	emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53512
2025-11-01 13:38:26 +00:00
Ed Maste e4f2a35095 bsd.prog.mk: Skip warnings if compiler.mk was not included
We emit a warning if src.conf options WITH_RETPOLINE or INIT_ALL are
in use, and the compiler or linker does not support the feature.

For targets like `cleandir` we skip including bsd.compiler.mk, which
leaves COMPILER_FEATURES unset and spurious warnings were emitted in
early buildworld stages, if these options are in use.

Commit 0837b2ebd5 ("pkg: Die if make -V BRANCH fails") added -W to
usr.sbin/pkg's make flags, causing it to exit on warnings.  As a result
buildworld failed when these src.conf options were in use.

Clean this up by omitting the warning if the magic
_NO_INCLUDE_COMPILERMK flag is set, which indicates that
COMPILER_FEATURES is not set.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53501
2025-10-31 21:17:11 -04:00
Sergey A. Osokin c6e02892bb bsd-family-tree: add macOS 26
Sponsored by:	tipi.work
2025-10-31 16:25:11 -04:00
Michael Tuexen 259b69ad3d ddb: fix compilation
Fixes:		9aa5a79e2a ("ddb: optionally print inp when printing tcpcb")
Sponsored by:	Netflix, Inc.
2025-10-31 15:20:01 -04:00
Gordon Bergling 7b11940d4a isci(4): Fix two typos in a log messages
- s/suspeneded/suspended/

MFC after:	5 days
2025-10-31 19:50:41 +01:00
Gordon Bergling a25172844e mfi(4): Fix a typo in a KASSERT message
- s/dissappeared/disappeared/

MFC after:	5 days
2025-10-31 19:50:41 +01:00
Gordon Bergling defe77554d igc(4): Fix a typo in a sysctl description
- s/Recevied/Received/

MFC after:	5 days
2025-10-31 19:50:41 +01:00
Gordon Bergling 84d75bb018 ciss(4): Fix a typo in a debug messsage
- s/unspported/unsupported/

MFC after:	5 days
2025-10-31 19:50:41 +01:00
Gordon Bergling 081aa26778 cesa: Fix a typo in a device messsage
- s/exhaused/exhausted/

MFC after:	5 days
2025-10-31 19:50:41 +01:00
Gordon Bergling 404af374b1 bwi(4): Fix a typo in a panic messsage
- s/unsupport/unsupported/

MFC after:	5 days
2025-10-31 19:50:40 +01:00
Gordon Bergling 3eaa2a852b ath(4): Fix a typo in a device messsage
- s/Orignal/Original/

MFC after:	5 days
2025-10-31 19:50:40 +01:00
Gordon Bergling 74a44a0bc8 vnic: Fix a typo in a device messsage
- s/interrups/interrupts/

MFC after:	5 days
2025-10-31 19:50:40 +01:00
Gordon Bergling 542f5985a8 oce(4): Fix a couple of typos in a sysctl descriptions
- s/Fragements/Fragments/
- s/Recived/Received/
- s/Alignmnet/Alignment/

MFC after:	5 days
2025-10-31 19:50:40 +01:00
Gordon Bergling 85d6c86f4b amdtemp(4): Fix typo in a sysctl description
- s/temparature/temperature/

MFC after:	5 days
2025-10-31 19:50:40 +01:00
Michael Tuexen 9aa5a79e2a ddb: optionally print inp when printing tcpcb
Add /i option to the ddb commands show tcpcb and show all tcpcbs,
which enables the printing of the t_inpcb.

Reviewed by:		markj
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53497
2025-10-31 14:05:02 -04:00
Michael Tuexen 3adaacad11 ddb: whitespace change
No functional change intended.

MFC after:	3 days
Sponsored by:	Netflix, Inc.
2025-10-31 14:03:35 -04:00