HomeFreeBSD

kern: factor out the 'writing' bits of user process coredumping

Description

kern: factor out the 'writing' bits of user process coredumping

Instead of assuming we have a vnode to dump to, pull out the bits that
describe how to write acoredump into a struct coredump_writer; the ctx
in that is expected to be opaque, but used by write/extend functions.
This should not be a functional change- we change two callers to use the
classic vnode write/extend interface.

This opens us up to other possible targets for coredumps, such as a
shmfd.

Reviewed by: markj (earlier version), kib
Differential Revision: https://reviews.freebsd.org/D51337

Details

Provenance
kevansAuthored on Jul 15 2025, 8:14 PM
Reviewer
markj
Differential Revision
D51337: kern: factor out the 'writing' bits of user process coredumping
Parents
rG6b49d1194899: kern: allow kern_shm_open2 of an anonymous preconstructed shmfd
Branches
Unknown
Tags
Unknown