]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Ordinarily, during a superpage promotion or demotion within a pmap, the
authoralc <alc@FreeBSD.org>
Thu, 8 Aug 2019 06:26:34 +0000 (06:26 +0000)
committeralc <alc@FreeBSD.org>
Thu, 8 Aug 2019 06:26:34 +0000 (06:26 +0000)
commit6632123aeacc2a3a0f1db1dfd656f7d0fbeba109
tree912e1c30650cec91bf13e27148112802cabbec77
parent4c8a9e2fb6a968ca2d84c197efbf85b293903a1b
Ordinarily, during a superpage promotion or demotion within a pmap, the
pmap's lock ensures that other operations on the pmap don't observe the
old mapping being broken before the new mapping is established.  However,
pmap_kextract() doesn't acquire the kernel pmap's lock, so it may observe
the broken mapping.  And, if it does, it returns an incorrect result.

This revision implements a lock-free solution to this problem in
pmap_update_entry() and pmap_kextract() because pmap_kextract() can't
acquire the kernel pmap's lock.

Reported by: andrew, greg_unrelenting.technology
Reviewed by: andrew, markj
Tested by: greg_unrelenting.technology
X-MFC with: r350579
Differential Revision: https://reviews.freebsd.org/D21169
sys/arm64/arm64/pmap.c
sys/arm64/include/pte.h