reaper_abandon_children(): leave no orphans on a reaped reaper
A reaper which exited stays the reaper of its subtree until it is
reaped, and processes can be linked onto its orphan list after its
exit1() emptied it. PT_ATTACH puts there a child which stayed with its
zombie reaper parent. Since 38ab6d47b7cb, reaper_adopt() puts there a
traced process which the zombie gets when a subreaper is reaped. When
the zombie is reaped in turn, reaper_abandon_children() keeps an orphan
holding a zombie reference with it, as is right only for
PROC_REAP_RELEASE. The struct proc is freed with the orphan still
linked to it, and proc_realparent() returns the freed or reused struct
proc on PT_DETACH, on the exit of the debugger, and from wait(2).
When the reaper is reaped, pass every orphan on to the new reaper, as
its children are. Anything linked onto the orphan list of a zombie
reaper is on its reaplist, so this empties the list. Assert that in
proc_reap().
Reported by: llm-postcr
[4 lines not shown]
tests/sys/kern/ptrace_test: reap a reaper which has a traced orphan
Add ptrace__parent_reaper_exits_before_attach, where the parent of the
traced child, also its reaper, exits before the attach. The child stays
with the zombie, and the attach puts it on the orphan list of the
zombie.
Add ptrace__reaper_exits_before_subreaper, where the parent of the
traced child is a subreaper, and the reaper above it exits first.
Reaping the parent while the reaper is a zombie hands the child over to
the zombie, and links it onto the orphan list of the zombie.
In both tests, the test process then reaps the zombie, detaches from
the child, and waits for it. Before the fix, the child stayed on the
orphan list of the freed reaper, and PT_DETACH handed it to the freed
struct proc.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[CIR] Handle lowering for most of Relative-Vtables (#247288)
This builds on previous patches, which move us towards the
relative-vtable implementation. This patch handles all of the lowering
except for:
1- buildVTablePointer, which is left as NYI. This is a touch more work
for C++ uses of RTTI types, so this will be done in a followup.
2- Some markers in CIRGen that need to be removed, but cannot be tested
properly due to the above.
This matches LLVM output every where I could find, so I believe this to
be correct for the cases we cover.
A follow-up patch will fix both of those, plus port the
relative-vtable-tests from classic.
Note that Claude helped heavily in generating this patch and tests.
[CIR] Implement loop-hint lowering (#247320)
Previous patches resulted in the loop hints making it to CIR, and this
patch handles the lowering. These are lowered similarly to Classic
Codegen with an attempt to make the checks/dependencies between them
'work' correctly.
This does NOT however handle 'parallel', which are both challenging for
other reasons. For parallel, this needs to get propagated to all of the
llvm-ir intructions inside of the loop: We probably want to introduce a
scope to handle this during flattening, and emit it conditionally based
on that.
[AMDGPU] Add an intrinsic and builtin to access the dispatch index
This PR adds an intrinsic (and corresponding builtin and MLIR
operation) for accessing the dispatch index on gfx12+, since it can be
needed in some low-level contexts.
AI disclosure: None, I did this by hand
[AMDGPU] Refactor wave ID intrinsic handling and expose a Clang builtin
This PR refactors how the architecture-provided wave ID on gfx12 is
exposed, including by generalizing its lowering in preparation for
adding a dispatch.index intrinsic.
This PR also annotates the wave-id intrinsic with `TargetFeatures`,
meaning that it no longer is a selection failure to use it on a target
without the architected SGPRs feature, but a failure earlier in the
pipeline.
In addition, this PR exposes this id as __builtin_amdgcn_wave_id() in
Clang, matching MLIR, and adds documentation that clarifies the
properties of the ID.
AI disclosure: None, I did this by hand
Check for a pending free before copying the block pointer for nopwrite
dmu_sync() and dmu_write_direct() copy db_blkptr for the nopwrite
check, and only then ask dnode_block_freed() whether the block was
freed in a txg that has not synced yet. The sync of that txg zeroes
the block pointer in the L1 indirect block (free_blocks(), under the
L1's db_rwlock) and then removes the range from dn_free_ranges under
dn_mtx (dnode_sync_free_ranges()); neither step takes the L0 db_mtx
that the copy and the check run under. So a copy made just before
the zeroing and a check made just after the removal see the old block
pointer and no pending free: the write nopwrites against the freed
block, and dmu_sync_done() or zio_done() then fails its BP_EQUAL()
VERIFY.
Check first. If dnode_block_freed() finds the range, nopwrite is off.
If it does not, either there was no free or its removal is done, and
dn_mtx orders the zeroing that came before the removal ahead of the
copy, so the copy sees the hole.
[9 lines not shown]
Disable Direct I/O nopwrite for blocks with a pending free
dmu_write_direct() copies db_blkptr so that the write can nopwrite
against it, and turns nopwrite off only if the block has an older
dirty record. dmu_sync() also turns it off when the block was freed
in a txg that has not synced yet (dnode_block_freed()), because that
sync makes the block pointer a hole and frees the block. A Direct
I/O write of the same data after such a free nopwrites against the
freed block. When its txg syncs, the override no longer matches the
block pointer, and zio_done() panics on
VERIFY(BP_EQUAL(zio->io_bp, &zio->io_bp_orig)) in the sync thread;
without that check the file would point at a freed block.
Check dnode_block_freed() in dmu_write_direct() as dmu_sync() does.
This makes dio_nopwrite_freed pass.
The panic and its stack match those reported in #19294.
[4 lines not shown]
[SPIR-V] Merge duplicate constants into the dominating copy (#247244)
Entry block constants were replaced by copies from other blocks
NewPM does not verify after each pass, so the expensive_checks XFAIL for
this XPASSed
ZTS: Direct I/O nopwrite against a block freed in an earlier txg
dmu_write_direct() lets a Direct I/O write nopwrite against the block
pointer the dbuf has now. It only rules that out when the block has
an older dirty record, not when it was freed in an earlier txg that
has not synced yet. The sync of that txg turns the block pointer into
a hole and frees the old block, while the Direct I/O write's override
still points at it, and syncing the write then fails
VERIFY(BP_EQUAL(zio->io_bp, &zio->io_bp_orig)) in zio_done().
Add a test that truncates a file in a txg that is kept from syncing,
then rewrites its first block with the same data with Direct I/O in
the next txg. A long free that reaches zfs_per_txg_dirty_frees_percent
of zfs_dirty_data_max quiesces the txg of the truncation early; the
test pins zfs_dirty_data_max to 256 MiB so that the free reaches it
whatever the amount of memory, and fails unless
dmu_tx_dirty_frees_delay shows that the free did wait. Add
PER_TXG_DIRTY_FREES_PERCENT and DIRTY_DATA_MAX to tunables.cfg.
[6 lines not shown]
Use netlink to get RDMA links (#20324)
Middleware kept the RDMA link and card choices in a cache until it
restarted. It did not see links that were added or removed after that.
This PR removes both caches. Middleware now gets the RDMA links from the
kernel through netlink with `get_rdma_links` from `truenas_pynetif`. It
no longer runs `rdma -j link`.
`rdma.interface.internal_interfaces` is called for each
`interface.query`. It now gets the RDMA links only if RDMA interfaces
are configured. It also ignores a configured interface that has no link.
Before, this caused a `KeyError`.
The second commit replaces the clearable cache from the first commit.
Thus `rdma.reset_link_choices` is not necessary and tests do not need to
call it.
---------
[3 lines not shown]
editors/emacs-devel: Update to 2026-12-01 snapshot
Highlights:
- Fix a regression in the previous snapshot where GPG-encrypted (and
compressed) files did not get the correct major mode.
- X11 GTK builds (not PGTK) linked against libX11 1.8.14 and newer now
delete frames on a lost X display and keep running.
- Mouse-hover help on the fringes, broken since Emacs 30, works again.
- Org updated to 9.8.13.
Commit log: https://github.com/emacs-mirror/emacs/compare/abc45ea64274...535957a34b8d
Sponsored by: The FreeBSD Foundation
RuntimeLibcalls: Add SME attributes to the AArch64 SME support routines
SMEAttrs currently assumes these attributes based on the function
name. Add them to the function definition so this code can be cleaned
up in the future.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
draid: recover damaged distributed spare copies
When a dRAID disk is replaced by a distributed spare while the
original disk stays attached, ZFS always reads that column from
the distributed spare. If the spare's copy is silently damaged,
the original disk's copy is never tried, so a block that could
have been recovered is reported as lost.
A healing resilver makes this worse: it copies the spare's data
onto the original disk before the block has been verified. If
the block then cannot be rebuilt, the good copy on the original
disk has been overwritten and the data is lost for good.
This change:
- Compares the copies under the distributed spare when a failed
read is retried and, if they differ, uses the original disk's
copy. The damaged copy is repaired once the block has been
verified.
[21 lines not shown]
[lldb] Avoid repeated interrupts for multi-site breakpoint updates (#246807)
Creating, enabling, or disabling a breakpoint with multiple sites while
a remote inferior is running interrupts and resumes the inferior once
per site.
Hold the remote transport lock across the operation so LLDB can send the
individual breakpoint packets during a single interruption.
Before the patch:
```
(lldb) platform select remote-linux
(lldb) platform connect connect://127.0.0.1:1234
(lldb) file sample
(lldb) run
(lldb) br add name test
Breakpoint 1: 100 locations.
(lldb) stat dump
"totalBreakpointResolveTime": 9.633445,
[8 lines not shown]
[AMDGPU] NFC: Precommit test for blocking cycle coverage (#246074)
For an upcoming refactor of `getBlockingCycles` -- we were missing
coverage on some groups of BlockingCycles instructions
---------
Co-authored-by: Matt Arsenault <Matthew.Arsenault at amd.com>
ports.cgi: use div instead of span around paragraphs
A span is an inline element and must not contain block elements
such as p. Use a div for the "nothing found" message and the
noscript warning.