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)
Sat, Dec 27, 11:55 AM
Unknown Object (File)
Wed, Dec 24, 1:17 PM
Unknown Object (File)
Nov 28 2025, 12:50 PM
Unknown Object (File)
Nov 27 2025, 3:08 AM
Unknown Object (File)
Nov 26 2025, 10:47 PM
Unknown Object (File)
Nov 26 2025, 9:01 PM
Unknown Object (File)
Nov 25 2025, 6:19 AM
Unknown Object (File)
Nov 16 2025, 5:54 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.