Commit Graph

306537 Commits

Author SHA1 Message Date
Alexander Ziaee 1f5795b642 INDEX.fonts: Minor maintenance
+ Mention relevance of this file in the vt manual screen.font entry
+ The vidfont manual is in section one, not eight
+ Remove leftover blank line from freebsd tag removal

MFC after:	3 days
2026-01-31 19:27:37 -05:00
Enji Cooper 1731fc70f7 OpenSSL: update vendor sources to match 3.5.5 content
MFC with:	f25b8c9fb4
MFC after:	1 week
2026-01-31 14:07:17 -08:00
Enji Cooper f25b8c9fb4 openssl: import 3.5.5
This change adds OpenSSL 3.5.5 from upstream [1].

The 3.5.5 artifact was been verified via PGP key [2] and by SHA256 checksum [3].

This is a security release, but also contains several bugfixes. All of
the CVE-worthy issues have already been addressed on the target
branch(es), so the net-result is that this is a bugfix release.

More information about the release (from a high level) can be found in
the release notes [4].

MFC after:	1 week

1. https://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz
2. https://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz.asc
3. https://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz.sha256
4. https://github.com/openssl/openssl/blob/openssl-3.5.5/NEWS.md

Merge commit '808413da28df9fb93e1f304e6016b15e660f54c8'
2026-01-31 14:00:39 -08:00
Michael Osipov fe81e3944c sockstat: Surround explicit IPv6 addresses with brackets
PR:		254611
Approved by:	otis, tuexen, des
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54375
2026-01-31 21:48:56 +01:00
Michael Tuexen d195b3783f sctp: fix socket type created by sctp_peeloff()
When calling sctp_peeloff() on a SOCK_SEQPACKET socket, the created
and returned socket has the type SOCK_STREAM.
This is specified in section 9.2 of RFC 6458.

Reported by:	Xin Long
MFC after:	3 days
2026-01-31 19:11:08 +01:00
Dag-Erling Smørgrav 1538284a5f libc/resolv: Switch default to loopback address
If no resolver configuration was found, we would fall back to INADDR_ANY
and IN6ADDR_ANY.  This made sense when it was first written thirty or
forty years ago but not today, especially since connecting to INADDR_ANY
or IN6ADDR_ANY is no longer supported.  Switch to the loopback address
and simplify the code.

Note that (as the pre-existing comment in the code states) running
without a resolver configuration is not really supported.  Still, if
we're going to have a hardcoded fallback, it might as well work.

PR:		291790
MFC after:	1 week
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55011
2026-01-31 18:52:53 +01:00
John Baldwin f4c40a5acb riscv: Add ffs.c and ffsdi2.c
These are only needed for GCC, but it doesn't hurt to include these
always.

Reviewed by:	mhorne
Differential Revision:	https://reviews.freebsd.org/D54968
2026-01-31 12:21:11 -05:00
John Baldwin 4c822dd4a1 libkern: Add libcalls for ffs and __ffsdi2
These are needed when compiling a RISC-V kernel with GCC which does
not inline __builtin_ffs*.

The __ffsdi2 is adapated from the previous ffsl.c.

This partially reverts commit f4db342d44.

Reviewed by:	mhorne
Differential Revision:	https://reviews.freebsd.org/D54967
2026-01-31 12:20:50 -05:00
John Baldwin 31b259049e riscv: Enable the zifencei extension explicitly in -march
clang is more tolerant and implies this extension whereas GCC is
stricter and requires it to be included.

Reviewed by:	mhorne
Differential Revision:	https://reviews.freebsd.org/D54965
2026-01-31 12:10:56 -05:00
John Baldwin fe45651224 stand: Add compiler builtins needed by GCC for RISC-V
Reviewed by:	mhorne
Differential Revision:	https://reviews.freebsd.org/D54963
2026-01-31 12:10:36 -05:00
John Baldwin 2e8ef82b34 stand: Use the correct OUTPUT_ARCH in the linker script for RISC-V
Compare to the OUTPUT_ARCH in sys/conf/ldscript.riscv.

Reviewed by:	mhorne
Differential Revision:	https://reviews.freebsd.org/D54962
2026-01-31 12:09:44 -05:00
John Baldwin b26a7af438 heimdal: Pass the correct pointer to free in an error case
This fixes a warning reported by GCC 14 on stable/14:

crypto/heimdal/lib/hdb/keys.c:241:13: warning: 'free' called on pointer 'ext' with nonzero offset 16 [-Wfree-nonheap-object]
  241 |             free(hist_keys);
      |             ^~~~~~~~~~~~~~~
crypto/heimdal/lib/hdb/keys.c:234:15: note: returned from 'calloc'
  234 |         ext = calloc(1, sizeof (*ext));
      |               ^~~~~~~~~~~~~~~~~~~~~~~~

Reviewed by:	rmacklem, cy
Fixes:		5000d023a4 ("heimdal-kadmin: Add support for the -f dump option")
Differential Revision:	https://reviews.freebsd.org/D54932
2026-01-31 12:00:44 -05:00
John Baldwin 8a8dc73ef8 heimdal: Add missing function prototypes
This fixes the build with GCC 14 on stable/14 which raises fatal
-Wimplicit-function-declaration warnings.

Reviewed by:	rmacklem, cy
Fixes:		5000d023a4 ("heimdal-kadmin: Add support for the -f dump option")
Differential Revision:	https://reviews.freebsd.org/D54931
2026-01-31 12:00:15 -05:00
John Baldwin 6e82cb2906 wlanstat: Drop unneeded bsd.compiler.mk from Makefile
No functional change, but downstream in CheriBSD this was causing a
link error as the Makefile was overriding CFLAGS set via a side effect
of bsd.compiler.mk.

Reviewed by:	bz, brooks, emaste
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54894
2026-01-31 11:58:39 -05:00
Alan Somers df68a09ea2 tests: sys/capsicum/functional requires mqueuefs
Skip this test if mqueuefs isn't loaded.  Unfortunately, that will skip
the entire googletest test program, including test cases that don't
require mqueuefs.  But the test's own skipping logic doesn't work, and
we don't yet have a googletest-compatible require_kmods() function.

MFC after:	2 weeks
Sponsored by:	ConnectWise
Reviewed by:	emaste, ngie
Differential Revision: https://reviews.freebsd.org/D54902
2026-01-31 08:46:35 -07:00
Gordon Bergling 0a3e7ba466 cpufreq(4): Fix a typo in a source code comment
- s/transcation/transaction/

MFC after:	5 days
2026-01-31 16:22:00 +01:00
Gordon Bergling a17659fe26 ath_hal(4): Fix a typo in a source code comment
- s/arithmatic/arithmetic/

MFC after:	5 days
2026-01-31 16:20:32 +01:00
Michael Tuexen 7b6e84c9ac ure: improve checksum offloading
This patch fixes three issues:
(1) Initially, set the hwassist flags correctly when enabling
    transmit checksum offload for TCP/IPv6 and UDP/IPv6.
(2) Keep the hwassist flags in sync with the capabilities when
    changing txcsum.
(3) Keep the hwasssit flags in sync with the capabilities when
    changing txcsum6.
Without this patch, transmit checksum offloading for TCP/IPv6 and
UDP/IPv6 is never used and transmit checksum offloading for IPv4,
TCP/IPv4 and UDP/IPv4 is always used, even if disabled via
ifconfig ue? -txcsum.

Reviewed by:		Timo Völker
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D54974
2026-01-31 11:42:10 +01:00
Enji Cooper ab9b047369 clang-format: adjust to sort C++ headers per style(9)
Many standard C++ headers do not have the .h file extension: some, such as
`iostream`, lack it; others have a .hpp file extension. Moreover, some
projects (like ATF/Kyua) also contain .ipp files, which are C++ "interface"
files.

Relax the regular expression to ensure that non-traditional C "system"
headers, C++ headers, etc, with angle brackets are sorted before
"local" headers.

MFC after:	1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54401
2026-01-30 20:14:10 -08:00
Gleb Smirnoff 9df110b11f tests/netinet: fix tests that depended on connect(in6addr_any)
Fixes:	627e126dbb
2026-01-30 13:31:13 -08:00
Mark Johnston 56e1cba88b ip6_mroute: Remove unnecessary casts
No functional change intended.

MFC after:	1 week
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
2026-01-30 20:39:34 +00:00
Mark Johnston 34c3e1d718 netstat: Fix whitespace in libxo output for multicast routes
Also fix some bogus libxo format strings in mroute6.c, and close a
couple of lists instead of opening them twice.

Fixes:		ade9ccfe21 ("Convert netstat to use libxo.")
MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
2026-01-30 20:30:58 +00:00
Konstantin Belousov 245157fd8a ktrcsw(): should not be called when the thread is owning interlock or on sleepq
The issue is that for ktrcsw() we lock the ktrace_mtx mutex while owning
the interlock from a subsystem that called msleep().  In particular, the
VM subsystem might call msleep() if page allocation failed.  This
establishes order VM locks (e.g. domain free queue lock) -> ktrace_mtx.
Calling free() while owning ktrace_mtx gives the reverse order.

Worse, msleep_spin_sbt() call s ktrcsw() while the thread is put on
sleep queue.  Then, since the mutex might be contested, the thread needs
to be put on turnstil, which cannot work.

Move the ktrcsw() call for switch-out after the wakeup, when the thread
does not yet re-obtained any locks.  From there, we call a special
version of ktrcsw(), which is passed the actual time when the context
switch occured.

The drawback is that the switch-out record is only written in the
ktrace.out file after the switch-in occurred, but this is probably not
too serious.

Reported and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-30 20:45:48 +02:00
Colin Percival bda8028146 release: Ship firmware from kmods repo on DVD
The packages for X.Y-RELEASE are a snapshot of the quarterly branch
for stable/X, i.e. typically built on X.(Y-1)-RELEASE.  (The case of
Y=0 is an exception for obvious reasons.)  This works for most ports
but not for kernel modules, which may need to be built on the release
in question; this is why we have a separate "kmods" repository.

Make sure that we put the packages from the kmods repository onto the
mini-pkg-repo on the DVD rather than shipping unusable firmware.

Reviewed by:	bz
MFC after:	1 week
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D52581
2026-01-30 09:41:51 -08:00
Andy Carrel 93d3ac1daa arm64: Fix kernel panic in get_arm64_sve during core dump
The coredump logic calls get_arm64_sve twice: once to get the note size,
and once to get the data. The note size calculation depended on the
volatile `PCB_FP_SVEVALID` flag. If this flag was cleared between the
two calls (e.g., due to a context switch clearing the flag to comply
with the ABI), the second call would expect a smaller buffer size than
the first, triggering a KASSERT panic ("invalid size").

Fix this by ensuring the SVE state is saved to the PCB before we decide
whether to use SVE or VFP.

PR: 292195
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D54532
2026-01-30 17:01:49 +00:00
Christos Margiolis c88f012faa lib/virtual_oss/sndio: Remove trailing backslash
Fixes:		d78291b0e9 ("lib/virtual_oss: don't (over)link to libsamplerate")
Reported by:	pkg-fallout
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
2026-01-30 18:25:02 +02:00
Christos Margiolis b9289743f4 src.opts: Remove MK_SOUND artifact
Fixes:		f74f891581 ("src.opts: Introduce MK_SOUND")
PR:		291853
Sponsored by:	The FreeBSD Foundation
MFC after:	4 days
2026-01-30 18:14:28 +02:00
Mark Johnston 1539a657ad ip6_output tests: Remove an unused import
No functional change intended.

MFC after:	1 week
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
2026-01-30 15:27:22 +00:00
Mark Johnston a03eabfebb ip6_mroute: Mark functions as static
No functional change intended.

MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
2026-01-30 15:25:52 +00:00
Timo Völker 574d46b25a epair: add VLAN_HWTAGGING
Add capability VLAN_HWTAGGING to the epair interface and enable it by
default.
When sending a packet over a VLAN interface that uses an epair
interface, the flag M_VLANTAG and the ether_vtag (which contains the
VLAN ID and/or PCP) are set in the mbuf to inform the hardware that
the VLAN header has to be added. The sending epair end does not need
to actually add a VLAN header. It can just pass the mbuf with this
setting to the other epair end, which receives the packet. The
receiving epair end can just pass the mbuf with this setting to the
upper layer. Due to this setting, the upper layer believes that there
was a VLAN header that has been removed by the interface.
If the packet later leaves the host, the outgoing physical interface
can add the VLAN header in hardware if it supports VLAN_HWTAGGING.
If not, the implementation of Ethernet or bridge adds the VLAN header
in software.

Reviewed by:		zlei, tuexen
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D52465
2026-01-30 11:54:33 +01:00
Michael Tuexen 33596d9255 dpaa2: add support for several interface counters
Add support for IFCOUNTER_IPACKETS, IFCOUNTER_OPACKETS,
IFCOUNTER_OBYTES, IFCOUNTER_OMCASTS, IFCOUNTER_OERRORS, and
IFCOUNTER_OQDROPS.
This allows tools like systat to report the incoming and outgoing
bandwidth.

Reviewed by:		dsl, Timo Völker
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D54893
2026-01-30 10:58:57 +01:00
Adrian Chadd 03e4cc9fde powerpc: explicitly cast the timebase printfs
This is causing compilation issues on powerpc:powerpc GENERIC.
2026-01-29 22:36:33 -08:00
Maxim Konovalov c443f5d1c2 intro.9: grammar 2026-01-30 04:51:24 +00:00
Maxim Konovalov 7f537f4ba8 intro.9: deduplicate vm_page Xrs
PR:		292820
Submitted by:	Kraytonian
MFC after:	1 week
2026-01-30 04:48:56 +00:00
Jose Luis Duran f54f362d62 nanobsd: embedded: Stub out experimental functions
Stub out both experimental functions introduced in ecc039be7f when
doing embedded builds.

Fixes:		ecc039be7f ("nanobsd: Add a NO_ROOT build option")
MFC after:	3 days
2026-01-30 01:42:00 +00:00
Jessica Clarke ba56760a47 Revert "src.opts.mk: Enable LLDB by default globally"
This breaks the riscv64 build; clearly the version we have in-tree is
not new enough to work. That or our build system needs tweaking. Either
way, we're not ready for this, and enabling it without testing was
misguided.

This reverts commit c59a47dc6c.
2026-01-30 01:11:13 +00:00
Abdelkader Boudih fdcd67be82 firmware: Fix inverted FIRMWARE_GET_NOWARN logic
The try_binary_file() function has inverted logic for the
FIRMWARE_GET_NOWARN flag.  When the flag is set (meaning "don't warn"),
the code sets warn=true and makes noise anyway.

Invert the assignment to warn to correctly suppress warnings when
FIRMWARE_GET_NOWARN is set.

Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D54955
2026-01-29 18:02:47 -06:00
Konstantin Belousov b249cb2b18 SCHED_4BSD: maybe_resched() cannot schedule ast() for curthread
maybe_resched() needs to schedule TDA_SCHED for curthread, but this
requires taking curthread lock while owning some other thread lock.
To avoid introducing the order:
- Use a scheduler-private TDP flag.
- Register an unconditional TDA_SCHED_PRIV for 4BSD.
When an AST needs to be scheduled, i.e. the current thread must do
context switch in the return to userspace path, set the flag.
Then the ast handler calls ast_scheduler(), which gives the same
effect as scheduling TDA_AST.

The overhead is a single function call on each userspace return, for
4BSD case.

Reported and tested by:	pho (previous version)
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54945
2026-01-30 01:26:16 +02:00
Konstantin Belousov 0730a05cd3 tuning.7: document schedulers knobs
Reviewed by:	emaste, olce, ziaee
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54951
2026-01-30 00:43:45 +02:00
Bjoern A. Zeeb 4b32fdb4a6 lindebugfs: check that name is set as otherwise pfs_alloc_node_flags() panics
I have hit the case multiple times that some LinuxKPI field may not be
set during driver bringup and lindebugfs would cause a panic.
The backtrace goes like:

  strlen() at strlen+0x54
  pfs_create_dir() at pfs_create_dir+0x41
  debugfs_create_dir() at debugfs_create_dir+0xa1
  ...

While the problem is clearly in LinuxKPI or the driver, we likely
should at least add an assert to pfs_create_dir() if name is NULL
like we have for pfs_add_node() but for lindebugfs at least make
this a graceful error and continue without creating the dir instead
of panicing.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	kevans
Differential Revision: https://reviews.freebsd.org/D54944
2026-01-29 19:35:23 +00:00
Konstantin Belousov 783b8a0fd8 kern/sched: deduplicate dtrace hook vars
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00
Konstantin Belousov 9409e86980 kern/sched: deduplicate sdt probes
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00
Konstantin Belousov a84a39dfe5 kern/sched: move duplicate preemption stat vars into sched_shim.c
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00
Konstantin Belousov 1322760fd1 sys: enable both SCHED_ULE and SCHED_4BSD for some configs
Globally enable both schedulers for LINT.
Enable both schedulers for GENERIC on amd64.

Reviewed by:	olce
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00
Konstantin Belousov ff870b783f sched_shim: restore kern.ccpu sysctl
It is apparently should be considered part of the ABI, and is used by
the base top(1).  But do not declare the ccpu variable in headers, it is
needed only by 4bsd. So put the variable definition into sched_shim.c to
make the kernel buildable without SCHED_4BSD.

Reviewed by:	olce
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00
Konstantin Belousov 5a6e0e31bc sysctl kern.sched.ule.topology_spec: allow to run if ULE is not initialized
Reviewed by:	olce
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00
Konstantin Belousov b602ba1b5f net/iflib.c: move out scheduler-depended code into the hook
Add sched_find_l2_neighbor().  This really should be not
scheduler-depended, in does not have anything to do with scheduler at
all.  But for now keep the same code structure.

Reviewed by:	olce
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00
Konstantin Belousov 1c4e16f6db x86/cpu_machdep.c: unconditionally fence
For !SCHED_ULE, even if the fence is not needed, it is harmless.

Reviewed by:	olce
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00
Konstantin Belousov c384b35e42 x86/local_apic.c: remove direct SCHED_ULE use
Move the code to decide on the timer accounting into the scheduler hook.
Since there were no inclusion of opt_sched.h, it is probably done
unconditionally anyway.

Reviewed by:	olce
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00
Konstantin Belousov 377c053a43 cpu_switch(): unconditionally wait on the blocked mutex transient
It is nop for 4BSD.

Reviewed by:	olce
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
2026-01-29 20:11:56 +02:00