Author: andrew Date: Mon May 21 16:14:53 2018 New Revision: 333985 URL: https://svnweb.freebsd.org/changeset/base/333985
Log: Restrict the faulting addresses we call pmap_fault from to just those that may fault due to superpage mappings being changed. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Mon May 21 16:13:43 2018 (r333984) +++ head/sys/arm64/arm64/trap.c Mon May 21 16:14:53 2018 (r333985) @@ -189,8 +189,16 @@ data_abort(struct thread *td, struct trapframe *frame, } } - if (pmap_fault(map->pmap, esr, far) == KERN_SUCCESS) - return; + /* + * We may fault from userspace or when in a DMAP region due to + * a superpage being unmapped when the access took place. In these + * cases we need to wait for the pmap to be unlocked and check + * if the translation is still invalid. + */ + if (map != kernel_map || VIRT_IN_DMAP(far)) { + if (pmap_fault(map->pmap, esr, far) == KERN_SUCCESS) + return; + } KASSERT(td->td_md.md_spinlock_count == 0, ("data abort with spinlock held")); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"