Patch "selftests/powerpc/spectre_v2: Return skip code when miss_percent is high" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/powerpc/spectre_v2: Return skip code when miss_percent is high

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-powerpc-spectre_v2-return-skip-code-when-m.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 663467b6a1d6b37a325ed115f2dd3118f82eb589
Author: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxx>
Date:   Tue Dec 7 10:05:57 2021 -0300

    selftests/powerpc/spectre_v2: Return skip code when miss_percent is high
    
    [ Upstream commit 3c42e9542050d49610077e083c7c3f5fd5e26820 ]
    
    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@xxxxxxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20211207130557.40566-1-cascardo@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/powerpc/security/spectre_v2.c b/tools/testing/selftests/powerpc/security/spectre_v2.c
index adc2b7294e5fd..83647b8277e7d 100644
--- a/tools/testing/selftests/powerpc/security/spectre_v2.c
+++ b/tools/testing/selftests/powerpc/security/spectre_v2.c
@@ -193,7 +193,7 @@ int spectre_v2_test(void)
 			 * We are not vulnerable and reporting otherwise, so
 			 * missing such a mismatch is safe.
 			 */
-			if (state == VULNERABLE)
+			if (miss_percent > 95)
 				return 4;
 
 			return 1;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux