Skip to contentSkip to conversation

target-openrisc: Remove executable flag for every page

PATCH New Sebastian Macke 1 participant 1 message Oct 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 target-openrisc: Remove executable flag for every page

Pages should be flagged executable only if the tlb executable flag is set or the mmu is off.

---
 target-openrisc/mmu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target-openrisc/mmu.c +1 -1
index 22d7cbe..dd487bd 100644
@@ -32,7 +32,7 @@ int cpu_openrisc_get_phys_nommu(OpenRISCCPU *cpu,
                                 int *prot, target_ulong address, int rw)
 {
     *physical = address;
-    *prot = PAGE_READ | PAGE_WRITE;
+    *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
     return TLBRET_MATCH;
 }
 @@ -187,7 +187,7 @@ int cpu_openrisc_handle_mmu_fault(CPUOpenRISCState

*env,
if (ret == TLBRET_MATCH) {
tlb_set_page(env, address & TARGET_PAGE_MASK,
- physical & TARGET_PAGE_MASK, prot | PAGE_EXEC,
+ physical & TARGET_PAGE_MASK, prot,

                      mmu_idx, TARGET_PAGE_SIZE);
         ret = 0;
     } else if (ret < 0) {
Signature · 1 line
1.7.9.5