HomeFreeBSD

unionfs: implement VOP_SET_TEXT/VOP_UNSET_TEXT

Description

unionfs: implement VOP_SET_TEXT/VOP_UNSET_TEXT

The implementation simply passes the text ref to the appropriate
underlying vnode. Without this, the default [un]set_text
implementation will only manage the text ref on the unionfs vnode,
causing it to be out of sync with the underlying filesystems and
potentially allowing corruption of executable file contents.
On INVARIANTS kernels, it also readily produces a panic on process
termination because the VM object representing the executable mapping
is backed by the underlying vnode, not the unionfs vnode.

PR: 251342
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D33611

Details

Provenance
jahAuthored on Dec 21 2021, 11:51 PM
Reviewer
kib
Differential Revision
D33611: unionfs: simplify writecount management
Parents
rGd877dd5767bc: unionfs: simplify writecount management
Branches
Unknown
Tags
Unknown