diff --git a/general_bounds.c b/general_bounds.c index 8c51e4d..955c2d9 100644 --- a/general_bounds.c +++ b/general_bounds.c @@ -59,8 +59,8 @@ int main(int argc, char *argv[]) printf("Explicitly setting the bounds outside the range causes the following exception: "); fflush(stdout); - int32_t custom_bounds_array = cheri_setbounds(array, bounds); + int32_t *custom_bounds_array = cheri_setbounds(array, bounds); #else #error Platform not currently supported. #endif -} \ No newline at end of file +} diff --git a/hybrid/compartment_examples/inter_comp_call/base/main.c b/hybrid/compartment_examples/inter_comp_call/base/main.c index 4f75905..7f50638 100644 --- a/hybrid/compartment_examples/inter_comp_call/base/main.c +++ b/hybrid/compartment_examples/inter_comp_call/base/main.c @@ -98,8 +98,8 @@ void executive_switch(struct comp c) void *__capability comps_addr = (void *__capability) &comps; comps_addr = cheri_bounds_set(comps_addr, COMP_COUNT * COMP_SIZE); - asm("mov c19, %w0\n\t" - "mov c20, %w1\n\t" + asm("mov c19, %C0\n\t" + "mov c20, %C1\n\t" "mov x0, #0\n\t" "msr CID_EL0, c0" : diff --git a/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-redirect_clr/main.c b/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-redirect_clr/main.c index 4ce6017..e35e916 100644 --- a/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-redirect_clr/main.c +++ b/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-redirect_clr/main.c @@ -115,7 +115,7 @@ void init_comps() switcher_call = (void *__capability) switcher_caps; // Seal this capability to be only used via a `lpb` type call - asm("seal %w0, %w0, lpb" : "+r"(switcher_call) :); + asm("seal %C0, %C0, lpb" : "+r"(switcher_call) :); } void add_comp(uint8_t *_start_addr, void (*_comp_fn)(), void *_comp_fn_end) diff --git a/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-try_deref/main.c b/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-try_deref/main.c index 9eeb62e..6d91eb1 100644 --- a/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-try_deref/main.c +++ b/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-try_deref/main.c @@ -144,7 +144,7 @@ void init_comps() switcher_call = (void *__capability) switcher_caps; // Seal this capability to be only used via a `lpb` type call - asm("seal %w0, %w0, lpb" : "+r"(switcher_call) :); + asm("seal %C0, %C0, lpb" : "+r"(switcher_call) :); } void add_comp(uint8_t *_start_addr, void (*_comp_fn)(), void *_comp_fn_end) diff --git a/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-update_ddc/main.c b/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-update_ddc/main.c index 49c81ff..ba77f56 100644 --- a/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-update_ddc/main.c +++ b/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure-update_ddc/main.c @@ -110,7 +110,7 @@ void init_comps() switcher_call = (void *__capability) switcher_caps; // Seal this capability to be only used via a `lpb` type call - asm("seal %w0, %w0, lpb" : "+r"(switcher_call) :); + asm("seal %C0, %C0, lpb" : "+r"(switcher_call) :); } void add_comp(uint8_t *_start_addr, void (*_comp_fn)(), void *_comp_fn_end) diff --git a/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure/main.c b/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure/main.c index 9eeb62e..6d91eb1 100644 --- a/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure/main.c +++ b/hybrid/compartment_examples/inter_comp_call/malicious_compartments/secure/main.c @@ -144,7 +144,7 @@ void init_comps() switcher_call = (void *__capability) switcher_caps; // Seal this capability to be only used via a `lpb` type call - asm("seal %w0, %w0, lpb" : "+r"(switcher_call) :); + asm("seal %C0, %C0, lpb" : "+r"(switcher_call) :); } void add_comp(uint8_t *_start_addr, void (*_comp_fn)(), void *_comp_fn_end)