HardenedBSD/src e9c46b1include stdbool.h, sys/dev/rge if_rge_microcode.h if_rge_hw.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+3,506-7,285sys/dev/rge/if_rge_microcode.h
+249-48sys/dev/rge/if_rge_hw.c
+17-14sys/dev/rge/if_rge.c
+6-2include/stdbool.h
+5-1sys/dev/rge/if_rgereg.h
+2-1sys/dev/rge/if_rgevar.h
+3,785-7,3516 files

HardenedBSD/src ae6fd78include stdbool.h, sys/dev/rge if_rge_microcode.h if_rge_hw.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+3,506-7,285sys/dev/rge/if_rge_microcode.h
+249-48sys/dev/rge/if_rge_hw.c
+17-14sys/dev/rge/if_rge.c
+6-2include/stdbool.h
+5-1sys/dev/rge/if_rgereg.h
+2-1sys/dev/rge/if_rgevar.h
+3,785-7,3516 files

HardenedBSD/src 5d73fcasys/dev/rge if_rge_microcode.h if_rge_hw.c

if_rge: sync with up to date OpenBSD code

a0b4d9e5bd63984bc3ad25b7f2881741e0d73980
Add support for RTL8126 chip revision 0x64a00000 from Carl Henriksson.
While here, update and add microcode for the RTL8126 chipset variant.

46810ff569a9416642fc5f8e86501028008a2e95
For RTL8125, there's no need to check whether RGE_CMD_STOPREQ has been
completed.  As with other chip variants, RGE_CMD_STOPREQ never acknowledges
completion.

5729fb17b5eeba56781da0b5c0525c198c5c2cd8
remove duplicate RGE_PHYSTAT_5000MBPS test

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D54517
Obtained from:  OpenBSD
DeltaFile
+3,506-7,285sys/dev/rge/if_rge_microcode.h
+249-48sys/dev/rge/if_rge_hw.c
+17-14sys/dev/rge/if_rge.c
+5-1sys/dev/rge/if_rgereg.h
+2-1sys/dev/rge/if_rgevar.h
+3,779-7,3495 files

HardenedBSD/src f441a22include stdbool.h

stdbool.h: Update for C23

When a compiler with C23 or higher is detected, builtin bool, true,
and false are used to conform the C23 standard.

Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D44664
DeltaFile
+6-2include/stdbool.h
+6-21 files

HardenedBSD/src e0cb64ashare/man/man4 iflib.4 mrsas.4, stand/i386/pxeldr pxeboot.8

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+33-13sys/kern/link_elf.c
+14-0sys/kern/link_elf_obj.c
+10-0share/man/man4/iflib.4
+6-3stand/i386/pxeldr/pxeboot.8
+0-8sys/vm/vm_kern.c
+2-1share/man/man4/mrsas.4
+65-252 files not shown
+68-258 files

HardenedBSD/src 8321ce5share/man/man4 iflib.4 mrsas.4, stand/i386/pxeldr pxeboot.8

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+33-13sys/kern/link_elf.c
+14-0sys/kern/link_elf_obj.c
+10-0share/man/man4/iflib.4
+6-3stand/i386/pxeldr/pxeboot.8
+0-8sys/vm/vm_kern.c
+2-1share/man/man4/mrsas.4
+65-252 files not shown
+68-258 files

HardenedBSD/src 1524f52share/man/man4 mfi.4, sys/dev/mfi mfi_pci.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+3-2sys/vm/vm_object.h
+2-0share/man/man4/mfi.4
+1-0sys/dev/mfi/mfi_pci.c
+6-23 files

HardenedBSD/src 28cb50fsys/vm vm_object.h

vm/vm_object.h: clarify the OBJ_ONEMAPPING semantic

(cherry picked from commit 9c923575606bbd29dcf0ec3384150d2d67136cbb)
DeltaFile
+3-2sys/vm/vm_object.h
+3-21 files

HardenedBSD/src 1961785stand/i386/pxeldr pxeboot.8

pxeboot.8: Fix mdoc typo for emails, tag spdx

Fixes:          a37825313f62 (Fix mdoc typos for emails, tag spdx)
MFC after:      3 days
DeltaFile
+6-3stand/i386/pxeldr/pxeboot.8
+6-31 files

HardenedBSD/src 83e6f0dshare/man/man4 iflib.4

iflib: document new sysctls

Document the new tx related sysctls I've added to iflib in the
last few months:  tx_reclaim_ticks & tx_reclaim_thresh

Sponsored by: Netflix
Reviewed by: ziaee
Differential Revision: https://reviews.freebsd.org/D54564
MFC after: 3 days
DeltaFile
+10-0share/man/man4/iflib.4
+10-01 files

HardenedBSD/src ccec94bshare/man/man4 mrsas.4

mrsas.4: Add Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116)

This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped
with many Fujitsu PRIMERGY servers like RX300 S7.

Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html

Reviewed by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54566
DeltaFile
+2-1share/man/man4/mrsas.4
+2-11 files

HardenedBSD/src 203e5a1sys/kern link_elf.c link_elf_obj.c, sys/vm vm_kern.c

linker: Reset DMAP protections in link_elf_unload_file()

On x86, when a preloaded kernel module is unloaded, we free the backing
(physically contiguous) pages.  The ET_REL linker will have adjusted
protections on segments of the preloaded file, which updates the direct
map, so the original protections must be restored when unloading the
module.

Previously this was handled in kmem_bootstrap_free(), but there is no
apparent reason not to handle this within the kernel linker.  Moreover,
we were not resetting permissions in the kernel map on arm64.

Reviewed by:    alc, kib
MFC after:      3 weeks
Differential Revision:  https://reviews.freebsd.org/D54438
DeltaFile
+33-13sys/kern/link_elf.c
+14-0sys/kern/link_elf_obj.c
+0-8sys/vm/vm_kern.c
+47-213 files

HardenedBSD/src e16e4cdshare/man/man4 mfi.4, sys/dev/mfi mfi_pci.c

mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116)

This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped
with many Fujitsu PRIMERGY servers like RX300 S7. This chip is also recognized
by mrsas(4) under the generic name for the controller chip.

Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html

Reviewed by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54520

(cherry picked from commit 8b210276cde207ca3dc1f7f46d5a6d32e0a1c51d)
DeltaFile
+2-0share/man/man4/mfi.4
+1-0sys/dev/mfi/mfi_pci.c
+3-02 files

HardenedBSD/src 8b21027share/man/man4 mfi.4, sys/dev/mfi mfi_pci.c

mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116)

This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped
with many Fujitsu PRIMERGY servers like RX300 S7. This chip is also recognized
by mrsas(4) under the generic name for the controller chip.

Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html

Reviewed by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54520
DeltaFile
+2-0share/man/man4/mfi.4
+1-0sys/dev/mfi/mfi_pci.c
+3-02 files

HardenedBSD/src 8562f3blib/libkldelf ef_mips.c, share/man/man4 cxgbe.4

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+0-116lib/libkldelf/ef_mips.c
+48-10share/man/man4/cxgbe.4
+29-29share/man/man7/security.7
+0-48sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h
+0-30sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c
+17-0stand/efi/loader/framebuffer.c
+94-2336 files not shown
+104-24512 files

HardenedBSD/src 7db1c1blib/libkldelf ef_mips.c, share/man/man4 cxgbe.4

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+0-116lib/libkldelf/ef_mips.c
+29-29share/man/man7/security.7
+48-10share/man/man4/cxgbe.4
+0-48sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h
+0-30sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c
+17-0stand/efi/loader/framebuffer.c
+94-2336 files not shown
+104-24512 files

HardenedBSD/src 4b64ad9sys/kern kern_prot.c kern_racct.c, sys/netpfil/pf pf_ioctl.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+115-128sys/kern/kern_prot.c
+4-135sys/kern/kern_racct.c
+43-48sys/netpfil/pf/pf_ioctl.c
+62-0tests/sys/netinet6/ndp.sh
+38-2tests/sys/netpfil/pf/divert-to.sh
+21-10tests/sys/netinet6/ra.py
+283-32316 files not shown
+358-39122 files

HardenedBSD/src 6c6e00blib/libkldelf ef_mips.c Makefile, sys/cddl/contrib/opensolaris/uts/mips/dtrace fasttrap_isa.c

mips: remove mips leftovers

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1909
DeltaFile
+0-116lib/libkldelf/ef_mips.c
+0-48sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h
+0-30sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c
+0-1lib/libkldelf/Makefile
+0-1usr.sbin/kldxref/Makefile
+0-1965 files

HardenedBSD/src 2962dc7bin/sh sh.1

sh.1: Restore missing builtin commands

PR:             292221
Fixes:          2980318b2747 (sh.1: extend the section about getopts)
MFC after:      3 days
DeltaFile
+1-1bin/sh/sh.1
+1-11 files

HardenedBSD/src be6ba97stand/efi/loader framebuffer.c

loader.efi: add stride & offset for MacBookPro3,1

Note that there are three variants of this MacBook. We only have the
stride and offset values for the 17" 1680x1050 model.

Reviewed by:    vexeduxr
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1584
DeltaFile
+17-0stand/efi/loader/framebuffer.c
+17-01 files

HardenedBSD/src 75866d7lib/libsys ptrace.2 chroot.2, share/man/man7 security.7

manuals: Correct some sysctl markup

This enables additional searching the manual by sysctl variable.
This syntax is standardized in style.mdoc(5).

Reported by:    bapt
MFC after:      3 days
DeltaFile
+29-29share/man/man7/security.7
+5-5lib/libsys/ptrace.2
+3-3lib/libsys/chroot.2
+1-1usr.sbin/chroot/chroot.8
+38-384 files

HardenedBSD/src c25259asys/netpfil/pf pf_ioctl.c pf_nv.c

pf: Avoid taking the pf rules write lock in a couple of ioctls

The DIOCGETRULES ioctl handlers has taken the write lock ever since
fine-grained locking was merged to pf, but I believe it's unneeded.  Use
the read lock instead.

DIOCGETRULENV takes the write lock as well but I believe this is only
required when clearing rule counters.  Acquire the read lock if that is
not the case.

Reviewed by:    kp, allanjude
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54292

(cherry picked from commit ae96ff302f8ae50903a96d3a1857f9acf243f3c4)
DeltaFile
+43-48sys/netpfil/pf/pf_ioctl.c
+1-1sys/netpfil/pf/pf_nv.c
+1-1sys/netpfil/pf/pf_nv.h
+45-503 files

HardenedBSD/src 3025957sys/netpfil/pf pf.c, tests/sys/netpfil/pf divert-to.sh

pf: Fix state handling when ICMP packets are diverted

Commit 66f2f1c83247 ("pf: handle divert packets") missed a case that I
happened to hit while testing something.

Add a regression test for the ICMP case, based on the existing test.
Fix a buglet in the existing test (missing whitespace after "[").

Reviewed by:    kp
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D54321

(cherry picked from commit 15178d8ed2904d5c4fa31a1531e60dcb1e0f9209)
DeltaFile
+38-2tests/sys/netpfil/pf/divert-to.sh
+6-4sys/netpfil/pf/pf.c
+44-62 files

HardenedBSD/src 97fbbf1sbin/ifconfig af_inet6.c, tests/sys/netinet6 ndp.sh ra.py

ifconfig: Fix the -L flag when using netlink

By default, when ifconfig shows a v6 address derived from a
router-advertised prefix, it shows the initial preferred and valid
lifetimes.  When -L is specified, it is supposed to show the remaining
lifetimes, but this was broken in the conversion to netlink.

Fix that, and add a regression test which validates ifconfig output
before and after a short-lived address expires.

Reported by:    Franco Fichtner <franco at opnsense.org>
Reviewed by:    melifaro, allanjude, Seyed Pouria Mousavizadeh Tehrani
Fixes:          4c91a5dfe483 ("ifconfig: make interface and address listing use Netlink as transport")
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54294

(cherry picked from commit df6861d755c8f72380ae7fb8df535b27eba8c0be)
DeltaFile
+62-0tests/sys/netinet6/ndp.sh
+10-1tests/sys/netinet6/ra.py
+4-2sbin/ifconfig/af_inet6.c
+76-33 files

HardenedBSD/src 9ee9e35tests/sys/netinet6 ra.py

tests: Fix style in ra.py

No functional change intended.

MFC after:      2 weeks

(cherry picked from commit 7080c1b09d72e64f17185e90d7b660175f8fbaba)
DeltaFile
+12-10tests/sys/netinet6/ra.py
+12-101 files

HardenedBSD/src 03e1605share/man/man4 cxgbe.4

cxgbe.4: Update for recent HARDWARE

Adjust document description, description section, and hardware section
to include Chelsio T7. Since this driver now supports many generations,
order reverse chronologically. Compare language to ice.4 and bnxt.4,
the other terabit ethernet drivers.

This list of HARDWARE is obtained from the Chelsio prouduct selector.

MFC after:              3 days (T7 support shipped with 15.0)
Discussed with:         jhb, np
Differential Revision:  https://reviews.freebsd.org/D54276
DeltaFile
+48-10share/man/man4/cxgbe.4
+48-101 files

HardenedBSD/src 765442a. Makefile.inc1

Makefile.inc1: Indicate that no-clean builds are on by default

PR:             292130
(cherry picked from commit a6afa194f382e4f81277fdc7e81e229d3c8caf5f)
DeltaFile
+1-1Makefile.inc1
+1-11 files

HardenedBSD/src f112909sys/kern kern_racct.c

kern: racct: Remove code unused since %cpu resource computation revamp

Reviewed by:    emaste, markj
Fixes:          c72188d85a79 ("racct: Improve handling of the pcpu resource")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54284

(cherry picked from commit 55ce12672b948c002431851af54843bfc7f50d6f)
DeltaFile
+0-133sys/kern/kern_racct.c
+0-1331 files

HardenedBSD/src 0d95a17usr.sbin/mountd exports.5

exports.5: Typo: "auomatically" => "automatically"

Fixes:          9d975e47d5a3 ("exports.5: Clarify that exported dirs should be local mount points")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 7521dc5dce35159add70003340e1555456721a2d)
DeltaFile
+1-1usr.sbin/mountd/exports.5
+1-11 files

HardenedBSD/src 42a3d3dsys/kern kern_jail.c

jail: Don't define malloc type M_PRISON_RACCT on !RACCT

Reviewed by:    emaste, jamie
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54271

(cherry picked from commit a8be81456cfeecc66ba3b41eb9a2d3dfea7ebc8c)
DeltaFile
+2-0sys/kern/kern_jail.c
+2-01 files