20 lines
355 B
C
20 lines
355 B
C
#include <cheriintrin.h>
|
|
#include <stdint.h>
|
|
|
|
int main() {
|
|
void *__capability csp;
|
|
|
|
// Set address
|
|
csp = (void *__capability)0x80001000;
|
|
|
|
// Set bounds
|
|
csp = cheri_bounds_set(csp, 8);
|
|
|
|
// Increment offset
|
|
csp = cheri_offset_increment(csp, 10);
|
|
|
|
uint64_t val = *(uint64_t *__capability)csp;
|
|
|
|
while (1) {}
|
|
return 0;
|
|
} |