// file: lib/libcheri/libcheri_sandbox_loader.c
int sandbox_class_load(struct sandbox_class *sbcp)
This will set up the code capability for a new sandbox class; (CHERI todo) set up the code and data capabilities differently. Steps includes:
int sandbox_object_load(struct sandbox_class *sbcp, struct sandbox_object *sbop)
This will create an initial reservation of space for the sandbox, and using anonymous memory that is neither readable nor writable. This ensures there is space for all the various segments we will be installing later. Steps includes:
The rough memory map is as follows:
// file:
// lib/libcheri/libcheri_sandbox_loader.c
/*
* J + 0x1000 [internal (non-shareable) heap]
* J [guard page]
* +0x600 Reserved vector
* +0x400 Reserved vector
* +0x200 Object-capability invocation vector
* +0x0 Run-time linker vector
* 0x8000 [memory mapped binary]
* 0x2000 [guard page]
* 0x1000 [read-only sandbox metadata page]
* 0x0000 [guard page]
*
*/
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?