HomeFreeBSD

CHERI: declare copy{in,out}ptr{,_nofault}

Description

CHERI: declare copy{in,out}ptr{,_nofault}

These provenance-preserving functions are to be used when copying
objects that are expected to contain pointers. Data buffers which do
not contain pointers should be copied by the traditional copyin/copyout
functions which *do not* preserve pointer provenance (on CHERI they
clear validity tags).

NOTE: Going forward, this requires changes when adding new syscalls or ioctl that take pointers to objects containing pointers. Fortunately, the vast majority (>90%) of copyin and copyout statements do not copy pointers and require no change. Failure to make the chance will have no effect on non-CHERI architectures.

Reviewed by: kib, markj
Effort: CHERI upstreaming
Sponsored by: DARPA, AFRL, Innovate UK
Differential Revision: https://reviews.freebsd.org/D57663

Details

Provenance
brooksAuthored on Jun 29 2026, 12:58 PM
Reviewer
kib
Differential Revision
D57663: CHERI: declare copy{in,out}ptr{,_nofault}
Parents
rGbbc2d15857b8: pf.conf.5: Fix typo
Branches
Unknown
Tags
Unknown