]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc/spectre_v2: Return skip code when miss_percent is high
authorThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 7 Dec 2021 13:05:57 +0000 (10:05 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 9 Dec 2021 11:41:21 +0000 (22:41 +1100)
commitbc39248e492fd1ba28d232369fde120f1dfe38a9
tree739ce1eb820303f317bf6356270c7a0635ccc08f
parent0119c247a3f9be0a5411cdc2add3cf2e5198b4ed
selftests/powerpc/spectre_v2: Return skip code when miss_percent is high

A mis-match between reported and actual mitigation is not restricted to the
Vulnerable case. The guest might also report the mitigation as "Software
count cache flush" and the host will still mitigate with branch cache
disabled.

So, instead of skipping depending on the detected mitigation, simply skip
whenever the detected miss_percent is the expected one for a fully
mitigated system, that is, above 95%.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211207130557.40566-1-cascardo@canonical.com
tools/testing/selftests/powerpc/security/spectre_v2.c