mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,will@kernel.org,david@kernel.org,broonie@kernel.org,b-padhi@ti.com,aishwarya.tcv@arm.com,catalin.marinas@arm.com,akpm@linux-foundation.org
Subject: + mm-huge_memory-initialise-the-tags-of-the-huge-zero-folio-fix.patch added to mm-hotfixes-unstable branch
Date: Mon, 03 Nov 2025 17:04:55 -0800	[thread overview]
Message-ID: <20251104010456.09A00C4CEE7@smtp.kernel.org> (raw)


The patch titled
     Subject: mm-huge_memory-initialise-the-tags-of-the-huge-zero-folio-fix
has been added to the -mm mm-hotfixes-unstable branch.  Its filename is
     mm-huge_memory-initialise-the-tags-of-the-huge-zero-folio-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-huge_memory-initialise-the-tags-of-the-huge-zero-folio-fix.patch

This patch will later appear in the mm-hotfixes-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Catalin Marinas <catalin.marinas@arm.com>
Subject: mm-huge_memory-initialise-the-tags-of-the-huge-zero-folio-fix
Date: Mon, 3 Nov 2025 14:30:12 +0000

Handle the arch mte_zero_clear_page_tags() code issuing MTE
instructions irrespective of whether the hardware supports it.

Link: https://lkml.kernel.org/r/aQi8dA_QpXM8XqrE@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lkml.kernel.org/r/aQiu-hU3x5V5drHF@finisterre.sirena.org.uk
Tested-by: Beleswar Padhi <b-padhi@ti.com>
Cc: Aishwarya TCV <aishwarya.tcv@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: David Hildenbrand (Red Hat) <david@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arm64/mm/fault.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/arch/arm64/mm/fault.c~mm-huge_memory-initialise-the-tags-of-the-huge-zero-folio-fix
+++ a/arch/arm64/mm/fault.c
@@ -969,6 +969,16 @@ struct folio *vma_alloc_zeroed_movable_f
 
 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;
+	}
+
 	/* Newly allocated page, shouldn't have been tagged yet */
 	WARN_ON_ONCE(!try_page_mte_tagging(page));
 	mte_zero_clear_page_tags(page_address(page));
_

Patches currently in -mm which might be from catalin.marinas@arm.com are

mm-huge_memory-initialise-the-tags-of-the-huge-zero-folio.patch
mm-huge_memory-initialise-the-tags-of-the-huge-zero-folio-fix.patch


                 reply	other threads:[~2025-11-04  1:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20251104010456.09A00C4CEE7@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=aishwarya.tcv@arm.com \
    --cc=b-padhi@ti.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=david@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=will@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;
as well as URLs for NNTP newsgroup(s).