Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F96252250
D28922.id84678.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28922.id84678.diff
View Options
Index: sys/amd64/amd64/pmap.c
===================================================================
--- sys/amd64/amd64/pmap.c
+++ sys/amd64/amd64/pmap.c
@@ -11348,9 +11348,6 @@
continue;
}
pa = pdpe & PG_FRAME;
- if (PMAP_ADDRESS_IN_LARGEMAP(sva) &&
- vm_phys_paddr_to_vm_page(pa) == NULL)
- goto restart;
if ((pdpe & PG_PS) != 0) {
sva = rounddown2(sva, NBPDP);
sysctl_kmaps_check(sb, &range, sva, pml4e, pdpe,
@@ -11359,6 +11356,15 @@
sva += NBPDP;
continue;
}
+ if (PMAP_ADDRESS_IN_LARGEMAP(sva) &&
+ vm_phys_paddr_to_vm_page(pa) == NULL) {
+ /*
+ * Page table pages for the large map may be
+ * freed. Validate the next-level address
+ * before descending.
+ */
+ goto restart;
+ }
pd = (pd_entry_t *)PHYS_TO_DMAP(pa);
for (k = pmap_pde_index(sva); k < NPDEPG; k++) {
@@ -11370,9 +11376,6 @@
continue;
}
pa = pde & PG_FRAME;
- if (PMAP_ADDRESS_IN_LARGEMAP(sva) &&
- vm_phys_paddr_to_vm_page(pa) == NULL)
- goto restart;
if ((pde & PG_PS) != 0) {
sva = rounddown2(sva, NBPDR);
sysctl_kmaps_check(sb, &range, sva,
@@ -11381,6 +11384,15 @@
sva += NBPDR;
continue;
}
+ if (PMAP_ADDRESS_IN_LARGEMAP(sva) &&
+ vm_phys_paddr_to_vm_page(pa) == NULL) {
+ /*
+ * Page table pages for the large map
+ * may be freed. Validate the
+ * next-level address before descending.
+ */
+ goto restart;
+ }
pt = (pt_entry_t *)PHYS_TO_DMAP(pa);
for (l = pmap_pte_index(sva); l < NPTEPG; l++,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 25, 5:32 AM (16 m, 2 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12736221
Default Alt Text
D28922.id84678.diff (1 KB)
Attached To
Mode
D28922: pmap: Fix largemap restart checks in the kernel_maps sysctl handler
Attached
Detach File
Event Timeline
Log In to Comment