Skip to content

Commit cd3df04

Browse files
committed
Fix potential landing pad escape
If main memory contained an LPAD instruction but the incoherent I$ contained an unrelated instruction, then the landing-pad MSBs would not have been checked. Fix by making the I$ coherent with the LPAD when the initial landing-pad check is performed.
1 parent 56c416d commit cd3df04

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

riscv/mmu.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,7 @@ class mmu_t
346346

347347
inline insn_fetch_t load_insn(reg_t addr)
348348
{
349-
icache_entry_t entry;
350-
return refill_icache(addr, &entry)->data;
349+
return refill_icache(addr, &icache[icache_index(addr)])->data;
351350
}
352351

353352
std::tuple<bool, uintptr_t, reg_t> ALWAYS_INLINE access_tlb(const dtlb_entry_t* tlb, reg_t vaddr, reg_t allowed_flags = 0, reg_t required_flags = 0)

0 commit comments

Comments
 (0)