mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-16 21:34:10 +00:00
MFamd64 SVN rev 179471 CVS rev 1.619
Correct an error in pmap_promote_pde() that may result in an errant promotion within the kernel's address space.
This commit is contained in:
parent
ccb33393cc
commit
2af89e55cc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183169
|
@ -2883,9 +2883,8 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va)
|
|||
|
||||
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
|
||||
firstpte = vtopte(trunc_4mpage(va));
|
||||
KASSERT((*firstpte & PG_V) != 0,
|
||||
("pmap_promote_pde: firstpte is missing PG_V"));
|
||||
if ((*firstpte & PG_A) == 0) {
|
||||
newpde = *firstpte;
|
||||
if ((newpde & (PG_A | PG_V)) != (PG_A | PG_V)) {
|
||||
pmap_pde_p_failures++;
|
||||
CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x"
|
||||
" in pmap %p", va, pmap);
|
||||
|
@ -2897,14 +2896,13 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va)
|
|||
" in pmap %p", va, pmap);
|
||||
return;
|
||||
}
|
||||
pa = *firstpte & PG_PS_FRAME;
|
||||
newpde = *firstpte;
|
||||
if ((newpde & (PG_M | PG_RW)) == PG_RW)
|
||||
newpde &= ~PG_RW;
|
||||
|
||||
/*
|
||||
* Check all the ptes before promotion
|
||||
*/
|
||||
pa = newpde & PG_PS_FRAME;
|
||||
for (pte = firstpte; pte < firstpte + NPTEPG; pte++) {
|
||||
retry:
|
||||
oldpte = *pte;
|
||||
|
|
Loading…
Reference in a new issue