dtb: sort by vendor on riscv
Just like arm64, our DTS comes from Linux and is correctly sorted into
subdirectories by vendor. Enable the logic to preserve these directories
in the installation, for example:
/boot/dtb/sifive/hifive-unmatched-a00.dtb
Approved by: re (cperciva)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53116
(cherry picked from commit cf202819af2337c0b652ac9290964c2ef7a1ae3c)
(cherry picked from commit 0cc2448fc2a2e194473d04512c1a83db3913de72)
sockstat: fix column length for PROTO
The computation of the length was not taking into account that IPv6
endpoints, which are not IPv6 only, have a suffix of 46.
For UDP and TCP this bug was not relevant, since tcp46 and udp46
has the same length as PROTO, but sctp46 is longer. Upcoming
udplite support will also be affected.
Approved by: re (cperciva)
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D53212
(cherry picked from commit 4ee0ddae1dab05dd8e3f273d861043c3e2919f23)
(cherry picked from commit 8c197879bf55dd9bdec84397fc29c3abcf959840)
UPDATING: bump __FreeBSD_version for LinuxKPI changes
The size of an embedded struct has changed and might possibly be a
problem. Allow this change to be detected by bumping __FreeBSD_version.
Approved by: re (cperciva)
(cherry picked from commit 37ad1beaf516854d5e59b90a9706b09d02cc2a81)
(cherry picked from commit a4ee95e54ad1e6a00be4dbaf9c3476915c212918)
LinuxKPI: 802.11: additions for Linux v6.17 based wireless drivers
This includes some type cleanups as well as some shuffling of structs
and functions to sort dependencies out. Few new functions and defines
as well as new struct members. Minor fixes to style and debug logging.
This is the majority of changes. None of these should conflict with
current in-tree drivers. The final bit of changes will come along with
the driver updates adding an extra argument to function pointers.
Approved by: re (cperciva)
(cherry picked from commit 0567484734ad9732978e189ebed042f6320e2471)
(cherry picked from commit f2b2d6c18a57abbedb14bf439ed5c69d648c47b6)
LinuxKPI: skbuff: add a misplaced socket operation to skbuff.h for now
This likely belongs in socket code which we do not have in LinuxKPI.
Needed by a wirless driver at v6.17.
Approved by: re (cperciva)
(cherry picked from commit 88dbf83345feefa7181bd6df47786e1a8d1d304d)
(cherry picked from commit 3ad05fa24a240011a8252140ff6431cb0b7879d9)
LinuxKPI: soc/mediatek add pr_debug calls
We do not support Wireless Ethernet Dispatch (wed) on the mt76 (yet).
Add pr_debug calls with TODO in case we run into the calls anyway so
we could deal with them.
Approved by: re (cperciva)
(cherry picked from commit 224ac9d2a030f85924e44a507ddc412797c3fe87)
(cherry picked from commit b9b571e6146a1b95ba18de065166a1a50eb88dfc)
LinuxKPI: page_pool headers moved; add netmem.h
page_pool headers were not used yet; they were created for mt76 but
are without functionality. Upstream has migrated them for v6.17 and
split them up into multiple files. Also add netmem.h which the little
needed is directly related to page pools.
Approved by: re (cperciva)
(cherry picked from commit 7c31cdfa408a4ebce7a3e10d29056a15c28bc092)
(cherry picked from commit d388ff8016adf0f24b9b846941f1f15f5463c49e)
LinuxKPI: add skeleton pci_enable_wake()
Given we do not yet support "wake" bits in device there is little need
doing it in PCI if we cannot check if we are supposed to do the
operation in first place. Once we would implement this, we would need
to also do the appropriate PCI (pme) checks before enabling (disabling)
it.
Approved by: re (cperciva)
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D53208
(cherry picked from commit 885e8f272f7515b0325974de72d18b73318eff07)
(cherry picked from commit be52a81be07997f84f454637372a056415f6a2eb)
LinuxKPI: platform_device return type change
The return type now is void; I believe no one ever used this
so we can just chnage it. The only active platform_driver_register()
calls seems to be in ath1[01]k and mt76 and there in unsupported code.
Approved by: re (cperciva)
Reviewed by: dumbbell, emaste
Differential Revision: https://reviews.freebsd.org/D53205
(cherry picked from commit 0ae4998423e0d513fb88e404dfb1c2a285d11309)
(cherry picked from commit 5434a1635ed3fab8214f3fea8ada9772e4372372)
ipfilter: Plug ip_htable kernel information leak
ipf_htable_stats_get() constructs an iphtstat_t on the stack and only
initializes select fields before copying the entire structure to
userland. The trailing padding array iphs_pad[16] is never initialized,
so ~128 bytes of uninitialized kernel stack memory can be leaked to user
space on each call. This is a classic information disclosure
vulnerability that can reveal pointers and other sensitive data.
We fix this by zeroing out the data structure prior to use.
Reported by: Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by: emaste
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D53275
ipfilter: Plug ip_nat kernel information leak
ipf_nat_getent() allocates a variable-sized nat_save_t buffer with
KMALLOCS() (which does not zero memory) and then copies only a subset
of fields into it before returning the object to userland using
ipf_outobjsz(). Because the structure is not fully initialized on all
paths, uninitialized kernel heap bytes can be copied back to user space,
resulting in an information leak.
We fix this by zeroing out the data structure immediately after
allocation.
Reported by: Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by: emaste
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D53274
release: Use PKG_CMD when installing pkgbase packages in vmimage.subr
This defaults to plain "pkg", but being able to override it is useful
when testing pkg itself.
Reviewed by: cperciva
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53307
mt76: update Mediatek's mt76 driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ).
MFC after: 3 days
LinuxKPI: 802.11: additions for Linux v6.17 based wireless drivers
This includes the conflicting changes from previous driver versions
(v6.11/v6.14), mostly being function pointer or function arguments.
MFC after: 3 days
rtw89: update Realtek's rtw89 driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ).
MFC after: 3 days
rtw88: update Realtek's rtw88 driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ).
MFC after: 3 days