HardenedBSD/src 6463886lib/libusb libusb10_hotplug.c, sys/contrib/vchiq/interface/vchiq_arm vchiq_arm.c vchiq_shim.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+165-108sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c
+143-72sys/riscv/starfive/jh7110_gpio.c
+41-75sys/contrib/vchiq/interface/vchiq_arm/vchiq_shim.c
+102-1sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c
+54-1usr.bin/netstat/netstat.1
+33-18lib/libusb/libusb10_hotplug.c
+538-27517 files not shown
+649-35623 files

HardenedBSD/src 019aa33lib/libusb libusb10_hotplug.c, sys/contrib/vchiq/interface/vchiq_arm vchiq_arm.c vchiq_shim.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+165-108sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c
+143-72sys/riscv/starfive/jh7110_gpio.c
+41-75sys/contrib/vchiq/interface/vchiq_arm/vchiq_shim.c
+102-1sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c
+54-1usr.bin/netstat/netstat.1
+33-18lib/libusb/libusb10_hotplug.c
+538-27517 files not shown
+649-35623 files

HardenedBSD/src 5268670tools/build/mk OptionalObsoleteFiles.inc

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+7-0tools/build/mk/OptionalObsoleteFiles.inc
+7-01 files

HardenedBSD/src 9fb03ddsys/dev/intel spi_pci.c

intelspi: add Comet Lake SPI controller IDs

Add PCI device IDs for Comet Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59000
DeltaFile
+6-0sys/dev/intel/spi_pci.c
+6-01 files

HardenedBSD/src 26b921dsys/dev/intel spi_pci.c

intelspi: add Cannon Lake SPI controller IDs

Add PCI device IDs for Cannon Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58999
DeltaFile
+6-0sys/dev/intel/spi_pci.c
+6-01 files

HardenedBSD/src 4c998ffsys/dev/intel spi_pci.c

intelspi: add Apollo Lake SPI controller IDs

Add PCI device IDs for Apollo Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58998
DeltaFile
+3-0sys/dev/intel/spi_pci.c
+3-01 files

HardenedBSD/src 7287754sys/dev/intel spi_pci.c

intelspi: sort PCI ID table by device ID

Sort the existing LPSS peripheral SPI controller PCI ID table by
numeric device ID so new entries have an unambiguous insertion point.

Reviewed by:    wulf
Differential Revision:  https://reviews.freebsd.org/D58996
DeltaFile
+3-3sys/dev/intel/spi_pci.c
+3-31 files

HardenedBSD/src a3489ccsys/dev/intel spi_pci.c

intelspi: add Broxton SPI controller IDs

Add PCI device IDs for Broxton-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58997
DeltaFile
+6-0sys/dev/intel/spi_pci.c
+6-01 files

HardenedBSD/src 76f1421sys/sys libkern.h

libkern.h: remove HAVE_INLINE_* macros

The final consumer of this was OpenZFS, fixed in ffaea0831973 (thanks
mav@). That change has been present in all active OpenZFS release
branches for at least 6 months. These can finally be retired.

Reviewed by:    mav
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55201
DeltaFile
+0-11sys/sys/libkern.h
+0-111 files

HardenedBSD/src 3d20f8asys/riscv/starfive jh7110_gpio.c

jh7110_gpio: driver enhancements

Fix reporting of state and capabilities by the gpioctl command.

Support selection of pull-up and pull-down resistors.

Support second gpio device (AON - always on power domain) to allow
attaching gpioled device to visionfive2 status LED or querying boot
selection switches.

Reviewed by:    mhorne
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D58693
DeltaFile
+111-36sys/riscv/starfive/jh7110_gpio.c
+111-361 files

HardenedBSD/src 7221614sys/riscv/starfive jh7110_gpio.c

jh7110_gpio: style

- Fix whitespace
- Replace JH7110_GPIO_READ with RD4 (and WR4)
- Trim headers
- Explicit conditional checks
- Use correct method typedefs

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+49-52sys/riscv/starfive/jh7110_gpio.c
+49-521 files

HardenedBSD/src 2af2ec5sys/riscv/starfive jh7110_gpio.c

jh7110_gpio: remove unneeded cleanup

Any failure within bus_alloc_resources() will call bus_release_resources();
thus the call is redundant here.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-1sys/riscv/starfive/jh7110_gpio.c
+0-11 files

HardenedBSD/src e2f2b18. ObsoleteFiles.inc

ObsoleteFiles: Add missing headers

The header files for dialog, figpar, dpv were never listed.

PR:             297612
Fixes:          af202a5052b6 ("Retire dialog")
DeltaFile
+7-0ObsoleteFiles.inc
+7-01 files

HardenedBSD/src 0c5eb09tools/build/mk OptionalObsoleteFiles.inc

OptionalObsoleteFiles: Add missing headers

The header files for dialog, figpar, dpv were never listed.

Fixes:          bc6c827078b7 ("OptionalObsoleteFiles: Add figpar to dialog section")
(cherry picked from commit acf6518a2d6f33fb56c861861cbad0c0cb56817e)
DeltaFile
+7-0tools/build/mk/OptionalObsoleteFiles.inc
+7-01 files

HardenedBSD/src fdf3e57sys/dev/sdhci sdhci_fdt_spacemit.c

sdhci: Remove redundant device_get_softc

Fixes: 550db3d6f502 ("sdhci: Initial support for the SpacemiT K1 sdhci controller")
Reviewed by:    bnovkov
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59083
DeltaFile
+1-1sys/dev/sdhci/sdhci_fdt_spacemit.c
+1-11 files

HardenedBSD/src 97e24b4sys/arm/broadcom/bcm2835 bcm2835_audio.c, sys/contrib/vchiq/interface/vchi vchi.h

vchiq: Merge two commits from Linux

6e474d8e3981 ("staging: vchiq_shim: avoid code duplication") refactors
some code which makes applying the subsequent patch easier.

49bec49fd7f2 ("staging: vc04_services: remove vchiq_copy_from_user")
addresses a user-triggerable integer overflow via the
VCHIQ_IOC_QUEUE_MESSAGE ioctl on /dev/vchiq (which has mode 0600 by
default).  It also addresses insufficient validation of user-controlled
addresses in vchiq_copy_from_user().

Update the bcm2835_audio driver to follow the change to
vchi_msg_queue().

Reported by:    Vicki Pfau
Reviewed by:    Abdelkader Boudih <freebsd at seuros.com>
Tested by:      Abdelkader Boudih <freebsd at seuros.com>
Tested by:      Marco Devesas Campos <devesas.campos at gmail.com>
MFC after:      2 weeks

    [2 lines not shown]
DeltaFile
+165-108sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c
+41-75sys/contrib/vchiq/interface/vchiq_arm/vchiq_shim.c
+102-1sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c
+24-14sys/arm/broadcom/bcm2835/bcm2835_audio.c
+6-19sys/contrib/vchiq/interface/vchi/vchi.h
+0-14sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
+338-2312 files not shown
+344-2378 files

HardenedBSD/src 250db71lib/libusb libusb10_hotplug.c

libusb: Add an XXX comment for possible duplicate callback IDs

If next_callback_id wraps we could end up with two callbacks with the
same ID.  I recommitted the original change despite this issue in order
to fix the libusb API as soon as possible after SHLIB_MAJOR was bumped
in commit 527a82474cb3 (libusb: versioning symbols).

It's very unlikely in practice that software will register and
deregister a sufficient number of callbacks to trigger this, but it is
a real issue to be fixed in a subsequent commit.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0lib/libusb/libusb10_hotplug.c
+1-01 files

HardenedBSD/src 6bda9f2lib/libusb libusb10.c libusb10.h

libusb: change callback register handler to int

libusb upstream uses int for register handler. This causes some library
user (like pyusb) to assume that we have int in all implementations and
therefore provides a 4 byte storage only. This causes Segmentation
fault as we will right the pointer.

Reviewed by:    adrian
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54211

(cherry picked from commit ce9ced951a0b9d004a3b007d4ac6e9087a1301a2)
DeltaFile
+32-18lib/libusb/libusb10_hotplug.c
+2-3lib/libusb/libusb.h
+2-0lib/libusb/libusb10.h
+1-0lib/libusb/libusb10.c
+37-214 files

HardenedBSD/src f71abf3usr.bin/netstat netstat.h main.c

netstat(1): Add nexthop statistics support with -os flag

Add support nexthop statistics and update its manual.
While here, fix manual of other nexthop related options.

Reviewed by: kfv
Differential Revision:  https://reviews.freebsd.org/D58538
DeltaFile
+54-1usr.bin/netstat/netstat.1
+24-0usr.bin/netstat/nhops.c
+9-3usr.bin/netstat/main.c
+1-0usr.bin/netstat/netstat.h
+88-44 files

HardenedBSD/src 5c3bc8asys/dev/sound/usb uaudio.c

snd_uaudio: Use uDWord for the UAC2 sample rate

uaudio20_set_speed() split the sample rate into bytes by hand. Use
uDWord and USETDW() instead.

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D59066
DeltaFile
+3-6sys/dev/sound/usb/uaudio.c
+3-61 files

HardenedBSD/src 2346300sys/dev/clk/spacemit k1_apmu.c

clk: Correct SpacemitT typo

SpacemiT has only one T.

Fixes: dcb10e3add17 ("clk: Initial support for the SpacemiT K1 clock control units")

Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/dev/clk/spacemit/k1_apmu.c
+1-11 files

HardenedBSD/src f8da3a5sys/dev/dpaa qman.c qman_portals.c, sys/dev/sdhci fsl_sdhci.c sdhci_fsl_fdt.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+121-23sys/dev/sdhci/sdhci_fsl_fdt.c
+96-39sys/dev/dpaa/dpaa_eth.c
+111-0sys/dev/dpaa/qman_portals.c
+5-77sys/dev/sdhci/fsl_sdhci.c
+59-8sys/powerpc/powerpc/busdma_bounce.c
+26-38sys/dev/dpaa/qman.c
+418-18512 files not shown
+517-19918 files

HardenedBSD/src 75e7074sys/dev/dpaa qman.c qman_portals.c, sys/dev/sdhci fsl_sdhci.c sdhci_fsl_fdt.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+121-23sys/dev/sdhci/sdhci_fsl_fdt.c
+96-39sys/dev/dpaa/dpaa_eth.c
+111-0sys/dev/dpaa/qman_portals.c
+5-77sys/dev/sdhci/fsl_sdhci.c
+59-8sys/powerpc/powerpc/busdma_bounce.c
+26-38sys/dev/dpaa/qman.c
+418-18512 files not shown
+517-19918 files

HardenedBSD/src 50c0aa0share/man/man4 pci.4, sys/dev/ixgbe ixgbe_sriov.h ixgbe_mbx.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+825-69sys/dev/ixgbe/if_sriov.c
+392-42sys/dev/pci/pci.c
+107-31sys/dev/ixgbe/if_ix.c
+81-6sys/dev/ixgbe/ixgbe_mbx.c
+28-9sys/dev/ixgbe/ixgbe_sriov.h
+31-0share/man/man4/pci.4
+1,464-15710 files not shown
+1,538-16916 files

HardenedBSD/src 240d811sys/dev/dpaa if_memac.c dpaa_eth.h

dpaa/dtsec: advertise RX/TX csum

Apply 6464974 to dTSEC, since it supports the same offload capabilities
as mEMAC.

The DPAA_CSUM_TX_OFFLOAD macro moves from if_memac.c to the shared
dpaa_eth.h since both drivers now reference it.
DeltaFile
+19-1sys/dev/dpaa/if_dtsec.c
+4-0sys/dev/dpaa/dpaa_eth.h
+0-2sys/dev/dpaa/if_memac.c
+23-33 files

HardenedBSD/src 81ac9c6sys/dev/dpaa qman_portals.c qman.c

dpaa/qman: Make `show fqid <N>` actually work

Set the verb correctly so the query works.  Also print out the
programmable FQID fields as well.
DeltaFile
+39-0sys/dev/dpaa/qman_var.h
+0-38sys/dev/dpaa/qman.c
+23-0sys/dev/dpaa/qman_portals.c
+62-383 files

HardenedBSD/src 86a8897sys/dev/dpaa qman.h qman_var.h

DPAA: Minor performance improvements

* Add interrupt coalescing for DQRR and MR, with thresholds and period
  as tunable sysctls under the `hw.qman` tree.
* Do lazy/sloppy buffer management to avoid constantly checking
  thresholds via QMan portal round-trips.
* Add cache stashing to prewarm caches, reducing latency.
* Fix the definition of Context_A in the init_fq MC command/result
  structures, they're 64-bit fields, not 32-bit.
* Reorder the dpaa_eth_frame_info as a bit of cleanup.
* Take advantage of the fact that UMA small allocations are returned in
  the DMAP, and avoid pmap_kextract().

These changes together improve throughput by ~1.5%
(925Mbps->935-940Mbps) consistently, and reduce CPU usage by a bit,
increasing idle CPU from 30%->35% minimum.
DeltaFile
+96-39sys/dev/dpaa/dpaa_eth.c
+88-0sys/dev/dpaa/qman_portals.c
+27-1sys/dev/dpaa/qman.c
+8-1sys/dev/dpaa/dpaa_eth.h
+4-2sys/dev/dpaa/qman_var.h
+2-1sys/dev/dpaa/qman.h
+225-446 files

HardenedBSD/src 86715a3sys/dev/dpaa fman.c

fman: Fix duplicate port identifiers

fman_qman_channel_id returns the QMan FMan channel for a given port.
If a port isn't found, the wrong channel number will be returned.
DeltaFile
+2-2sys/dev/dpaa/fman.c
+2-21 files

HardenedBSD/src 6b57054sys/dev/dpaa fman_port.c

dpaa/fman_port: Fix register config typo
DeltaFile
+2-1sys/dev/dpaa/fman_port.c
+2-11 files

HardenedBSD/src 4860904sys/conf files.powerpc, sys/dev/sdhci fsl_sdhci.c sdhci_fsl_fdt.c

sdhci_fsl_fdt: Add support for PowerPC eSDHC controllers

Migrate all PowerPC QorIQ to the sdhci_fsl_fdt SDHC driver.  There are a
few differences that need to be accounted for:
* On PowerPC device trees, the `clock-frequency` property defines the
  clock rate, not a `clocks` reference property.
* On some older SoCs (P1022 only?) the BURST fields of the WML register
  are reserved, and must be 0x10, so add a FSL quirk (errata field) to
  account for this.
* The PowerPC eSDHC controllers must have the DMA SNOOP bit set for DMA
  to work properly and avoid corruption.

As part of this, make the fallback "fsl,esdhc" compat data work for
PowerPC.  If these fallbacks are not compatible with ARM SoCs, newer
compat strings could be added for those, but the conservative catch-all
should work for most SoCs, though perhaps less optimal.

Differential Revision:  https://reviews.freebsd.org/D58630
DeltaFile
+119-23sys/dev/sdhci/sdhci_fsl_fdt.c
+5-77sys/dev/sdhci/fsl_sdhci.c
+6-0sys/powerpc/conf/QORIQ64
+6-0sys/powerpc/conf/MPC85XX
+1-1sys/conf/files.powerpc
+137-1015 files