]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: add sysfs vulnerability show for speculative store bypass
authorJeremy Linton <jeremy.linton@arm.com>
Mon, 15 Apr 2019 21:21:28 +0000 (16:21 -0500)
committerWill Deacon <will.deacon@arm.com>
Wed, 1 May 2019 13:47:55 +0000 (14:47 +0100)
commita1fa83d81e2b82fb6f7dcf79a1216db6ee58b762
tree300e37207d1293a08de24348aabaf40e5ee405e6
parentb68f706f781183287a026b9b01778a2f5b00a73e
arm64: add sysfs vulnerability show for speculative store bypass

Return status based on ssbd_state and __ssb_safe. If the
mitigation is disabled, or the firmware isn't responding then
return the expected machine state based on a whitelist of known
good cores.

Given a heterogeneous machine, the overall machine vulnerability
defaults to safe but is reset to unsafe when we miss the whitelist
and the firmware doesn't explicitly tell us the core is safe.
In order to make that work we delay transitioning to vulnerable
until we know the firmware isn't responding to avoid a case
where we miss the whitelist, but the firmware goes ahead and
reports the core is not vulnerable. If all the cores in the
machine have SSBS, then __ssb_safe will remain true.

Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/cpu_errata.c