FreeBSD/src 5bd8397sys/dev/thunderbolt nhi_pci.c tb_pcib.c

thunderbolt: Remove PNP info

So it isn't matched by devmatch(8) and automatically loaded. The PNP
info will be readded once the USB4 driver is more complete.

PR:             290827
Reported by:    fuz, Marco Siedentopf <siedentm at me.com>
Fixes:  2ed9833791f2 (thunderbolt: Import USB4 code)
Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-2sys/dev/thunderbolt/nhi_pci.c
+0-2sys/dev/thunderbolt/tb_pcib.c
+0-42 files

FreeBSD/src f1b50f2cddl/contrib/opensolaris/tools/ctf/cvt barrier.c barrier.h

ctfmerge: fix segfault when building on macOS

The barrier code was using semaphores which have been deprecated in
macOS and not working at all, causing a race condition. Since macOS
does not have pthread_barrier_*(), this change uses a condition
variable instead.

PR:             290958
Reported by:    wosch
Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D54018

(cherry picked from commit 732b4aa05d78ca6831d02e67a43f34ad104f4f01)
DeltaFile
+3-23cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c
+2-7cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h
+5-302 files

FreeBSD/src 2bf082dcddl/contrib/opensolaris/tools/ctf/cvt barrier.c barrier.h

ctfmerge: fix segfault when building on macOS

The barrier code was using semaphores which have been deprecated in
macOS and not working at all, causing a race condition. Since macOS
does not have pthread_barrier_*(), this change uses a condition
variable instead.

PR:             290958
Reported by:    wosch
Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D54018

(cherry picked from commit 732b4aa05d78ca6831d02e67a43f34ad104f4f01)
DeltaFile
+3-23cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c
+2-7cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h
+5-302 files

FreeBSD/src 7cba272cddl/contrib/opensolaris/tools/ctf/cvt barrier.c barrier.h

ctfmerge: fix segfault when building on macOS

The barrier code was using semaphores which have been deprecated in
macOS and not working at all, causing a race condition. Since macOS
does not have pthread_barrier_*(), this change uses a condition
variable instead.

PR:             290958
Reported by:    wosch
Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D54018

(cherry picked from commit 732b4aa05d78ca6831d02e67a43f34ad104f4f01)
DeltaFile
+3-23cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c
+2-7cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h
+5-302 files

FreeBSD/src 3daae1asbin/ipfw ipfw.8 ipfw2.c, sys/netpfil/ipfw ip_fw_bpf.c ip_fw_log.c

ipfw: create a bpf tap point for every log rule

Dynamically allocate bpf tap points for every rule that has "log".
The name is "ipfw%u", where %u is substituted to the rule number.
The default catch all "ipfw0" tap still exists for compatibility
and it will catch packets in case if there are no bpf listeners
on a per-rule tap.

Reviewed by:            ae
Differential Revision:  https://reviews.freebsd.org/D53877
DeltaFile
+98-31sys/netpfil/ipfw/ip_fw_bpf.c
+22-9sbin/ipfw/ipfw.8
+3-27sys/netpfil/ipfw/ip_fw_log.c
+4-3sbin/ipfw/ipfw2.c
+4-3sys/netpfil/ipfw/ip_fw_private.h
+5-0sys/netpfil/ipfw/ip_fw_sockopt.c
+136-734 files not shown
+140-7710 files

FreeBSD/src 1615effsys/dev/usb usb_pf.c usb_bus.h, sys/netinet6 in6.c

usb: don't create ifnet(9) for usbus devices

Differential Revision:  https://reviews.freebsd.org/D54063
DeltaFile
+13-176sys/dev/usb/usb_pf.c
+0-23usr.sbin/usbdump/usbdump.c
+1-1sys/dev/usb/usb_bus.h
+0-1sys/netinet6/in6.c
+14-2014 files

FreeBSD/src ddf4f9elibexec/rc rc.conf, libexec/rc/rc.d ipfw

ipfw: create "ipfw0" and "ipfwlog0" bpf tapping points without ifnet(9)

As a free bonus the tapping points are now able to match packet direction.

Reviewed by:            ae
Differential Revision:  https://reviews.freebsd.org/D53875
DeltaFile
+26-120sys/netpfil/ipfw/ip_fw_bpf.c
+9-29sbin/ipfw/ipfw.8
+0-10libexec/rc/rc.d/ipfw
+0-1libexec/rc/rc.conf
+35-1604 files

FreeBSD/src 1c5021fsbin/ifconfig ifclone.c

ifconfig: print warning and return success on ipfw0, ipfwlog0 cloning

This should provide people a chance to remove ipfw0 and ipfwlog0 from
cloned_interfaces in their rc.conf during FreeBSD 16.x lifetime.

Differential Revision:  https://reviews.freebsd.org/D53876
DeltaFile
+9-0sbin/ifconfig/ifclone.c
+9-01 files

FreeBSD/src efc8353usr.sbin/usbdump usbdump.c

usbdump: remove some FreeBSD 9.x code
DeltaFile
+0-19usr.sbin/usbdump/usbdump.c
+0-191 files

FreeBSD/src 94b76eacontrib/libpcap pcap-bpf.c

libpcap: obtain list of bpf tap points with BIOCGETIFLIST

Differential Revision:  https://reviews.freebsd.org/D53874
DeltaFile
+47-9contrib/libpcap/pcap-bpf.c
+47-91 files

FreeBSD/src c10447ashare/man/man4 bpf.4, sys/net bpf.c bpf.h

bpf: add BIOCGETIFLIST ioctl that returns all available tap points

Differential Revision:  https://reviews.freebsd.org/D53873
DeltaFile
+63-2sys/net/bpf.c
+26-1share/man/man4/bpf.4
+10-0sys/net/bpf.h
+1-1sys/sys/param.h
+100-44 files

FreeBSD/src 8774a99sys/conf files, sys/net bpf.c bpf_ifnet.c

bpf: modularize ifnet(9) part of bpf

Imagine that bpf(9) tapping can happen at any point in the network stack,
not necessarily at interface transmit or receive.  To achieve that we need
a thin layer of abstraction defined by struct bif_methods, that defines
how generic bpf layer works with a tap point of this kind.

Implement ifnet(9) specific methods in a separate file bpf_ifnet.c.  At
this point there is 100% compatibility for all existing interfaces, there
is no KPI change, yet.  The legacy attaching KPI is layered over new ifnet
agnostic KPI.  The new KPI may change though, as we can implement multiple
DLTs per single tap point in a prettier fashion.

The new abstraction layer allows us to move all the 802.11 radio injection
hacks out of bpf.c into ieee80211_radiotap.c, so do that immediately as a
good proof of concept.

Reviewed by:            bz
Differential Revision:  https://reviews.freebsd.org/D53872
DeltaFile
+257-469sys/net/bpf.c
+257-0sys/net/bpf_ifnet.c
+114-14sys/net80211/ieee80211_radiotap.c
+0-31sys/net80211/ieee80211_freebsd.c
+27-1sys/net/bpf.h
+1-0sys/conf/files
+656-5156 files

FreeBSD/src daedb91sys/modules/agp Makefile

agp: Export intel_gtt_read_pte, required by i915kms

This isn't used by modern cards, but is needed for i915kms to load
on a system that has agp as a module not compiled into the kernel.

PR:             291214
Reviewed by:    cy
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53906

(cherry picked from commit a87c1e2dd8fc997d6ee603c252c543afe8a4d2a4)
(cherry picked from commit 8befd2d2b6a0c5d54fa53246a89ae09009007799)
(cherry picked from commit ae1f6fd47c4584d1abe5ecf26f291d282e6f6a67)
DeltaFile
+1-0sys/modules/agp/Makefile
+1-01 files

FreeBSD/src 79fc0a5sys/conf Makefile.mips

mips: Include CCLDFLAGS when linking kernel.tramp.bin

This ensures we pick up -fuse-ld/--ld-path for external toolchains
rather than trying to use the default system linker, which may not
exist (e.g. on macOS).

This is a direct commit to stable/13 as mips no longer exists in main.
DeltaFile
+1-1sys/conf/Makefile.mips
+1-11 files

FreeBSD/src eb95543sys/conf Makefile.mips

mips: Drop unused TRAMP_LDFLAGS

This has always been empty since e8dce5b9b3a5 ("Complete the integration
of tbemd branch into head.").

This is a direct commit to stable/13 as mips no longer exists in main.
DeltaFile
+1-1sys/conf/Makefile.mips
+1-11 files

FreeBSD/src f2ddd97sys/compat/linuxkpi/common/src linux_80211.c linux_80211_macops.c

LinuxKPI: 802.11: rework MC/configure_filter

(*prepare_multicast)(), for the drivers we support, is iwlwifi(4)-specific.
If it is not available do not let us stop from calling (*configure_filter)()
at least as well.
In addition to the interface setting mc_all_multi, if we have no way to
prepare the multicast filter list this way, set FIF_ALLMULTI for now.
This seems to help some with rtw89 but does not help me with other drivers
yet to get IPv6 link-local (e.g., ff02::1%wlan0) going.
This should also help in case we are scanning and are setting
FIF_BCN_PRBRESP_PROMISC .  We should go and review the full FIF_ list and
start adding conditional support for the other options too.

Sponsored by:   The FreeBSD Foundation
PR:             281982

(cherry picked from commit f943454bfbd98ce49516c6ede8626b5f2602edc1)
DeltaFile
+2-8sys/compat/linuxkpi/common/src/linux_80211.c
+0-3sys/compat/linuxkpi/common/src/linux_80211_macops.c
+2-112 files

FreeBSD/src 2e1156fsys/compat/linuxkpi/common/src linux_80211.c linux_80211.h

LinuxKPI: 802.11: lock down the "txq_scheduled" tailq

For consistency rename the "scheduled_txqs" tailq to
"txq_scheduled" and add a lock per txq ("txq_scheduled_lock[]").
We use the "_bh" locking as this called from the device driver.

This fixes panics due to concurrent access to the tailq, especially
in between "first" and "remove" on the out-direction and between
"insert" and "elem_init" on the in-direction.

This was easily reproducible just running iperf3 at basic rates for
a few seconds to minutes with multiple chipsets, not only rtw89.

Sponsored by:   The FreeBSD Foundation
PR:             290636
Reported by:    arved, and others before

(cherry picked from commit 567a097c8ab60d9fcd68a87c3c5ad605fe8715cc)
DeltaFile
+40-11sys/compat/linuxkpi/common/src/linux_80211.c
+2-1sys/compat/linuxkpi/common/src/linux_80211.h
+42-122 files

FreeBSD/src caf7a30sys/modules/ath11k Makefile

ath11k: add new files to module Makefile

Add the new files to the module Makefile as well, so they do not get lost.

(cherry picked from commit c68126ec2594a80ac095e5ce9e6138709db75519)
DeltaFile
+1-0sys/modules/ath11k/Makefile
+1-01 files

FreeBSD/src ec43b17sys/contrib/dev/athk/ath11k coredump.h core.h

ath11k: start making compile some more

There is more work to do to make this compile again but we will do that
when we get to the driver.  For now just take the most noise out of it.

(cherry picked from commit 9c2f321630894b40c1ec51ece881c7c765d6d749)
DeltaFile
+4-0sys/contrib/dev/athk/ath11k/coredump.h
+2-0sys/contrib/dev/athk/ath11k/core.h
+6-02 files

FreeBSD/src f545f88. ObsoleteFiles.inc, share/firmwares/iwm Makefile

iwmfw(4): fix spelling of the iwm8000C firmware.

When migrating the firmware to be installed as plain firmware files
to /boot/firmware the iwm8000C firmware lost its "fw" suffix that
iwm(4) expects.
The follow-up change to defaults/loader.conf is also consistently
missing the "fw".

Fix both places, and add the wrongly spelt version to ObsoleteFiles.inc
(entirely untested).

PR:             291403
Reported by:    Augustin Hoffmann (avgwst tutanota.de)
Fixes:          af0a81b6470aba4af4a24ae9804053722846ded4
Fixes:          a0f06dfb0d188966bee7265ec7d9f20093186bb6

(cherry picked from commit f0ea859229843affe07ac94db915489756f87096)
DeltaFile
+3-0ObsoleteFiles.inc
+1-1share/firmwares/iwm/Makefile
+1-1stand/defaults/loader.conf
+5-23 files

FreeBSD/src 17c0fbcsys/contrib/dev/athk/ath10k mac.c core.c

ath10k: update Atheros/QCA's ath10k driver

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

Merge commit 'f4669ef6cf7860919442e67106e83f616ed36f51'.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 9954217599ce02fbf1772388e24e0b89663f4425)
DeltaFile
+160-103sys/contrib/dev/athk/ath10k/mac.c
+130-44sys/contrib/dev/athk/ath10k/core.c
+102-20sys/contrib/dev/athk/ath10k/wmi.c
+57-47sys/contrib/dev/athk/ath10k/wmi.h
+89-0sys/contrib/dev/athk/ath10k/leds.c
+45-41sys/contrib/dev/athk/ath10k/pci.c
+583-25541 files not shown
+1,008-57347 files

FreeBSD/src 3ebd7cbsys/compat/linuxkpi/common/include/linux leds.h, sys/modules/ath10k Makefile

LinuxKPI: ath10k: adjust for led changes to keep ath10k compiling

Add the conditional compile time option defaulting to off as we do
not support leds in LinuxKPI to ath10k for the new file.

Add empty struct gpio_led to LinuxKPI.

(cherry picked from commit fe7b6fc32455389d1b8452c67e1ddcfbc4e5f5cc)
DeltaFile
+6-0sys/modules/ath10k/Makefile
+4-1sys/compat/linuxkpi/common/include/linux/leds.h
+10-12 files

FreeBSD/src 1fa2a48sys/contrib/dev/athk Kconfig testmode_i.h

ath-common: update common Atheros/QCA code

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ).

Merge commit '99ad6f4f54c86845d6e3f03541913c07fcdeef59'

(cherry picked from commit 28125d24c92a45883b3ab105625ec5b3ba37e320)
DeltaFile
+68-0sys/contrib/dev/athk/Kconfig
+66-0sys/contrib/dev/athk/testmode_i.h
+25-0sys/contrib/dev/athk/Makefile
+8-13sys/contrib/dev/athk/dfs_pattern_detector.c
+4-2sys/contrib/dev/athk/ath.h
+2-2sys/contrib/dev/athk/trace.h
+173-173 files not shown
+177-209 files

FreeBSD/src c439ae1sys/contrib/dev/athk/ath11k mac.c core.c

ath11k: update Atheros/QCA's ath11k driver

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

Merge commit '989a88787ef2c1a73f44b82031a6f4f4470e2676'

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit c95ea407b322379bcb3c013a2dca9a18072c1df8)
DeltaFile
+1,407-541sys/contrib/dev/athk/ath11k/mac.c
+728-115sys/contrib/dev/athk/ath11k/core.c
+336-218sys/contrib/dev/athk/ath11k/wmi.c
+342-56sys/contrib/dev/athk/ath11k/reg.c
+195-140sys/contrib/dev/athk/ath11k/dp_rx.c
+268-43sys/contrib/dev/athk/ath11k/pci.c
+3,276-1,11361 files not shown
+4,866-2,08267 files

FreeBSD/src 577b231usr.sbin/freebsd-update freebsd-update.sh

freebsd-update: Mention upgrading packages, not just ports

These days most end users are likely using pre-built packages, not
locally-built ports. Thus be sure to mention this as an important case,
and put it ahead of ports.

Reviewed by:    emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D42968

(cherry picked from commit ced74610217ff0be071e4614c64a4ff66c40bc6b)
DeltaFile
+2-2usr.sbin/freebsd-update/freebsd-update.sh
+2-21 files

FreeBSD/src 29e7443share/mk bsd.compat.mk

bsd.compat.mk: Honour XSTRIPBIN for lib32

Currently we only honour XNM and XOBJCOPY, but XSTRIPBIN is important
during install. Otherwise we end up using STRIPBIN for the host, not the
target, which is normally the same, but may not be, especially on
non-FreeBSD systems. In particular, cheribuild will build FreeBSD with
STRIPBIN=/usr/bin/strip XSTRIPBIN=strip (with the latter referring to
the bootstrap strip in PATH), which breaks for WITH_LIB32 when the
host's /usr/bin/strip is unable to process the lib32 binaries (e.g.
building arm64 FreeBSD's lib32 on an amd64 GNU/Linux system).

MFC after:      1 week

(cherry picked from commit ad13dc1ece2fe4a6192bceffea4a868ba6a2e0e2)
DeltaFile
+1-0share/mk/bsd.compat.mk
+1-01 files

FreeBSD/src dc6d1c8libexec/rtld-elf/aarch64 reloc.c, libexec/rtld-elf/riscv reloc.c

rtld-elf: Delete unused RELOC_ALIGNED_P copies

This was copied from arm to aarch64 to riscv, but only arm uses it.

MFC after:      1 week

(cherry picked from commit 02d06043ba88f931f9debd5aa519fc303ca70d11)
DeltaFile
+0-7libexec/rtld-elf/aarch64/reloc.c
+0-7libexec/rtld-elf/riscv/reloc.c
+0-142 files

FreeBSD/src 7a41a74sys/sys elf_common.h

sys: Sync RISC-V relocations

MFC after:      1 week

(cherry picked from commit 65bd6c7acd1fba38ce0b234d5d777a2ebad7e807)
DeltaFile
+10-1sys/sys/elf_common.h
+10-11 files

FreeBSD/src 3e264f4sys/kern imgact_elf.c

imgact_elf: Fix off-by-one in note size check

Prior to c86af2cc4cd1 ("imgact_elf: Check note body sizes"), this was
note_name + n_namesz >= note_end, which checks that there is at least
one byte after the unpadded name (which could be either padding or
data), and given our notes always have data with them this was fine.
However, once we started checking the padded name (note that "FreeBSD\0"
is already a multiple of 4 bytes, so has no padding) and data, this
turned into checking that there is at least one byte after the unpadded
data, and since our ELF notes already have a multiple of 4 bytes for
their data and therefore have no padding, this means that we are now
checking that there is at least one byte after the ELF note, which is
not going to be the case for the last ELF note. Instead, switch this to
a strict greater than, as should be used when comparing one-past-the-end
pointers, which both sides of the inequality are.

For executables, this was generally not a problem in reality, since the
last of our ELF notes is NT_FREEBSD_NOINIT_TAG, which isn't read by the
kernel. However, ld-elf.so.1 (and libcompat variants), like shared

    [15 lines not shown]
DeltaFile
+1-1sys/kern/imgact_elf.c
+1-11 files

FreeBSD/src 056563ausr.bin/kyua Makefile

cross-build: fix after the recent sqlite3 import

Stop adding contrib/sqlite3 into the include path for usr.bin/kyua, take
headers from the install sysroot env.  sqilte3 now has the VERSION file,
which clashes with c++ include <version>.

Submitted by:   jrtc27 (see https://reviews.freebsd.org/D51217)
Tested by:      kib
Fixes:  17f0f75308f2 ("sqlite3: Vendor import of sqlite3 3.50.2")

(cherry picked from commit 09d28419c646650a77721e168ef43bc1bac96b67)
DeltaFile
+1-1usr.bin/kyua/Makefile
+1-11 files