Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com,
	james.morse@arm.com
Subject: Re: [PATCH 3/3] arm64: errata: Expand speculative SSBS workaround (again)
Date: Thu, 1 Aug 2024 14:49:28 +0100	[thread overview]
Message-ID: <20240801134928.GC4794@willie-the-truck> (raw)
In-Reply-To: <20240801101803.1982459-4-mark.rutland@arm.com>

On Thu, Aug 01, 2024 at 11:18:03AM +0100, Mark Rutland wrote:
> A number of Arm Ltd CPUs suffer from errata whereby an MSR to the SSBS
> special-purpose register does not affect subsequent speculative
> instructions, permitting speculative store bypassing for a window of
> time.
> 
> We worked around this for a number of CPUs in commits:
> 
> * 7187bb7d0b5c7dfa ("arm64: errata: Add workaround for Arm errata 3194386 and 3312417")
> * 75b3c43eab594bfb ("arm64: errata: Expand speculative SSBS workaround")
> 
> Since then, similar errata have been published for a number of other Arm
> Ltd CPUs, for which the same mitigation is sufficient. This is described
> in their respective Software Developer Errata Notice (SDEN) documents:
> 
> * Cortex-A76 (MP052) SDEN v31.0, erratum 3324349
>   https://developer.arm.com/documentation/SDEN-885749/3100/
> 
> * Cortex-A77 (MP074) SDEN v19.0, erratum 3324348
>   https://developer.arm.com/documentation/SDEN-1152370/1900/
> 
> * Cortex-A78 (MP102) SDEN v21.0, erratum 3324344
>   https://developer.arm.com/documentation/SDEN-1401784/2100/
> 
> * Cortex-A78C (MP138) SDEN v16.0, erratum 3324346
>   https://developer.arm.com/documentation/SDEN-1707916/1600/
> 
> * Cortex-A78C (MP154) SDEN v10.0, erratum 3324347
>   https://developer.arm.com/documentation/SDEN-2004089/1000/
> 
> * Cortex-A725 (MP190) SDEN v5.0, erratum 3456106
>   https://developer.arm.com/documentation/SDEN-2832921/0500/
> 
> * Cortex-X1 (MP077) SDEN v21.0, erratum 3324344
>   https://developer.arm.com/documentation/SDEN-1401782/2100/
> 
> * Cortex-X1C (MP136) SDEN v16.0, erratum 3324346
>   https://developer.arm.com/documentation/SDEN-1707914/1600/
> 
> * Neoverse-N1 (MP050) SDEN v32.0, erratum 3324349
>   https://developer.arm.com/documentation/SDEN-885747/3200/
> 
> * Neoverse-V1 (MP076) SDEN v19.0, erratum 3324341
>   https://developer.arm.com/documentation/SDEN-1401781/1900/
> 
> Note that due to the manner in which Arm develops IP and tracks errata,
> some CPUs share a common erratum number and some CPUs have multiple
> erratum numbers for the same HW issue.
> 
> On parts without SB, it is necessary to use ISB for the workaround. The
> spec_bar() macro used in the mitigation will expand to a "DSB SY; ISB"
> sequence in this case, which is sufficient on all affected parts.
> 
> Enable the existing mitigation by adding the relevant MIDRs to
> erratum_spec_ssbs_list. The list is sorted alphanumerically (involving
> moving Neoverse-V3 after Neoverse-V2) so that this is easy to audit and
> potentially extend again in future. The Kconfig text is also updated to
> clarify the set of affected parts and the mitigation.
> 
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: James Morse <james.morse@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> ---
>  Documentation/arch/arm64/silicon-errata.rst | 18 +++++++++++++++++
>  arch/arm64/Kconfig                          | 22 +++++++++++++++------
>  arch/arm64/kernel/cpu_errata.c              | 11 ++++++++++-
>  3 files changed, 44 insertions(+), 7 deletions(-)

Thanks. This looks correct as far as I can tell:

Acked-by: Will Deacon <will@kernel.org>

Will


  parent reply	other threads:[~2024-08-01 13:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 10:18 [PATCH 0/3] arm64: errata: Expand speculative SSBS workaround (again) Mark Rutland
2024-08-01 10:18 ` [PATCH 1/3] arm64: cputype: Add Cortex-X1C definitions Mark Rutland
2024-08-01 11:42   ` Anshuman Khandual
2024-08-01 10:18 ` [PATCH 2/3] arm64: cputype: Add Cortex-A725 definitions Mark Rutland
2024-08-01 11:42   ` Anshuman Khandual
2024-08-01 10:18 ` [PATCH 3/3] arm64: errata: Expand speculative SSBS workaround (again) Mark Rutland
2024-08-01 12:06   ` Anshuman Khandual
2024-08-01 13:49   ` Will Deacon [this message]
2024-08-01 17:14 ` [PATCH 0/3] " 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=20240801134928.GC4794@willie-the-truck \
    --to=will@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    /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