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)
Tue, Mar 18, 3:31 AM
Unknown Object (File)
Sat, Mar 15, 4:17 AM
Unknown Object (File)
Mar 10 2025, 8:31 PM
Unknown Object (File)
Mar 9 2025, 9:38 PM
Unknown Object (File)
Feb 24 2025, 8:59 AM
Unknown Object (File)
Feb 24 2025, 5:28 AM
Unknown Object (File)
Feb 22 2025, 2:35 PM
Unknown Object (File)
Feb 3 2025, 9:50 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 Not Applicable
Unit
Tests Not Applicable

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.