[PATCH] mm/huge_memory: Initialise the tags of the huge zero folio
Catalin Marinas
catalin.marinas at arm.com
Tue Nov 4 00:52:01 PST 2025
On Mon, Nov 03, 2025 at 05:05:47PM -0800, Andrew Morton wrote:
> On Mon, 3 Nov 2025 15:59:39 +0000 Catalin Marinas <catalin.marinas at arm.com> wrote:
> > > > --- 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?
>
> I added it as a -fix patch thanks.
>
> And I added a Signed-off-by-you-by-me ;)
Thanks Andrew.
--
Catalin
More information about the linux-arm-kernel
mailing list