HardenedBSD/src 4139a8dshare/man/man4 epair.4, sys/dev/dpaa2 dpaa2_ni.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+16-12sys/net/if_epair.c
+19-1share/man/man4/epair.4
+14-0sys/dev/dpaa2/dpaa2_ni.c
+49-133 files

HardenedBSD/src 0d71922share/man/man4 epair.4, sys/dev/dpaa2 dpaa2_ni.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+16-12sys/net/if_epair.c
+19-1share/man/man4/epair.4
+14-0sys/dev/dpaa2/dpaa2_ni.c
+49-133 files

HardenedBSD/src 574d46bshare/man/man4 epair.4, sys/net if_epair.c

epair: add VLAN_HWTAGGING

Add capability VLAN_HWTAGGING to the epair interface and enable it by
default.
When sending a packet over a VLAN interface that uses an epair
interface, the flag M_VLANTAG and the ether_vtag (which contains the
VLAN ID and/or PCP) are set in the mbuf to inform the hardware that
the VLAN header has to be added. The sending epair end does not need
to actually add a VLAN header. It can just pass the mbuf with this
setting to the other epair end, which receives the packet. The
receiving epair end can just pass the mbuf with this setting to the
upper layer. Due to this setting, the upper layer believes that there
was a VLAN header that has been removed by the interface.
If the packet later leaves the host, the outgoing physical interface
can add the VLAN header in hardware if it supports VLAN_HWTAGGING.
If not, the implementation of Ethernet or bridge adds the VLAN header
in software.

Reviewed by:            zlei, tuexen

    [2 lines not shown]
DeltaFile
+16-12sys/net/if_epair.c
+19-1share/man/man4/epair.4
+35-132 files

HardenedBSD/src 33596d9sys/dev/dpaa2 dpaa2_ni.c

dpaa2: add support for several interface counters

Add support for IFCOUNTER_IPACKETS, IFCOUNTER_OPACKETS,
IFCOUNTER_OBYTES, IFCOUNTER_OMCASTS, IFCOUNTER_OERRORS, and
IFCOUNTER_OQDROPS.
This allows tools like systat to report the incoming and outgoing
bandwidth.

Reviewed by:            dsl, Timo Völker
MFC after:              1 week
Differential Revision:  https://reviews.freebsd.org/D54893
DeltaFile
+14-0sys/dev/dpaa2/dpaa2_ni.c
+14-01 files

HardenedBSD/src e6da1d2bin/sh sh.1, release/tools vmimage.subr

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+252-157sys/kern/sched_ule.c
+214-183sys/kern/sched_4bsd.c
+234-0sys/kern/sched_shim.c
+83-113release/tools/vmimage.subr
+182-9bin/sh/sh.1
+103-7sys/sys/sched.h
+1,068-46942 files not shown
+1,259-67248 files

HardenedBSD/src 03912e0share/man/man7 tuning.7, share/man/man9 intro.9

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+26-0share/man/man7/tuning.7
+19-2sys/kern/sched_4bsd.c
+8-8sys/powerpc/powermac/platform_powermac.c
+7-0tools/tools/nanobsd/embedded/common
+5-1share/mk/src.opts.mk
+1-3share/man/man9/intro.9
+66-145 files not shown
+74-1611 files

HardenedBSD/src 5051544lib/libc/net getnetbydns.c, sys/powerpc/aim moea64_native.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+90-9sys/powerpc/powermac/platform_powermac.c
+5-0sys/powerpc/aim/moea64_native.c
+3-0lib/libc/net/getnetbydns.c
+98-93 files

HardenedBSD/src 10a0132sys/powerpc/powermac platform_powermac.c

powerpc: explicitly cast the timebase printfs

This is causing compilation issues on powerpc:powerpc GENERIC.

(cherry picked from commit 03e4cc9fdeb2a6445f13cd41b471927a0f722fff)
DeltaFile
+8-8sys/powerpc/powermac/platform_powermac.c
+8-81 files

HardenedBSD/src 03e4cc9sys/powerpc/powermac platform_powermac.c

powerpc: explicitly cast the timebase printfs

This is causing compilation issues on powerpc:powerpc GENERIC.
DeltaFile
+8-8sys/powerpc/powermac/platform_powermac.c
+8-81 files

HardenedBSD/src 0a45c88sys/powerpc/aim moea64_native.c

powerpc: disable the TLBIE lock, it's not needed for POWER8

According to POWER8_UM_v1.3_16MAR2016 3.8.3 Translation Lookaside
Buffer (TLB), POWER8 supports lockless TLBIE operations.

Locally Tested:

* IBM POWER8 Revision 2.0, dual socket, 160 threads

Differential Revision:  https://reviews.freebsd.org/D54855
Approved by:    jhibbits

(cherry picked from commit 9a5baa9c585652fb7bd4ccd45d567204caf349f2)
DeltaFile
+5-0sys/powerpc/aim/moea64_native.c
+5-01 files

HardenedBSD/src b30d064sys/powerpc/powermac platform_powermac.c

powerpc: add a best-effort SMP time base sync for G5's that need it

There's no timebase freeze platform routine registered on my dual 2.3GHz
G5 PPC970FX Apple PowerMac.

For platforms without an explicit timebase freeze/unfreeze, we'll have to
make do with what we have - which for now is an explicit hand-crafted
spinlock/rendezvous method.

* For existing platforms, they'll still continue to clock freeze /
  rendezvous; albeit with some stronger atomic bits now (from jhibbits@.)
* Instead of the fallback being "no timesync", implement a
  best-effort one which does a similar rendezvous barrier between
  BSP and APs, but instead of freeze/unfreeze the first instruction
  after the CPUs all register they're ready is to set the timebase.

This has resulted in many reboots of my Powermac G5 dual-socket device
correctly starting and running in SMP mode.


    [4 lines not shown]
DeltaFile
+90-9sys/powerpc/powermac/platform_powermac.c
+90-91 files

HardenedBSD/src c443f5dshare/man/man9 intro.9

intro.9: grammar
DeltaFile
+1-1share/man/man9/intro.9
+1-11 files

HardenedBSD/src 7f537f4share/man/man9 intro.9

intro.9: deduplicate vm_page Xrs

PR:             292820
Submitted by:   Kraytonian
MFC after:      1 week
DeltaFile
+0-2share/man/man9/intro.9
+0-21 files

HardenedBSD/src f54f362tools/tools/nanobsd/embedded common

nanobsd: embedded: Stub out experimental functions

Stub out both experimental functions introduced in ecc039be7fdd when
doing embedded builds.

Fixes:          ecc039be7fdd ("nanobsd: Add a NO_ROOT build option")
MFC after:      3 days
DeltaFile
+7-0tools/tools/nanobsd/embedded/common
+7-01 files

HardenedBSD/src 2b22e05lib/libc/net getnetbydns.c

libc: Don't use uninitialised string for getnetbyaddr[_r](0) DNS lookup

If net is all-zero, the loop to extract all leading non-zero octets will
iterate zero times and leave nn with the value 4, which the following
switch statement to initialise qbuf does not handle. As a result,
_dns_getnetbyaddr will look up the PTR record for this uninitialised
string, which will leak the pre-existing contents of that stack memory
to the DNS resolver and, if remote and not otherwise protected, network.

Note that _dns_getnetbyaddr is only used if nsswitch.conf is configured
to enable the "dns" source for the "networks" database, which is not the
default configuration in FreeBSD.

For glibc this same bug, in code also derived from BIND's, was issued
CVE-2026-0915. This commit adopts the same behaviour as glibc's fix,
which is to regard a net of 0 as being for 0.0.0.0. Apparently NetBSD
will return NS_UNAVAIL instead, which may or may not make more sense,
but in general glibc compatibility tends to cause less friction when
there's not a good reason to avoid it.

    [7 lines not shown]
DeltaFile
+3-0lib/libc/net/getnetbydns.c
+3-01 files

HardenedBSD/src ba56760share/mk src.opts.mk

Revert "src.opts.mk: Enable LLDB by default globally"

This breaks the riscv64 build; clearly the version we have in-tree is
not new enough to work. That or our build system needs tweaking. Either
way, we're not ready for this, and enabling it without testing was
misguided.

This reverts commit c59a47dc6c016dff74466cecb160459980a5d782.
DeltaFile
+5-1share/mk/src.opts.mk
+5-11 files

HardenedBSD/src efc1cfacontrib/capsicum-test linux.cc capability-fd.cc, tests/sys/capsicum linux.cc capability-fd.cc

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+1,500-0tests/sys/capsicum/linux.cc
+0-1,500contrib/capsicum-test/linux.cc
+1,359-0tests/sys/capsicum/capability-fd.cc
+0-1,359contrib/capsicum-test/capability-fd.cc
+1,097-0tests/sys/capsicum/procdesc.cc
+0-1,097contrib/capsicum-test/procdesc.cc
+3,956-3,956134 files not shown
+11,872-10,021140 files

HardenedBSD/src fdcd67bsys/kern subr_firmware.c

firmware: Fix inverted FIRMWARE_GET_NOWARN logic

The try_binary_file() function has inverted logic for the
FIRMWARE_GET_NOWARN flag.  When the flag is set (meaning "don't warn"),
the code sets warn=true and makes noise anyway.

Invert the assignment to warn to correctly suppress warnings when
FIRMWARE_GET_NOWARN is set.

Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D54955
DeltaFile
+1-1sys/kern/subr_firmware.c
+1-11 files

HardenedBSD/src b249cb2sys/kern sched_4bsd.c kern_synch.c, sys/sys sched.h proc.h

SCHED_4BSD: maybe_resched() cannot schedule ast() for curthread

maybe_resched() needs to schedule TDA_SCHED for curthread, but this
requires taking curthread lock while owning some other thread lock.
To avoid introducing the order:
- Use a scheduler-private TDP flag.
- Register an unconditional TDA_SCHED_PRIV for 4BSD.
When an AST needs to be scheduled, i.e. the current thread must do
context switch in the return to userspace path, set the flag.
Then the ast handler calls ast_scheduler(), which gives the same
effect as scheduling TDA_AST.

The overhead is a single function call on each userspace return, for
4BSD case.

Reported and tested by: pho (previous version)
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54945
DeltaFile
+19-2sys/kern/sched_4bsd.c
+1-1sys/kern/kern_synch.c
+2-0sys/sys/sched.h
+1-0sys/sys/proc.h
+23-34 files

HardenedBSD/src 0730a05share/man/man7 tuning.7

tuning.7: document schedulers knobs

Reviewed by:    emaste, olce, ziaee
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54951
DeltaFile
+26-0share/man/man7/tuning.7
+26-01 files

HardenedBSD/src 06f75e5share/man/man5 src.conf.5

HBSD: Resolve final merge conflict

Regen src.conf.5.

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-12share/man/man5/src.conf.5
+0-121 files

HardenedBSD/src c0143barelease/tools azure.conf vagrant.conf

HBSD: Resolve merge conflicts for release configs

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-13release/tools/azure.conf
+0-10release/tools/vagrant.conf
+0-8release/tools/ec2.conf
+0-313 files

HardenedBSD/src a8dc88fsys/netinet6 in6_pcb.c

HBSD: Resolve merge conflict for sys/netinet6/in6_pcb.c

FreeBSD now defaults this same sysctl node as we do. Let's apply a diff
reduction and take their change.

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-8sys/netinet6/in6_pcb.c
+0-81 files

HardenedBSD/src 07e8b87bin/sh sh.1, release/tools vmimage.subr

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

Conflicts:
        release/tools/azure.conf (unresolved)
        release/tools/ec2.conf (unresolved)
        release/tools/vagrant.conf (unresolved)
        share/man/man5/src.conf.5 (unresolved)
        sys/netinet6/in6_pcb.c (unresolved)
DeltaFile
+252-157sys/kern/sched_ule.c
+195-181sys/kern/sched_4bsd.c
+234-0sys/kern/sched_shim.c
+83-113release/tools/vmimage.subr
+182-9bin/sh/sh.1
+101-7sys/sys/sched.h
+1,047-46734 files not shown
+1,201-62140 files

HardenedBSD/src 4b32fdbsys/compat/lindebugfs lindebugfs.c

lindebugfs: check that name is set as otherwise pfs_alloc_node_flags() panics

I have hit the case multiple times that some LinuxKPI field may not be
set during driver bringup and lindebugfs would cause a panic.
The backtrace goes like:

  strlen() at strlen+0x54
  pfs_create_dir() at pfs_create_dir+0x41
  debugfs_create_dir() at debugfs_create_dir+0xa1
  ...

While the problem is clearly in LinuxKPI or the driver, we likely
should at least add an assert to pfs_create_dir() if name is NULL
like we have for pfs_add_node() but for lindebugfs at least make
this a graceful error and continue without creating the dir instead
of panicing.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days

    [2 lines not shown]
DeltaFile
+3-0sys/compat/lindebugfs/lindebugfs.c
+3-01 files

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

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+8-4sys/compat/freebsd32/freebsd32_misc.c
+0-2sys/sys/ucred.h
+8-62 files

HardenedBSD/src e0c83ceshare/mk src.opts.mk

HBSD: Resolve merge conflict

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

HardenedBSD/src 3c86fddcontrib/capsicum-test linux.cc capability-fd.cc, tests/sys/capsicum linux.cc capability-fd.cc

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

Conflicts:
        share/mk/src.opts.mk (unresolved)
DeltaFile
+0-1,500contrib/capsicum-test/linux.cc
+1,500-0tests/sys/capsicum/linux.cc
+1,359-0tests/sys/capsicum/capability-fd.cc
+0-1,359contrib/capsicum-test/capability-fd.cc
+0-1,097contrib/capsicum-test/procdesc.cc
+1,097-0tests/sys/capsicum/procdesc.cc
+3,956-3,956134 files not shown
+11,875-10,015140 files

HardenedBSD/src ff870b7sys/kern sched_4bsd.c sched_shim.c

sched_shim: restore kern.ccpu sysctl

It is apparently should be considered part of the ABI, and is used by
the base top(1).  But do not declare the ccpu variable in headers, it is
needed only by 4bsd. So put the variable definition into sched_shim.c to
make the kernel buildable without SCHED_4BSD.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
DeltaFile
+6-4sys/kern/sched_4bsd.c
+4-0sys/kern/sched_shim.c
+10-42 files

HardenedBSD/src 377c053sys/amd64/amd64 cpu_switch.S, sys/arm/arm swtch-v6.S

cpu_switch(): unconditionally wait on the blocked mutex transient

It is nop for 4BSD.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
DeltaFile
+13-18sys/i386/i386/swtch.S
+1-6sys/arm/arm/swtch-v6.S
+0-5sys/amd64/amd64/cpu_switch.S
+1-2sys/powerpc/powerpc/swtch32.S
+1-2sys/powerpc/powerpc/swtch64.S
+1-2sys/riscv/riscv/swtch.S
+17-351 files not shown
+18-377 files