From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E32A481648 for ; Thu, 2 Jul 2026 12:49:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782996587; cv=none; b=F6SErHP0WTDGTSKQkfCG6QT5NcnSKBmaHUnPHsgDMlI3Tz5IR1Qff8MEkWV9yezfaNFTm4vOCVmPlixhTIkFG1XIjbM5peM57S9HPm6UZuurbsroH5dH0uGSk/fOqqCDOxDKk1IWokcZbvcpQnp7IBmf+q9PIKgDGudwtfjcqoQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782996587; c=relaxed/simple; bh=xJW1Uwt4QJCDdS2j4iq81Ki7O3/NeztcX3AE9QgMinY=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=uoSzcSzo/i0rP16n625rEdnHjGQOvQ9p1lmB5jK8E2Ya39swdOucISo3hyM0aUxlhLEo6Uf+FkiUiwA7QPL63eLb5UDW3k/CZp/Nh//a6Um7uwlrvAzS6t3OpIB4qfqb0w+4yyPQ2ywr3RlWL3nCJfPhwBp0vlxKkX491iowyEQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eEu5bE8o; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eEu5bE8o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A3CA1F00A3D; Thu, 2 Jul 2026 12:49:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782996585; bh=yLsNQX7GSsJgc5dVquyAv5RF7dNga6zsxvy/1nBChj8=; h=Subject:To:Cc:From:Date; b=eEu5bE8oHj8dP4INsGFrvKyug7YW0vLidKPcdYLcmwMHME8SZ4QZMn9JMUV1u5K7+ jEJzPuU6IjuYCZbrPkh3bxiSryGYCuKcQb1QAtCwEeGzuar+Oi0EtWwzXSrysm05hM 4J4VHKwr0q0ZdRM+4keVdeeB5IGoW/YbX3QpIg2E= Subject: FAILED: patch "[PATCH] KVM: arm64: Omit tag sync on stage-2 mappings of the zero" failed to apply to 5.10-stable tree To: ardb@kernel.org,catalin.marinas@arm.com,will@kernel.org Cc: From: Date: Thu, 02 Jul 2026 14:49:43 +0200 Message-ID: <2026070243-tapestry-thinning-690d@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 2986a625740599fe6e7635b0586fed2a95bcd1f7 # git commit -s git send-email --to '' --in-reply-to '2026070243-tapestry-thinning-690d@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 2986a625740599fe6e7635b0586fed2a95bcd1f7 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Thu, 4 Jun 2026 17:11:56 +0200 Subject: [PATCH] KVM: arm64: Omit tag sync on stage-2 mappings of the zero page Commit f620d66af316 ("arm64: mte: Do not flag the zero page as PG_mte_tagged") removed the PG_mte_tagged flag from the zero page, but missed a KVM code path that may set this flag on the zero page when it is used in a stage-2 CoW mapping of anonymous memory. So disregard the zero page explicitly in sanitise_mte_tags(). Fixes: f620d66af316 ("arm64: mte: Do not flag the zero page as PG_mte_tagged") Cc: stable@vger.kernel.org # 5.10.x Suggested-by: Catalin Marinas Signed-off-by: Ard Biesheuvel Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index d089c107d9b7..445d6cf035c9 100644 --- a/arch/arm64/kvm/mmu.c +++ b/arch/arm64/kvm/mmu.c @@ -1479,6 +1479,11 @@ static void sanitise_mte_tags(struct kvm *kvm, kvm_pfn_t pfn, if (!kvm_has_mte(kvm)) return; + if (is_zero_pfn(pfn)) { + WARN_ON_ONCE(nr_pages != 1); + return; + } + if (folio_test_hugetlb(folio)) { /* Hugetlb has MTE flags set on head page only */ if (folio_try_hugetlb_mte_tagging(folio)) {