amd64 pmap: Fix pkru handling in pmap_remove().
When pmap_pkru_on_remove() is called, the sva argument value was advanced. Clear PKRU earlier when sva still specifies the start of the region. Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
b726d74fce
commit
7256d0fcfd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349427
@ -4998,6 +4998,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
|
|||||||
|
|
||||||
pmap_delayed_invl_start();
|
pmap_delayed_invl_start();
|
||||||
PMAP_LOCK(pmap);
|
PMAP_LOCK(pmap);
|
||||||
|
pmap_pkru_on_remove(pmap, sva, eva);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* special handling of removing one page. a very
|
* special handling of removing one page. a very
|
||||||
@ -5091,7 +5092,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
|
|||||||
out:
|
out:
|
||||||
if (anyvalid)
|
if (anyvalid)
|
||||||
pmap_invalidate_all(pmap);
|
pmap_invalidate_all(pmap);
|
||||||
pmap_pkru_on_remove(pmap, sva, eva);
|
|
||||||
PMAP_UNLOCK(pmap);
|
PMAP_UNLOCK(pmap);
|
||||||
pmap_delayed_invl_finish();
|
pmap_delayed_invl_finish();
|
||||||
vm_page_free_pages_toq(&free, true);
|
vm_page_free_pages_toq(&free, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user