[PATCH] arm64: hugetlb: fix BBM for mprotect() on contiguous PTEs
Karl Mehltretter
kmehltretter at gmail.com
Wed Sep 2 10:06:56 PDT 2026
On Wed, Sep 02, 2026 at 08:16:36PM +0100, Dev Jain wrote:
> Upon discussing with Ryan I got to know, he was implementing the
> contpte stuff for non-hugetlb user mappings and that basically
> drove a clarification on the semantics of contiguous bit and
> this rule was added.
>
> If you see currently for non-hugetlb mprotect() we do not flush
> during contpte teardown.
>
> So if the above reasoning makes sense, I can infact audit and
> remove the flushes in the hugetlb helpers.
>
Well, that's quite a turn of events! I wasn't aware of R_JQQTC or the
architectural clarification behind contpte_wrprotect_ptes().
My QEMU checker was based on the older assumption in commit
410982303772 and the existing hugetlb comments, so it treated a
clear and remake without an intermediate TLBI as a violation.
So... Please consider this patch withdrawn.
It's good that this may have uncovered an opportunity to remove
the flushes in the hugetlb helpers.
Thanks,
Karl
More information about the linux-arm-kernel
mailing list