HardenedBSD/src 04528b0sys/dev/hwpmc hwpmc_mod.c, sys/dev/iommu busdma_iommu.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+145-124sys/vm/vm_domainset.c
+47-19sys/dev/usb/wlan/if_rsu.c
+41-13sys/dev/iommu/busdma_iommu.c
+31-3sys/dev/ixgbe/if_ix.c
+12-13sys/dev/qlnx/qlnxe/qlnx_os.c
+10-11sys/dev/hwpmc/hwpmc_mod.c
+286-18352 files not shown
+489-32658 files

HardenedBSD/src e044783stand/efi/loader main.c, sys/conf NOTES

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+31-3sys/dev/ixgbe/if_ix.c
+10-11sys/dev/hwpmc/hwpmc_mod.c
+7-11stand/efi/loader/main.c
+10-6sys/kern/kern_proc.c
+5-6sys/ddb/db_ps.c
+5-5sys/conf/NOTES
+68-4222 files not shown
+106-8228 files

HardenedBSD/src 46347b3sys/dev/ixgbe if_ix.c

ixgbe: Fix incomplete speed coverage in link status logging

Originally ixgbe_if_update_admin_status() only handled 1G and 10G speeds,
causing any other speeds to display as "1 Gbps" in link status logs.

This issue is fixed by adding link speed to string conversion logic through
the introduction of a helper function, ixgbe_link_speed_to_str(), which
corrects the misleading logs to reflect accurate link speeds.

Signed-off-by: Yogesh Bhosale yogesh.bhosale at intel.com

PR:             288960
Reported by:    Mike Belanger - QNX
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52442
DeltaFile
+31-3sys/dev/ixgbe/if_ix.c
+31-31 files

HardenedBSD/src 101a35estand/efi/boot1 boot1.c, stand/efi/loader efi_main.c

efi: translate errno to EFI status on exit

Translate the given errno to an efi status instead of always exiting
with EFI_LOAD_ERROR.
DeltaFile
+2-2stand/efi/boot1/boot1.c
+1-1stand/efi/loader/efi_main.c
+3-32 files

HardenedBSD/src 1814196stand/efi/loader main.c

loader/efi: remove is_last parameter from find_currdev

It is unused.

Reviewed by:    tsoome
Differential Revision:  https://reviews.freebsd.org/D52434
DeltaFile
+3-6stand/efi/loader/main.c
+3-61 files

HardenedBSD/src b4c5d58stand/efi/loader main.c

loader/efi: plug memory leak

Reviewed by:    tsoome
Differential Revision:  https://reviews.freebsd.org/D52433
DeltaFile
+2-0stand/efi/loader/main.c
+2-01 files

HardenedBSD/src cd9b43estand/efi/loader framebuffer.c

loader/efi: return error from efi_find_framebuffer

Also return actual errno values in other code paths.
(suggested by tsoome)

Reviewed by:    tsoome, imp
Differential Revision:  https://reviews.freebsd.org/D52432
DeltaFile
+5-2stand/efi/loader/framebuffer.c
+5-21 files

HardenedBSD/src 7d48a56stand/common gfx_fb.c, stand/efi/loader main.c bootinfo.c

stand: remove unused variables
DeltaFile
+2-5stand/efi/loader/main.c
+1-2stand/efi/loader/bootinfo.c
+0-2stand/efi/loader/arch/amd64/multiboot2.c
+1-1stand/efi/loader/copy.c
+0-1stand/common/gfx_fb.c
+0-1stand/efi/loader/arch/amd64/trap.c
+4-126 files

HardenedBSD/src d81b84dstand/efi/loader Makefile

loader/efi: build with -Wall

Reviewed by:    tsoome
Differential Revision:  https://reviews.freebsd.org/D52431
DeltaFile
+1-0stand/efi/loader/Makefile
+1-01 files

HardenedBSD/src 9bfbc68usr.bin/sockstat main.c

sockstat: fix the -j option with piped output after libxo integration

The legacy code handling -j in display() was causing xo_finish() to be
skipped.  It has also been causing a memory leak since 0726c6574f8
(sockstat: Add automatic column sizing and remove -w option)

Fixes:          7b35b4d1963 (sockstat: add libxo support)
MFC after:      1 week
Reported by:    glebius
Reviewed by:    glebius
Sponsored by:   ConnectWise
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1842
DeltaFile
+2-1usr.bin/sockstat/main.c
+2-11 files

HardenedBSD/src faf7e99sys/kern kern_proc.c

'kern.proc.groups' sysctl knob: Restore outputting the effective GID

In particular, fixes 'procstat -s' on a live system (for processes with
more than 16 groups).

Reviewed by:    kib, emaste
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52261
DeltaFile
+5-2sys/kern/kern_proc.c
+5-21 files

HardenedBSD/src 63a40casys/kern kern_proc.c

kinfo_proc: Restore outputting the effective GID

In particular, fixes 'procstat -s' on a live system or a core file (only
if there are less than 16 groups).

Reviewed by:    kib
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52259
DeltaFile
+5-4sys/kern/kern_proc.c
+5-41 files

HardenedBSD/src 7676df2lib/libkvm kvm_proc.c

kvm_proclist(): Restore outputting the effective GID

In particular, fixes 'procstat -s -M' (only if there are less than 16
groups).

Reviewed by:    kib, emaste
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52260
DeltaFile
+5-4lib/libkvm/kvm_proc.c
+5-41 files

HardenedBSD/src 5568b44sys/kern imgact_elf.c

imgact_elf: procstat groups: Restore sending the effective GID

Fixes 'procstat -s' run on a core file when the number of groups in
effect at the moment of core dump exceeds KI_NGROUPS (16).

Reviewed by:    kib
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52258
DeltaFile
+3-1sys/kern/imgact_elf.c
+3-11 files

HardenedBSD/src 71db323sys/fs/nfsclient nfs_clport.c

nfscl: Restore sending the effective GID to the server

Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52256
DeltaFile
+4-3sys/fs/nfsclient/nfs_clport.c
+4-31 files

HardenedBSD/src d859d4csys/fs/procfs procfs_status.c

procfs: Restore printing the effective GID in 'status'

Reviewed by:    kib
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52257
DeltaFile
+2-6sys/fs/procfs/procfs_status.c
+2-61 files

HardenedBSD/src 67f8bd5sys/fs/nfs nfs_commonport.c

nfs: newnfs_setroot(): Remove an obsolete comment

This comment is obsolete, as:
1. This code is FreeBSD-specific and is not shared with other BSDs.
2. With our recent changes in commit be1f7435ef218b1d ("kern: start
   tracking cr_gid outside of cr_groups[]"), all of NetBSD, OpenBSD and
   FreeBSD have the effective GID in a separate field (DragonFlyBSD
   remains to this day an outlier).

MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52254
DeltaFile
+0-2sys/fs/nfs/nfs_commonport.c
+0-21 files

HardenedBSD/src 1c40b15sys/dev/hwpmc hwpmc_mod.c

hwpmc: On attach, fix allowing a PMC's owner to attach it to itself

The returned value in this case was wrong, and would basically prevent
some PMC's owner process to attach that PMC to itself although the
security checks underneath would have allowed it.

Now that this early return has been fixed, its block basically becomes
a performance short-circuit which has no effect from a functional
standpoint.

Fixes:          ebccf1e3a6b1 ("Bring a working snapshot of hwpmc(4), ...")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/dev/hwpmc/hwpmc_mod.c
+1-11 files

HardenedBSD/src d9e11f0sys/dev/hwt hwt_ioctl.c

hwt: On attach, ensure owner is a target effective GID's member

This restores a check that existed prior to commit be1f7435ef218b1d
("kern: start tracking cr_gid outside of cr_groups[]").

Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52253
DeltaFile
+4-5sys/dev/hwt/hwt_ioctl.c
+4-51 files

HardenedBSD/src 1c3c698sys/dev/hwpmc hwpmc_mod.c

hwpmc: On attach, ensure owner is a target effective GID's member

This restores a check that existed prior to commit be1f7435ef218b1d
("kern: start tracking cr_gid outside of cr_groups[]").

While here, improve pmc_can_attach()'s style by changing the type of
'decline_attach' to 'bool', fixing tests on it, adding missing
parentheses to 'return' statements, and by changing its return value
type to 'bool'.

Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52252
DeltaFile
+10-11sys/dev/hwpmc/hwpmc_mod.c
+10-111 files

HardenedBSD/src de974a0sys/ddb db_ps.c

ddb ps: Print again the effective GID, separately

Following commit be1f7435ef218b1d ("kern: start tracking cr_gid outside
of cr_groups[]"), cr_groups[] doesn't contain the effective GID anymore.
Fix the 'show proc' DDB command to show it again, and make it stand out
with respect to the supplementary ones.

Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52251
DeltaFile
+5-6sys/ddb/db_ps.c
+5-61 files

HardenedBSD/src 1cf67b5sys/conf NOTES

NOTES: Fix whitespace in "options MAC_DO"

For "options", we put a space before a TAB so that commenting out an
option doesn't move the columns.

No functional change.

Fixes:          c8d8cac2a847 ("mac_do(4): allow compiling into kernel")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/conf/NOTES
+1-11 files

HardenedBSD/src c1eff1dsys/amd64/conf GENERIC, sys/arm/conf TEGRA124

sys: NOTES: Fix comment for wlan_* devices; GENERIC*: Re-order 'wlan_tkip'

Fix the comment introducing the 'wlan_*' devices (AES-CCMP is missing)
after introducing AES-GCMP.

While here, re-order the devices in order of appearance of the related
technologies.

No functional change (intended).

Reviewed by:    adrian, emaste
Fixes:          7bf82ea4fdda ("sys: add wlan_gcmp to GENERIC kernels as appropriate")
MFC after:      3 days
MFC to:         stable/15
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52444
DeltaFile
+4-4sys/conf/NOTES
+1-1sys/powerpc/conf/GENERIC64
+1-1sys/powerpc/conf/GENERIC64LE
+1-1sys/i386/conf/GENERIC
+1-1sys/amd64/conf/GENERIC
+1-1sys/arm/conf/TEGRA124
+9-96 files

HardenedBSD/src a3bdb21share/mk src.opts.mk

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-4share/mk/src.opts.mk
+0-41 files

HardenedBSD/src 56ed574sys/dev/iommu busdma_iommu.c, sys/dev/qlnx/qlnxe qlnx_os.c qlnx_def.h

Merge remote-tracking branch 'internal/freebsd/current/main' into hardened/current/master

Conflicts:
        share/mk/src.opts.mk (unresolved)
DeltaFile
+145-124sys/vm/vm_domainset.c
+47-19sys/dev/usb/wlan/if_rsu.c
+41-13sys/dev/iommu/busdma_iommu.c
+12-13sys/dev/qlnx/qlnxe/qlnx_os.c
+15-6sys/vm/vm_page.c
+0-16sys/dev/qlnx/qlnxe/qlnx_def.h
+260-19124 files not shown
+386-24330 files

HardenedBSD/src 2024887usr.sbin/certctl certctl.c

certctl: Include sys/types.h

This is needed to fix bootstrapping on FreeBSD versions before commit
56ee5c551f89 ("sysctl: make sys/sysctl.h self contained").  Moreover,
certctl should really be including sys/types.h directly since it uses
size_t.

MFC after:      1 week
DeltaFile
+1-0usr.sbin/certctl/certctl.c
+1-01 files

HardenedBSD/src 26d56deusr.sbin/certctl certctl.c

certctl: Use __DECONST rather than reimplementing
DeltaFile
+1-1usr.sbin/certctl/certctl.c
+1-11 files

HardenedBSD/src e1c5e04sys/dev/qlnx/qlnxe ecore_dev.c ecore_mcp.c

qlnxe: Report speeds in decimal format

It is more natural to read the speed in decimal format than hexadecimal
one.

Spotted this while diagnosing PR 287445,

```
[__ecore_configure_pf_max_bandwidth:6864(qlnx-0)]Configured MAX bandwidth to be 000061a8 Mb/sec
[__ecore_configure_pf_min_bandwidth:6922(qlnx-0)]Configured MIN bandwidth to be 750 Mb/sec
```

Reviewed by:    kbowling
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D52376
DeltaFile
+3-3sys/dev/qlnx/qlnxe/ecore_dev.c
+1-1sys/dev/qlnx/qlnxe/ecore_mcp.c
+4-42 files

HardenedBSD/src 08356a7sys/dev/qlnx/qlnxe qlnx_os.c qlnx_def.h

qlnxe: Unconditionally enable extended media types

Those extended media types are available since about 2015 [1]. All
supported branches already have them defined.

No functional change intended.

[1] eb7e25b22f1c ifmedia changes: Extend the number of available subtypes for Ethernet media ...

Reviewed by:    kbowling
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D52374
DeltaFile
+9-12sys/dev/qlnx/qlnxe/qlnx_os.c
+0-16sys/dev/qlnx/qlnxe/qlnx_def.h
+9-282 files

HardenedBSD/src 6e3c8c0sys/dev/qlnx/qlnxe qlnx_os.c

qlnxe: Support SIOCGIFXMEDIA ioctl

ifconfig(8) will try SIOCGIFXMEDIA first and then retry SIOCGIFMEDIA if
that fails. Since the driver reports extended media types, support
SIOCGIFXMEDIA ioctl directly rather than doing another round.

Reviewed by:    kbowling
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D52375
DeltaFile
+3-1sys/dev/qlnx/qlnxe/qlnx_os.c
+3-11 files