From: Catalin Marinas <catalin.marinas@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Will Deacon <will@kernel.org>, James Morse <james.morse@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Mark Brown <broonie@kernel.org>
Subject: [PATCH v5 0/4] arm64: Work around C1-Pro erratum 4193714 (CVE-2026-0995)
Date: Tue, 7 Apr 2026 11:28:40 +0100 [thread overview]
Message-ID: <20260407102848.2266988-1-catalin.marinas@arm.com> (raw)
That's version 5 of the C1-Pro workaround. Version 3 here:
https://lore.kernel.org/r/20260402101246.3870036-1-catalin.marinas@arm.com
Changes since v4:
- Static sme_dvmsync_cpus mask to avoid allocating under stop_machine().
Sashiko was right, even GFP_ATOMIC won't work under a raw_spin_lock()
- batch->cpumask allocated lazily on arch_tlbbatch_add_pending() only to
avoid a potential leak in case of task cloning failure. That's mostly
theoretical as the (mobile) systems affected are expected to be built
with CPUMASK_OFFSTACK=n (the GKI kernel defaults to NR_CPUS=32)
The other Sashiko report about the DSB in arch_tlbbatch_add_pending() is
correct but it's not much we can do about it. I don't expect this to be
noticeable at all on systems with a small number of CPUs.
As with v4, there's no longer a global sme_active_cpus mask, reducing
the risk DoS from a malicious app using SME.
Erratum description:
Arm C1-Pro prior to r1p3 has an erratum (4193714) where a TLBI+DSB
sequence might fail to ensure the completion of all outstanding SME
(Scalable Matrix Extension) memory accesses. The DVMSync message is
acknowledged before the SME accesses have fully completed, potentially
allowing pages to be reused before all in-flight accesses are done.
The workaround consists of executing a DSB locally (via IPI)
on all affected CPUs running with SME enabled, after the TLB
invalidation. This ensures the SME accesses have completed before the
IPI is acknowledged.
This has been assigned CVE-2026-0995:
https://developer.arm.com/documentation/111823/latest/
Catalin Marinas (4):
arm64: tlb: Introduce __tlbi_sync_s1ish_{kernel,batch}() for TLB
maintenance
arm64: tlb: Pass the corresponding mm to __tlbi_sync_s1ish()
arm64: cputype: Add C1-Pro definitions
arm64: errata: Work around early CME DVMSync acknowledgement
Documentation/arch/arm64/silicon-errata.rst | 2 +
arch/arm64/Kconfig | 12 +++
arch/arm64/include/asm/cpucaps.h | 2 +
arch/arm64/include/asm/cputype.h | 2 +
arch/arm64/include/asm/fpsimd.h | 21 +++++
arch/arm64/include/asm/tlbbatch.h | 10 ++-
arch/arm64/include/asm/tlbflush.h | 96 +++++++++++++++++++--
arch/arm64/kernel/cpu_errata.c | 30 +++++++
arch/arm64/kernel/entry-common.c | 3 +
arch/arm64/kernel/fpsimd.c | 79 +++++++++++++++++
arch/arm64/kernel/process.c | 36 ++++++++
arch/arm64/kernel/sys_compat.c | 2 +-
arch/arm64/tools/cpucaps | 1 +
13 files changed, 285 insertions(+), 11 deletions(-)
next reply other threads:[~2026-04-07 10:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 10:28 Catalin Marinas [this message]
2026-04-07 10:28 ` [PATCH v5 1/4] arm64: tlb: Introduce __tlbi_sync_s1ish_{kernel,batch}() for TLB maintenance Catalin Marinas
2026-04-07 10:28 ` [PATCH v5 2/4] arm64: tlb: Pass the corresponding mm to __tlbi_sync_s1ish() Catalin Marinas
2026-04-07 10:28 ` [PATCH v5 3/4] arm64: cputype: Add C1-Pro definitions Catalin Marinas
2026-04-07 10:28 ` [PATCH v5 4/4] arm64: errata: Work around early CME DVMSync acknowledgement Catalin Marinas
2026-04-10 12:09 ` Will Deacon
2026-04-10 12:55 ` Catalin Marinas
2026-04-10 13:26 ` Will Deacon
2026-04-10 12:11 ` [PATCH v5 0/4] arm64: Work around C1-Pro erratum 4193714 (CVE-2026-0995) Will Deacon
2026-04-10 18:47 ` Catalin Marinas
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=20260407102848.2266988-1-catalin.marinas@arm.com \
--to=catalin.marinas@arm.com \
--cc=broonie@kernel.org \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--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