diff options
author | alc <alc@FreeBSD.org> | 2012-08-17 05:02:29 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2012-08-17 05:02:29 +0000 |
commit | 1c4df46d33f6f47eb491ad2b04f5a49b017d406b (patch) | |
tree | eadb75ad0b9209138981b69cb2212e6b94494d17 /contrib/diff/src/util.c | |
parent | 15835e923bd523ef918dc1c1c26cf070050e17e2 (diff) | |
download | FreeBSD-src-1c4df46d33f6f47eb491ad2b04f5a49b017d406b.zip FreeBSD-src-1c4df46d33f6f47eb491ad2b04f5a49b017d406b.tar.gz |
Fix two problems with pmap_clear_modify().
First, pmap_clear_modify() is write protecting all mappings to the specified
page, not just clearing the modified bit. Specifically, it sets PTE_RO on
the PTE, which is wrong. Moreover, it is calling vm_page_dirty(), which is
not the expected behavior for pmap_clear_modify(). Generally speaking, the
machine-independent VM layer masks these mistakes. For example, setting
PTE_RO will result in additional soft faults, but not a catastrophe.
Second, pmap_clear_modify() may not clear the modified bits because it only
iterates over the PV list when the page has the PV_TABLE_MOD flag set and
elsewhere the pmap clears the PV_TABLE_MOD flag anytime a modified mapping
is write protected or destroyed. However, the page may still have other
mappings with the modified bit set.
Eliminate a stale comment.
Diffstat (limited to 'contrib/diff/src/util.c')
0 files changed, 0 insertions, 0 deletions