HardenedBSD/src f4cd5cecddl/lib/libzfs Makefile, sys/dev/irdma irdma_hw.c irdma_cm.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+108-24sys/dev/irdma/irdma_hw.c
+18-41sys/kern/kern_prot.c
+2-36sys/dev/irdma/irdma_cm.c
+16-16cddl/lib/libzfs/Makefile
+1-29sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+16-11sys/netlink/netlink_snl.h
+161-15760 files not shown
+392-42766 files

HardenedBSD/src 7b6644esys/dev/irdma irdma_hw.c irdma_cm.c

irdma(4): fix potential memory leak on qhash cqp operation

It was found that in some circumstances when launching
non-waiting create qhash cqp operation the refcount on
the cqp_request may be not properly decremented leading to a memory
leak.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak at intel.com>

Reviewed by:    anzhu_netapp.com
Tested by:      mateusz.moga_intel.com
Approved by:    kbowling (mentor)
MFC after:      1 week
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D53732
DeltaFile
+108-24sys/dev/irdma/irdma_hw.c
+2-36sys/dev/irdma/irdma_cm.c
+2-2sys/dev/irdma/icrdma.c
+2-1sys/dev/irdma/irdma_main.h
+114-634 files

HardenedBSD/src d78231esys/dev/cxgbe/common t4_msg.h

cxgbe: Fix the RSS build

When "options RSS" is configured, opt_rss.h defines the "RSS" token.

PR:     291068
Fixes:  17b4a0acfaf5 ("cxgbe(4): T7 related updates to shared code")
DeltaFile
+1-1sys/dev/cxgbe/common/t4_msg.h
+1-11 files

HardenedBSD/src 72a447dsys/vm vm_object.c

vm_object_page_remove(): clear pager even if there is no resident pages

Swap pager might still carry the data.

Debugging help from:    mmel
Reviewed by:    alc
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D53891
DeltaFile
+2-1sys/vm/vm_object.c
+2-11 files

HardenedBSD/src 8a766c9sys/dev/nvme nvme.h

nvme: Fix some comments

Tweak a couple of comments and fix a spelling error.

Sponsored by:           Netflix
DeltaFile
+2-3sys/dev/nvme/nvme.h
+2-31 files

HardenedBSD/src 828df4dsys/netlink netlink_snl.h

netlink: Fix overallocation of netlink message buffers

Prior to commit 0c511bafdd5b309505c13c8dc7c6816686d1e103, each time
snl_realloc_msg_buffer was called, it called snl_allocz to request a
new buffer.  If an existing linear buffer was used, then after the
call, the linear buffer effectively contained the old buffer contents
followed by the new buffer (so there was definitely wasted memory),
but the linear buffer state was consistent (lb->offset correctly
accounted for both copies).  For example, if the initial linear buffer
was 256 bytes in size, lb->size would be 256.  Using 16 bytes followed
by 32 bytes would first set lb->offset to 16, then the second realloc
would allocate 48 bytes (16 + 32) setting lb->offset to 64 (16 + 48).

Commit 0c511bafdd5b309505c13c8dc7c6816686d1e103 aimed to avoid this
memory waste by resetting the base pointer to the start of the
existing linear buffer if the new allocation was later in the same
linear buffer.  This avoided some of the waste, but broke the
accounting.  Using the same example above, the second realloc would
reuse the pointer at an offset of 0, but the linear buffer would still

    [20 lines not shown]
DeltaFile
+16-11sys/netlink/netlink_snl.h
+16-111 files

HardenedBSD/src f7ab908sys/compat/freebsd32 freebsd32_misc.c, sys/sys ucred.h

freebsd32_setcred: Copy all of the setcred fields individually

This is the more typical style used in compat syscalls.  Modern
compilers are smart enough to coalesce multiple member assignments
into a bulk copy.

Reviewed by:    olce, brooks
Obtained from:  CheriBSD
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D53757
DeltaFile
+8-4sys/compat/freebsd32/freebsd32_misc.c
+0-2sys/sys/ucred.h
+8-62 files

HardenedBSD/src 6292eecsys/compat/freebsd32 freebsd32_misc.c, sys/kern kern_prot.c

setcred: Move initial copyin of struct setcred out to per-ABI syscall

This is the more typical approach used in the tree for system calls
with per-ABI structure layouts.

Reviewed by:    olce, brooks
Obtained from:  CheriBSD
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D53756
DeltaFile
+17-35sys/kern/kern_prot.c
+16-2sys/compat/freebsd32/freebsd32_misc.c
+2-2sys/sys/ucred.h
+35-393 files

HardenedBSD/src 134d00bsys/kern kern_prot.c, sys/security/mac mac_syscalls.c mac_syscalls.h

MAC: Use the current thread's user ABI to determine the layout of struct mac

This removes mac_label_copyin32() as mac_label_copyin() can now handle
both native and 32-bit struct mac objects.

Reviewed by:    olce, brooks
Obtained from:  CheriBSD
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D53755
DeltaFile
+5-20sys/security/mac/mac_syscalls.c
+1-8sys/security/mac/mac_syscalls.h
+1-6sys/kern/kern_prot.c
+7-343 files

HardenedBSD/src e928afccddl/lib/libzdb Makefile, cddl/lib/libzfs Makefile

Use ZFSTOP more broadly

Reviewed by:    brooks
Obtained from:  CheriBSD
Differential Revision:  https://reviews.freebsd.org/D53791
DeltaFile
+16-16cddl/lib/libzfs/Makefile
+13-13cddl/lib/libzfs_core/Makefile
+10-10cddl/lib/pam_zfs_key/Makefile
+10-10cddl/lib/libzutil/Makefile
+9-9cddl/lib/libzdb/Makefile
+9-9cddl/lib/libzfsbootenv/Makefile
+67-6731 files not shown
+188-18837 files

HardenedBSD/src 7980cf5cddl/lib/libzpool Makefile, cddl/sbin/zfs Makefile

Centralize definition of ZFSTOP

Define this helper variable in one place and make it available while
building the entire base system.

Reviewed by:    sjg
Obtained from:  CheriBSD (mostly)
Differential Revision:  https://reviews.freebsd.org/D53790
DeltaFile
+3-0share/mk/src.sys.mk
+0-2cddl/lib/libzpool/Makefile
+0-2cddl/sbin/zfs/Makefile
+0-2cddl/sbin/zpool/Makefile
+0-2cddl/share/zfs/compatibility.d/Makefile
+0-2cddl/usr.bin/zinject/Makefile
+3-107 files not shown
+3-2413 files

HardenedBSD/src 2fe3792sys/net if_loop.c

loopback: Clear hash unconditionally.

Clear the RSS hash on transmit, now that RSS hashing is enabled
unconditionally, and the network stack may want to trust that
it is getting the correct hash on input.

Differential Revision:  https://reviews.freebsd.org/D53090
Reviewed by: zlei
Sponsored by: Netflix
DeltaFile
+0-2sys/net/if_loop.c
+0-21 files

HardenedBSD/src 8f94088sys/dev/mlx5/mlx5_en mlx5_en_main.c mlx5_en_rx.c

mlx5: use newly exposed RSS hash key API rather than ad-hoc hashing

Differential Revision:  https://reviews.freebsd.org/D53091
Reviewed by: kib
Sponsored by: Netflix
DeltaFile
+1-29sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+0-4sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
+0-2sys/dev/mlx5/mlx5_en/en.h
+1-353 files

HardenedBSD/src b0c7eafusr.sbin/bhyve/slirp slirp-helper.c

bhyve/slirp: Drop privileges before entering capability mode

When in restricted mode, the slirp-helper process enters a capsicum
sandbox, after which we cannot look up the uid for the "nobody" user.
Reverse the order.

Reported by:    kp
Fixes:  0e62ebd20172 ("bhyve: Move the slirp backend out into a separate process")
DeltaFile
+5-5usr.sbin/bhyve/slirp/slirp-helper.c
+5-51 files

HardenedBSD/src bac572busr.sbin/bhyve net_backend_slirp.c

bhyve/slirp: Avoid a nested declaration of environ

Fixes:  0e62ebd20172 ("bhyve: Move the slirp backend out into a separate process")
DeltaFile
+2-1usr.sbin/bhyve/net_backend_slirp.c
+2-11 files

HardenedBSD/src 6739241krb5/util/ss Makefile

krb5: Use sh to run mk_cmds

Otherwise etcupdate apparently can fail if its private object directory
under /var/db is in a filesystem mounted noexec.  We shouldn't be
building this target at all, but for now, just apply this workaround.

PR:             291043
Reviewed by:    ivy, cy, des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53861
DeltaFile
+1-1krb5/util/ss/Makefile
+1-11 files

HardenedBSD/src 0628c25libexec/rtld-elf/powerpc reloc.c, libexec/rtld-elf/powerpc64 reloc.c

rtld: fix powerpc build

In arch_fix_auxv(), remove local variable shadowing the argument,
remove write-only variable, and declare the loop variable.
The wrong patch was committed after series of local reverts and
re-apply.

Fixes:  b2b3d2a962eb00005641546fbe672b95e5d0672a
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-3libexec/rtld-elf/powerpc/reloc.c
+1-3libexec/rtld-elf/powerpc64/reloc.c
+2-62 files

HardenedBSD/src 8f8b8e4sys/dev/sound/midi midi.c

sound: Fix revents in midi_poll()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    christos
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1887
DeltaFile
+9-11sys/dev/sound/midi/midi.c
+9-111 files

HardenedBSD/src cf14103sbin/mount mount.8, sys/arm/freescale/imx imx6_ssi.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+7-2sbin/mount/mount.8
+1-5sys/arm/freescale/imx/imx6_ssi.c
+1-5sys/arm/freescale/vybrid/vf_sai.c
+9-123 files

HardenedBSD/src 221605asbin/mount mount.8, sys/arm/freescale/imx imx6_ssi.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+7-2sbin/mount/mount.8
+1-5sys/arm/freescale/vybrid/vf_sai.c
+1-5sys/arm/freescale/imx/imx6_ssi.c
+9-123 files

HardenedBSD/src d11f174sys/dev/sound/pci/hda hdaa_patches.c hdac.h

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+2-1sys/dev/sound/pci/hda/hdaa_patches.c
+1-0sys/dev/sound/pci/hda/hdac.h
+3-12 files

HardenedBSD/src 4991bb6sys/dev/sound/pci/hda hdaa_patches.c hdac.h

snd_hda: Patch Lenovo V15

PR:             290496
Tested by:      adrian
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 5f624d923db0f2fb33990948cffdc24da44deaa8)
DeltaFile
+2-1sys/dev/sound/pci/hda/hdaa_patches.c
+1-0sys/dev/sound/pci/hda/hdac.h
+3-12 files

HardenedBSD/src 120f8a4sys/arm/freescale/imx imx6_ssi.c, sys/arm/freescale/vybrid vf_sai.c

arm: Add missing argument in mtx_init() calls

Fixes:          9d18115ca0ab ("sound: Retire snd_mtx* wrappers")
Reported by:    CI
Sponsored by:   The FreeBSD Foundation
MFC after:      4 days
DeltaFile
+1-5sys/arm/freescale/imx/imx6_ssi.c
+1-5sys/arm/freescale/vybrid/vf_sai.c
+2-102 files

HardenedBSD/src a067eb5sbin/mount mount.8

mount.8: document nosymfollow option

Document the nosymfollow mount option in more details.
Forgotten in 5ddc8ded1dbe650b7d83240a1f86a1eb6e2b9b5a
DeltaFile
+7-2sbin/mount/mount.8
+7-21 files

HardenedBSD/src 8217d4e. ObsoleteFiles.inc, contrib/pam-krb5/docs pam_krb5.pod

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+1,268-937lib/libpam/modules/pam_krb5/pam-krb5.8
+9-6contrib/pam-krb5/docs/pam_krb5.pod
+10-2lib/libpam/modules/pam_krb5/Makefile
+7-4ObsoleteFiles.inc
+6-0contrib/pam-krb5/module/auth.c
+3-0contrib/pam-krb5/module/internal.h
+1,303-9491 files not shown
+1,306-9497 files

HardenedBSD/src f3d25cf. ObsoleteFiles.inc, contrib/pam-krb5/docs pam_krb5.pod

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+1,268-937lib/libpam/modules/pam_krb5/pam-krb5.8
+9-6contrib/pam-krb5/docs/pam_krb5.pod
+10-2lib/libpam/modules/pam_krb5/Makefile
+7-4ObsoleteFiles.inc
+6-0contrib/pam-krb5/module/auth.c
+3-0contrib/pam-krb5/module/internal.h
+1,303-9491 files not shown
+1,306-9497 files

HardenedBSD/src 8e55bbacontrib/ntp/ntpd ntp_io.c, lib/libc/db/mpool mpool.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+1-1usr.sbin/lpr/lpr/lpr.1
+1-1contrib/ntp/ntpd/ntp_io.c
+1-1lib/libc/db/mpool/mpool.c
+1-1share/man/man4/isp.4
+1-1usr.sbin/ypldap/ldapclient.c
+5-55 files

HardenedBSD/src 43e336d. ObsoleteFiles.inc, contrib/pam-krb5/docs pam_krb5.pod

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+1,268-937lib/libpam/modules/pam_krb5/pam-krb5.8
+9-6contrib/pam-krb5/docs/pam_krb5.pod
+10-2lib/libpam/modules/pam_krb5/Makefile
+5-2ObsoleteFiles.inc
+6-0contrib/pam-krb5/module/auth.c
+3-0contrib/pam-krb5/module/internal.h
+1,301-9478 files not shown
+1,311-95414 files

HardenedBSD/src 815f085release/scripts pkg-stage.sh

release: Ship DVD with only emacs at nox flavour

Contrary to the claim made in a previous commit, removing KDE and
adding all of vim and emacs results in an image which does not fit
into 4.7 GB; to be specific, it lands at 4.722 GB rather than the
claimed 4.689 GB.  (This descrepancy resulted from doing test DVD
image builds using an out-of-date tree, and became visible when the
15.0-RC3 images were built.)

Limit the emacs packages shipped on the DVD to the "nox" flavor;
this brings the disk image down to 4.407 GB, aka under the 4.7 GB
limit for standard DVDs.

Fixes:  6cc6beb4c889 ("release: Remove KDE from dvd1.iso")
MFC after:      1 day (for 15.0-RC4)

(cherry picked from commit c8cf5a99f82bc52849960e689442421ad5a6d412)
DeltaFile
+1-1release/scripts/pkg-stage.sh
+1-11 files

HardenedBSD/src e9a7a3eshare/man/man4 isp.4

isp.4: Fix a typo in the manual page

- s/Chanel/Channel/

(cherry picked from commit 8158b813d90f01368b2045709feee1980a323198)
DeltaFile
+1-1share/man/man4/isp.4
+1-11 files