HardenedBSD/src 3acad36lib/libpmc libpmc.c, sys/dev/hwpmc hwpmc_mod.c hwpmc_amd.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+45-0sys/dev/hwpmc/hwpmc_mod.c
+9-10lib/libpmc/libpmc.c
+6-13sys/dev/nvme/nvme_private.h
+15-2sys/sys/pmc.h
+15-0sys/dev/hwpmc/hwpmc_amd.c
+5-2usr.sbin/pmcstat/pmcstat.c
+95-277 files not shown
+109-4113 files

HardenedBSD/src d0f4057lib/libpmc libpmc.c, sys/dev/hwpmc hwpmc_mod.c hwpmc_amd.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+45-0sys/dev/hwpmc/hwpmc_mod.c
+6-13sys/dev/nvme/nvme_private.h
+9-10lib/libpmc/libpmc.c
+15-2sys/sys/pmc.h
+15-0sys/dev/hwpmc/hwpmc_amd.c
+5-2usr.sbin/pmcstat/pmcstat.c
+95-277 files not shown
+109-4113 files

HardenedBSD/src e39d3a6sys/sys pmc.h

pmc.h: bump PMC_VERSION_MINOR

Bump for the addition of PMC_OP_GETCAPS and the recently added Intel
CPUs.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/sys/pmc.h
+1-11 files

HardenedBSD/src 209d9fbusr.sbin/pmcstat pmcstat.c

pmcstat: Implement PMC_CAP_SYSWIDE

Implement the PMC_CAP_SYSWIDE capability flag in the same manner as the
PMC_CAP_DOMWIDE flag.  This flag was previously introduced along side
the domain wide flag, but is yet to be used anywhere.

Reviewed by:    mhorne
Sponsored by:   Netflix
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2075
DeltaFile
+5-2usr.sbin/pmcstat/pmcstat.c
+5-21 files

HardenedBSD/src 44a983dlib/libpmc libpmc.c, share/man/man4 hwpmc.4

libpmc: Query hwpmc for caps

This change allows for fine-grained capabilities per counter index. This
is particularly useful for AMD where subclasses are not exposed to the
general PMC code, but other architectures also have asymmetric behaviors
when it comes to specific counter indices.

A new PMC_OP_GETCAPS op is added to the hwpmc(4) ioctl interface.

Reviewed by:    mhorne
Sponsored by:   Netflix
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2058
DeltaFile
+45-0sys/dev/hwpmc/hwpmc_mod.c
+9-10lib/libpmc/libpmc.c
+15-0sys/dev/hwpmc/hwpmc_amd.c
+14-1sys/sys/pmc.h
+4-0share/man/man4/hwpmc.4
+87-115 files

HardenedBSD/src f0e0c4clib/libpmc/pmu-events jevents.c

jevents: include file path in whitelist error message

A small enhancement.

Reviewed by:    Ali Mashtizadeh <ali at mashtizadeh.com>
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55830
DeltaFile
+1-1lib/libpmc/pmu-events/jevents.c
+1-11 files

HardenedBSD/src 83d7a49sys/vm vm_fault.c

vm_fault: expand KASSERT message in vm_fault_populate_cleanup

Include index values and object pointer in the diagnostic
to improve debugging of pindex mismatches.

No functional change.

Signed-off-by: Isa Isoux <isa at isoux.org>
Reviewed by: kib, pouria
Pull Request: https://github.com/freebsd/freebsd-src/pull/2038
DeltaFile
+4-1sys/vm/vm_fault.c
+4-11 files

HardenedBSD/src aa15df4sys/sys queue.h

queue.h: Reorder STAILQ_INSERT_TAIL

The current implementation briefly violates the tail invariant.  This
is not usually an issue, but if an insert is in flight when a panic
occurs, we may then trip the invariant while dumping core.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    obiwac, olce, jhb
Differential Revision:  https://reviews.freebsd.org/D55819
DeltaFile
+2-1sys/sys/queue.h
+2-11 files

HardenedBSD/src 541fbf2sys/net if.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+3-21sys/net/if.c
+3-211 files

HardenedBSD/src bbffe59sys/net if.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+3-21sys/net/if.c
+3-211 files

HardenedBSD/src 889d10dsys/dev/nvme nvme_private.h nvme_qpair.c

nvme: Replace bus_space_[read|write]_4 with bus_[read|write]_4

The goal this change is to remove the use of the tag and handle
needed by bus_space_[read|write]_4.

Fixes:                  b3d9e5013f3e5 (Don't active memory space)
Requested by:           jhb
Reviewed by:            gallatin, imp, jhb, jrtc27
Differential Revision:  https://reviews.freebsd.org/D55818
DeltaFile
+6-11sys/dev/nvme/nvme_private.h
+3-4sys/dev/nvme/nvme_qpair.c
+0-3sys/dev/nvme/nvme_pci.c
+0-2sys/dev/nvme/nvme_ahci.c
+9-204 files

HardenedBSD/src 4e3beefsys/dev/nvme nvme_private.h nvme_ahci.c

nvme: Removed unused 'regs' variable

The private struct has a 'regs' member that's only written to
and otherwise unused. This change removes it.

Fixes:                  b3d9e5013f3e5 (Don't active memory space)
Requested by:           jhb
Reviewed by:            imp, jhb, jrtc27
Differential Revision:  https://reviews.freebsd.org/D55817
DeltaFile
+0-2sys/dev/nvme/nvme_private.h
+0-1sys/dev/nvme/nvme_ahci.c
+0-1sys/dev/nvme/nvme_pci.c
+0-43 files

HardenedBSD/src e073105sys/net if.c

ifnet: Remove unreachable code

The ioctls SIOCSIFVNET and SIOCSIFRVNET are for userland only. For
SIOCSIFVNET, if_vmove_loan(), the interface is obtained from current
VNET. For SIOCSIFRVNET, if_vmove_reclaim(), a valid child prison is
held before getting the interface. In both cases the VNET of the
obtained interfaces is stable, so there's no need to check it.

No functional change intended.

Reviewed by:    glebius, jamie (for #jails)
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55828
DeltaFile
+0-18sys/net/if.c
+0-181 files

HardenedBSD/src 8065ff6sys/net if.c

ifnet: Fix decreasing the vnet interface count

It should be decreased only when the interface has been successfully
removed from the "active" list.

This prevents vnet_if_return() from potential OOB writes to the
allocated memory "pending".

Reviewed by:    kp, pouria
Fixes:          a779388f8bb3 if: Protect V_ifnet in vnet_if_return()
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D55873
DeltaFile
+3-3sys/net/if.c
+3-31 files

HardenedBSD/src cb71c48share/man/man9 crypto_request.9, sys/dev/usb/net if_ure.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+66-3sys/dev/usb/net/if_ure.c
+22-12sys/net/rss_config.c
+1-1share/man/man9/crypto_request.9
+89-163 files

HardenedBSD/src 8a7d865share/man/man9 crypto_request.9, sys/dev/usb/net if_ure.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+66-3sys/dev/usb/net/if_ure.c
+22-12sys/net/rss_config.c
+1-1share/man/man9/crypto_request.9
+89-163 files

HardenedBSD/src 33e0568sys/dev/usb/net if_ure.c

ure(4): Fix spurious link flaps from MII

A race condition in the MII layer causes spurious link down events.
In `statchg`, on link down, check if the PHY reports the link as
actually down using the BMSR register, if not, force the status of the
link to back up and restart TX. Do the same in a MII `linkchg` handler.
On actual link up, restart TX in case it went idle and down.

PR:             252165
Signed-off-by:  Rafael Kitover <rkitover at gmail.com>
Reviewed by:    pouria
Differential Revision: https://reviews.freebsd.org/D55682
DeltaFile
+66-3sys/dev/usb/net/if_ure.c
+66-31 files

HardenedBSD/src fed9017share/man/man9 crypto_request.9

crypto_request.9: Fix typo on crypto_initreq arguments

The function signature of `crypto_initreq()` was
incorrectly documented.

Signed-off-by:  Zixu Wu <zx at bv3.dev>
Reviewed by:    ziaee, pouria
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2077
DeltaFile
+1-1share/man/man9/crypto_request.9
+1-11 files

HardenedBSD/src 283ef95sys/net rss_config.c

rss_config: Add option to enable rss udp hashing

Added optional system tunable parameter to enable
4-tuple rss udp hashing.

Signed-off-by: bigJ <bigj at solanavibestation.com>
Reviewed by: adrian, pouria
Pull Request: https://github.com/freebsd/freebsd-src/pull/2057
DeltaFile
+22-12sys/net/rss_config.c
+22-121 files

HardenedBSD/src 9579ad0contrib/tcpdump tcpdump.c print-icmp6.c, contrib/tcpdump/missing snprintf.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+0-508contrib/tcpdump/missing/snprintf.c
+311-47contrib/tcpdump/tcpdump.c
+84-103contrib/tcpdump/print-icmp6.c
+79-105contrib/tcpdump/print-egp.c
+110-56contrib/tcpdump/CMakeLists.txt
+54-84contrib/tcpdump/print-mobility.c
+638-90363 files not shown
+1,581-1,65869 files

HardenedBSD/src 3ca155dcontrib/tcpdump tcpdump.c print-icmp6.c, contrib/tcpdump/missing snprintf.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+0-508contrib/tcpdump/missing/snprintf.c
+311-47contrib/tcpdump/tcpdump.c
+84-103contrib/tcpdump/print-icmp6.c
+79-105contrib/tcpdump/print-egp.c
+110-56contrib/tcpdump/CMakeLists.txt
+54-84contrib/tcpdump/print-mobility.c
+638-90363 files not shown
+1,581-1,65869 files

HardenedBSD/src e608379contrib/tcpdump tcpdump.c print-icmp6.c, contrib/tcpdump/missing snprintf.c

tcpdump: Update to 4.99.6

Changes:        https://github.com/the-tcpdump-group/tcpdump/blob/tcpdump-4.99/CHANGES
Obtained from:  https://www.tcpdump.org/release/tcpdump-4.99.6.tar.xz
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55578
Differential Revision:  https://reviews.freebsd.org/D55871
DeltaFile
+0-508contrib/tcpdump/missing/snprintf.c
+311-47contrib/tcpdump/tcpdump.c
+84-103contrib/tcpdump/print-icmp6.c
+79-105contrib/tcpdump/print-egp.c
+110-56contrib/tcpdump/CMakeLists.txt
+54-84contrib/tcpdump/print-mobility.c
+638-90363 files not shown
+1,581-1,65869 files

HardenedBSD/src 8802fa8sys/dev/rge if_rge.c if_rgevar.h, sys/modules/zfs Makefile

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+22-21sys/modules/zfs/Makefile
+2-2sys/dev/rge/if_rge.c
+2-2usr.bin/backlight/backlight.8
+0-4sys/dev/rge/if_rgevar.h
+1-1usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
+1-0usr.sbin/bluetooth/rtlbtfw/main.c
+28-301 files not shown
+29-307 files

HardenedBSD/src c24fae9sys/dev/rge if_rge.c if_rgevar.h, sys/modules/zfs Makefile

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+22-21sys/modules/zfs/Makefile
+2-2sys/dev/rge/if_rge.c
+0-4sys/dev/rge/if_rgevar.h
+2-2usr.bin/backlight/backlight.8
+1-1usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
+1-0usr.sbin/bluetooth/rtlbtfw/main.c
+28-301 files not shown
+29-307 files

HardenedBSD/src 5f659f2sys/modules/zfs Makefile

zfs: Fix build after merge of openzfs/zfs at f8e5af53e

The change causing it is the introduction of the test over __BMI2__ in
'module/zstd/lib/common/bitstream.h'.

This is a stop-gap commit whose content needs to be upstreamed (after
possibly having been improved).

Fixes:          8a62a2a5659d ("zfs: merge openzfs/zfs at f8e5af53e")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+22-21sys/modules/zfs/Makefile
+22-211 files

HardenedBSD/src 9976cffsys/dev/rge if_rge.c if_rgevar.h

rge: use C style comments instead of C++

FreeBSD style(9) mandates C style comments. The initial import from
OpenBSD left several C++ style // comments in if_rge.c and if_rgevar.h.
Replace them with proper /* */ comments.

Also fix a malformed comment that mixed // with a closing */.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D55743
DeltaFile
+2-2sys/dev/rge/if_rge.c
+0-4sys/dev/rge/if_rgevar.h
+2-62 files

HardenedBSD/src 73f37a6share/mk bsd.own.mk

Revert "bsd.own.mk: Deorbit compat include of bsd.compiler.mk"

This reverts commit 0bebad8d072bb7abef1cea0d8c8d04d500913adf.

It might be that all that's needed to fix this is to add
".include <bsd.compiler.mk>" to some Makefiles. I'll look into it soon
but for now let's unbreak HEAD.

Approved by:            bnovkov (mentor)
Differential Revision:  https://reviews.freebsd.org/D55869
DeltaFile
+6-0share/mk/bsd.own.mk
+6-01 files

HardenedBSD/src 424d3causr.bin/backlight backlight.8

backlight.8: Fix typo in man

Increment and decrement where swapped.

Signed-off-by: Salman Sarray <salman at sarray.de>
Reviewed by: ziaee, Christos Longros <chris.longros at gmail.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2072
DeltaFile
+2-2usr.bin/backlight/backlight.8
+2-21 files

HardenedBSD/src 2e93669sys/netgraph/bluetooth/drivers/ubt ng_ubt_rtl.c, usr.sbin/bluetooth/rtlbtfw rtlbtfw.conf main.c

rtlbtfw(8): Add support for Realtek 8852CE

Add the USB Vendor/Product ID (0x13d3:0x3612) for
the new Realtek 8852CE drive to make sure it works.

Signed-off-by: Ying Xu <fakeshadow1337 at gmail.com>
Reviewed by: pouria, wulf
Pull Request: https://github.com/freebsd/freebsd-src/pull/2071
DeltaFile
+1-1usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
+1-0sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c
+1-0usr.sbin/bluetooth/rtlbtfw/main.c
+3-13 files

HardenedBSD/src 0bebad8share/mk bsd.own.mk

bsd.own.mk: Deorbit compat include of bsd.compiler.mk

Commit b946bedd09d3bd1 ("Previous versions of bsd.own.mk [...]")
mentions that bsd.own.mk included bsd.compiler.mk as a temporary
workaround and was destined to be removed in FreeBSD 12. Do that now.

PR:             203540
Reviewed by:    bnovkov, imp
Approved by:    bnovkov (mentor)
Differential Revision:  https://reviews.freebsd.org/D55867
DeltaFile
+0-6share/mk/bsd.own.mk
+0-61 files