HardenedBSD/src 0f908da — sys/powerpc/include atomic.h

powerpc: Define the sub-word atomic load and store directly

All currently supported powerpc CPUs handle single-copy atomicity for
any size up to the native word size, so load and store operations are
guaranteed for sub-word size that are naturally aligned.
DeltaFile
+6-0sys/powerpc/include/atomic.h
+6-01 files

HardenedBSD/src 934ffa4 — sys/powerpc/powerpc elf64_machdep.c

powerpc64: Don't ignore lookup errors in kernel linker

If a lookup fails for a R_PPC_JMP_SLOT (PLT relocation) ignoring errors
results in an address of 0 gets written into the jump slot, leading to a
NULL pointer jump when attempting to call the function it points to.
Fix this with proper error checking so that a module will fail to load
instead of crashing later on.
DeltaFile
+3-1sys/powerpc/powerpc/elf64_machdep.c
+3-11 files

HardenedBSD/src 68ba58a — sbin/camcontrol nvres.c

camcontrol: Fix -Wcast-align errors in the NVMe reservation report

Casting the byte buffer that holds the Reservation Report payload to
the status structures trips -Wcast-align on strict-alignment
architectures, which broke the CI builds there.  Put the buffer in a
union with the two status structures instead, so it is properly
aligned and no casts are needed.

Reported by:    FreeBSD CI
Fixes:  ba75cf05727e ("camcontrol: Support NVMe reservations via the persist subcommand")
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
MFC after:      1 week
Sponsored by:   Spectra Logic
DeltaFile
+11-7sbin/camcontrol/nvres.c
+11-71 files

HardenedBSD/src c17aa09 — usr.sbin/camdd camdd.c

camdd: Fix the worker startup race

The reader can hand off its first buffer before the writer sets
CAMDD_DEV_FLAG_ACTIVE.  camdd_queue_peer_buf() then mistakes the writer
for an exited peer and releases the buffer instead of queueing it.  This
can make a copy fail with bytes read but nothing written, without an
error message.

Mark both devices active before creating either worker, leaving the
workers to clear the flag on exit.  The work queues and EVFILT_USER
events are already initialized, so queued buffers and their notification
can wait for the writer to start without a startup barrier.

Treat pthread_create() failure as fatal.  Returning through the normal
cleanup path can free devices that an already-started worker is still
using, and an unstarted peer cannot consume any queued buffers.

Reviewed by:    imp, markj, ken
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D61277
DeltaFile
+9-6usr.sbin/camdd/camdd.c
+9-61 files

HardenedBSD/src 80f0901 — sbin/camcontrol Makefile camcontrol.h

camcontrol: Support NVMe namespace formatting via the format subcommand

Support formatting NVMe namespaces through the existing format
subcommand.  The format subcommand now dispatches on the device
protocol, in the same way the identify and persist subcommands do,
and issues the NVMe FORMAT NVM command for NVMe devices.

The SCSI syntax and behavior are unchanged.  The NVMe-specific
options are -e (secure erase setting), -G (format all namespaces),
-f (LBA format), -l (protection information location), -m (metadata
setting) and -p (protection information type).  The -q and -y options
work for both protocols; NVMe formats gain the same confirmation
question that SCSI formats have always had.  The -r and -w options
are SCSI only; -r returns an error for NVMe devices and -w has no
effect, since the NVMe format command does not complete until the
format is finished.

The default timeout for NVMe is 30 seconds for a cryptographic erase
and 30 minutes otherwise; the generic -t option overrides it.

    [23 lines not shown]
DeltaFile
+313-0sbin/camcontrol/nvformat.c
+114-1sbin/camcontrol/camcontrol.8
+30-8sbin/camcontrol/camcontrol.c
+3-0sbin/camcontrol/camcontrol.h
+1-1sbin/camcontrol/Makefile
+461-105 files

HardenedBSD/src 6eae951 — sbin/camcontrol Makefile camcontrol.h

camcontrol: Add a feature subcommand for NVMe Get/Set Features

Add a feature subcommand for the NVMe Get Features and Set Features
commands:

  camcontrol feature ndaX -a <get|set> -f feature [-d data]
      [-s num] [-U]

There is no transport-specific prefix in the name: SCSI has no
feature command (the closest equivalents are mode pages), and the
ATA SET FEATURES subcommands are already exposed through dedicated
camcontrol subcommands (apm, aam, epc and the power commands), so
the name is unclaimed.  The subcommand returns an error for
non-NVMe devices.

Currently, only the hostid feature is fully implemented.  The
hostid value for set is specified with -d as a UUID or an integer
in decimal, hex, or octal, and -U outputs the hostid as a UUID on
get.

    [36 lines not shown]
DeltaFile
+539-0sbin/camcontrol/nvfeature.c
+182-0sbin/camcontrol/camcontrol.8
+32-1sbin/camcontrol/camcontrol.c
+3-0sbin/camcontrol/camcontrol.h
+1-1sbin/camcontrol/Makefile
+757-25 files

HardenedBSD/src 961fa19 — sbin/camcontrol camcontrol.h camcontrol.8

camcontrol: Add support for NVMe namespace Identify

Add a -N argument to camcontrol identify.  This will fetch and
display namespace Identify data for NVMe drives, using
nvme_print_namespace() from nvmecontrol(8).

This gets the namespace Identify data via XPT_DEV_ADVINFO (i.e.
data cached in the kernel) like the standard NVMe identify command
does, and so works even on NVMe devices that do not support NVMe
Namespace Management.

sbin/camcontrol/camcontrol.c:
        Add a -N argument to camcontrol identify.

        Rename nvme_get_cdata() to nvme_get_data(), and give it the
        ability to fetch controller or namespace Identify data.
        While here, improve its error reporting with
        cam_error_print(), and only look at the CAM status bits of
        the returned CCB.

    [22 lines not shown]
DeltaFile
+87-26sbin/camcontrol/camcontrol.c
+12-2sbin/camcontrol/camcontrol.8
+2-0sbin/camcontrol/camcontrol.h
+101-283 files

HardenedBSD/src ba75cf0 — sbin/camcontrol Makefile camcontrol.h

camcontrol: Support NVMe reservations via the persist subcommand

The NVMe reservation model is closely patterned after SCSI Persistent
Reservations, so support NVMe devices through the existing persist
subcommand rather than adding a transport-specific subcommand.  The
persist subcommand now dispatches on the device protocol, in the same
way the identify subcommand does.

The SCSI syntax is unchanged.  For NVMe devices, the -i modes all map
to the Reservation Report command (read_full_status requests the
extended data structure, which contains 128-bit Host Identifiers), and
the -o service actions map to the corresponding NVMe reservation
operations: register, register_ignore, reserve, preempt,
preempt_abort, release and clear, plus two NVMe-only actions,
unregister and replace.  The reservation type names for -T are shared
between SCSI and NVMe.  A new -c option gives explicit control over
the NVMe Persist Through Power Loss State; -p is equivalent to
-c enable.  SCSI-only options return an error for NVMe devices.


    [32 lines not shown]
DeltaFile
+674-0sbin/camcontrol/nvres.c
+107-7sbin/camcontrol/camcontrol.8
+23-9sbin/camcontrol/camcontrol.c
+3-0sbin/camcontrol/camcontrol.h
+1-1sbin/camcontrol/Makefile
+808-175 files

HardenedBSD/src 9814633 — sys/cam/nvme nvme_all.h nvme_all.c

cam: Add NVMe reservation, format and features CCB building functions

Add NVMe CCB (union ccb / struct ccb_nvmeio) building functions for
the four NVMe reservation opcodes, Format NVM, and Get Features /
Set Features.  These use the nvme_command building blocks added to
sys/dev/nvme/nvme.h, and are used by the new camcontrol(8) nvres,
nvformat and nvfeature subcommands that will be added separately.

sys/cam/nvme/nvme_all.c:
        Add NVMe CCB building functions for the four NVMe reservation
        opcodes: nvme_resv_report(), nvme_resv_register(),
        nvme_resv_acquire() and nvme_resv_release().  Data direction
        is set internally (CAM_DIR_IN or CAM_DIR_OUT as appropriate),
        so no flags parameter is needed.

        Add a new nvme_format() CCB building function.

        Add nvme_get_feature() and nvme_set_feature() CCB building
        functions, along with nvme_get_feature_hostid() and

    [16 lines not shown]
DeltaFile
+201-0sys/cam/nvme/nvme_all.c
+41-0sys/cam/nvme/nvme_all.h
+242-02 files

HardenedBSD/src 7a9e437 — sbin/nvmecontrol resv.c, sys/dev/nvme nvme_util.c nvme_ctrlr.c

nvme: Add reservation, format and features command building support

Add command (struct nvme_command) building functions for the four
NVMe reservation opcodes (Report, Register, Acquire and Release),
Format NVM, and Get Features / Set Features, along with the
enumerations and data structures that go with them.  These are
shared between the kernel and userland, and are the underpinnings
for new camcontrol(8) subcommands (nvres, nvformat, nvfeature) that
will be added separately.

The reservation type names are intentionally similar to the SCSI
names for the same reservation types.

sys/dev/nvme/nvme.h:
  Add NVMe command building functions for the four NVMe
  reservation opcodes: nvme_ns_resv_report_cmd(),
  nvme_ns_resv_register_cmd(), nvme_ns_resv_acquire_cmd() and
  nvme_ns_resv_release_cmd().


    [68 lines not shown]
DeltaFile
+176-10sys/dev/nvme/nvme.h
+15-22sys/dev/nvme/nvme_ctrlr_cmd.c
+8-9sys/dev/nvme/nvme_ctrlr.c
+15-0sys/dev/nvme/nvme_util.c
+5-4sbin/nvmecontrol/resv.c
+219-455 files

HardenedBSD/src 46198fb — sbin/nvmecontrol nvmecontrol.h nvmecontrol_ext.h

nvmecontrol: Factor out namespace Identify printing

Move print_namespace() from identify.c to identify_ext.c and rename
it to nvme_print_namespace(), to match nvme_print_controller().
This allows other consumers (notably camcontrol(8)) to print NVMe
namespace Identify data.

No functional changes intended.

sbin/nvmecontrol/identify.c:
        Remove print_namespace(), and call nvme_print_namespace()
        instead.

sbin/nvmecontrol/identify_ext.c:
        Add nvme_print_namespace(), moved here from identify.c.

sbin/nvmecontrol/nvmecontrol.h:
        Remove the print_namespace() prototype.


    [12 lines not shown]
DeltaFile
+1-128sbin/nvmecontrol/identify.c
+127-0sbin/nvmecontrol/identify_ext.c
+2-1sbin/nvmecontrol/ns.c
+0-1sbin/nvmecontrol/nvmecontrol.h
+1-0sbin/nvmecontrol/nvmecontrol_ext.h
+131-1305 files

HardenedBSD/src 4398c46 — contrib/bc/vs bcl.vcxproj.filters bc.vcxproj.filters, contrib/bc/vs/tests tests_bc.bat

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+0-301contrib/bc/vs/bc.vcxproj
+0-264contrib/bc/vs/bcl.vcxproj
+247-0sbin/dhclient/tests/functional.py
+0-170contrib/bc/vs/bc.vcxproj.filters
+0-104contrib/bc/vs/tests/tests_bc.bat
+0-87contrib/bc/vs/bcl.vcxproj.filters
+247-92624 files not shown
+443-1,20130 files

HardenedBSD/src 9dae9b3 — lib/libthr/thread thr_exit.c

libthr: require both _Unwind_ForcedUnwind and _Unwind_GetCFA for !PIC

Static linking must bring in both symbols for the unwind to work.

The landing pads added by 2734bbbcba3c reference _Unwind_Resume and
__gcc_personality_v0. In a static link, these pull UnwindLevel1.o
from libgcc_eh.a, which also defines _Unwind_ForcedUnwind, but
not UnwindLevel1-gcc-ext.o, which defines _Unwind_GetCFA. Unless
something else pulls that object in, as libcxxrt does for C++ programs,
thread_unwind_stop() calls a NULL _Unwind_GetCFA on every thread exit.

Reported and tested by: dch
Fixes:  2734bbbcba3c ("libthr: Create landing pad in thr_once in C++ exception")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1lib/libthr/thread/thr_exit.c
+1-11 files

HardenedBSD/src c3a0593 — share/man/man4 iscsi.4, sys/dev/iscsi iscsi.c

Revert "iSCSI: Fast and per-session timeouts"

This reverts commit 6129bc4b65d8f00570bdcf2b2d36f3717e4b4741.
DeltaFile
+18-35sys/dev/iscsi/iscsi.c
+2-23usr.bin/iscsictl/parse.y
+6-8usr.bin/iscsictl/iscsictl.c
+2-6usr.sbin/iscsid/iscsid.c
+3-4share/man/man4/iscsi.4
+3-3usr.bin/iscsictl/iscsi.conf.5
+34-792 files not shown
+34-828 files

HardenedBSD/src b556d9c — share/man/man7 ports.7

ports.7: Add the DEVELOPER make variable

make.conf(5) says make variables that are for the ports tree should
be documented in ports(7). Add this from the porters handbook.

MFC after:              3 days
Reviewed by:            alven
Event:                  FreeBSD 2026 Vendor Summit
Differential Revision:  https://reviews.freebsd.org/D61272
DeltaFile
+4-1share/man/man7/ports.7
+4-11 files

HardenedBSD/src 5b5f93f — contrib/bc/vs bcl.vcxproj.filters bc.vcxproj.filters, contrib/bc/vs/tests tests_dc.bat tests_bc.bat

contrib/bc: remove vs sub-directory

Some of the files in the vs sub-directory are checked out with  CRLF
line breaks via .getattributes. This causes issues when checking out
the source tree with other tools that operate on Git repositories like
"got". Remove the vs sub-directory from the contrib tree, since it is
not required on FreeBSD.

(cherry picked from commit 94d4ba04a96f495d635bf246e4d5021eb1faab22)
DeltaFile
+0-301contrib/bc/vs/bc.vcxproj
+0-264contrib/bc/vs/bcl.vcxproj
+0-170contrib/bc/vs/bc.vcxproj.filters
+0-104contrib/bc/vs/tests/tests_bc.bat
+0-87contrib/bc/vs/bcl.vcxproj.filters
+0-61contrib/bc/vs/tests/tests_dc.bat
+0-9873 files not shown
+1-1,0559 files

HardenedBSD/src 6129bc4 — share/man/man4 iscsi.4, sys/dev/iscsi iscsi.c

iSCSI: Fast and per-session timeouts

Support per-session configurable ping (SCSI NOP) and login timeouts
similar to what is supported in the Linux iSCSI initiator configuration file.

Reduce iscsi timer granularity to 0.1 sec.
For backwards compatibility, when all timers are selected on integer numbers,
all status messages are unchanged. If the higher granularity is used, the
log messages include sub-second granularity.

The sysctl(3) interface has changed from pure int to string, in order to
support fractional seconds in a human-readable, dotted notation.

Reviewed By: #netapp, #manpages, jhb, pauamma_chezdork.com, siderop1_netapp.com
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D32540
DeltaFile
+35-18sys/dev/iscsi/iscsi.c
+23-2usr.bin/iscsictl/parse.y
+8-6usr.bin/iscsictl/iscsictl.c
+6-2usr.sbin/iscsid/iscsid.c
+4-3share/man/man4/iscsi.4
+3-3usr.bin/iscsictl/iscsi.conf.5
+79-342 files not shown
+82-348 files

HardenedBSD/src e0c6b88 — sys/dev/irdma irdma_utils.c irdma_cm.c

irdma: improve TCP header validation

iWARP handling code deals with TCP header processing outside of the normal TCP stack.
Add validation checks to verify the internal integrity of the TCP headers.

Reviewed By: tuexen, O11 Intel Networking group, #transport, bartosz.sobczak_intel.com
Sponsored by: NetApp, Inc.
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D58323
DeltaFile
+20-2sys/dev/irdma/irdma_cm.c
+13-0sys/dev/irdma/irdma_utils.c
+33-22 files

HardenedBSD/src b3eec38 — sys/dev/sdhci sdhci_pci.c

sdhci_pci: Add Intel Sunrise Point-LP SDXC controller

Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR:             300175
Reviewed by:    imp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D60973

(cherry picked from commit 584f44221f45c5c26ec2a2888a3815c6f34bfad0)
DeltaFile
+2-0sys/dev/sdhci/sdhci_pci.c
+2-01 files

HardenedBSD/src d0666b1 — usr.bin/uname uname.1

uname.1: Document which flags are non-POSIX

MFC after:              3 days
Reviewed by:            ziaee
Differential Revision:  https://reviews.freebsd.org/D58476
DeltaFile
+11-1usr.bin/uname/uname.1
+11-11 files

HardenedBSD/src f3b6bb1 — secure/lib/libcrypto Makefile compat.c

openssl: restore removed libcrypto symbols as compat symbols

c01c0a27cb82 (D60397) stopped exporting 52 names from libcrypto.so.35 that
upstream does not export.  Binaries and libraries linked against the
earlier libcrypto.so.35 can still import them; the libssl.so.35 from
15.0 and 15.1 imports 15 of them, so it fails to load with the new
libcrypto.

Provide all 52 again as non-default (compat) versions, in the version
nodes they had before: OPENSSL_cpuid_setup at OPENSSL_3_0_9, the others
@OPENSSL_3_5_0.  Existing consumers resolve them; new links cannot bind
to them.  The default exports do not change and still match upstream.

The wrappers live in a new FreeBSD-only file, compat.c.  Remove it at
the next SHLIB_MAJOR bump.

Reviewed by:            ngie
Fixes:                  c01c0a27cb82 ("openssl: make libcrypto export the same symbols as upstream")
MFC after:              2 weeks

    [3 lines not shown]
DeltaFile
+425-0secure/lib/libcrypto/compat.c
+9-0secure/lib/libcrypto/Makefile
+434-02 files

HardenedBSD/src 46453f0 — secure/lib/libcrypto/modules Makefile.inc, secure/lib/libcrypto/modules/legacy Version.map Makefile

openssl: build legacy provider as upstream does

- Build with libcrypto's compile flags: modules/Makefile.inc now
  includes libcrypto's Makefile.inc, which brings in Makefile.common
  (NDEBUG, the asm dispatch defines, OPENSSL_PIC, the directory
  defines).  Before this change, assertions were enabled in legacy.so.
- Use upstream's per-architecture source list: the provider's own CPU
  capability code (cpuid asm and armcap.c/ppccap.c, or mem_clr.c
  without asm), and the MD5, RC4 and DES asm where upstream uses it.
  The provider no longer uses libcrypto's exported RC4, SHA1 and
  CRYPTO_*128 functions.
- Drop the objects that upstream's linker leaves out of legacy.so
  (fcrypt_b.c, md5_one.c, md5_sha1.c, provider_err.c and
  ciphercommon_{ccm,gcm}*.c / ciphercommon_hw.c).  Without them,
  params_idx.c is not needed either.
- Add a version script, a copy of upstream's providers/legacy.ld, so
  that only OSSL_provider_init is exported.  Around 209 symbols were
  exported before.


    [5 lines not shown]
DeltaFile
+49-18secure/lib/libcrypto/modules/legacy/Makefile
+3-9secure/lib/libcrypto/modules/Makefile.inc
+5-0secure/lib/libcrypto/modules/legacy/Version.map
+57-273 files

HardenedBSD/src 6242117 — sys/amd64/amd64 machdep.c, sys/arm64/arm64 pmap.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+310-0tests/sys/cpuctl/cpuctl_ibs_stray_nmi_test.c
+107-50sys/security/audit/audit_syscalls.c
+88-39sys/arm64/arm64/pmap.c
+56-0sys/x86/x86/cpu_machdep.c
+40-3sys/dev/cpuctl/cpuctl.c
+22-3sys/amd64/amd64/machdep.c
+623-9518 files not shown
+718-12024 files

HardenedBSD/src f67af87 — sys/amd64/amd64 machdep.c, sys/arm64/arm64 pmap.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+310-0tests/sys/cpuctl/cpuctl_ibs_stray_nmi_test.c
+107-50sys/security/audit/audit_syscalls.c
+88-39sys/arm64/arm64/pmap.c
+56-0sys/x86/x86/cpu_machdep.c
+40-3sys/dev/cpuctl/cpuctl.c
+22-3sys/amd64/amd64/machdep.c
+623-9518 files not shown
+718-12024 files

HardenedBSD/src 40371e5 — cddl/contrib/opensolaris/tools/ctf/cvt ctfconvert.c

ctfconvert: Make the absence of debug info non-fatal

When compiled with gcc14, subr_ticks.o legitimately doesn't contain any
DWARF sections.  Just emit a warning in this case.  In general we still
want to run ctfconvert on asm files.

Reviewed by:    emaste, des
Fixes:          e959f2a7d8a8 ("ctf*: exit with error upon terminate()")
Differential Revision:  https://reviews.freebsd.org/D61231
DeltaFile
+7-2cddl/contrib/opensolaris/tools/ctf/cvt/ctfconvert.c
+7-21 files

HardenedBSD/src 8fb539b — sys/amd64/vmm x86.h x86.c

amd64/vmm: Don't advertise AMD PerfMonV2 or performance counters

vmm does not handle CPUID leaf 0x80000022, so a FreeBSD guest on a
Family 19h or later host panics on "kldload hwpmc", which trusts the
PerfMonV2 bit and writes AMD_PMC_GLOBAL_CTL.

Tested by:      Osvaldo Janeri Filho <ojanerif at amd.com>
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Reviewed by:    markj, kib
Differential Revision:  https://reviews.freebsd.org/D61141
DeltaFile
+11-0sys/amd64/vmm/x86.c
+1-0sys/amd64/vmm/x86.h
+12-02 files

HardenedBSD/src 0efaebd — sys/dev/hwpmc hwpmc_amd.c

hwpmc: Decline the AMD PerfMonV2 path when GLOBAL_CTL is absent

The v2 path writes AMD_PMC_GLOBAL_CTL whenever the PerfMonV2 CPUID bit
is set. bhyve passes that bit through from the host but does not emulate
the register, so loading hwpmc in a guest on a Family 19h or later host
panics the kernel.

amd_v2_hwcheck_cpu() already probes EVSEL MSRs, so probe GLOBAL_CTL
there too, in order to reject the v2 path and fall back to the generic
CPU class.

Fixes:          9d3064010590 ("hwpmc_amd: add PerfMonV2 global-control path")
Tested by:      Osvaldo Janeri Filho <ojanerif at amd.com>
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Reviewed by:    mhorne, afscoelho at gmail.com
Differential Revision:  https://reviews.freebsd.org/D61133
DeltaFile
+17-3sys/dev/hwpmc/hwpmc_amd.c
+17-31 files

HardenedBSD/src 0a8afdf — sbin/dhclient/tests Makefile functional.py

dhclient: Add some regression tests

Add tests for some recently fixed bugs in dhclient.  All of these tests
set up two VNET jails connected by an epair.  dhclient runs in one jail,
and the test code runs on the other end.  It uses scapy to inject
"interesting" packets in response to DHCPDISCOVER messages from
dhclient, then checks the configured interface and lease file.

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60485

(cherry picked from commit a143197801c680b958ab662c88cf086668a1958b)
DeltaFile
+242-0sbin/dhclient/tests/functional.py
+2-0sbin/dhclient/tests/Makefile
+244-02 files

HardenedBSD/src 077a583 — usr.sbin/bhyve pci_virtio_input.c

bhyve: Fix virtio-input event array resizing

Use the new array size when calling realloc().  Note that this queue
stores events read from a host evdev device, i.e., it is not
guest-controlled.

While here, use the cdefs.h __unused macro and use them correctly, i.e.,
don't mark "arg" as unused when it isn't.

Reported by:    Brian Delgado from Intel using Anthropic Opus 4.8
Fixes:          054accac71e0 ("Add a virtio-input device emulation.")
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60679

(cherry picked from commit f1986e5b88630b1404a202251499bca0f97f5f06)
DeltaFile
+7-13usr.sbin/bhyve/pci_virtio_input.c
+7-131 files

HardenedBSD/src 149cebf — sys/kern kern_malloc.c

malloc: Fix realloc() for large allocations

min() truncates its parameters.

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit ca16e7a4920415bf9d09cf76bd2c3cda7447c098)
DeltaFile
+2-2sys/kern/kern_malloc.c
+2-21 files