[PATCH] mm/huge_memory: Initialise the tags of the huge zero folio
Catalin Marinas
catalin.marinas at arm.com
Mon Nov 3 07:59:39 PST 2025
On Mon, Nov 03, 2025 at 03:41:03PM +0100, David Hildenbrand (Red Hat) wrote:
> > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
> > index d816ff44faff..125dfa6c613b 100644
> > --- a/arch/arm64/mm/fault.c
> > +++ b/arch/arm64/mm/fault.c
> > @@ -969,6 +969,16 @@ struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma,
> > void tag_clear_highpage(struct page *page)
> > {
> > + /*
> > + * Check if MTE is supported and fall back to clear_highpage().
> > + * get_huge_zero_folio() unconditionally passes __GFP_ZEROTAGS and
> > + * post_alloc_hook() will invoke tag_clear_highpage().
> > + */
> > + if (!system_supports_mte()) {
> > + clear_highpage(page);
> > + return;
> > + }
>
> LGTM!
I tested it with and without MTE and it works fine.
Andrew, would you like a separate patch or are you ok with folding this
into the previous patch?
Thanks.
--
Catalin
More information about the linux-arm-kernel
mailing list