]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
riscv: Fix pmap_fault_fixup for L3 pages
authorJessica Clarke <jrtc27@FreeBSD.org>
Mon, 6 Apr 2020 22:29:15 +0000 (22:29 +0000)
committerJessica Clarke <jrtc27@FreeBSD.org>
Mon, 6 Apr 2020 22:29:15 +0000 (22:29 +0000)
commit1dc32a6d7733062134855ef03980ae338e8212d6
tree81c4c5082544d4f3110c470903b8bf81b45a6b49
parentc79f5a43287f5f57c13d321724afe78a5ac647e6
riscv: Fix pmap_fault_fixup for L3 pages

Summary:
The parentheses being in the wrong place means that, for L3 pages,
oldpte has all bits except PTE_V cleared, and so all the subsequent
checks against oldpte will fail, causing us to bail out and not retry
the faulting instruction after an SFENCE.VMA. This causes a WITNESS +
INVARIANTS kernel to fault on the "Chisel P3" (BOOM-based) DARPA SSITH
GFE SoC in pmap_init when writing to pv_table and, being a nofault
entry, subsequently panic with:

  panic: vm_fault_lookup: fault on nofault entry, addr: 0xffffffc004e00000

Reviewed by: markj
Approved by: markj
Differential Revision: https://reviews.freebsd.org/D24315
sys/riscv/riscv/pmap.c