HardenedBSD/src 254b23esys/net rtsock.c route.h, sys/net/route route_ctl.c nhop_ctl.c

routing: Retire ROUTE_MPATH compile option

The ROUTE_MPATH compile option was introduced to
test the new multipath implementation.
Since compiling it has no overhead and it's enabled
by default, remove it.

Reviewed by:    melifaro, markj
Relnotes:       yes
Differential Revision: https://reviews.freebsd.org/D55884
DeltaFile
+2-36sys/net/route/route_ctl.c
+13-21sys/netlink/route/rt.c
+10-22sys/net/rtsock.c
+4-13sys/net/route/nhop_ctl.c
+0-17sys/net/route.h
+6-8sys/netinet6/in6_fib.c
+35-11741 files not shown
+67-22347 files

HardenedBSD/src 2371b24tests/sys/netinet6 ndp.sh

tests: Add grand link-layer event in netinet6/ndp

Add test for ndp to verity link-layer address change event
actually triggers the grand.

Differential Revision: https://reviews.freebsd.org/D55927
DeltaFile
+50-0tests/sys/netinet6/ndp.sh
+50-01 files

HardenedBSD/src 6cf1afeusr.sbin/newsyslog newsyslog.c

newsyslog: check for rename failure during log rotation

Differential Revision:  https://reviews.freebsd.org/D56088
DeltaFile
+3-3usr.sbin/newsyslog/newsyslog.c
+3-31 files

HardenedBSD/src dc9411detc/mtree BSD.include.dist, release/packages/ucl rc.ucl xz-all.ucl

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+5-5etc/mtree/BSD.include.dist
+5-2release/packages/ucl/rc.ucl
+2-2tests/sys/netlink/test_snl.c
+1-1release/packages/ucl/xz-all.ucl
+1-1share/man/man9/DEVICE_IDENTIFY.9
+14-115 files

HardenedBSD/src c2dddf1etc/mtree BSD.include.dist, release/packages/ucl rc.ucl xz-all.ucl

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+5-5etc/mtree/BSD.include.dist
+5-2release/packages/ucl/rc.ucl
+2-2tests/sys/netlink/test_snl.c
+1-1share/man/man9/DEVICE_IDENTIFY.9
+1-1release/packages/ucl/xz-all.ucl
+14-115 files

HardenedBSD/src 8330871release/packages/ucl rc.ucl

packages: Add dependency from rc to mtree

/etc/rc.d/var_run uses mtree, which is in the devel set and isn't
installed as part of either minimal or optional, so add a manual
dependency.

Reviewed by:    des, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D54540
Sponsored by:           https://www.patreon.com/bsdivy
DeltaFile
+5-2release/packages/ucl/rc.ucl
+5-21 files

HardenedBSD/src 4377300release/packages/ucl xz-all.ucl

packages: Move xz to the minimal set

pkg(8), via its daily periodic script, requires xz.  We don't have
a way to encode dependencies from ports on base packages right now,
so instead move xz to the minimal set so it's always installed.

This isn't an ideal solution, but it's justified in this case since
pkg(8) is always installed, so having its dependencies always
installed is acceptable.

(Following discusson on the diff, new versions of pkg have now been
changed to use zstd instead of xz, but we still think xz is useful
enough to keep in minimal.)

MFC after:      1 week (stable/15 only)
Reviewed by:    des, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D55630
Sponsored by:           https://www.patreon.com/bsdivy
DeltaFile
+1-1release/packages/ucl/xz-all.ucl
+1-11 files

HardenedBSD/src 8ba3adaetc/mtree BSD.include.dist

etc/mtree: Restore removed package tags

Following commit 436618a427b4 which added package tags to mtree,
some of the tags were later removed due to an issue with empty
packages being created.  That problem has been fixed by commit
7965c93e4d41, so we can now restore the tags that were removed.

This reverts commit 00352ef6d2a013650f0ab2a4c9b016c22552ed25.
This reverts commit 1fbdb149aa486961c5d9d6403065e90123b3f5fe.
This reverts commit ef2d586d7efb908bf39e7d5eb5d4305193d0ca6e.
This reverts commit 2a8a6179eb6cef8ba1a417a4c8a1f7063c704533.

MFC after:      2 weeks (stable/15 only)
Reviewed by:    des, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D55645
Sponsored by:           https://www.patreon.com/bsdivy
DeltaFile
+5-5etc/mtree/BSD.include.dist
+5-51 files

HardenedBSD/src c789376share/man/man9 DEVICE_IDENTIFY.9

DEVICE_IDENTIFY.9: Fix function call to detect driver in example code

Fixes:          ccabc7c2e556 ("DEVICE_IDENTIFY.9: Modernize description and use cases")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1share/man/man9/DEVICE_IDENTIFY.9
+1-11 files

HardenedBSD/src 0342842sys/dev/uart uart_bus_pci.c, sys/net if_types.h

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+3-2sys/dev/uart/uart_bus_pci.c
+1-1sys/ofed/include/rdma/ib_mad.h
+1-1sys/net/if_types.h
+5-43 files

HardenedBSD/src ecf33b6sys/dev/uart uart_bus_pci.c, sys/net if_types.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+3-2sys/dev/uart/uart_bus_pci.c
+1-1sys/net/if_types.h
+1-1sys/ofed/include/rdma/ib_mad.h
+5-43 files

HardenedBSD/src 1acc442sys/contrib/zlib gzread.c zlib.h, sys/contrib/zlib/contrib/gcc_gvmat64 gvmat64.S

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+0-574sys/contrib/zlib/contrib/gcc_gvmat64/gvmat64.S
+190-124sys/contrib/zlib/gzread.c
+213-94sys/contrib/zlib/zlib.h
+168-99sys/contrib/zlib/gzwrite.c
+38-151sys/contrib/zlib/inflate.c
+91-91sys/contrib/zlib/inffixed.h
+700-1,13334 files not shown
+1,734-1,77840 files

HardenedBSD/src 18ce9e2tests/sys/netlink test_snl.c

tests/netlink: Bugfix on snl_parse_errmsg_capped test

Turn off the NETLINK_EXT_ACK flag to fix bug of snl_parse_errmsg_capped.

Reviewed by:    pouria
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1660
DeltaFile
+2-2tests/sys/netlink/test_snl.c
+2-21 files

HardenedBSD/src ebe529esys/dev/ixgbe ixgbe_type_e610.h ixgbe_e610.c

ix(4): Add EEE support for E610 adapters

The ix driver now supports Energy Efficient Ethernet (EEE) on Intel
E610 devices. EEE allows the network interface to enter low-power
states during periods of low link utilization, reducing power
consumption while maintaining full performance when needed.

E610 adapters provide EEE support through BASE-T PHY functionality.
Due to this PHY-based implementation, EEE is supported only
on 2.5Gb speeds and above.

Signed-off-by: Yogesh Bhosale <yogesh.bhosale at intel.com>
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>

Authored-by: Yogesh Bhosale <yogesh.bhosale at intel.com>

Approved by:    kbowling (mentor)
Tested by:      Mateusz Moga <mateusz.moga at intel.com>
Sponsored by:   Intel Corporation

    [3 lines not shown]
DeltaFile
+43-14sys/dev/ixgbe/ixgbe_type_e610.h
+35-13sys/dev/ixgbe/ixgbe_e610.c
+34-0sys/dev/ixgbe/if_ix.c
+112-273 files

HardenedBSD/src 1491fe8sys/dev/uart uart_bus_pci.c

uart/pci: support 16550A PCI serial devices

Expand the current check to also attach the ns8250 driver to devices
reporting as 16550A.  This has been tested to work on a real device.

From an inspection of the code in the ns8250 driver it seems like it should
support up to 16950A devices, but I don't have hardware to ensure that,
hence be conservative with the change.

MFC: 2 weeks
Reviewed by: imp
Differential revision: https://reviews.freebsd.org/D56095
DeltaFile
+1-1sys/dev/uart/uart_bus_pci.c
+1-11 files

HardenedBSD/src c562c81sys/dev/uart uart_bus_pci.c

uart/pci: always disable MSI for generic devices

The generic device pci_id structure in uart_pci_probe() already has
PCI_NO_MSI appended to it's flags, however that information is not
propagated into uart_pci_attach().

Assume that any device that doesn't match the known IDs is a generic UART
device, and hence prevent the usage of MSIs.

MFC: 2 weeks
Reviewed by: imp
Differential revision: https://reviews.freebsd.org/D56097
DeltaFile
+2-1sys/dev/uart/uart_bus_pci.c
+2-11 files

HardenedBSD/src aed3bc8sys/ofed/include/rdma ib_mad.h

ofed: Fix a typo in a source code comment

- s/refereced/referenced/

MFC after:      3 days
DeltaFile
+1-1sys/ofed/include/rdma/ib_mad.h
+1-11 files

HardenedBSD/src 8bc31c8sys/net if_types.h

if_types: Fix a typo in a source code comment

- s/Circiut/Circuit/

Obtained from:  OpenBSD
MFC after:      3 days
DeltaFile
+1-1sys/net/if_types.h
+1-11 files

HardenedBSD/src 74f3572sys/contrib/zlib gzread.c zlib.h, sys/contrib/zlib/contrib/gcc_gvmat64 gvmat64.S

MFC: MFV: zlib 1.3.2.

Relnotes:       yes

(cherry picked from commit 7aa1dba6b00ccfb7d66627badc8a7aaa06b02946)
DeltaFile
+0-574sys/contrib/zlib/contrib/gcc_gvmat64/gvmat64.S
+190-124sys/contrib/zlib/gzread.c
+213-94sys/contrib/zlib/zlib.h
+168-99sys/contrib/zlib/gzwrite.c
+38-151sys/contrib/zlib/inflate.c
+91-91sys/contrib/zlib/inffixed.h
+700-1,13331 files not shown
+1,622-1,75137 files

HardenedBSD/src 40094cd. Makefile.inc1, sys/kern kern_event.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+18-2sys/vm/vm_fault.c
+17-0sys/sys/filedesc.h
+13-1sys/kern/kern_event.c
+1-1Makefile.inc1
+0-2sys/x86/isa/atpic.c
+2-0sys/x86/isa/icu.h
+51-66 files

HardenedBSD/src a9027c5. Makefile.inc1, sys/kern kern_event.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+18-2sys/vm/vm_fault.c
+17-0sys/sys/filedesc.h
+13-1sys/kern/kern_event.c
+1-1Makefile.inc1
+0-2sys/x86/isa/atpic.c
+2-0sys/x86/isa/icu.h
+51-66 files

HardenedBSD/src e3eb31esys/amd64/amd64 trap.c exec_machdep.c, sys/amd64/ia32 ia32_signal.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+117-85sys/amd64/amd64/trap.c
+53-6sys/x86/include/frame.h
+28-0sys/amd64/ia32/ia32_signal.c
+23-0sys/x86/include/specialreg.h
+19-0sys/amd64/amd64/exec_machdep.c
+11-1sys/dev/mlx5/mlx5_core/mlx5_cmd.c
+251-925 files not shown
+263-10411 files

HardenedBSD/src e8dac39. Makefile.inc1

Makefile.inc1: Remove extraneous }

Reported by:    tijl
Fixes: 17494c6e6b7d ("build: Boostrap LLVM_BINUTILS for cross-tools")
DeltaFile
+1-1Makefile.inc1
+1-11 files

HardenedBSD/src 5f08cdcsys/x86/isa atpic.c icu.h

x86: move the NUM_ISA_IRQS symbol from atpic.c into x86/isa/icu.h

This is not the best location, but works for now.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56003
DeltaFile
+0-2sys/x86/isa/atpic.c
+2-0sys/x86/isa/icu.h
+2-22 files

HardenedBSD/src f404109sys/vm vm_fault.c

vm_fault: Avoid creating clean, writeable superpage mappings

The pmap layer requires writeable superpage mappings to be dirty.
Otherwise, during demotion, we may miss a hw update of the PDE which
sets the dirty bit.

When creating a managed superpage mapping without promotion, i.e., with
pmap_enter(psind == 1), we must therefore ensure that a writeable
mapping is created with the dirty bit pre-set.  To that end,
vm_fault_soft_fast(), when handling a map entry with write permissions,
checks whether all constituent pages are dirty, and if so, converts the
fault to a write fault, so that pmap_enter() does the right thing.  If
one or more pages is not dirty, we simply create a 4K mapping.

vm_fault_populate(), which may also create superpage mappings, did not
do this, and thus could create mappings which violate the invariant
described above.  Modify it to instead check whether all constituent
pages are already dirty, and if so, convert the fault to a write fault.
Otherwise the mapping is downgraded to read-only.

    [5 lines not shown]
DeltaFile
+18-2sys/vm/vm_fault.c
+18-21 files

HardenedBSD/src 8f3227fsys/kern kern_event.c, sys/sys filedesc.h

kqueue: Fix a race when adding an fd-based knote to a queue

When registering a new kevent backed by a file descriptor, we first look
up the file description with fget(), then lock the kqueue, then see if a
corresponding knote is already registered.  If not, and KN_ADD is
specified, we add the knote to the kqueue.

closefp_impl() interlocks with this process by calling knote_fdclose(),
which locks each kqueue and checks to see if the fd is registered with a
knote.  But, if userspace closes an fd while a different thread is
registering it, i.e., after fget() succeeds but before the kqueue is
locked, then we may end up with a mismatch in the knote table, where the
knote kn_fp field points to a different file description than the knote
ident.

Fix the problem by double-checking before registering a knote.  Add a
new fget_noref_unlocked() helper for this purpose.  It is a clone of
fget_noref().  We could simply use fget_noref(), but I like having an
explicit unlocked variant.

    [5 lines not shown]
DeltaFile
+17-0sys/sys/filedesc.h
+13-1sys/kern/kern_event.c
+30-12 files

HardenedBSD/src 663efd8lib/libc/gen rtld_get_var.3, lib/msun/arm fenv.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+152-36libexec/rtld-elf/rtld.c
+38-0libexec/rtld-elf/tests/set_var_test.c
+14-7sys/x86/x86/cpu_machdep.c
+17-0lib/libc/gen/rtld_get_var.3
+6-3sys/x86/x86/tsc.c
+6-1lib/msun/arm/fenv.c
+233-4711 files not shown
+286-5917 files

HardenedBSD/src 381a8e7lib/libc/gen rtld_get_var.3, lib/msun/arm fenv.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+152-36libexec/rtld-elf/rtld.c
+38-0libexec/rtld-elf/tests/set_var_test.c
+14-7sys/x86/x86/cpu_machdep.c
+17-0lib/libc/gen/rtld_get_var.3
+6-3sys/x86/x86/tsc.c
+6-1lib/msun/arm/fenv.c
+233-4711 files not shown
+286-5917 files

HardenedBSD/src 8823ca9sys/x86/include frame.h

amd64: revert back struct trapframe to the pre-FRED definition

(cherry picked from commit 1ba29614c4ce5e261ade0bd7def94079b7b9647a)
DeltaFile
+4-0sys/x86/include/frame.h
+4-01 files

HardenedBSD/src a7182edsys/dev/mlx5 driver.h, sys/dev/mlx5/mlx5_core mlx5_cmd.c

mlx5: postpone freeing the completed command entity to taskqueue

(cherry picked from commit f0d5f46a1e42b801d96447e544cc3820612748b1)
DeltaFile
+11-1sys/dev/mlx5/mlx5_core/mlx5_cmd.c
+1-0sys/dev/mlx5/driver.h
+12-12 files