Page MenuHomeFreeBSD

CHERI: add mem{cpy,move}_data
Needs ReviewPublic

Authored by brooks on Fri, Jun 19, 2:12 PM.
Tags
None
Referenced Files
F160210536: D57662.id180057.diff
Mon, Jun 22, 5:19 AM
F160210524: D57662.id180057.diff
Mon, Jun 22, 5:19 AM
F160199624: D57662.id180170.diff
Mon, Jun 22, 2:57 AM
Unknown Object (File)
Sun, Jun 21, 6:11 PM
Unknown Object (File)
Sun, Jun 21, 3:07 PM
Unknown Object (File)
Sun, Jun 21, 2:54 PM
Unknown Object (File)
Sun, Jun 21, 4:37 AM
Unknown Object (File)
Sat, Jun 20, 3:16 AM

Details

Reviewers
kib
markj
jhb
jrtc27
Group Reviewers
cheri
Summary

Add kernel-only provenance-discarding memcpy_data and
memmove_data APIs intended to copy raw data which does not contain
pointers (e.g., buffers on their way to or from network or storage
devices). On CHERI architectures, they will explicitly remove tags
from capabilities, removing any provenance. This reduces the risk of
accidental spread of pointers on CHERI system.

This includes a simple C implementation for CHERI targets.

Effort: CHERI upstreaming
Sponsored by: DARPA, AFRL, Innovate UK

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 74061
Build 70944: arc lint + arc unit

Event Timeline

share/man/man9/memcpy.9
91

typo

emaste added inline comments.
sys/sys/systm.h
295

How widely used is bcopy_data in CHERI? Is it reasonable to move those to memmove_data (possibly moving to memmove first in FreeBSD)? It seems slightly unfortunate to make a new version of a legacy/obsolete interface.

sys/sys/systm.h
295

None of these are widely used. memmove_data is currently completely unused except to implement bcopy_data. I actually think most (or even all) could be memcpy_data (I don't think any of these overlap).

The one slightly perverse argument for bcopy_data is that it's safely outside the reserved mem* namespace.

sys/sys/systm.h
295

I'll make the s/bcopy/memcpy changes and do some consolidation along the way.

Rebase after removing references to strings in base manpages

brooks retitled this revision from CHERI: add mem{cpy,move}_data and bcopy_data to CHERI: add mem{cpy,move}_data.Sat, Jun 20, 5:07 PM
brooks edited the summary of this revision. (Show Details)
adrian added inline comments.
share/man/man9/memcpy.9
62

where is "pointer provenance" defined?