FreeBSD/src 452b92fsys/compat/linuxkpi/common/src linux_page.c

linuxkpi: gracefully handle page lookup failure in lkpi_vmf_insert_pfn_prot_locked

Currently lkpi_vmf_insert_pfn_prot_locked will check the page iter to
find a usage of the page. If no page was found, it continues on to
try using PHYS_TO_VM_PAGE() to get a page. Currently it does not check
if a valid page was found before passing it to vm_page_busy_acquire,
which can cause a kernel page fault as vm_page_busy_acquire expects
a valid page pointer.

This can easily be triggered while starting KDE6 in wayland mode, which
many users have been reporting. With this change plasma6 starts properly
in wayland mode.

Sponsored by:   NVIDIA
PR:             288565
Reviewed by:    markj, kbowling (mentor)
Differential Revision:  https://reviews.freebsd.org/D53412

(cherry picked from commit 03b214a35db1ebdc7575cad8d695c65daf2817bf)
DeltaFile
+4-0sys/compat/linuxkpi/common/src/linux_page.c
+4-01 files

FreeBSD/src 3bb9800sys/compat/linuxkpi/common/include/linux pm.h

linuxkpi: add stub implementation of pm_vt_switch_(un)register

This adds empty implementations of pm_vt_switch_(un)register which
are used by nvidia-drm. We do not need to specify anything here as
a VT switch always happens on suspend/resume.

Sponsored by:   NVIDIA
Reviewed by:    kbowling (mentor), emaste
Differential Revision:  https://reviews.freebsd.org/D53400

(cherry picked from commit 75aa13c64aba71f6f26d05e8fcf96e3862d44cde)
DeltaFile
+14-0sys/compat/linuxkpi/common/include/linux/pm.h
+14-01 files

FreeBSD/src 0140dc4lib/libsys jail.2, share/man/man5 pf.conf.5

man typos: Fix pf.conf.5 and jail.2 typos

MFC after:      3 days
Signed-off-by:  Seth Hoffert <seth.hoffert at gmail.com>
Closes:         https://github.com/freebsd/freebsd-src/pull/1919
DeltaFile
+1-1lib/libsys/jail.2
+1-1share/man/man5/pf.conf.5
+2-22 files

FreeBSD/src ebe7b24share/examples/sound oss.h simple.c

sound examples: Check if setting property was successful

MFC after:      1 week
Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D54038
DeltaFile
+18-4share/examples/sound/oss.h
+4-0share/examples/sound/simple.c
+22-42 files

FreeBSD/src b986aa0sys/net if_llatbl.c if_llatbl.h, sys/netinet if_ether.c

lltable: use own lock

Add struct mtx to struct lltable and stop using IF_AFDATA_LOCK, that
was created for a completely different purpose.  No functional change
intended.

Reviewed by:            zlei, melifaro
Differential Revision:  https://reviews.freebsd.org/D54086
DeltaFile
+24-26sys/net/if_llatbl.c
+12-13sys/netinet6/nd6.c
+8-8sys/netinet/if_ether.c
+5-7sys/netinet6/in6.c
+8-1sys/net/if_llatbl.h
+4-4sys/netinet6/mld6.c
+61-592 files not shown
+65-648 files

FreeBSD/src 607f110sys/compat/linsysfs linsysfs_net.c, sys/compat/linux linux_if.c linux_netlink.c

linux: store Linux Ethernet interface number in struct ifnet

The old approach where we go through the list of interfaces and count them
has bugs.  One obvious bug with this dynamic translation is that once an
Ethernet interface in the middle of the list goes away, all interfaces
following it would change their Linux names.

A bigger problem is the ifnet arrival and departure times.  For example
linsysfs has event handler for ifnet_arrival_event, and of course it wants
to resolve the name.  This accidentially works, due to a bug in
if_attach() where we call if_link_ifnet() before invoking all the event
handlers.  Once the bug is fixed linsysfs won't be able to resolve the old
way.  The other side is ifnet_departure_event, where there is no bug, the
eventhandlers are called after the if_unlink_ifnet().  This means old
translation won't work for departure event handlers.  One example is
netlink.  This change gives the Netlink a chance to emit a proper Linux
interface departure message.

However, there is another problem in Netlink, that the ifnet pointer is

    [7 lines not shown]
DeltaFile
+71-64sys/compat/linux/linux_if.c
+6-6sys/compat/linsysfs/linsysfs_net.c
+4-3sys/compat/linux/linux_netlink.c
+2-3sys/compat/linux/linux_common.h
+2-1sys/netlink/netlink_linux.h
+1-1sys/netlink/netlink_io.c
+86-785 files not shown
+95-7811 files

FreeBSD/src fbf05d2sys/compat/linux linux_if.c linux.c, sys/modules/linux_common Makefile

linux: separate all ifnet(9) related code into linux_ifnet.c

Remove linux_use_real_ifname().  It is no longer used outside of the
file since 3ab3c9c29cf0.  There is no functional change.

Reviewed by:            melifaro, dchagin
Differential Revision:  https://reviews.freebsd.org/D54076
DeltaFile
+310-0sys/compat/linux/linux_if.c
+1-277sys/compat/linux/linux.c
+0-10sys/compat/linux/linux.h
+1-2sys/modules/linux_common/Makefile
+312-2894 files

FreeBSD/ports 6c669e4www/tomcat-devel distinfo pkg-plist

www/tomcat-devel: Update 11.0.14 => 11.0.15

Changelog:
https://tomcat.apache.org/tomcat-11.0-doc/changelog.html#Tomcat_11.0.15_(markt)

MFH:    2025Q4
(cherry picked from commit 304b5416c1681c5badd9853444c14d5bb0989928)
DeltaFile
+3-3www/tomcat-devel/distinfo
+1-1www/tomcat-devel/pkg-plist
+1-1www/tomcat-devel/Makefile
+5-53 files

FreeBSD/ports 92fe63ewww/tomcat110 distinfo pkg-plist

www/tomcat110: Update 11.0.14 => 11.0.15

Changelog:
https://tomcat.apache.org/tomcat-11.0-doc/changelog.html#Tomcat_11.0.15_(markt)

MFH:    2025Q4
(cherry picked from commit 1c459dadac074f5a634a493bb946d9e7f55b2e8d)
DeltaFile
+3-3www/tomcat110/distinfo
+1-1www/tomcat110/pkg-plist
+1-1www/tomcat110/Makefile
+5-53 files

FreeBSD/ports 304b541www/tomcat-devel distinfo Makefile

www/tomcat-devel: Update 11.0.14 => 11.0.15

Changelog:
https://tomcat.apache.org/tomcat-11.0-doc/changelog.html#Tomcat_11.0.15_(markt)

MFH:    2025Q4
DeltaFile
+3-3www/tomcat-devel/distinfo
+1-1www/tomcat-devel/Makefile
+1-1www/tomcat-devel/pkg-plist
+5-53 files

FreeBSD/ports 1c459dawww/tomcat110 distinfo Makefile

www/tomcat110: Update 11.0.14 => 11.0.15

Changelog:
https://tomcat.apache.org/tomcat-11.0-doc/changelog.html#Tomcat_11.0.15_(markt)

MFH:    2025Q4
DeltaFile
+3-3www/tomcat110/distinfo
+1-1www/tomcat110/Makefile
+1-1www/tomcat110/pkg-plist
+5-53 files

FreeBSD/src acd0244sys/kern init_main.c

proc0_post: Clear relevant thread stats directly

rufetch() has several other effects besides clearing these per-thread
stats most of which are explicitly discarded by the subsequent calls
to ruxreset().  Just clear the relevant stats directly instead.

Reviewed by:    olce, kib, markj
Differential Revision:  https://reviews.freebsd.org/D54050
DeltaFile
+6-3sys/kern/init_main.c
+6-31 files

FreeBSD/src 3f8ed60sys/kern init_main.c, sys/sys proc.h

ruxreset: Add an inline function to reset all the stats in rusage_ext

Use it in proc0_post to reset per-process CPU usage.

Suggested by:   olce
Reviewed by:    olce, kib
Differential Revision:  https://reviews.freebsd.org/D54049
DeltaFile
+12-0sys/sys/proc.h
+1-4sys/kern/init_main.c
+13-42 files

FreeBSD/src dafe50esys/kern init_main.c

thread0: Clear td_rux stats in proc0_post

proc0_post aims to reset the CPU usage accounting for all threads and
processes in the system to zero once the time of day is verified.
However, not all of the per-thread stats were not being cleared,
resulting in over-reported time for thread0 post-boot.

Reviewed by:    olce, kib, markj
Fixes:          bed4c5241663 ("Implement RUSAGE_THREAD. Add td_rux...")
Differential Revision:  https://reviews.freebsd.org/D54040
DeltaFile
+6-2sys/kern/init_main.c
+6-21 files

FreeBSD/src d9788easbin/ipf/libipf interror.c, sys/netpfil/ipfilter/netinet ip_fil_freebsd.c fil.c

ipfilter: Restrict ipfilter within a jail

Add a sysctl/tunable (net.inet.ipf.jail_allowed) to control whether a
jail can manage its own ipfilter rules, pools, and settings. A jail's
control over its own ipfilter rules and settings may not be desireable.
The default is jail access to ipfilter is denied.

The host system can stil manage a jail's rules by attaching the rules,
using the on keyword, limiting the rule to the jail's interface. Or
the sysctl/tunable can be enabled to allow a jail control over its own
ipfilter rules and settings.

Implementation note: Rather than store the jail_allowed variable,
referenced by sysctl(9), in a global area, storing the variable in the
ipfilter softc is consistent with ipfilter's use of its softc.

Discussed with:         emaste, jrm
MFC after:              1 week
Differential revision:  https://reviews.freebsd.org/D53623
DeltaFile
+15-0sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
+1-0sys/netpfil/ipfilter/netinet/fil.c
+1-0sbin/ipf/libipf/interror.c
+1-0sys/netpfil/ipfilter/netinet/ip_fil.h
+1-0sys/netpfil/ipfilter/netinet/mlfk_ipl.c
+19-05 files

FreeBSD/src 0ff0c19sbin/ipf Makefile, sys/conf options

ipfilter: Disable ipfs(8) by default

At the moment ipfs(8) is a tool that can be easily abused. Though the
concept is sound the implementation needs some work.

ipfs(8) should be considered experimental at the moment.

This commit also makes ipfs support in the kernel optional.

Reviewed by:            emaste, glebius
MFC after:              1 week
Differential revision:  https://reviews.freebsd.org/D53787
DeltaFile
+7-0sys/modules/ipfilter/Makefile
+6-1sbin/ipf/Makefile
+4-1sys/netpfil/ipfilter/netinet/ip_nat.c
+4-0sys/netpfil/ipfilter/netinet/ip_state.c
+4-0tools/build/mk/OptionalObsoleteFiles.inc
+1-0sys/conf/options
+26-22 files not shown
+28-28 files

FreeBSD/ports 19373d8devel/R-cran-lintr Makefile distinfo

devel/R-cran-lintr: Update to 3.3.0-1

Update dependencies.

Changelog: https://cran.r-project.org/web/packages/lintr/news/news.html
DeltaFile
+7-9devel/R-cran-lintr/Makefile
+3-3devel/R-cran-lintr/distinfo
+10-122 files

FreeBSD/src 4b61bd7sys/contrib/dev/mediatek/mt76 mac80211.c

mt76: ieee80211_is_first_frag() operates on the seq_ctrl field not on fc.

Pass the correct field to ieee80211_is_first_frag(); otherwise the results
may vary.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit c67fd35e58c6ee1e19877a7fe5998885683abedc)
DeltaFile
+1-1sys/contrib/dev/mediatek/mt76/mac80211.c
+1-11 files

FreeBSD/src 8f7cbd2sys/contrib/dev/mediatek/mt76/mt7915 coredump.c eeprom.c, sys/contrib/dev/mediatek/mt76/mt7921 mcu.c

mt76: add LINUXKPI_PARAM_PREFIX for module_param*

In order to not overwrite sysctl/tunables under compat.linuxkpi
we need to prefix the module_param* names with a per-driver/file
designator to make them (more) uniq.  Add the FreeBSD specific
LINUXKPI_PARAM_PREFIX defines for that where missing in mt76.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 853e0440c97a4a1797edd6d653fba4398dc885e8)
DeltaFile
+4-0sys/contrib/dev/mediatek/mt76/mt7915/coredump.c
+4-0sys/contrib/dev/mediatek/mt76/mt7915/eeprom.c
+4-0sys/contrib/dev/mediatek/mt76/mt7915/mcu.c
+4-0sys/contrib/dev/mediatek/mt76/mt7915/mmio.c
+4-0sys/contrib/dev/mediatek/mt76/mt7921/mcu.c
+4-0sys/contrib/dev/mediatek/mt76/mt7925/mcu.c
+24-05 files not shown
+44-011 files

FreeBSD/src e65e9bcsys/contrib/dev/rtw88 led.c sdio.c

rtw88: update Realtek's rtw88 driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
7d0a66e4bb9081d75c82ec4957c50034cb0ea449 ( tag: v6.18 ).

Merge commit 'e543442afe3ad5b27616575be2d2402b988656eb' into rtw88

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 8b4477f6b8e1b82acfef558a11facbb2797cb690)
DeltaFile
+7-6sys/contrib/dev/rtw88/led.c
+4-0sys/contrib/dev/rtw88/sdio.c
+11-62 files

FreeBSD/src c22fa08sys/contrib/dev/mediatek/mt76 util.h

mt76: util.h: extend worker name

In mt76_worker_setup() add the "name" argument to the description
for the worker thread.  That way we have a chance to keep them apart.

While here, rename a variable and shorten the the (c)/SPDX section
according to new style.

(cherry picked from commit 9492230fd3d1e58696e9fd99cb9680b27bf1d424)
DeltaFile
+8-31sys/contrib/dev/mediatek/mt76/util.h
+8-311 files

FreeBSD/src e2ebe56sys/modules/mt76 Makefile.inc

mt76: set appropriate CONFIG options for the module build

Always set CONFIG_ARCH_DMA_ADDR_T_64BIT as it is true for all
architectures we support.  Add an option for CONFIG_NET_MEDIATEK_SOC_WED,
which we currently do not yet support.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 87aa494dfca73204516799033821ab1db184933f)
DeltaFile
+9-0sys/modules/mt76/Makefile.inc
+9-01 files

FreeBSD/src 7ed3a99sys/compat/linuxkpi/common/include/linux/soc/mediatek mtk_wed.h

LinuxKPI: mt76: depend on CONFIG_NET_MEDIATEK_SOC_WED

If CONFIG_NET_MEDIATEK_SOC_WED is not set then be silent;  if
CONFIG_NET_MEDIATEK_SOC_WED is set we will enable logic or rather te
pr_debug("TODO") calls for now.

Spsonsored by:  The FreeBSD Foundation

(cherry picked from commit 51c73fc5f5dd95c6a0e3d232091a732a14c7ecc9)
DeltaFile
+27-1sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h
+27-11 files

FreeBSD/src a714641sys/compat/linuxkpi/common/include/net mac80211.h

LinuxKPI: 802.11: move ieee80211_offload_flags

Move the enum and leave a comment on the struct member for the vif
about the type.

No functional changes.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit b10ff7ed37a9b891bec7e1093e44fa7abb2054b4)
DeltaFile
+7-7sys/compat/linuxkpi/common/include/net/mac80211.h
+7-71 files

FreeBSD/src 85db0f5sys/compat/linuxkpi/common/include/linux ieee80211.h, sys/compat/linuxkpi/common/include/net cfg80211.h

LinuxKPI: 802.11: fill in more skeleton functions

Some of these are used by mt76 and while I was here and it only was
a handfull I figured I should just clean this all up.

There is one problem in that between 802.11az and 802.11-2024 action
frame formats have changed;  I got compile errors from iwlwifi(4) given
I updated them to -2024 so we remain on older versions for the moment.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit af22833348c6c7ffed0186651437b5f50be1550b)
DeltaFile
+138-32sys/compat/linuxkpi/common/include/linux/ieee80211.h
+4-0sys/compat/linuxkpi/common/include/net/cfg80211.h
+142-322 files

FreeBSD/src c55874dsys/compat/linuxkpi/common/include/net mac80211.h

LinuxKPI: 802.11: make airtime fairness an IMPROVE

We are ways away from implementing "airtime fairness" in LinuxKPI
(or rather net80211).  For now make it an 'improve' rather than a
'todo' to get the logging away.  Everything will work without it.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 86bfe5b4d5a7b90d3746059dd1f87cdd5a0bf90c)
DeltaFile
+1-1sys/compat/linuxkpi/common/include/net/mac80211.h
+1-11 files

FreeBSD/src 0f49678sys/compat/linuxkpi/common/include/linux device.h

LinuxKPI: device: add a pr_debug("TODO") call to device_release_driver()

The logic in device_release_driver() got disabled in 93b14194acaf2
and since left alone.  Add a pr_debug() call so we have a chance to
notice if that code is actually still in need to be fixed and re-enabled.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit fc9666d0fc0c2541e44bfbcaa5bb1b670395687c)
DeltaFile
+1-0sys/compat/linuxkpi/common/include/linux/device.h
+1-01 files

FreeBSD/src 8dd5b13sys/compat/linuxkpi/common/src linux_page.c

LinuxKPI: page.c: remove a spurious character from a comment

No functional changes.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 45d8bfdcba37996993748f4667646f5dc9f54506)
DeltaFile
+1-1sys/compat/linuxkpi/common/src/linux_page.c
+1-11 files

FreeBSD/src 07555b1sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: when synching HT and VHT cap, mask rx_mcs

When we sync the sta data, mask the rx_mcs with what the hardware is
able to do so that we do not leave, e.g., a 2nd stream enabled on a 1x1
chipset.
iwlwifi(4) has a further check for the smps_mode to limit to NSS=1 but
I believe that is historic and not actually in use anymore.

This fixes firmware crashes on TLC updates with nss=1 but the nss=2 array
index also being populated (with HT/VHT80/160 mcs information):
data being populated:
  iwlwifi0: 0x20101A0D | ADVANCED_SYSASSERT
  iwlwifi0: 0x00000006 | umac data1
  iwlwifi0: 0x00000001 | umac data2
  iwlwifi0: 0x000003FF | umac data3
  iwlwifi0: 0x____050F | last host cmd

Reported by:    Claudio Zumbo (claudiozumbo gmail.com), Erik Power
Tested by:      Claudio Zumbo, Erik Power (eppower umich.edu)

    [4 lines not shown]
DeltaFile
+71-28sys/compat/linuxkpi/common/src/linux_80211.c
+71-281 files

FreeBSD/src 2032abbsys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: pci: undo the pci_resource_len() check in lkpi_pci_request_region()

Creating non-passthru SR-IOV interfaces on a mlx5en(4) failed.
The problem lies in the pci_resource_len() call but not that the BAR length
is tmeporary 0 but in that we call lkpi_pci_get_bar() with a true argument
which will create the BAR resource for us and report the approriate length
back.  However, the later call to bus_alloc_resource_any() will then fail
given the resource already exists.

Restore the previous behaviour and let bus_alloc_resource_any() do the
work.  Adjust the return values from -ENODEV to -EBUSY to match callers
expectations.

In linuxkpi_pcim_request_all_regions(), like in linuxkpi_pci_request_regions(),
filter out the -EBUSY errors as "not an error" and try the next bar.
This also seems to be consistent with the expectations of the callers.

PR:             290793
Reported by:    David BOYER (jcduss13 gmail.com)

    [7 lines not shown]
DeltaFile
+3-10sys/compat/linuxkpi/common/src/linux_pci.c
+3-101 files