Commit Graph
306860 Commits
Author SHA1 Message Date
Michael Tuexen 378577393e ure: improve receive checksum offloading
Let the receive checksum offload for TCP/IPv6 and UDP/IPv6 be
controlled by ifconfig rxcsum6 and not by ifconfig rxcsum.
While there, make the code more compact and improve stlye.9
conformity.

Reviewed by:		Timo Völker
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D55188
2026-02-10 18:13:48 +01:00
Kristof Provost 950dedcd87 pf: remove unused variable from pf_test_ctx
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-02-10 18:09:34 +01:00
Andrew Turner 1ea0721e1a vtgpu: Support virtio gpu on Parallels Desktop
The Parallels Desktop Virtio GPU implementation doesn't handle
enqueuing the VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING request and
memory list together.

Work around this by splitting them before sending them to be enqueued.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D55147
2026-02-10 17:06:31 +00:00
Olivier Certner 7e5f4bb3a1 kernel dump: dumpsys_gen_pa_next(): Fix "no more chunks" condition detection
In the (improbable) cases where either:
- All entries in dump_map[] are used, so there is no guard entry filled with zeros.
- Some dump region has size 0.
We would respectively access dump_map[] out-of-bounds or omit further
dump regions when iterating.

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
2026-02-10 17:50:27 +01:00
Sarah Walker 1224347817 arm64: Add MOPS implementations of copyin/copyout
Reimplement copyin() & copyout() as ifuncs.

Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D54947
2026-02-10 15:39:56 +00:00
Sarah Walker 7d7295df9b arm64: Add MOPS implementation of pagezero()
Reimplement pagezero() as ifunc. As pagezero() is only used in pmap.c,
move ifunc to that file.

Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D54946
2026-02-10 15:39:56 +00:00
Sarah Walker 2ccbf06c02 arm64: Add MOPS implementations of memset(), memcpy() and memmove()
Enable the use of MOPS implementations of memset, memcpy and memmove within
the kernel. Fix pre-ifunc resolution uses of these functions.

Reported by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D55051
2026-02-10 15:39:56 +00:00
Sarah Walker 18af5a180b arm64: Enable MOPS usage in the kernel
Support handling kernel-side MOE exceptions.

Reported by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D54943
2026-02-10 15:39:56 +00:00
Bjoern A. Zeeb 083f8f3330 ath10k: update Atheros/QCA's ath10k driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
05f7e89ab9731565d8a62e3b5d1ec206485eeb0b ( tag: v6.19 ).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2026-02-10 15:12:28 +00:00
Mark Johnston 4c23a98ba3 asan: Use memset_early() to fill shadow memory
__builtin_memset() calls are replaced with calls to memset(), but that
can't be used before ifunc relocations are processed if the
implementation is selected at boot time.  Meanwhile, the sanitizer may
emit calls to __asan_set_shadow_*() as soon as locore jumps into C code,
before ifuncs are selected.

Just unconditionally use memset_early() to work around this.

Reported by:	andrew
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55079
2026-02-10 15:10:39 +00:00
Cheng Cui a485399f88 tcp: restrict flowtype copying to specific RSS TCP types
Reviewed by:	gallatin, tuexen
Differential Revision:	https://reviews.freebsd.org/D55196
2026-02-10 10:08:57 -05:00
Bjoern A. Zeeb 91a3131f2f ath10k: update Atheros/QCA's ath10k driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
05f7e89ab9731565d8a62e3b5d1ec206485eeb0b ( tag: v6.19 ).

Sponsored by:	The FreeBSD Foundation
2026-02-10 14:58:56 +00:00
Dimitry Andric 212272a437 mtree: stop creating /usr/share/doc/ncurses
In base 68ad2b0d7a the ncurses html documentation was removed, and
entries added to ObsoleteFiles.inc to get rid of /usr/share/doc/ncurses,
but the directory was still being re-created via BSD.usr.dist. Remove it
from there too.

Fixes:		68ad2b0d7a
MFC after:	1 month
2026-02-10 15:34:03 +01:00
Dag-Erling Smørgrav 36ec2b1c10 pwd: Add tests
MFC after:	1 week
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D55153
2026-02-10 15:29:08 +01:00
Dag-Erling Smørgrav 2df923c5d2 pwd: Clean up and adopt POSIX semantics
According to POSIX, the default should be -L.  Based on code history,
whoever first wrote BSD pwd(1) could not figure out how to implement
-L and therefore made -P the default (and only) option. Support for -L
was later added, but the default was never changed.

Clean up the code, make -L the default, and rewrite getcwd_logical() to
reject paths that contain dot or dot-dot, as required by POSIX.

MFC after:	1 week
Reviewed by:	olce
Differential Revision:	https://reviews.freebsd.org/D55146
2026-02-10 15:29:04 +01:00
Cy Schubert 47fb51847f ipfilter: Interface name must not extend beyond end of buffer
sifpidx (an interface name) cannot extend beyond the end of the
fr_names buffer.

We do the validation for fr_sifpidx here because it is a union that
contains an offset only when fr_sifpidx points to an interface name,
an offset into fr_names. The union is  an offset into fr_names in this
case only.

interr_tbl now becomes a static variable outside a function to facilitate
its use by two functions within fil.c

Note that sifpidx is only used in ipf_sync() which implments ipf -y.

Reported by:	Ilja Van Sprundel <[email protected]>
MFC after:	1 week
2026-02-10 06:02:18 -08:00
Mark Johnston 93075bdb81 net: Remove the IFF_RENAMING flag
This used to be needed when interface renames were broadcast using the
ifnet_departure_event eventhandler, but since commit 349fcf079c
("net: add ifnet_rename_event EVENTHANDLER(9) for interface renaming"),
it has no purpose.  Remove it.

Reviewed by:	pouria, zlei
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55171
2026-02-10 13:45:06 +00:00
Mark Johnston d8f7a7b44a ip6_mroute: Deindent some code in ip6_mdq()
Deal with the mifi >= nummifs case early so that we can de-indent the
rest of the code.  This also ensures that the debug log (compiled out by
default) doesn't perform an out-of-bounds access.

Remove a bogus NULL test in an inner loop while here.

No functional change intended.

Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55059
2026-02-10 13:45:06 +00:00
Mark Johnston 9df6a7f9a6 ip_mroute: Try to make function pointer declarations more consistent
The ip_mroute and ip6_mroute modules hook into the network stack via
several function pointers.  Declarations for these pointers are
scattered around several headers.  Put them all in the same place,
ip(6)_mroute.h.

No functional change intended.

Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55058
2026-02-10 13:45:06 +00:00
Mark Johnston 0a757ef9a7 ip_mroute: Use a local variable to store a VIF pointer
This is cleaner and will make it a bit easier to add some more
indirection to the VIF table, specifically, to add per-FIB tables.

No functional change intended.

Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55057
2026-02-10 13:45:06 +00:00
Baptiste Daroussin 8d4c1043bb usb_vendors: update to 2025.12.13 2026-02-10 14:38:48 +01:00
Bjoern A. Zeeb 3f4213f00a rtw88: remove more references to rtw88fw
When I removed the Realtek rtww8x firmware from base I missed to
add rtw88fw.4 to ObsoleteFiles.inc [1].
While adding this, also remove a leftover reference in rtw88.4.

Reported by:	Herbert J. Skuhra (herbert gojira.at) [1]
Fixes:		cf94672363
MFC after:	3 days
2026-02-10 13:36:06 +00:00
Baptiste Daroussin 1acfc913e6 pci_vendors: update to 2026-02-10 2026-02-10 14:33:42 +01:00
Johan Söllvander 821243b387 sbin/geom: Convert err/warn() to xo_err/warn() and style(9) fixes
Finishing up the libxo conversion of geom by switching err(3) to their
libxo equivalents.

While here, fix some style(9) issues. There are still a few left, but at
least they're fewer now.

Reviewed by:	asomers
Approved by:	asomers (mentor)
MFC after:	2 weeks
Sponsored by:	ConnectWise
Differential Revision:	https://reviews.freebsd.org/D54938
2026-02-10 13:19:50 +01:00
Bjoern A. Zeeb f19cb3c72b rtw89: module Makefile add USB bus attachments
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2026-02-10 10:16:35 +00:00
Bjoern A. Zeeb 7fc5c8df4c rtw89: harmonize all MODULE_DEPEND to rtw89
rtw89 came like rtw88 was done.  Given rtw88 once was split up rtw89
got modelled the same way.  Clean this up too.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
2026-02-10 10:16:34 +00:00
Bjoern A. Zeeb 57b839612b rtw89: cleanup static_assert() calls
These days we can use static_assert() without trouble so remove the
FreeBSD-specific rtw89_static_assert implementation.  This reduces
the diff to upstream and will ease future driver updates.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2026-02-10 10:16:34 +00:00
Bjoern A. Zeeb 9e17556119 rtw88: Add bus attachments to the module Makefile
In addition to PCIe we will support USB and also prepare for SDIO (still
disabled locally).  The module SRCS are split up into a common part,
which we always add.  All three bus parts are guarded by a local
variable in the Makefile.
In addition the PCI parts require PCI to be compiled into the kernel.
We add that check in case of, e.g., SoCs with SDIO but no PCI, which
may not have PCI in the kernel config and thus the module would fail
to attach.
USB has no additional check as it is fully loadable and does not have
to be in a kernel config.
SDIO depends on an MMCCAM-enabled kernel but is otherwise loadable.

While we could, we are not splitting the various bus attachments into
individual modules as we generally do not do that in FreeBSD. [1]

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Discussed with:	imp and jhb (2022, 2024), see also 17732dd8f0 [1]
OKed by:	imp (KERN_OPTS checks initially suggested by jhb)
Differential Revision: https://reviews.freebsd.org/D55022
2026-02-10 10:16:34 +00:00
Bjoern A. Zeeb 49c1b388d5 rtw88: harmonize all MODULE_DEPEND to rtw88
From the time I used to split up the driver into a core part and
bus attachment sub-drivers the various bus attachments had their own
module name but all is "rtw88" now.

Core functionality depends on linuxkpi, linuxkpi_wlan, and for debug.c
lindebugfs.
Each bus attachment then depends on its own parent layer if needed:
PCI gets pull in through linuxkpi, USB: depends on [the future] linuxkpi_usb,
and SDIO: depends on [the future] linuxkpi_sdio.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D55021
2026-02-10 10:16:33 +00:00
Chandrakanth Patil c2f799d419 iflib: Add support for SIOCGIFDOWNREASON ioctl
This change adds native support for the SIOCGIFDOWNREASON ioctl in iflib.

When ifconfig issues SIOCGIFDOWNREASON, the request is now routed through a
new driver callback (IFDI_GET_DOWNREASON). iflib allocates the ifdownreason
structure, calls the driver to fill the down-reason message, and then
returns the data back to ifconfig for display.

Without this change, iflib-based drivers cannot implement link-down reason
reporting even if the hardware provides the information.

No functional change for existing drivers unless they implement the new
IFDI_GET_DOWNREASON method. Existing drivers continue to behave as before.

Reviewed by: gallatin, erj, kgalazka, ssaxena, #iflib
Differential Revision: https://reviews.freebsd.org/D54045
MFC After: 1 week
2026-02-10 09:30:06 +00:00
Chandrakanth Patil feb0a7e19f pci_iov: Reuse downstream bridge bus window if it already covers VF bus
If the parent bridge's [secondary, subordinate] window already covers
the VF bus (e.g., programmed by BIOS or a prior PF), skip allocating
PCI_RES_BUS. This avoids a duplicate rman allocation in the multi-PF
case while still allocating when growth is actually needed.

Reviewed by: ssaxena
Differential Revision: https://reviews.freebsd.org/D52163
MFC After: 1 week
2026-02-10 09:30:06 +00:00
Bjoern A. Zeeb 10f91d9ff7 rtw89: update Realtek's rtw89 driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 ( tag: v6.19-rc6 ).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
PR:		285228
2026-02-10 08:35:34 +00:00
Konstantin Belousov bf603dbbb2 dev/mfi: include sys/abi_compat.h unconditionally
not only for COMPAT_FREEBSD32 case.  The driver uses INPTR() for
non-compat32 code.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-02-10 09:08:57 +02:00
Konstantin Belousov 5f3192b3fd amd64/acpica/acpi_wakeup.c: do not store to WARMBOOT_OFF in efi_boot case
Split acpi_wakeup_cpus() into acpi_wakeup_cpus_bios() and
acpi_wakeup_cpus_efi().  The former needs to manipulate zero page and
CMOS state, the later does not.

Referenced commit left the write to WARMBOOT_OFF in case of
acpi_wakeup_ap() failed.

Fixes:	e99255c8a6
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D55205
2026-02-10 04:38:33 +02:00
Konstantin Belousov ecadac729a sys/event.h: reduce namespace pollution from sys/abi_compat.h
Split out types definitions into sys/abi_types.h, and only include
abi_types.h into sys/event.h.

Tested and reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D55202
2026-02-10 04:10:11 +02:00
Bjoern A. Zeeb 32efafda38 ath10k: modules Makefile bus attachments
Given USB in theory compiles add it to the Makefile.  The upstream
support was never finished and I see little chances it ever will be
so keep USB disabled by default.

MFC after:	3 days
2026-02-09 21:49:46 +00:00
Bjoern A. Zeeb ca83c36975 ath10k: usb: make compile using [a future] linuxkpi_usb
Make ath10k usb code compile just to gather more USB bits.

Currently (and likely forever) it is useless as the ath10k USB
implementation never got finished.
At the moment it lacks an entry for the USB bus attachment in
core.c ath10k_hw_params_list[].

ath10k_usb0 on uhub1
ath10k_usb0: <Qualcomm Atheros USBWLAN, rev 2.01/92.10, addr 6> on usbus0
ath10k_usb0: Warning: ath10k USB support is incomplete, don't expect anything to work!
ath10k_usb0: Unsupported hardware version: 0x5020001
ath10k_usb0: could not get hw params (-22)
ath10k_usb0: could not probe fw (-22)

There is another possible hardware [1] which was also never merged
upstream.
[1] https://lists.infradead.org/pipermail/ath10k/2024-August/016037.html
"[PATCH] wifi: ath10k: add USB device ID for Atheros QCA9377-7"

MFC after:	3 days
2026-02-09 21:49:46 +00:00
Bjoern A. Zeeb c45b60cab0 ath10k: harmonize all MODULE_DEPEND to ath10k
With theoretically multiple bus attachements (unclear if we will ever
support anything but PCI) rename the module name to "ath10k" and use
it consistently.  Move the common depends to core.c and lindebugfs
and usb to their respective files.

MFC after:	3 days
2026-02-09 21:49:46 +00:00
Bjoern A. Zeeb db20376a4f ath10k: cleanup some bits no longer FreeBSD-specific
We have since I did this port in 2023 added ACPI support to LinuxKPI, so
we can use it.  Also there is a linux/of.h header so we no longer need
to guard the #include.

MFC after:	3 days
2026-02-09 21:49:46 +00:00
Bjoern A. Zeeb 717240c95d ath10k: add sysctl to turn on/off fwlog
FWLOG, if compiled in, was on by default without a way to stop it from
printing everything to the console.  Add a modparam to enable it with
it being disabled by default if available.

MFC after:	3 days
2026-02-09 21:49:45 +00:00
Bjoern A. Zeeb 6387c11359 ath10k: fix a schedule() call
Using kern_yield does not seem ideal either for polling here;  use a
schedule_timeout() call from LinuxKPI instead and use about 100
iterations per second.

Improve an error message to include the error code so we have a better
idea of what happens.

MFC after:	3 days
2026-02-09 21:49:45 +00:00
Bjoern A. Zeeb d3c4e8952c rtw88: set .bsddriver.name for USB chipsets
We use the FreeBSD-specifc bsddriver.name to get the device name;
set it everywere consistently.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D55020
2026-02-09 21:49:45 +00:00
Bjoern A. Zeeb 31393810a1 LinuxKPI: add scoped_guard(), spinlock guard support
The "cleanup.h" implementation got a bit more complicated.

For one we now use a macro to concatenate a prefix, the name, and a
suffix for variable and function declarations.  This was triggered
by the fact that the "guard_" prefix we used was confusing.  We now
use a generic "cleanup_" which is only encoded in the single place
rather than all over the file.

As already indicated by the comment the DEFINE_LOCK_GUARD_0()
macro got split up and a _1 version which also takes a type got
implemented and is used for a spinlock variant used by rtw89(4)
via the new scoped_guard() bits.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D54808
2026-02-09 21:49:45 +00:00
Bjoern A. Zeeb 020ff5e294 LinuxKPI: mod_devicetable, add comment about [future] LinuxKPI USB
USB structures are defined with the native USB implementation.
Just leave a comment why they are not here.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	dumbbell
Differential Revision: https://reviews.freebsd.org/D54991
2026-02-09 21:49:44 +00:00
Bjoern A. Zeeb 1f4fbcf342 LinuxKPI: move MODULE_DEVICE_TABLE from pci.h to module.h
Move the MODULE_DEVICE_TABLE macro to module.h where it belongs
in preparation for different bus (e.g., USB, SDIO) support.
The various struct <bus>_device_id, if not elsewhere, should be
defined in mod_devicetable.h.

This is the next step after 2f5666c172.

No functional changes.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D54900
2026-02-09 21:49:44 +00:00
Bjoern A. Zeeb 1f19fc2632 LinuxKPI: pci: make sure a tailq and lock are initialized
Move the initializations of the tailq and lock from
linux_pci_attach_device() into lkpifill_pci_dev() so that they are
initialized in all cases we create a device (see all the possible
callers of lkpifill_pci_dev()).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D54861
2026-02-09 21:49:30 +00:00
Bjoern A. Zeeb b615b4805a LinuxKPI: expand dma_sync_single_for_cpu() in lkpi_dma_unmap()
In case lkpi_dma_unmap() would call dma_sync_single_for_cpu() we get
into a lock recursion which will trigger a panic with debug kernels.

It would be hard to provide an internal "locked" version for
dma_sync_single_for_cpu().  In the old days this would not have
been a problem but (long before we added the missing sync calls)
some locks got folded into one in a6619e8d9c.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Observed with:	iwlwifi mld
Reviewed by:	dumbbell
Differential Revision:	https://reviews.freebsd.org/D54841
2026-02-09 21:40:47 +00:00
Bjoern A. Zeeb 840f478eed net80211: in net80211_vap_printf() also use vprintf()
While everything else uses vprintf() and net80211_vap_printf()
vlog() the debug output of wlandebug sessions can be weird.
For consistency use vprintf() everywhere to have homogeneous logging.

Sponosred by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D54795
2026-02-09 21:40:47 +00:00
Guido Falsi a2eb0894b7 sys/netinet6: switch net.inet6.ip6.use_stableaddr to on by default
This change switches to using RFC 7217 algorithm as the default to
generate SLAAC addresses for IPv6 interfaces configured with
accept_rtadv.

Reviewed by:		pouria, glebius, zlei
Approved by:		zlei
Relnotes:		yes
Differential Revision:	https://reviews.freebsd.org/D55138
2026-02-09 21:27:15 +01:00
Guido Falsi e912723afb ifconfig.8: Start new sentence on new line
This change was forgotten by me in the previous commit to this file.

Reported by:	kib
Approved by:	implicit (change omitted from previous commit)
Fixes:		31ec8b6407
2026-02-09 21:09:20 +01:00