HomeFreeBSD

sys: do not allow entering vm_fault() on boot until VM is initialized

Description

sys: do not allow entering vm_fault() on boot until VM is initialized

On amd64, a hack sets td_critnest to 1 in hammer_time(), and then clear
it before returning from hammer_time(), which is too early. Instead,
set TDP_NOFAULTING for thread0, and clear the flag after vm_init() finished.

Noted by: adrian
Reviewed by: adrian (previous version), markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54768

Details

Provenance
kibAuthored on Jan 18 2026, 9:14 PM
Reviewer
adrian
Differential Revision
D54768: sys: do not allow entering vm_fault() on boot until VM is initialized
Parents
rG3a6289e1e53f: .github: Disable checklist workflow on forks
Branches
Unknown
Tags
Unknown