[PATCH] powerpc: Fix mprotect on book3s32
Dave Vasilevsky
dave at vasilevsky.ca
Sun Nov 9 09:24:44 AEDT 2025
On 2025-11-08 14:16, Ritesh Harjani wrote:
> Shouldn't we flush all if we get tlb_flush request for full mm? e.g.
> Something like this maybe?
>
> +void hash__tlb_flush(struct mmu_gather *tlb)
> +{
> + if (tlb->fullmm || tlb->need_flush_all)
> + hash__flush_tlb_mm(tlb->mm);
> + else
> + hash__flush_range(tlb->mm, tlb->start, tlb->end);
> +}
That seems reasonable, I should be able to test it next by next
weekend and re-submit.
> Thanks again for pointing this out. How did you find this though?
> What hardware do you use?
I'm on an iBook G3 from 2001, running Arch Power:
https://archlinuxpower.org/. I found the bug because SheepShaver has a
configure test for mprotect, which was failing--I was quite surprised!
The bug reproduces easily on qemu (with the `mac99` machine), if you'd
like to try yourself.
-Dave
More information about the Linuxppc-dev
mailing list