Page MenuHomeFreeBSD

D61601.1794873989.diff
No OneTemporary

Authored By
Unknown
Size
773 B
Referenced Files
None
Subscribers
None

D61601.1794873989.diff

diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c
--- a/sys/powerpc/aim/mmu_radix.c
+++ b/sys/powerpc/aim/mmu_radix.c
@@ -3398,6 +3398,10 @@
("mmu_radix_enter_quick_locked: managed mapping within the clean submap"));
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
+ /* Prefaulting must not grant read access to a write-only mapping. */
+ if ((prot & (VM_PROT_READ | VM_PROT_EXECUTE)) == 0)
+ return (NULL);
+
/*
* In the case that a page table page is not
* resident, we are creating it here.
@@ -3483,7 +3487,7 @@
pa = VM_PAGE_TO_PHYS(m) | pmap_cache_bits(m->md.mdpg_cache_attrs);
if (prot & VM_PROT_EXECUTE)
pa |= PG_X;
- else
+ if (prot & VM_PROT_READ)
pa |= RPTE_EAA_R;
if ((m->oflags & VPO_UNMANAGED) == 0)
pa |= PG_MANAGED;

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 17, 12:06 AM (23 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41788377
Default Alt Text
D61601.1794873989.diff (773 B)

Event Timeline