Analysis: Use subclass volatile and atomic queries where the type is known (#242094)
Call isVolatile and isAtomic on the subclass already identified by an
isa or dyn_cast, instead of the generic Instruction versions that
switch over the opcode.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Read the objset in the fadvise handlers after entering
zpl_fadvise() and zfs_freebsd_advise() read zfsvfs->z_os before
entering the file system. If a 'zfs recv' into the file system is
suspending it, the call waits in zfs_enter() until zfs_resume_fs() has
swapped in the new objset and freed the old one, then passes the stale
pointer to dmu_prefetch_user() or dmu_evict_range(). The kernel
oopses (Linux) or panics (FreeBSD) in dnode_hold_impl(), and a backup
tool that issues fadvise while a replication stream is received can
bring a host down.
Read z_os once the file system is entered, as the other entry points
do.
This makes fadvise/fadvise_recv pass on Linux and FreeBSD.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
[2 lines not shown]
AArch64: Use inline register class syntax in MIR tests (#242043)
Avoid using the registers section and delete it when no longer needed.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
ipfilter: Remove erroneous ntohs()
The original commit was wrong. ipf_nat_builddivertmp() builds the UDP
template with the length in host byte order
M_DUP() copies that value unchanged. The old code was therefore correct.
It added fin_plen in host order and then did a single htons().
The original patch was discussed with Co-Pilot, which pointed out the
original bug. claude-opus-5-5 discovered the ntohs() error that
co-pilot suggested.
Interestingly this code had been running here for a couple of months.
Reported by: llm-postcr
Fixes: 72cc9e3766f4
(cherry picked from commit 86861520613f99c85b5fbdf92b5c955a13ed6624)
ipfilter: Only recalculate the UDP header when we have one
When ipf_nat_out processes NAT_DIVERTOUT (ipnat rdr statements)
it also fixes the checksum in the UDP header. Test for a UDP header
before adjusting its length.
While we are here, the length in the UDP header must be converted
from network byte order to host byte order. Add the missing ntohs().
PR: 296944
(cherry picked from commit 72cc9e3766f4222fa7fc462bc669dcf668e8b334)
x11/weltschmerz: [NEW PORT] Terminal emulator in Vala
weltschmerz is a small and simple terminal emulator built upon the Virtual
Terminal Emulator widget. It’s written in Vala, supports clickable URLs and
hyperlinks, can reload its configuration whilst running, and has basic search
functionality.
As a VTE app, weltschmerz supports practically every contemporary terminal
emulator feature. It is built to be a stable and practical terminal emulator for
daily use.
WWW: https://oriole.systems/posts/weltschmerz
PR: 292659
ipfilter: Remove erroneous ntohs()
The original commit was wrong. ipf_nat_builddivertmp() builds the UDP
template with the length in host byte order
M_DUP() copies that value unchanged. The old code was therefore correct.
It added fin_plen in host order and then did a single htons().
The original patch was discussed with Co-Pilot, which pointed out the
original bug. claude-opus-5-5 discovered the ntohs() error that
co-pilot suggested.
Interestingly this code had been running here for a couple of months.
Reported by: llm-postcr
Fixes: 72cc9e3766f4
(cherry picked from commit 86861520613f99c85b5fbdf92b5c955a13ed6624)
ipfilter: Only recalculate the UDP header when we have one
When ipf_nat_out processes NAT_DIVERTOUT (ipnat rdr statements)
it also fixes the checksum in the UDP header. Test for a UDP header
before adjusting its length.
While we are here, the length in the UDP header must be converted
from network byte order to host byte order. Add the missing ntohs().
PR: 296944
(cherry picked from commit 72cc9e3766f4222fa7fc462bc669dcf668e8b334)
krb5: Import MIT 1.22.3
Major changes in 1.22.3 (2026-11-09)
====================================
This is a bug fix release, with a focus on security issues discovered
with the aid of large language models. See
https://web.mit.edu/kerberos/advisories/MITKRB5-SA-2026-001.txt for
information on the risks of continuing to use unpatched releases.
* Fix a logic error when checking PAC server checksums
[CVE-2026-111423].
* Check for unkeyed checksums when validating CAMMAC verifiers
[CVE-2026-71199].
* Fix a loophole in the KDC's client authdata filtering which could
allow clients to include fake PAC and CAMMAC authdata values when
requesting service tickets. These fake values would be rejected by
[50 lines not shown]
Mk/Uses/tex.mk: Fix indentation
Committing changes to tex.mk would fail the check_mk_indentations
pre-commit hook unless --no-verify was supplied to git commit. Use
Tools/scripts/indent_make_if.pl to fix the indentation.
Approved by: blanket, no-op fix
Sponsored by: The FreeBSD Foundation
RISCV: Use inline register class syntax in mir tests
Also clean up unnecessary registers sections
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Do not import symlinks from non-pkg package builds
The package phase lets the jail build user write to a host-backed
/.npkg directory. build_port() imported every file and symlink from
that directory into the host package repository. An absolute symlink
changes meaning at this boundary: it points inside the jail while
mounted but at the host after import.
Only the pkg bootstrap variants need package-manager compatibility
links. Process those links before their targets and reject any that
resolve outside staging. Import only regular files for other ports,
preventing their build output from introducing host-resolved symlinks
into the repository.
(cherry picked from commit d558fca255b11e6350b62337bdd80bef36f673bf)
Conflicts:
src/share/poudriere/common.sh
Issue #1366
SystemZ: Use inline regclass syntax in mir tests
Also clean up unnecessary registers sections
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[compiler-rt] Add Device AddressSanitizer runtime
Host and device runtime for dasan, built on the sanitizer_common offload
layer. The common layer gains the HSA pieces dasan needs: pool and agent
queries, virtual memory reservation and sharing, code object enumeration,
cache publication, and device symbolization. The runtime keeps the
allocator, global aliasing, and report formatting. Each device begins on
its own metadata granule, so an entry load stays on the device that owns
the object.
The runtime follows ubsan's offload shape: HSA interceptors that report HSA
as absent when it is not loaded, a dasan-preinit archive, static and shared
runtimes, a receive-only RPC handler on SANITIZER_OFFLOAD_DASAN, and lit
tests on the common GPU substitutions. The report handlers elect the first
active lane, which is the first failing one, and take their return address
as the location of the access. Host checks call __dasan_report_load and
__dasan_report_store and take the caller's frame.
Fine-grain pools are placed only when the AMD extension honors pool flags
[5 lines not shown]
[Clang] Add -fsanitize=daddress for Device AddressSanitizer
Wire the sanitizer through the driver, codegen, and preprocessor. Emit
sanitize_device_address, run the dasan pass, and link the dasan runtime
on AMDGPU offload and supported Linux hosts.
RFC: https://discourse.llvm.org/t/rfc-add-a-device-address-sanitizer-for-gpus-dasan/92710
vtnet: honor the advertised MTU limit on attach
When VIRTIO_NET_F_MTU is negotiated, virtio_net_config.mtu specifies
the maximum MTU the driver may use. vtnet_ioctl_mtu() enforces this
limit for subsequent MTU changes, but ether_ifattach() unconditionally
initializes the interface MTU to ETHERMTU (1500).
So a device advertising a maximum below 1500 starts with an MTU above
its limit. So make sure to set the initial MTU no larger than
vtnet_max_mtu. That is, for vtnet_max_mtu less than 1500
interface MTU will be set to this value, otherwise the current behaviour
is preserved, MTU will be set to 1500.
Reviewed by: kfv, tuexen
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60980
(cherry picked from commit 0974ef03b43f279f16289ad4d5be3a03923983ea)
[NFC][analyzer] Silence gcc -Wempty-body when compiling unittest (#241759)
When I was building and running the static analyzer tests; gcc always
emitted a `-Wempty-body` warning for this test file. Let's silence it to
reduce noise during the build.
Mips: Use inline register class syntax in MIR tests
Also clean up unnecessary registers sections.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[LLVM] Add DeviceAddressSanitizer instrumentation pass
Instrument loads, stores, and memory intrinsics against dasan's
size-class metadata. The handler locates the access by its return
address, so each check calls a report of its own that is never merged,
inlined, or tail called. On AMDGPU, keep the dispatch pointer that
shared memory checks read, and preserve the __dasan_ entry points.
AMDGPU keeps one decode per inbounds root and selects the zero word for
an outside pointer, so the load can be hoisted and the wave does not
branch. Elsewhere an outside pointer is the common case, so membership
is a branch and the decode is its cold side. Global relocation defaults
to AMDGPU and follows -dasan-instrument-globals when set. The metadata
pointer uses the data layout's default globals address space.
RFC: https://discourse.llvm.org/t/rfc-add-a-device-address-sanitizer-for-gpus-dasan/92710
[IR] Add sanitize_device_address function attribute
Mark functions that should receive Device AddressSanitizer checks,
matching the other sanitize_* attributes. Bitcode, LangRef, editor
syntax, and inliner compatibility rules are updated accordingly.
Speculative loads, non-local GVN load elimination, and hot/cold
splitting are suppressed under it, as they are for sanitize_address.
RFC: https://discourse.llvm.org/t/rfc-add-a-device-address-sanitizer-for-gpus-dasan/92710
nvme: enforce the Abort Command Limit
Each watchdog pass submitted an Abort for every timed-out command
with nothing counting them against the controller's ACL. A
controller may complete excess Aborts with Abort Command Limit
Exceeded status.
Reviewed by: imp, adrian
Differential Revision: https://reviews.freebsd.org/D59636
[LangRef] Allow non-void deallocation functions
CHERI has a deallocation API that is fallible and can return an error
code. That seems useful, so let's remove the requirement that
deallocation functions must return void.
Revert the deallocation part of 81dba15c0635023d9f0fc293ab941faf7c1a560,
which relied on that as a micro-optimization.
games/yquake2: Fix game.so loading
Do not load game.so shipped with games/quake2-data port
as it causes problems such as the game freezing.
Warning: the game will not load old saves after this update.
PR: 300679
Approved by: osa, vvd (mentors, implicit)
MFH: 2026Q4
(cherry picked from commit 274ff815b97b69ec1d80b270abc435225a69d826)
games/yquake2: Fix game.so loading
Do not load game.so shipped with games/quake2-data port
as it causes problems such as the game freezing.
Warning: the game will not load old saves after this update.
PR: 300679
Approved by: osa, vvd (mentors, implicit)
MFH: 2026Q4