Page MenuHomeFreeBSD

Restore nofaulting operations after r352807
ClosedPublic

Authored by kib on Oct 12 2019, 3:27 PM.

Details

Summary

The TDP_NOFAULTING flag should be checked in vm_fault(), not in vm_fault_trap(). Otherwise kernel accesses to userspace like vn_io_fault() enter vm locking.

Reported by: pho

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib created this revision.Oct 12 2019, 3:27 PM
kib edited the summary of this revision. (Show Details)Oct 12 2019, 3:47 PM
kib added reviewers: alc, markj.
kib added a subscriber: pho.
alc added inline comments.Oct 12 2019, 4:48 PM
sys/vm/vm_fault.c
561 ↗(On Diff #63180)

This is now only used under KTRACE. I suspect that using curthread directly in those two places will be cheaper than using a callee-saves register for td.

alc accepted this revision.Oct 12 2019, 4:48 PM
This revision is now accepted and ready to land.Oct 12 2019, 4:48 PM
kib updated this revision to Diff 63189.Oct 12 2019, 5:31 PM

Stop using td in vm_fault_trap(), use curthread.

This revision now requires review to proceed.Oct 12 2019, 5:31 PM
kib marked an inline comment as done.Oct 12 2019, 5:32 PM
markj accepted this revision.Oct 12 2019, 5:42 PM
This revision is now accepted and ready to land.Oct 12 2019, 5:42 PM
alc accepted this revision.Oct 12 2019, 5:44 PM
This revision was automatically updated to reflect the committed changes.