Page MenuHomeFreeBSD

Do not loose dirty bits for removing PROT_WRITE on arm64.
ClosedPublic

Authored by kib on Apr 10 2017, 7:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 1 2024, 7:43 AM
Unknown Object (File)
Nov 6 2023, 2:54 PM
Unknown Object (File)
May 3 2023, 2:42 AM
Unknown Object (File)
Jan 18 2023, 5:02 PM
Unknown Object (File)
Dec 4 2022, 7:57 PM
Unknown Object (File)
Apr 27 2017, 11:37 AM
Unknown Object (File)
Apr 13 2017, 6:22 AM
Unknown Object (File)
Apr 11 2017, 10:23 PM
Subscribers

Details

Reviewers
andrew
alc
Summary

Arm64 pmap interprets accessed writable ptes as modified, since ARMv8.0 does not track Dirty Bit Modifier in hardware. If writable bit is removed, page must be marked as dirty for MI VM.

This change is most important for COW, where fork caused losing content of the dirty pages which were not yet scanned by pagedaemon.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 8645
Build 8972: CI src buildJenkins

Event Timeline

This revision is now accepted and ready to land.Apr 10 2017, 9:35 AM

pmap_remove() needs the same fix.

P.S. Please change "loose" to "lose" when you commit this revision. :-)

In D10339#214208, @alc wrote:

pmap_remove() needs the same fix.

Could you, please, elaborate ? pmap_remove() calls pmap_remove_l3() to clear pte, and the call to vm_page_dirty() is there. Superpages are always demoted before removal.

I am wrong about pmap_remove(). You are correct. It does correctly update each page's dirty field.