Page MenuHomeFreeBSD

Fix fault_type handling in vm_map_lookup().
ClosedPublic

Authored by markj on Dec 4 2019, 8:14 PM.
Tags
None
Referenced Files
F148920329: D22683.id.diff
Sat, Mar 21, 12:51 AM
Unknown Object (File)
Wed, Mar 18, 4:29 AM
Unknown Object (File)
Tue, Mar 10, 1:24 PM
Unknown Object (File)
Mon, Mar 9, 7:38 AM
Unknown Object (File)
Tue, Mar 3, 6:00 AM
Unknown Object (File)
Tue, Mar 3, 4:05 AM
Unknown Object (File)
Sat, Feb 28, 1:43 PM
Unknown Object (File)
Jan 28 2026, 6:32 PM
Subscribers

Details

Summary

Suppose that the map entry is wired, so that we later assign
fault_type = entry->protection. Suppose further that we jump back to
RetryLookup. Then fault_type will no longer contain the original
fault protection mask.

I think this is mostly harmless from a correctness standpoint. We end
up with a fault_type that is a superset of its correct value. We may
trigger a copy-on-write update to the entry while handling a read fault,
or we may end up returning KERN_PROTECTION_FAILURE for a fault that
should have succeeded if the entry protections change while the map lock
was dropped.

Submitted by: Wuyang Chung <wuyang.chung1@gmail.com>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable