David Chisnall (*Now with 50% more sarcasm!*)@david_chisnall@infosec.exchange

I guess, in light of the liblzma debacle, today is a good time to remind everyone that the #CHERIoT platform was designed from the ground up with supply-chain security in mind. If you want to use some third-party code, you can audit precisely the APIs from other components that it can use, the set of things that can call it, the set of devices it can directly access, the amount of heap memory it can allocate, and more.

For a case study, see our ongoing work on compartmentalising the network stack, where we can fearlessly reuse third-party code and know that we are safe from entire classes of compromise.

If you want to build IoT devices with long, low-maintenance, secure lifetimes, SCI Semiconductor may have the microcontroller that you need to realise your goals.

3 15 38

불러오는 중…

Gerard@GerardThornley@hachyderm.io

@david_chisnall I've just been reading the #CHERI intro TR and some of the material on #CHERIoT. It's an interesting approach with some attractive features; embedded systems seem like a good target use case.

Has there been any work on adding an extra line to the data bus and RAM registers so that the tag bit can be moved along with the capability, saving the need for a separate table lookup? While it probably wouldn't be practical for a processor with external RAM, I can imagine it being quite worthwhile in a microcontroller where it's all self-contained.

Also, have you ever looked at Integrity RTOS from Green Hills? I haven't used it myself, but from what I recall reading (albeit twenty years ago) I think it might lend itself quite well to CHERI-style compartmentalisation.

David Chisnall (*Now with 50% more sarcasm!*)@david_chisnall@infosec.exchange

@GerardThornley

I’m not sure what you mean by ‘table lookup’. CHERI was designed from the start to avoid indirection. The tags are stored in registers, flow across the bus as an extra signal. How they’re stored in memory is a more complex question because there is value for temporal safety in being able to read just the tags without the accompanying data.

I haven’t looked at Integrity RTOS. It’s proprietary so the code isn’t just there for me to prod. In general, we find it easier to apply CHERI to embedded systems that don’t do much compartmentalisation with an MMU or MPU, because these tend to force you into particular abstractions that are not great for programmers and don’t really line up with the ones CHERI enables. Adding compartmentalisation is easier than turning coarse-grained compartmentalisation built around implicit access to shared-memory regions into fine-grained compartmentalisation built around sharing objects.

Gerard@GerardThornley@hachyderm.io

@david_chisnall

I needed to reread some things, then found another TR with more detail about implementation approaches, including touching on the question I was asking.

When I said 'table lookup' I meant the tag controller reading the tag table. On re-reading, I realise this is placed between the caches and memory, and tags do already flow on the bus within the core as you said.

Most lower-level applications I've worked on used smaller microcontrollers, which often connect the memories directly to the core buses without any cache. They were foremost in my mind when I asked about modifying the memory structure to store tags alongside the data.

I can see that adding CHERI to more powerful MCUs presents a different proposition, given memory access is in done in pages via a cache and there may be DMA to work with or other assumptions embedded in the architecture.

I assume the temporal safety point is specific to data access that goes via a cache? I'd be interested to understand more, if you're able to point me towards a discussion of the considerations?

Yeah, Integrity is proprietary so perhaps not ideal for research work. I appreciate your point about pre-existing abstractions. Having worked with file serving protocols, I've had my share of incompatible assumptions to work around. Having that at the top of the stack is one thing; having it in the foundations is something no-one wants!