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

(cherry picked from commit 9e891d43f586e91541bd61fb12550de296d76fd9)

Details

Provenance
jahAuthored on Dec 21 2021, 11:51 PM
emasteCommitted on Jan 9 2023, 2:31 AM
Reviewer
kib
Differential Revision
D33611: unionfs: simplify writecount management
Parents
rGf61fca7409f6: readelf: match GNU readelf formatting
Branches
Unknown
Tags
Unknown