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 A980C480DFD for ; Thu, 2 Jul 2026 12:49:47 +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=1782996589; cv=none; b=exZ6CgsmVeAy48gKuYcdYMv+kY0YQphLCzFtatxGkyJmBsZPdAHVErKydyjedNDbGP/AgdUIco9gtqXxrs6CohYkUIu4o8q6/Ws+GHAQpFOFJryAqWPNqYwAclwDWg3sP0kg2cOZTS0GoHJ9UjUzT+jhS8VIXMtPKYT1yOQJhzw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782996589; c=relaxed/simple; bh=ijIIMATKrTI+EV+tHR6LVM8dVADL9DIzao/xM3+WK/Q=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=RyTYVJdSa09uejihgq4L+cL4sOva7ih76+ccz1gGHPc6La6WAZh5VUrjaeH+QSmot+rjLqGFgJ0otv3nPlwxTcMa4hZBDvKmq1FqIGTRj+w27PcMm8fp9sZK8vwF7k1m3RAw9UF+x2kyUMayBLDTRuyuFNHLYMShKptEVjj6V5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1ZB0c64j; 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="1ZB0c64j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DC241F000E9; Thu, 2 Jul 2026 12:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782996587; bh=w4yCIRmpaIbkFoGJ5dJEPBx6ASE9DkXgJXMIJL2nIbk=; h=Subject:To:Cc:From:Date; b=1ZB0c64jnPfj3sXXD2vrM0GmRWhuJFI5lJLTQ6YkeRxyLO6FvazgUWlx+Mr+1NyKj AxjTJNNZ4U16aEYIyIdV/EcxW4UtU/W8YMdwlNpYG4hObH0oNedCDRKdN2duPhpYaH rud9O16pmEL+9CGVeUppjQ7KXKCg0iqKr11GR42g= Subject: FAILED: patch "[PATCH] KVM: arm64: Omit tag sync on stage-2 mappings of the zero" failed to apply to 6.1-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-portable-tissue-14ab@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 6.1-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-6.1.y git checkout FETCH_HEAD git cherry-pick -x 2986a625740599fe6e7635b0586fed2a95bcd1f7 # git commit -s git send-email --to '' --in-reply-to '2026070243-portable-tissue-14ab@gregkh' --subject-prefix 'PATCH 6.1.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)) {