public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
	Oliver Upton <oupton@kernel.org>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Sudeep Holla <sudeep.holla@kernel.org>,
	James Morse <james.morse@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Mark Brown <broonie@kernel.org>,
	kvmarm@lists.linux.dev
Subject: Re: [PATCH v3 4/5] arm64: errata: Work around early CME DVMSync acknowledgement
Date: Fri, 27 Mar 2026 19:15:31 +0000	[thread overview]
Message-ID: <acbXU2IEi4CPyoqU@arm.com> (raw)
In-Reply-To: <20260323162408.4163113-5-catalin.marinas@arm.com>

On Mon, Mar 23, 2026 at 04:24:04PM +0000, Catalin Marinas wrote:
> +void sme_enable_dvmsync(void)
> +{
> +	if ((!cpumask_available(sme_dvmsync_cpus) &&
> +	     !zalloc_cpumask_var(&sme_dvmsync_cpus, GFP_ATOMIC)) ||
> +	    (!cpumask_available(sme_active_cpus) &&
> +	     !zalloc_cpumask_var(&sme_active_cpus, GFP_ATOMIC)))
> +		panic("Unable to allocate the cpumasks for SME DVMSync erratum");
> +
> +	cpumask_set_cpu(smp_processor_id(), sme_dvmsync_cpus);
> +}

Sashiko (correctly) highlighted a race here. This function, even if the
erratum is a local cpu feature, is still called via stop_machine() on
all active cpus when the non-boot features are initialised. It only
matters if CPUMASK_OFFSTACK is enabled. I'll add a fix, most likely a
lock around this to serialise the cpumask initialisation.

-- 
Catalin


  reply	other threads:[~2026-03-27 19:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 16:24 [PATCH v3 0/5] arm64: Work around C1-Pro erratum 4193714 (CVE-2026-0995) Catalin Marinas
2026-03-23 16:24 ` [PATCH v3 1/5] arm64: tlb: Introduce __tlbi_sync_s1ish_{kernel,batch}() for TLB maintenance Catalin Marinas
2026-03-23 16:24 ` [PATCH v3 2/5] arm64: tlb: Pass the corresponding mm to __tlbi_sync_s1ish() Catalin Marinas
2026-03-23 16:24 ` [PATCH v3 3/5] arm64: cputype: Add C1-Pro definitions Catalin Marinas
2026-03-23 16:24 ` [PATCH v3 4/5] arm64: errata: Work around early CME DVMSync acknowledgement Catalin Marinas
2026-03-27 19:15   ` Catalin Marinas [this message]
2026-03-23 16:24 ` [PATCH v3 5/5] KVM: arm64: Add SMC hook for SME dvmsync erratum Catalin Marinas
2026-03-24 10:14   ` Vincent Donnefort
2026-03-24 12:56     ` Catalin Marinas
2026-03-23 17:53 ` [PATCH v3 0/5] arm64: Work around C1-Pro erratum 4193714 (CVE-2026-0995) Mark Rutland

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=acbXU2IEi4CPyoqU@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=broonie@kernel.org \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=sudeep.holla@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