freebsd-dev/sys/powerpc/booke
Justin Hibbits ae672aa5e3 powerpc/pmap: Fix pte_find_next() iterators for booke64 pmap
After r361988 fixed the reference count leak on booke64, it became possible
for an iteration somewhere in the middle of a page to become stale, with the
page vanishing (correctly) due to all PTEs on that page going away.
pte_find_next() would start at that iterator, and move along 'higher' order
directory pages until it finds a valid one, without zeroing out the lower
order pages.  For instance:

	/* Find next pte at or above 0x10002000. */
	pte = pte_find_next(pmap, &(0x10002000));
	pte_remove(pmap, pte);
	/* This pte was the last reference in the page table page, page is
	 * gone.
	 */
	pte = pte_find_next(pmap, 0x10002000);
	/* pte_find_next will see 0x10002000's page is gone, and jump to the
	 * next one, but starting iteration at the '0x2000' slot, skipping
	 * 0x0000 and 0x1000.
	 */

This caused some processes, like git, to trip the KASSERT() in
pmap_release().

Fix this by zeroing all lower order iterators at each level.
2020-06-10 23:03:35 +00:00
..
booke_machdep.c powerpc/mmu: Convert PowerPC pmap drivers to ifunc from kobj 2020-05-27 01:24:12 +00:00
locore.S powerpc/booke: Fix 32-bit Book-E SMP AP bringup 2019-12-04 03:41:55 +00:00
machdep_e500.c powerpc: Add a CPU-custom machine check handler 2020-05-10 19:00:57 +00:00
mp_cpudep.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
platform_bare.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
pmap_32.c powerpc/mmu: Convert PowerPC pmap drivers to ifunc from kobj 2020-05-27 01:24:12 +00:00
pmap_64.c powerpc/pmap: Fix pte_find_next() iterators for booke64 pmap 2020-06-10 23:03:35 +00:00
pmap.c powerpc: Use IFUNCs for copyin/copyout/etc 2020-06-06 03:09:12 +00:00
spe.c powerpc: Simplify _nodrop variants of FPU and vector register saves 2020-03-13 01:27:37 +00:00
trap_subr.S powerpc/booke: Change Book-E 64-bit pmap to 4-level table 2020-04-11 00:12:34 +00:00