linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: spectre-v2: remove Brahma-B53 from hardening
@ 2019-10-31 22:00 Florian Fainelli
  2019-11-11  3:33 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2019-10-31 22:00 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: bcm-kernel-feedback-list, catalin.marinas, will, Doug Berger,
	Florian Fainelli, Russell King, Julien Thierry, open list

From: Doug Berger <opendmb@gmail.com>

When the default processor handling was added to the function
cpu_v7_spectre_init() it only excluded other ARM implemented processor
cores. The Broadcom Brahma B53 core is not implemented by ARM so it
ended up falling through into the set of processors that attempt to use
the ARM_SMCCC_ARCH_WORKAROUND_1 service to harden the branch predictor.

Since this workaround is not necessary for the Brahma-B53 this commit
explicitly checks for it and prevents it from applying a branch
predictor hardening workaround.

Fixes: 10115105cb3a ("ARM: spectre-v2: add firmware based hardening")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/mm/proc-v7-bugs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mm/proc-v7-bugs.c b/arch/arm/mm/proc-v7-bugs.c
index 9a07916af8dd..a6554fdb56c5 100644
--- a/arch/arm/mm/proc-v7-bugs.c
+++ b/arch/arm/mm/proc-v7-bugs.c
@@ -65,6 +65,9 @@ static void cpu_v7_spectre_init(void)
 		break;
 
 #ifdef CONFIG_ARM_PSCI
+	case ARM_CPU_PART_BRAHMA_B53:
+		/* Requires no workaround */
+		break;
 	default:
 		/* Other ARM CPUs require no workaround */
 		if (read_cpuid_implementor() == ARM_CPU_IMP_ARM)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: spectre-v2: remove Brahma-B53 from hardening
  2019-10-31 22:00 [PATCH] ARM: spectre-v2: remove Brahma-B53 from hardening Florian Fainelli
@ 2019-11-11  3:33 ` Florian Fainelli
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2019-11-11  3:33 UTC (permalink / raw)
  To: Florian Fainelli, linux-arm-kernel
  Cc: bcm-kernel-feedback-list, catalin.marinas, will, Doug Berger,
	Russell King, Julien Thierry, open list



On 10/31/2019 3:00 PM, Florian Fainelli wrote:
> From: Doug Berger <opendmb@gmail.com>
> 
> When the default processor handling was added to the function
> cpu_v7_spectre_init() it only excluded other ARM implemented processor
> cores. The Broadcom Brahma B53 core is not implemented by ARM so it
> ended up falling through into the set of processors that attempt to use
> the ARM_SMCCC_ARCH_WORKAROUND_1 service to harden the branch predictor.
> 
> Since this workaround is not necessary for the Brahma-B53 this commit
> explicitly checks for it and prevents it from applying a branch
> predictor hardening workaround.
> 
> Fixes: 10115105cb3a ("ARM: spectre-v2: add firmware based hardening")
> Signed-off-by: Doug Berger <opendmb@gmail.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Submitted:

https://www.armlinux.org.uk/developer/patches/viewpatch.php?id=8937/1
-- 
Florian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-11  3:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 22:00 [PATCH] ARM: spectre-v2: remove Brahma-B53 from hardening Florian Fainelli
2019-11-11  3:33 ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).