tock icon indicating copy to clipboard operation
tock copied to clipboard

Tracking: CHERI

Open alevy opened this issue 1 year ago • 2 comments

A series of steps to upstream support for CHERI architectures from tock/tock-cheri

  • [x] Replace ubiquitous usize with specific sized integers and explicit pointer type
  • [ ] libtock-c and libtock-rs support for non-u32-sized pointers
  • [ ] MPU/MMU trait hooks for bounds on function pointer
  • [ ] CHERI arch
  • [ ] libtock-c & libtock-rs CHERI support
  • [ ] Zero-copy grants
  • [ ] Zero-copy grants + DMA

/cc @LawrenceEsswood

alevy avatar Aug 07 '24 20:08 alevy

Replace ubiquitous usize with specific sized integers and explicit pointer type

I remember talking about this (long, long ago) on a core team call (or two) for a while, and explicitly and intentionally using usize (as opposed to the more common uint32_t paradigm in a lot of embedded C) IIRC as a future-proofing for a 64-bit platform option (including ease of semi-hosted / host-side testing as most-immediate use case). Is this going to be at odds with CHERI support?

ppannuto avatar Aug 13 '24 01:08 ppannuto

@ppannuto I don't think so, but there are places where we use usize and we actually mean u32, places where we say usize and we actually mean *const _, and places we use usize and mean something like "a user meaningful pointer that should only be messed with in controlled particular ways"

alevy avatar Aug 13 '24 03:08 alevy