Page MenuHomeFreeBSD

CHERI: make mem{cpy,move}(9) CHERI compatible
ClosedPublic

Authored by brooks on Tue, Jun 30, 1:38 PM.
Tags
None
Referenced Files
F161964917: D57965.diff
Wed, Jul 8, 10:36 AM
F161957096: D57965.id180976.diff
Wed, Jul 8, 8:39 AM
F161956566: D57965.id180976.diff
Wed, Jul 8, 8:32 AM
Unknown Object (File)
Tue, Jul 7, 8:12 PM
Unknown Object (File)
Tue, Jul 7, 8:06 PM
Unknown Object (File)
Sun, Jul 5, 4:27 PM
Unknown Object (File)
Sun, Jul 5, 4:24 PM
Unknown Object (File)
Sun, Jul 5, 4:48 AM
Subscribers

Details

Summary
  • Use intptr_t in place of long as the word type in the core copying loop where aligned words a copied. This preserved the provenance of any copied pointers.
  • When working with the address of src or dst use ptraddr_t rather than uintptr_t. This avoid ambigious provenance in expressions involving multiple addresses.

As a minor tweak, rename the function to memmove since that's the
interface it implements (overlapping src and dst are permitted) and make
memcpy the alias rather than the other way around.

Effort: CHERI upstreaming
Sponsored by: Innovate UK

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable