Page MenuHomeFreeBSD

vm_fault: handle KERN_PROTECTION_FAILURE
ClosedPublic

Authored by kib on Mar 27 2021, 11:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 30, 2:07 AM
Unknown Object (File)
Tue, Apr 29, 7:50 PM
Unknown Object (File)
Mon, Apr 21, 5:22 AM
Unknown Object (File)
Fri, Apr 18, 9:16 PM
Unknown Object (File)
Thu, Apr 17, 12:25 PM
Unknown Object (File)
Mar 18 2025, 3:31 AM
Unknown Object (File)
Mar 15 2025, 4:17 AM
Unknown Object (File)
Mar 10 2025, 8:31 PM
Subscribers
None

Details

Summary

pmap_enter(PMAP_ENTER_LARGEPAGE) may return KERN_PROTECTION_FAILURE due to PKRU inconsistency. Handle it in the call place from vm_fault_populate(), and in places which decode errors from vm_fault_populate()/vm_fault_allocate().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Mar 27 2021, 2:00 PM
markj added inline comments.
sys/vm/vm_fault.c
563

If psind == 0, we do not assert rv == KERN_SUCCESS, but it looks like we should.

sys/vm/vm_fault.c
563

Never mind, @jah fixed it in D29439.

This revision was automatically updated to reflect the committed changes.