Skip to content

Commit

Permalink
Merge pull request #1717 from riscv-software-src/fix-ss-load
Browse files Browse the repository at this point in the history
Loads to shadow-stack pages are allowed
  • Loading branch information
aswaterman authored Jul 4, 2024
2 parents 4a2da91 + 952b98f commit 98d2c29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riscv/mmu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ reg_t mmu_t::walk(mem_access_info_t access_info)
// shadow stack access cause store access fault if xwr!=010 and xwr!=001
throw trap_store_access_fault(virt, addr, 0, 0);
} else if (type == FETCH || hlvx ? !(pte & PTE_X) :
type == LOAD ? !(pte & PTE_R) && !(mxr && (pte & PTE_X)) :
type == LOAD ? !(pte & PTE_R) && !(sse && (pte & PTE_W)) && !(mxr && (pte & PTE_X)) :
!(pte & PTE_W)) {
break;
} else if ((ppn & ((reg_t(1) << ptshift) - 1)) != 0) {
Expand Down

0 comments on commit 98d2c29

Please sign in to comment.