[PATCH 26/46] mm/mmu_gather: fix flushing ranges with 4 GiB or larger
David Hildenbrand (Arm)
david at kernel.org
Tue Oct 27 12:25:19 PDT 2026
On 10/27/26 08:35, Dev Jain wrote:
>
>
> On 27/10/26 4:47 am, David Hildenbrand (Arm) wrote:
>> From: Josef Bacik <josef at toxicpanda.com>
>>
>> __tlb_adjust_range() takes the size of the range which has to be flushed
>> as an unsigned int. Its callers, tlb_flush_{pte,pmd,pud,p4d}_range(), get
>> and pass an unsigned long. Consequently, a range that is 4 GiB or larger
>> gets truncated, possibly to 0.
>>
>> On arm64 with hugetlb, a 64k kernel can flush 16 GiB hugetlb PMDs, and a
>
> Nit: this wasn't obvious to me. Better expressed as:
> "a 64K kernel can have 16 GiB hugepage mapped contiguously at the PMD level"
>
>
>> 16k kernel can flush 64 GiB PUDs through tlb_unshare_pmd_ptdesc(). So
>> at least these two scenarios are affected.
>>
>> Fix it by flushing the proper range instead of the truncated one.
>
> Nit: after reading this I thought you are passing some other parameter now.
> But that is just a type change.
I fixed both up, thanks!
--
Cheers,
David
More information about the kexec
mailing list