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
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
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.
rtld-elf/i386: assume CPUID is always present
It is on amd64 host.
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D60693
libc/csu/i386: assume CPUID is always present
It is on amd64 host.
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D60693
i386 lib/msun: SSE2 is always present on amd64 host
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D60703
ipfw: match tcpmss only on the first fragment
08f0a1bdc091 dropped the check that O_TCPMSS has a TCP header to look
at. For a non-first fragment of a TCP datagram ulp is NULL, and
args->f_id._flags is not set for such a packet. ipfw_check_packet()
does not zero its struct ip_fw_args, so the flags may still have
TH_SYN from an earlier packet; a tcpmss rule then reads the TCP
header through the NULL pointer and the kernel panics.
Check offset == 0, as the other TCP header opcodes do: then the TCP
header has been pulled up and the flags belong to this packet.
Document that tcpmss looks only at packets with the SYN flag set and
never matches a fragment with a non-zero offset.
Add tests that send SYNs through a tcpmss rule, alone and each
followed by a non-first TCP fragment, and check the rule counters:
frag4: IPv4; panics without the fix.
frag6: IPv6; panics without the fix.
[8 lines not shown]
tools: Remove the vm86 test tool
This requires an i386 kernel (virtual 8086 mode only works from 32-bit
protected mode, it is not supported by long mode).
Reviewed by: kib, emaste
Differential Revision: https://reviews.freebsd.org/D60676
isa: Retire the isa_init() MD hook
The implementation was an empty function on all current platforms.
Reviewed by: imp, kib, emaste
Differential Revision: https://reviews.freebsd.org/D60675