linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Vasilevsky <dave@vasilevsky.ca>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Nadav Amit <nadav.amit@gmail.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] powerpc: Fix mprotect on book3s32
Date: Sat, 8 Nov 2025 17:24:44 -0500	[thread overview]
Message-ID: <baf4fd6c-1796-47cb-a9bb-72521a217453@vasilevsky.ca> (raw)
In-Reply-To: <878qgg49or.ritesh.list@gmail.com>

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




      reply	other threads:[~2025-11-08 22:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251027-vasi-mprotect-g3-v1-1-3c5187085f9a@vasilevsky.ca>
2025-11-08 19:16 ` Ritesh Harjani
2025-11-08 22:24   ` Dave Vasilevsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=baf4fd6c-1796-47cb-a9bb-72521a217453@vasilevsky.ca \
    --to=dave@vasilevsky.ca \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=nadav.amit@gmail.com \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=ritesh.list@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox