Skip to content

Commit

Permalink
Avoid dependence on asm ssp symbol
Browse files Browse the repository at this point in the history
Resolves #336
  • Loading branch information
aswaterman committed Oct 8, 2024
1 parent 7f3bef0 commit abadfdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pk/pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static void run_loaded_program(size_t argc, char** argv, uintptr_t kstack_top)
size_t shadow_stack_top = shadow_stack_bottom + shadow_stack_size;

set_csr(senvcfg, SENVCFG_SSE);
write_csr(ssp, shadow_stack_top);
asm volatile ("csrw %0, %1" :: "I" (CSR_SSP), "r" (shadow_stack_top) : "memory");
}

set_csr(senvcfg, SENVCFG_CBCFE | INSERT_FIELD(0, SENVCFG_CBIE, 1));
Expand Down

0 comments on commit abadfdc

Please sign in to comment.