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
Unknown Object (File)
Tue, Jul 28, 12:05 AM
Unknown Object (File)
Mon, Jul 27, 1:30 AM
Unknown Object (File)
Sun, Jul 26, 3:15 AM
Unknown Object (File)
Sat, Jul 25, 5:01 AM
Unknown Object (File)
Wed, Jul 22, 10:31 PM
Unknown Object (File)
Wed, Jul 22, 2:59 AM
Unknown Object (File)
Sat, Jul 18, 5:43 AM
Unknown Object (File)
Fri, Jul 17, 8:44 PM
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