diff options
author | alc <alc@FreeBSD.org> | 2012-10-08 16:57:05 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2012-10-08 16:57:05 +0000 |
commit | 41b1f8207c32e613f4f60a6b4e70ff2fb877a32e (patch) | |
tree | c9d5fbd978bf6d11a9da39e1dcf430dca7c9ea8e /sys/libkern/strcspn.c | |
parent | ea2e90dbb4d21d52967a0d5a48c7c68205b80759 (diff) | |
download | FreeBSD-src-41b1f8207c32e613f4f60a6b4e70ff2fb877a32e.zip FreeBSD-src-41b1f8207c32e613f4f60a6b4e70ff2fb877a32e.tar.gz |
In a few places, like the implementation of ptrace(), a thread may call
upon pmap_enter() to create a mapping within a different address space,
i.e., not the thread's own address space. On i386, this entails the
creation of a temporary mapping to the affected page table page (PTP). In
general, pmap_enter() will read from this PTP, allocate a PV entry, and
write to this PTP. The trouble comes when the system is short of memory.
In order to allocate a new PV entry, an older PV entry has to be
reclaimed. Reclaiming a PV entry involves destroying a mapping, which
requires access to the affected PTP. Thus, the PTP mapped at the
beginning of pmap_enter() is no longer mapped at the end of pmap_enter(),
which leads to pmap_enter() modifying the wrong PTP. To address this
problem, pmap_pv_reclaim() is changed to use an alternate method of
mapping PTPs.
Update a related comment.
Reported by: pho
Diagnosed by: kib
MFC after: 5 days
Diffstat (limited to 'sys/libkern/strcspn.c')
0 files changed, 0 insertions, 0 deletions