Skip to content

Commit 952b98f

Browse files
committed
Loads to shadow-stack pages are allowed
1 parent 1b1a333 commit 952b98f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

riscv/mmu.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ reg_t mmu_t::walk(mem_access_info_t access_info)
557557
// shadow stack access cause store access fault if xwr!=010 and xwr!=001
558558
throw trap_store_access_fault(virt, addr, 0, 0);
559559
} else if (type == FETCH || hlvx ? !(pte & PTE_X) :
560-
type == LOAD ? !(pte & PTE_R) && !(mxr && (pte & PTE_X)) :
560+
type == LOAD ? !(pte & PTE_R) && !(sse && (pte & PTE_W)) && !(mxr && (pte & PTE_X)) :
561561
!(pte & PTE_W)) {
562562
break;
563563
} else if ((ppn & ((reg_t(1) << ptshift) - 1)) != 0) {

0 commit comments

Comments
 (0)