HardenedBSD/src 2b386basys/contrib/openzfs/cmd zhack.c, sys/contrib/openzfs/module/os/linux/zfs abd_os.c

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/pledge
DeltaFile
+305-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_zhack_reclaim.ksh
+178-0sys/contrib/openzfs/cmd/zhack.c
+159-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_degraded_import.ksh
+0-150sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/zfs_send_delegation_user/zfs_send_usertest.ksh
+0-148sys/contrib/openzfs/module/os/linux/zfs/abd_os.c
+144-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_split_large_block.ksh
+786-298171 files not shown
+4,345-1,416177 files

HardenedBSD/src dd73fbasys/contrib/openzfs/cmd zhack.c, sys/contrib/openzfs/module/os/linux/zfs abd_os.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+305-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_zhack_reclaim.ksh
+178-0sys/contrib/openzfs/cmd/zhack.c
+159-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_degraded_import.ksh
+0-150sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/zfs_send_delegation_user/zfs_send_usertest.ksh
+0-148sys/contrib/openzfs/module/os/linux/zfs/abd_os.c
+144-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_split_large_block.ksh
+786-298171 files not shown
+4,345-1,416177 files

HardenedBSD/src dde735fsys/dev/sound/usb uaudio.c, sys/dev/usb usbdevs

snd_uaudio: Define USB IDs in usbdevs

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks

(cherry picked from commit 3e67b90c55b44579c2f73c2fbdeac54087c7495f)
DeltaFile
+67-67sys/dev/sound/usb/uaudio.c
+53-0sys/dev/usb/usbdevs
+120-672 files

HardenedBSD/src ba00f71sys/dev/sound/pci csapcm.c emu10kx.h, sys/dev/sound/pcm sound.h

sound: Retire sndcard_func

sndcard_func is used as an ivar which passes around device info to the
PCM and MIDI children in snd_csa(4) and snd_emu10kx(4). Simplify this
and retire the need for sndcard_func, by 1) making an ivar only what
used to be stored in sndcard_func->varinfo, 2) replacing
sndcard_func->func with a child comparison, where needed, for instance
in csa_detach().

sndcard_func is harmless in reality, but there is no reason to have the
additional complexity. This way we also avoid the structure allocations.

Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks

(cherry picked from commit a753ca9c3f0644611e7dfb453af61896fed6c897)
DeltaFile
+18-48sys/dev/sound/pci/csa.c
+15-47sys/dev/sound/pci/emu10kx.c
+0-15sys/dev/sound/pcm/sound.h
+2-8sys/dev/sound/pci/emu10kx-midi.c
+4-5sys/dev/sound/pci/emu10kx.h
+2-6sys/dev/sound/pci/csapcm.c
+41-1292 files not shown
+43-1398 files

HardenedBSD/src ac4c533sys/module/zfs zfs_gitrev.h zfs_config.h, sys/modules/zfs zfs_gitrev.h zfs_config.h

zfs: fix mismerge from 2c00a421637
DeltaFile
+0-946sys/module/zfs/zfs_config.h
+25-7sys/modules/zfs/zfs_config.h
+1-1sys/modules/zfs/zfs_gitrev.h
+0-1sys/module/zfs/zfs_gitrev.h
+26-9554 files

HardenedBSD/src 2c00a42sys/contrib/openzfs/cmd zhack.c, sys/contrib/openzfs/module/os/linux/zfs abd_os.c

zfs: merge openzfs/zfs at 71a9f9578

OpenZFS 2.4.4

Notable upstream pull request merges:
 #18544 eb4199c6a zio_ddt_write: compute have_dvas after taking dde_io_lock
 #18573 0da2e6b39 Update mtime/ctime when fallocate grows a file
 #18611 b021ebcdc zfs_ioctl: fix EBUSY race between quota queries and mount
 #18652 027940e0b zbookmark_compare: handle "marker" bookmarks with
                  negative levels
 #18657 14ff1853c Fix race between device removal completion and pool export
 #18673 -multiple delegate: add send:encrypted permission
 #18688 5f84f4d81 Fix handling of _PC_HAS_HIDDENSYSTEM for FreeBSD
 #18693 7e8f6ad78 Clean up embedded slog metaslab across txgs
 #18706 5e8780ff9 ddt_log: Fix refcount tagging for begin/commit
 #18713 a2c02072f libzfs: fix MS_CRYPT/MS_OVERLAY collision with umount2(2)
                  flags
 #18720 09a876a38 Fix insufficient locking in dedup verify
 #18724 a6f557c2c Fix reads for blocks freed after being cloned

    [38 lines not shown]
DeltaFile
+946-0sys/module/zfs/zfs_config.h
+305-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_zhack_reclaim.ksh
+178-0sys/contrib/openzfs/cmd/zhack.c
+159-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_degraded_import.ksh
+0-150sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/zfs_send_delegation_user/zfs_send_usertest.ksh
+0-148sys/contrib/openzfs/module/os/linux/zfs/abd_os.c
+1,588-298161 files not shown
+5,103-1,202167 files

HardenedBSD/src e038f30sys/conf files.powerpc, sys/dev/dpaa fman_port_var.h fman_port_tx.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+18-630sys/dev/dpaa/fman_port.c
+398-0sys/dev/dpaa/fman_port_rx.c
+347-0sys/dev/dpaa/fman_port_tx.c
+85-0sys/dev/dpaa/fman_port_var.h
+1-1sys/powerpc/include/slb.h
+2-0sys/conf/files.powerpc
+851-6316 files

HardenedBSD/src b9c522bsys/dev/e1000 e1000_82571.c e1000_mac.c, sys/dev/sound/pci hdspe-pcm.c

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/pledge
DeltaFile
+137-84sys/dev/e1000/e1000_phy.c
+128-18sys/dev/e1000/e1000_ich8lan.c
+124-2sys/dev/e1000/e1000_i210.c
+54-46sys/dev/e1000/e1000_mac.c
+72-24sys/dev/sound/pci/hdspe-pcm.c
+63-5sys/dev/e1000/e1000_82571.c
+578-17923 files not shown
+724-23729 files

HardenedBSD/src bf36bb6sys/conf files.powerpc, sys/dev/dpaa fman_port_var.h fman_port_tx.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+18-630sys/dev/dpaa/fman_port.c
+398-0sys/dev/dpaa/fman_port_rx.c
+347-0sys/dev/dpaa/fman_port_tx.c
+85-0sys/dev/dpaa/fman_port_var.h
+1-1sys/powerpc/include/slb.h
+2-0sys/conf/files.powerpc
+851-6316 files

HardenedBSD/src ffc778fsys/dev/e1000 e1000_82571.c e1000_mac.c, sys/dev/sound/pci hdspe-pcm.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+137-84sys/dev/e1000/e1000_phy.c
+128-18sys/dev/e1000/e1000_ich8lan.c
+124-2sys/dev/e1000/e1000_i210.c
+54-46sys/dev/e1000/e1000_mac.c
+72-24sys/dev/sound/pci/hdspe-pcm.c
+63-5sys/dev/e1000/e1000_82571.c
+578-17923 files not shown
+724-23729 files

HardenedBSD/src 9171bb4sys/powerpc/include slb.h

powerpc/pmap: Fix SLB VSID mask

Bits [0:1] map to "B", the "Segment size selector", and are not part of
the VSID.  Correct this mask.
DeltaFile
+1-1sys/powerpc/include/slb.h
+1-11 files

HardenedBSD/src 5d884fcsys/conf files.powerpc, sys/dev/dpaa fman_port_var.h fman_port_tx.c

dpaa: Split FMan port driver into distinct TX/RX

There are several port functions that are only for one type or the
other, so they don't make sense to be together.  Splitting these up also
simplifies adding support for the Offline/Host Command ports.
DeltaFile
+18-630sys/dev/dpaa/fman_port.c
+398-0sys/dev/dpaa/fman_port_rx.c
+347-0sys/dev/dpaa/fman_port_tx.c
+85-0sys/dev/dpaa/fman_port_var.h
+2-0sys/conf/files.powerpc
+850-6305 files

HardenedBSD/src af0e83dsbin/restore symtab.c

Fix transposed arguments in call to calloc(). Reported by GCC 15 warning.

No functional change intended.

Submitted by: Pedro Giffuni <pfg at freebsd.org>

(cherry picked from commit 2cefae4cf34e7d39fc3b27358d7d66a96b3b0056)
DeltaFile
+1-1sbin/restore/symtab.c
+1-11 files

HardenedBSD/src 0bc6905sys/dev/sound/pci hdspe.h hdspe.c

snd_hdspe: Avoid allocation in the interrupt handler

Cache PCM children and drain interrupt callbacks before detach.
Allocate the parent softc by its actual size.

Reviewed by:    br
Differential Revision:  https://reviews.freebsd.org/D58370

(cherry picked from commit 4c1004c00ff250f2a9e5bff5ae90c25d6b70feb3)
DeltaFile
+72-24sys/dev/sound/pci/hdspe-pcm.c
+13-13sys/dev/sound/pci/hdspe.c
+9-0sys/dev/sound/pci/hdspe.h
+94-373 files

HardenedBSD/src b5f4665sys/dev/ixgbe ixgbe_phy.c

ixgbe: Avoid a signed shift while assembling the PHY ID

The PHY identifier word is promoted to signed int when the cast is
applied after the shift.  Cast the 16-bit register value first so
identifiers with their high bit set are assembled as unsigned data.

(cherry picked from commit f4bf1da7bac80cbe3ec862f395c22a3c5d176312)
DeltaFile
+1-1sys/dev/ixgbe/ixgbe_phy.c
+1-11 files

HardenedBSD/src 4cfa058sys/dev/igc igc_phy.c

igc: Avoid a signed shift while assembling the PHY ID

The PHY identifier word is promoted to signed int when the cast is
applied after the shift.  Cast the 16-bit register value first so
identifiers with their high bit set are assembled as unsigned data.

(cherry picked from commit f5fd839fe688181e57171850ce51e4dec71e62fd)
DeltaFile
+1-1sys/dev/igc/igc_phy.c
+1-11 files

HardenedBSD/src 2a21a77sys/dev/e1000 e1000_phy.c e1000_ich8lan.c

e1000: Avoid signed shifts while assembling PHY IDs

PHY identifier words are promoted to signed int when the cast is applied
after the shift.  Cast each 16-bit register value first so identifiers
with their high bit set are assembled as unsigned data.

(cherry picked from commit 13a7470096567480676e24545b3c1d6404f3f2ec)
DeltaFile
+1-1sys/dev/e1000/e1000_phy.c
+1-1sys/dev/e1000/e1000_ich8lan.c
+1-1sys/dev/e1000/e1000_82571.c
+3-33 files

HardenedBSD/src 8958751sys/dev/igc if_igc.c

igc: Export EEE Low Power Idle counters

The driver already accumulates the clear-on-read transmit and receive
LPI event counters.  Expose the 64-bit totals under the per-device eee
sysctl node.

(cherry picked from commit 13d78e4b9d0a27128319a1241f00f7ab9aa864bb)
DeltaFile
+10-2sys/dev/igc/if_igc.c
+10-21 files

HardenedBSD/src 0278a71sys/dev/ixl ixl_pf_main.c

ixl: Avoid a signed PHY capability shift

The PHY capability display examines all 32 bits of the firmware bitmap.
Use an unsigned value so examining bit 31 does not shift a signed
integer into its sign bit.

(cherry picked from commit f7427f890c7f34d0842a35eb9df814adad11a95a)
DeltaFile
+1-1sys/dev/ixl/ixl_pf_main.c
+1-11 files

HardenedBSD/src 07deb66sys/dev/e1000 e1000_82571.c

e1000: Avoid a signed manageability VLAN bitmap shift

A manageability VLAN can select bit 31 of its VFTA register.  Use an
unsigned value when constructing the register mask.

(cherry picked from commit 392fbdcf2232f12cb973d00ae931740c72d970c6)
DeltaFile
+1-1sys/dev/e1000/e1000_82571.c
+1-11 files

HardenedBSD/src 43c32e3sys/dev/ixgbe ixgbe_mbx.c ixgbe_82598.c

ixgbe: Use unsigned register bitmap shifts

VLAN, VMDq, and VF reset bit indices can reach 31.  Use unsigned
values when constructing their 32-bit register masks so the shifts do
not operate on signed integers.

(cherry picked from commit bf6feffef6c16559333048859b24547acea3dba5)
DeltaFile
+9-9sys/dev/ixgbe/ixgbe_common.c
+3-3sys/dev/ixgbe/ixgbe_82598.c
+2-2sys/dev/ixgbe/ixgbe_mbx.c
+14-143 files

HardenedBSD/src 2f28293sys/dev/ixgbe ixgbe_type.h

ixgbe: Avoid signed overflow in LED register masks

LED index three shifts the blink bit into bit 31.  Convert the base to
the register width before shifting so the operation is unsigned.

This is the ixgbe counterpart of the e1000 correction imported from
DPDK commit 214cb0d7f1.

(cherry picked from commit bbdd3c4692e2869817f77c359b4a2719e716921d)
DeltaFile
+1-1sys/dev/ixgbe/ixgbe_type.h
+1-11 files

HardenedBSD/src 5a7f59dsys/dev/ixgbe ixgbe_common.c

ixgbe: Avoid a signed shift while assembling the PBA number

The EEPROM word is promoted to signed int before the left shift when
the cast is applied to the complete expression.  Cast the word first so
all 16-bit values are shifted as unsigned data.

This is the ixgbe counterpart of the e1000 correction imported from
DPDK commit b932270c66.

(cherry picked from commit baa6e3af8525244e65a404fa13306fbca7feae9c)
DeltaFile
+1-1sys/dev/ixgbe/ixgbe_common.c
+1-11 files

HardenedBSD/src 2c545fcsys/dev/igc igc_phy.c

igc: Check PHY control register reads

Do not modify a zero-initialized PHY control value when its preceding
read failed.  Leave the PHY unchanged when the void power helpers cannot
read its current state.

This follows the defensive checks added to the corresponding e1000
helpers.

(cherry picked from commit 1121aaa0758baf04bed6f16d4157116b49c25000)
DeltaFile
+12-2sys/dev/igc/igc_phy.c
+12-21 files

HardenedBSD/src 360982bsys/dev/igc igc_mac.c

igc: fix data type in MAC hash

DPDK commit message

net/e1000/base: fix data type in MAC hash

One of the bit shifts in MAC hash calculation triggers a static analysis
warning about a potential overflow. Fix the data type to avoid this.

Fixes: af75078fece3 ("first public release")
Cc: stable at dpdk.org

Signed-off-by: Barbara Skobiej <barbara.skobiej at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>

Obtained from:  DPDK (458734aaac)

(cherry picked from commit 3fc1786aa2a3f590453abb6ea2351a12e19f6b45)
DeltaFile
+4-2sys/dev/igc/igc_mac.c
+4-21 files

HardenedBSD/src fdfece4sys/dev/igc igc_mac.c

igc: fix MAC address hash bit shift

DPDK commit message

net/e1000/base: fix MAC address hash bit shift

In e1000_hash_mc_addr_generic() the expression:

"mc_addr[4] >> 8 - bit_shift", right shifting "mc_addr[4]"

shift by more than 7 bits always yields zero, so hash becomes not so
different. Add initialization with bit_shift = 1, and add a loop
condition to ensure bit_shift will be always in [1..8] range.

Fixes: af75078fece3 ("first public release")
Cc: stable at dpdk.org

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>

    [5 lines not shown]
DeltaFile
+2-2sys/dev/igc/igc_mac.c
+2-21 files

HardenedBSD/src df83413sys/dev/igc igc_phy.c

igc: fix iterator type

DPDK commit message

net/e1000/base: fix iterator type

Fix static analysis warning about comparison between types of
incompatible width, which might lead to an infinite loop due to
overflow.

Fixes: af75078fece3 ("first public release")
Cc: stable at dpdk.org

Signed-off-by: Amir Avivi <amir.avivi at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>

Obtained from:  DPDK (3d36053991)

(cherry picked from commit 5587cb18b168f57a4d68c7e58ec660ab2a5ce4da)
DeltaFile
+2-1sys/dev/igc/igc_phy.c
+2-11 files

HardenedBSD/src cce182csys/dev/ixgbe ixgbe_common.c

ixgbe: Avoid a signed multicast bitmap shift

The multicast vector bit can be 31.  Use an unsigned value so setting
the bit cannot shift a signed integer into its sign bit.

(cherry picked from commit 8704d29c6cc86f0780dff3d3d17d744106776ad3)
DeltaFile
+1-1sys/dev/ixgbe/ixgbe_common.c
+1-11 files

HardenedBSD/src c1d2260sys/dev/igc igc_mac.c

igc: Avoid a signed multicast bitmap shift

The multicast hash bit can be 31.  Use an unsigned value so setting the
bit cannot shift a signed integer into its sign bit.

(cherry picked from commit 275ca86f6abffc4ee6e52a6daab06f5e5c21aa05)
DeltaFile
+1-1sys/dev/igc/igc_mac.c
+1-11 files

HardenedBSD/src daf690asys/dev/e1000 e1000_82571.c

e1000: Preserve errors while disabling D0 LPLU

Return a PHY write failure immediately when disabling D0 low-power
link-up on 82571-family controllers.

(cherry picked from commit b1da641d23a95c4e7f61b7a546938ec8fceb47e7)
DeltaFile
+2-0sys/dev/e1000/e1000_82571.c
+2-01 files