HomeFreeBSD

[PowerPC] Fix 32-bit Book-E panic due to pve leak

Description

[PowerPC] Fix 32-bit Book-E panic due to pve leak

On an INVARIANTS kernel on 32-bit Book-E, we were panicing when running
the libproc tests. This was caused by extra pv entries being generated
accidentally by the pmap icache invalidation code.

Use the same VA (i.e. 0) when freeing the temporary mapping, instead of
some arbitrary address within the zero page.

Failure to do this was causing kernel-side icache syncing to leak
PVE entries when invalidating icache for a non page-aligned address, which
would later result in pages erroneously showing up as mapped to vm_page.

This bug was introduced in r347354 in 2019.

Reviewed by: jhibbits (in irc)
Sponsored by: Tag1 Consulting, Inc.

Details

Provenance
bdragonAuthored on Mar 29 2021, 10:59 PM
Parents
rG9fa8d1582b44: Put bandaid for nhgrp_dump_sysctl() malloc KASSERT().
Branches
Unknown
Tags
Unknown