HomeFreeBSD

arm64: Use the right PTE when downgrading perms in pmap_promote_l2()

Description

arm64: Use the right PTE when downgrading perms in pmap_promote_l2()

When promoting a run of small mappings to a superpage, we have to
downgrade clean, writable mappings to read-only, to handle the
possibility that the MMU will concurrently mark one of the mappings as
dirty.

The code which performed this operation for the first PTE in the run
used the wrong PTE pointer. As a result, the comparison would always
fail, aborting the promotion. This only occurs when promoting writable,
clean mappings.

Fixes: ca2cae0b4dd
Reviewed by: alc, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30642

Details

Provenance
markjAuthored on Jun 6 2021, 8:40 PM
Reviewer
alc
Differential Revision
D30642: arm64: Use the right PTE when downgrading perms in pmap_promote_l2()
Parents
rG1ea87e2a70c3: stand: Fix __elfN(loadimage) return value
Branches
Unknown
Tags
Unknown