FreeBSD/src c80cc23 — sys/contrib/openzfs/include/sys ddt.h, sys/contrib/openzfs/module/zfs zio.c ddt.c

ddt: select traditional phys by block identity, not BP DVA count

The write path stores a traditional DDT entry in the phys slot chosen
by the zp_copies value the block was written with, but the free-path
lookup validation (ddt_entry_lookup_is_valid()) selected the slot to
compare by the BP's physical DVA count, and ddt_addref() bumped the
refcount of that same wrongly-selected slot.

The two indexes diverge whenever a deduplicated block's BP carries
more DVAs than its copies value, which is exactly what ganging does:
a gang header is stored in more copies than the data it gangs, so
copies=1 blocks get a two-DVA gang header BP (unconditionally
through 2.3.3, and under the default redundant_metadata=all since
a46ce73ca8 made it configurable in 2.3.4 and 9250403ba6 in 2.4.0),
and from 2.3.4 that default also gives unencrypted copies=2 blocks a
three-DVA header BP. Encryption does not avoid the mismatch at
copies=1: the header BP still carries two counted DVAs (the salt/IV
DVA is separate). For such a block the validation checked
the wrong slot, concluded the entry had been pruned, and

    [56 lines not shown]
DeltaFile
+177-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/dedup/dedup_legacy_gang.ksh
+30-35sys/contrib/openzfs/module/zfs/ddt.c
+21-7sys/contrib/openzfs/module/zfs/zio.c
+6-3sys/contrib/openzfs/include/sys/ddt.h
+4-0sys/contrib/openzfs/tests/runfiles/linux.run
+1-0sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
+239-456 files

FreeBSD/src b65f638 — release/tools ec2-desktop.conf

EC2: Explicitly block root login via RDP

Approved by:    re (cperciva)
MFC after:      0 days
Security:       GHSA-3rww-h298-82rx
Sponsored by:   Amazon

(cherry picked from commit 2112d90be7a855d4c9f598409850d54583089de2)
(cherry picked from commit ae6b73db4ff63e3dadfc397972e57714f0fc3552)
DeltaFile
+3-0release/tools/ec2-desktop.conf
+3-01 files

FreeBSD/src 059107e — release/tools gce.conf

GCE: Switch to using kvmclock timecounter on GCE VMs

Currently, GCE VMs are configured to use the "ACPI-safe" timecounter,
which does not exist on modern VM hardware. The system then falls back
to TSC-low because it has a higher quality rating than kvmclock.
However, TSC-low may report incorrect time after a VM migrates to a
different host system.

Instruct GCE VMs to use the kvmclock timecounter so that timekeeping
remains accurate across live migrations.

Approved by:    re (cperciva)
Reported by:    delphij
Reviewed by:    delphij
Approved by:    delphij (mentor)
Approved by:    re (cperciva)
Differential Revision:  https://reviews.freebsd.org/D62121

(cherry picked from commit 141e74291075785c7898763d33288b7fd8b9f06d)
(cherry picked from commit a61ec24c11d052ecbe5cfb9d5bfd11e18d352139)
DeltaFile
+1-1release/tools/gce.conf
+1-11 files

FreeBSD/src 86eb741 — sys/contrib/zlib gzwrite.c inflate.c

MFC: MFV: zlib 1.4

Approved by:    re (cperciva)

(cherry picked from commit 724bb39e83e369209d8e42a52370684b82e26350)
(cherry picked from commit a0e97829173660733f28a510ea35dbc7aa3d766e)
DeltaFile
+100-41sys/contrib/zlib/gzread.c
+73-37sys/contrib/zlib/deflate.c
+44-33sys/contrib/zlib/zlib.h
+37-37sys/contrib/zlib/gzlib.c
+43-13sys/contrib/zlib/inflate.c
+40-8sys/contrib/zlib/gzwrite.c
+337-16917 files not shown
+452-19723 files

FreeBSD/src c96b480 — sys/contrib/zstd/lib zstd.h, sys/contrib/zstd/lib/compress zstd_compress.c

MFV: zstd 1.6.0

Approved by:    re (cperciva)
Security:       CVE-2026-124851
MFC after:      3 days

(cherry picked from commit 0412a4034e277629245c8bd87978680216bb06b5)
(cherry picked from commit 4e033451cba2795a152d17caed8b88d71db28012)
DeltaFile
+775-214sys/contrib/zstd/lib/compress/zstd_compress.c
+713-235sys/contrib/zstd/programs/fileio.c
+439-105sys/contrib/zstd/programs/util.c
+5-364sys/contrib/zstd/lib/legacy/zstd_v02.c
+209-112sys/contrib/zstd/lib/zstd.h
+253-65sys/contrib/zstd/programs/zstd.1
+2,394-1,09577 files not shown
+4,703-2,09683 files

FreeBSD/src 43d4a4b — stand loader.mk defs.mk, stand/efi/loader Makefile

loader: Add defines for ZLIB_CFLAGS, BZIP2_CFLAGS and ZSTD_CFLAGS

These are scattered in several places, so centralize the setting of
these flags.

Approved by:    re (cperciva)
Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57861

(cherry picked from commit 53811ed6237972f92a80627ea2c17ece212315a7)
(cherry picked from commit eca31f2d9e6ec5b1ed6abf89584b962d58601f16)
DeltaFile
+9-0stand/defs.mk
+1-2stand/libsa/Makefile
+2-1stand/efi/loader/Makefile
+1-1stand/uboot/Makefile
+1-1stand/loader.mk
+1-1stand/i386/loader/Makefile
+15-63 files not shown
+18-99 files

FreeBSD/src c932de9 — sys/powerpc/aim mmu_radix.c mmu_oea64.h

powerpc64: Fix disappearing low memory on radix MMU systems (POWER9)

The FreeBSD radix implementation piggybacks on the physical memory
allocation function from the HPT implementation, but did not share
the same state information for number of physical memory ranges.
This led to a situation where the HPT physical memory allocator
would attempt to shift the physical memory ranges in the shared
range table, but would use the wrong number of entries, thus
overwriting the large segment of low memory that should have been
available for e.g. 32-bit DMA.

Incorrect physical memory map:

real memory  = 33997058048 (32422 MB)
available KVA = 34359619583 (32767 MB)
Physical memory chunk(s):
0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages)
0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages)
0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages)

    [30 lines not shown]
DeltaFile
+2-1sys/powerpc/aim/mmu_oea64.c
+0-1sys/powerpc/aim/mmu_radix.c
+1-0sys/powerpc/aim/mmu_oea64.h
+3-23 files

FreeBSD/src ebaa1f1 — sys/dev/acpica/Osd OsdDebug.c

acpi: OsdDebug.c: Include 'acdebug.h' on ACPI_DEBUGGER

On ACPI_DEBUGGER (defined by 'acfreebsd.h' on ACPI_DEBUG_OUTPUT and DDB
defined), OsdDebug.c defines acpi_EnterDebugger() which uses
AcpiDbUserCommands().  Include 'acdebug.h' to provide a declaration for
it.

Reported by:    llm-postcr
Fixes:          d6fd89254a91 ("acpi: acpivar.h: Include ACPICA's acpi.h, remove the latter in consumers")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+4-0sys/dev/acpica/Osd/OsdDebug.c
+4-01 files

FreeBSD/src 43c2e0f — sys/dev/acpica acpivar.h

acpi: acpivar.h: Include 'accommon.h' on ACPI_DEBUG_OUTPUT

ACPICA's public interface ('acpi.h') exports debug macros like
ACPI_FUNCTION_TRACE(), return_VOID, return_*(), and a lot of our
implementation files use them.  Unfortunately, on ACPI_DEBUG_OUTPUT,
they expand to calls to functions (such as AcpiUtTrace(), AcpiUtExit(),
etc.) that are declared only in 'acutils.h', which is to be included via
'accommon.h', the header to use for ACPICA internals, breaking the
compilation if not included.

Include 'accommon.h' from <dev/acpica/acpivar.h> on ACPI_DEBUG_OUTPUT.

Reported by:    llm-postcr
Fixes:          d6fd89254a91 ("acpi: acpivar.h: Include ACPICA's acpi.h, remove the latter in consumers")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+8-0sys/dev/acpica/acpivar.h
+8-01 files

FreeBSD/src d93bcb6 — sys/dev/ixgbe if_sriov.c

ixgbe: Restore broadcast and VF-to-PF unicast reception with SR-IOV

Enable broadcast and untagged reception in the PF pool. With VMDq
replication enabled, the global broadcast setting alone does not deliver
LAN ARP requests to the PF when a VF also accepts them.

Hardware initialization clears the RAR[0] pool selection. Program the
PF MAC and pool together after reset so the internal switch can deliver
VF unicast to the PF. This follows the VMDq initialization sequence in
section 4.6.10.1.1 of the Intel X550 datasheet.

Based on FreeBSD Bugzilla attachments 277574 and 277575.

PR:             301018, 301019
Reviewed by:    kgalazka
MFC after:      1 week
Sponsored by:   BBOX.io

Co-authored-by: Kevin Bowling <kbowling at FreeBSD.org>
DeltaFile
+12-1sys/dev/ixgbe/if_sriov.c
+12-11 files

FreeBSD/src e601eb9 — sys/netpfil/ipfw ip_fw_nat.c, tests/sys/netpfil/ipfw Makefile nat44_config.c

ipfw_nat: check spool entries in NAT44 config requests

nat44_cfg() only checked that the redirs of an IP_FW_NAT44_XCONFIG
request fit into it, not the spool (LSNAT) entries that follow each
redir.  add_redir_spool_cfg() then walked up to 65535 spool entries
per redir past the end of the request buffer and stored what it read
as LSNAT servers, which IP_FW_NAT44_XGETCONFIG later copied out to
the caller.  The request needs PRIV_NETINET_IPFW, which root in a
VNET jail has.

Add nat44_check_cfg(), which walks all redirs and their spool entries
and rejects a request that does not hold them, and call it before the
instance is touched.  This also replaces the redir_cnt multiplication,
which could wrap on 32-bit platforms.

Do the same in the legacy IP_FW_NAT_CFG path, which does not convert
spool entries at all, and make its redir_cnt check overflow-safe.
That path is no longer reachable on main, but it is on stable/14.


    [15 lines not shown]
DeltaFile
+336-0tests/sys/netpfil/ipfw/nat44_config.c
+47-3sys/netpfil/ipfw/ip_fw_nat.c
+2-0tests/sys/netpfil/ipfw/Makefile
+385-33 files

FreeBSD/src f74e018 — sys/dev/hwpmc hwpmc_mod.c hwpmc_logging.c

hwpmc: Size and walk per-CPU state by CPU ID

pm_pcpu_state is indexed by CPU ID but sized by mp_ncpus, and the log
code walks CPUs 0 to mp_ncpus - 1.  CPU IDs can have holes, for example
on riscv when a hart fails to start, so the array is too short and the
loops bind to an absent CPU and skip the last ones.

Size the array with pmc_cpu_max() and walk with CPU_FOREACH().

Reviewed by:    mhorne
MFC after:      3 days
Sponsored by:   Advanced Micro Devices, Inc.
Signed-off-by:  Osvaldo Janeri Filho <ojanerif at amd.com>
Differential Revision:  https://reviews.freebsd.org/D62377
DeltaFile
+4-3sys/dev/hwpmc/hwpmc_logging.c
+2-2sys/dev/hwpmc/hwpmc_mod.c
+6-52 files

FreeBSD/src a61ec24 — release/tools gce.conf

GCE: Switch to using kvmclock timecounter on GCE VMs

Currently, GCE VMs are configured to use the "ACPI-safe" timecounter,
which does not exist on modern VM hardware. The system then falls back
to TSC-low because it has a higher quality rating than kvmclock.
However, TSC-low may report incorrect time after a VM migrates to a
different host system.

Instruct GCE VMs to use the kvmclock timecounter so that timekeeping
remains accurate across live migrations.

Reported by:    delphij
Reviewed by:    delphij
Approved by:    delphij (mentor)
Approved by:    re (cperciva)
Differential Revision:  https://reviews.freebsd.org/D62121

(cherry picked from commit 141e74291075785c7898763d33288b7fd8b9f06d)
DeltaFile
+1-1release/tools/gce.conf
+1-11 files

FreeBSD/src 6103a96 — usr.sbin/bhyve pci_emul.c

bhyve: fix bootorder for PCI slots >= 10

Currently, bhyve writes slots as decimals. Firmware such as EDK2
interprets them as hexadecimals, so slot 10 becomes 16, breaking
the configured boot order.

Reviewed by:    markj
Fixes:          6632a0a4e3ab ("bhyve: add helper to create a bootorder")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D61997

(cherry picked from commit 653c5d3b5f9f3f157c043c0acdcfc2ba85718016)
DeltaFile
+1-1usr.sbin/bhyve/pci_emul.c
+1-11 files

FreeBSD/src 9ffe291 — usr.sbin/bsdconfig Makefile, usr.sbin/bsdconfig/share geom.subr

bsdconfig: Resolve GEOM ids and names without scanning

f_device_get_all probes every DEV geom. Each probe calls
f_geom_find_by to turn a provider ref into a struct, and
f_geom_find for the gpt, geli, and nop parent names. Those walks
cover every class and geom, so a machine with a large disk set
spends its time in sh at "Probing devices".

Record each struct by id, and each geom by name, while
f_geom_get_all parses kern.geom.confxml. f_geom_find_by resolves
property id from the id map. f_geom_find resolves a non-empty name
from the name map. The same name can appear in more than one class,
so the name map stores a list of structs. A name that is still not
a shell identifier after rewriting is left for the linear scan.
f_geom_reset drops both maps.

Add an ATF test that times id and name lookups at 100 and 200
disks, and checks names that are not shell identifiers.


    [3 lines not shown]
DeltaFile
+324-0usr.sbin/bsdconfig/tests/geom_subr_test.sh
+316-3usr.sbin/bsdconfig/share/geom.subr
+3-0usr.sbin/bsdconfig/Makefile
+3-0usr.sbin/bsdconfig/tests/Makefile
+646-34 files

FreeBSD/src e109c8d — usr.sbin/bhyve pci_emul.c

bhyve: fix bootorder for PCI slots >= 10

Currently, bhyve writes slots as decimals. Firmware such as EDK2
interprets them as hexadecimals, so slot 10 becomes 16, breaking
the configured boot order.

Reviewed by:    markj
Fixes:          6632a0a4e3ab ("bhyve: add helper to create a bootorder")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D61997

(cherry picked from commit 653c5d3b5f9f3f157c043c0acdcfc2ba85718016)
DeltaFile
+1-1usr.sbin/bhyve/pci_emul.c
+1-11 files

FreeBSD/src 7fc5b4e — usr.sbin/sysrc sysrc.8 sysrc, usr.sbin/sysrc/tests sysrc_test.sh

sysrc: Add -u and -U

-U names a user in the jail password database and is passed to
jexec(8). It requires a running jail.

-u names a user in the host password database and is passed to
both jexec(8) and chroot(8).

The two cannot be combined, matching jexec(8).

MFC after:      2 weeks
Reported by:    ngie
Reviewed by:    kfv, ngie (previous revision)
Differential Revision:  https://reviews.freebsd.org/D61930
DeltaFile
+209-0usr.sbin/sysrc/tests/sysrc_test.sh
+54-6usr.sbin/sysrc/sysrc
+37-1usr.sbin/sysrc/sysrc.8
+300-73 files

FreeBSD/src 98ca8c5 — sys/dev/virtio/network if_vtnet.c

vtnet: disable mq by default to work around busdma usage bugs

The busdma tag / locking isn't right for multiqueue usage, so
disable it for now until it's been resolved.

PR: kern/301386

Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D62387

(cherry picked from commit a4c9e53a393505c22126f2a929e0087d9a9296f7)
DeltaFile
+1-1sys/dev/virtio/network/if_vtnet.c
+1-11 files

FreeBSD/src a4c9e53 — sys/dev/virtio/network if_vtnet.c

vtnet: disable mq by default to work around busdma usage bugs

The busdma tag / locking isn't right for multiqueue usage, so
disable it for now until it's been resolved.

PR: kern/301386

Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D62387
DeltaFile
+1-1sys/dev/virtio/network/if_vtnet.c
+1-11 files

FreeBSD/src 394e861 — usr.sbin/bsdinstall/scripts checksum

bsdinstall: Fix and optimize checksum validation awk

Prevent numerical comparison for decimal-looking sha256sum output.

awk's double has a 53-bit mantissa, so largest integer it can hold
is exactly 2^53 or 9,007,199,254,740,992. The next integer is not
representable, and awk rounds it back. This means large numbers when
compared can lead to false equivalence.

For example:

a=1234567890123456789012345678901234567890123456789012345678901234
b=1234567890123456789012345678901234567890123456789012345678901235
a == b # true but should be false

Casting the sha256sum to a string fixes comparison. h/t kfv

While here ... (for script hardening):


    [24 lines not shown]
DeltaFile
+15-15usr.sbin/bsdinstall/scripts/checksum
+15-151 files

FreeBSD/src 6255527 — usr.sbin/bsdinstall/scripts checksum

bsdinstall: Fix checksum incorrect percentages

Adding an integer value lacking floating point precision to another
integer of the same results in incorrect percentage procession.

For example, when NDISTRIBUTIONS is 8, the old method of using
$percentage+100/n (where n is the constant 8 in this example) results
in 0 -> 12 -> 24 -> 36 -> 48 -> 60 -> 72 -> 84 compared to the new
i*100/n (where i counter starts with 0, +1 each dist) which results
in 0 -> 12 -> 25 -> 37 -> 50 -> 62 -> 75 -> 87.

Note that the progress display is not redrawn for the last/final dist
(to display 100, or in the previous algorithm, 96 for set of 8 dists)
and for good reason. The distextract script wipes the screen almost
immediately thereafter, and so the only way the user would see 100%
would be if checksum slept after a final render. To keep the
installer quick and snappy, we're not going to add such a sleep and
so omitting the final render is fine.


    [3 lines not shown]
DeltaFile
+4-2usr.sbin/bsdinstall/scripts/checksum
+4-21 files

FreeBSD/src acdedb7 — usr.sbin/bsdinstall/scripts checksum

bsdinstall: Optimize checksum percentage calculation

Re-calculating how many words are in DISTRIBUTIONS n-times, once for
each word in DISTRIBUTIONS when the value of DISTRIBUTIONS does not
change is inefficient. So is piping to bc(1) instead of using shell
arithmetic expansion (both produce the same results, but built-in
avoids an unnecessary fork to bc(1)).

MFC after:      2 weeks
Reviewed by:    kfv
Differential Revision:  https://reviews.freebsd.org/D62047
DeltaFile
+3-1usr.sbin/bsdinstall/scripts/checksum
+3-11 files

FreeBSD/src 73cee3d — usr.sbin/bsdinstall/scripts checksum

bsdinstall: checksum: Add necessary quotes, remove unnecessary quotes

Quote BSDINSTALL_DISTDIR (script hardening)

MFC after:      2 weeks
Reviewed by:    kfv
Differential Revision:  https://reviews.freebsd.org/D62046
DeltaFile
+4-4usr.sbin/bsdinstall/scripts/checksum
+4-41 files

FreeBSD/src 5c24fdd — usr.sbin/bsdinstall/scripts checksum

bsdinstall: Fix checksum dist_to_statusvar(), remove evals

Replace crude sed encoding scheme with robust forkless scheme that
cannot lead to evaluated code when trying to set status vars.

Whitespace, control characters, redirects, exclamations, backticks,
dollars, globs, and more could be injected into an eval statement
through DISTRIBUTIONS. Using f_str2varname on the remaining invalid
varname chars makes it safe but use setvar builtin anyways.

Replace shell variable indirection with f_getvar for readability.

Comment status number meanings while here.

Fixes:          47d669f10ea3 (bsdinstall: Encode dists to valid variable names in checksum script)
MFC after:      2 weeks
Reviewed by:    kfv
Differential Revision:  https://reviews.freebsd.org/D62045
DeltaFile
+25-8usr.sbin/bsdinstall/scripts/checksum
+25-81 files

FreeBSD/src 2ba7ebe — lib/libdevdctl Makefile, lib/libdevdctl/tests Makefile

libdevdctl: fix multiple problems with the tests

* Fix a clean buildworld.  Only build the tests when MK_TESTS is active.
  It won't be during the libs phase when libdevdctl is first built.

* Remove the "-I ${LOCALBASE}/include" directive.  It was necessary back
  in 2016 when these tests were first added.  But it no longer is,
  because googletest got imported into contrib in 2019.  Also, the
  pthread stuff is not needed, because bsd.test.mk sets it.

Fixes:          3cd9170882a ("Acutally connect the libdevdctl tests to")
Reported by:    llm-postcr
MFC after:      1 week
Sponsored by:   ConnectWise
DeltaFile
+1-1lib/libdevdctl/Makefile
+0-1lib/libdevdctl/tests/Makefile
+1-22 files

FreeBSD/src 970fb1d — sys/powerpc/linux linux_proto.h syscalls.master

linuxulator/powerpc: fix the argument order of sync_file_range2

PowerPC only has sync_file_range2, which takes the flags second. We read
the arguments in the sync_file_range order, so glibc's sync_file_range()
failed with EINVAL for any length above 7.

Fixes:          e62e2bb64ffb ("powerpc: Add first Linuxulator support (ELFv1, BE, powerpc64)")
Reviewed by:    jhibbits
Differential Revision:  https://reviews.freebsd.org/D62381
DeltaFile
+3-3sys/powerpc/linux/linux_systrace_args.c
+3-2sys/powerpc/linux/syscalls.master
+1-1sys/powerpc/linux/linux_proto.h
+7-63 files

FreeBSD/src ecf639e — sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: refresh the MSI data of MSI descriptors

lkpi_pci_msi_desc_alloc() cached the descriptor, and with it the MSI
data, on first use.  FreeBSD only programs the MSI message, and sets
cfg.msi.msi_data, once the first interrupt handler is set up.  ath11k
calls irq_get_msi_desc() before request_irq() and again after it, in
ath11k_pci_config_msi_data(), to take the final data and hand it to
its firmware; it got the 0 cached by the first call.

Keep only the allocation, and refresh the data on every call.

Restructured the final code and added a comment [bz].

Sponsored by:   Defenso
MFC after:      3 days
Reviewed by:    bz
Differential Revision: https://reviews.freebsd.org/D61214
DeltaFile
+6-6sys/compat/linuxkpi/common/src/linux_pci.c
+6-61 files

FreeBSD/src 0d232f6 — sys/powerpc/aim mmu_radix.c

powerpc/radix: let mprotect() revoke execute permission

mmu_radix_protect() and pmap_protect_l3e() set PG_X when the new
protection includes execute and do nothing about it otherwise, so a
mapping that was executable stays executable after mprotect() takes
PROT_EXEC away. That goes for 4K and 2M pages alike.

amd64 sets pg_nx here when execute is not asked for. PG_X on radix is
the opposite kind of bit, it grants execute, so clear it in that case.

Reviewed by:    jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D62362
DeltaFile
+4-0sys/powerpc/aim/mmu_radix.c
+4-01 files

FreeBSD/src 22aad25 — sys/cddl/contrib/opensolaris/uts/powerpc/dtrace fasttrap_isa.c

dtrace/powerpc: refuse pid tracepoints that would need a single step

The pid provider leaves every instruction it doesn't emulate to a
pc/npc single step, and nothing on powerpc implements that. A
tracepoint on such an instruction traps forever: an entry probe hangs
the traced process at 100% CPU.

Refuse to install one. Entry probes on most functions still don't
work, but they no longer hang the process.

Reviewed by:    jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D62370
DeltaFile
+4-0sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
+4-01 files

FreeBSD/src c467e63 — sys/cddl/contrib/opensolaris/uts/powerpc/dtrace fasttrap_isa.c

dtrace/powerpc: sign extend branch displacements in the pid provider

The displacement of b and bc was sign extended to 32 bits only and then
added to a 64-bit pc, so the emulation of a backward branch sent the
traced process about 4 GB forward. A return probe on a function with a
loop or a tail call killed it with SIGSEGV at the first hit.

Sign extend the displacement to the full width.

Reviewed by:    jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D62369
DeltaFile
+5-6sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
+5-61 files