Commit Graph
304455 Commits
Author SHA1 Message Date
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
David E. O'Brien 8bd9a9e9e4 random: CTASSERT check sizeof random_source_descr[]
Ensure that the number of elements of random_source_descr[]
and fxrng_ent_char[] matches that of enum random_entropy_source.

Reviewed by:	cem
Differential Revision: https://reviews.freebsd.org/D53255
2025-10-31 11:01:45 -07:00
Michael Tuexen fee2e6b9fa ddb: improve printing of inp_flags
Add four missing flags (INP_BINDANY, INP_INHASHLIST, INP_RESERVED_0,
INP_BOUNDFIB) used in inp_flags and remove one flag (INP_ORIGDSTADDR),
which is actually a flag used in inp_flags2 and not in inp_flags.

Reviewed by:		markj
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53498
2025-10-31 13:58:46 -04:00
Ed Maste ce03706ab2 openssh: Handle localtime_r() failure by return "UNKNOWN-TIME"
Apply openssh-portable commit 8b6c1f402feb by [email protected]

Obtained from:	openssh-portable
PR:		288773
Reported by:	wosch
Sponsored by:	The FreeBSD Foundation
2025-10-31 13:08:45 -04:00
Warner Losh d787ce1927 u3g: Note support for Quectel EM060K and Sierra EM7590
Sponsored by:		Netflix
2025-10-31 10:54:13 -06:00
Andre Albsmeier 6968897a80 usb/u3g: add Quectel EM060K
PR: 290688
MFC After: 3 days
2025-10-31 10:51:15 -06:00
Ari Suutari 00ebecd4a0 Add support for Sierra Wireless EM7590 modem.
PR: 290421
MFC After: 3 days
2025-10-31 10:48:21 -06:00
Tiago Gasiba b9f848ecba truss: Properly display first argument to nmount
The first argument to nmount(2) is an nvlist in the form of an iovec,
which truss already knows how to decode.  Set the correct flag so
this happens automatically.

MFC after:	1 week
PR:		290667
2025-10-31 17:15:06 +01:00
Mateusz Piotrowski db25448ab9 dtrace_io.4: Use bio_length instead of bio_bcount in examples
Tracing bio_bcount makes little sense for some devices like for example
md(4), as it is set to "0" instead of to the actual I/O length.

markj@ suggested the following DTrace one-liner to identify some cases
where bio_length is set but bio_bcount is not:

    dtrace -n 'io:::start /args[0]->bio_length != args[0]->bio_bcount/{printf("%d %d", args[0]->bio_length, args[0]->bio_bcount); stack();}'

For future reference in the context of bio_length vs bio_bcount,
phk@ mentioned in the code review that:

> the original intent was to get rid of of bio_bcount

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53365
2025-10-31 16:52:20 +01:00
Dimitry Andric bd27bd1f51 Revert "Merge commit e24f90190c77 from llvm git (by Brad Smith):"
[Driver] Enable outline atomics for FreeBSD/aarch64 (#156089)

The compiler_rt helper functions have been built since 12.4, 13.1, 14
and anything newer.

This reverts commit 51e8e8b0f3.

MFC after:	immediately
2025-10-31 16:51:16 +01:00
Mitchell Horne 6de1c50e78 uart: provide and use default rclk for JH7110 UART
A regression in the u-boot-provided JH7110 device tree leaves the uart
incorrectly configured.

The issue arises when a baud rate is specified ('current-speed'
property), but the rclk value is not ('clock-frequency'). Previous
releases, e.g. v2025.04, provided both.

The alternative way to retrieve this value is to query the parent clock,
but our clk framework is not available during early console probing and
configuration.

In this instance, we end up defaulting to DEFAULT_RCLK in ns8250_init(),
which is the wrong value. The relevant uart class (uart_snps) should
provide a default rclk in its definition, but it does not. Add a new
variant class with the correct default rclk of 24000000.

Finally, uart_cpu_fdt_probe() needs to be updated to actually query this
default value when it does not find a 'clock-frequency' property. This
was simply missing; the ACPI uart bus behaves identically, see
uart_acpi_probe().

PR:		289978
Reported by:	[email protected]
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D53119
2025-10-31 12:30:02 -03:00
Kristof Provost 08ed87a4a2 pf: convert DIOCRSETADDRS to netlink
The list of addresses is potentially very large. Larger than we can fit in a
single netlink request, so we indicate via the PFR_FLAG_START/PFR_FLAG_DONE
flags when we start and finish, so the kernel can work out which addresses need
to be removed.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-10-31 16:24:09 +01:00
Kristof Provost 56d5ec30e8 pf tests: pfctl -T replace test
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-10-31 16:24:09 +01:00
Mark Johnston 5baa83cfcb riscv/vmm: Remove a redundant maxcpu check in vm_alloc_vcpu()
aplic_max_cpu_count() just returns the VM's max vCPU count, and
vm_alloc_vcpu() already checks that.  Just remove this check so that
it's easier to merge vm_alloc_vcpu() into MI code.

If the APLIC really does require us to lower the limit, we should
instead adjust vm->maxcpu in vm_create().

No functional change intended.

Reviewed by:	br
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53496
2025-10-31 14:08:45 +00:00
Peter Lei 44ad7d4844 tcp: remove unused define
Reviewed by:	tuexen
MFC after:	3 days
Sponsored by:	Netflix, Inc.
2025-10-31 14:31:20 +01:00
Robert Clausecker d59e924d29 depend-cleanup.sh: clean up after riscv64 enhanced string function patch set
This ensures an incremental build succeeds after import of
D47275, D46023, D45730, D45693, D46139, D46230, D46047, and D53248.

Approved by:	markj (mentor)
MFC after:	1 month
MFC to:		stable/15
Differential Revision:	https://reviews.freebsd.org/D53485
2025-10-31 13:50:29 +01:00
Robert Clausecker d6870bb941 simd.7: document bcopy() and bzero() as accelerated on riscv64
Event:		Google Summer of Code 2024
MFC after:	1 month
MFC to:		stable/15
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D53248
2025-10-31 13:48:01 +01:00
Robert Clausecker b5dbf3de56 libc/riscv64: implement bcopy() and bzero() through memcpy() and memset()
This picks up the accelerated string functions written by
strajabot@.

Event:		Google Summer of Code 2024
MFC after:	1 month
MFC to:		stable/15
See also:	79e01e7e64
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D53248
2025-10-31 13:48:00 +01:00