spectre_v2 from ubuntu_kernel_selftests ADT test failure with 5.13/5.11 ppc64el

Bug #1953366 reported by Kelsey Steele
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Impish
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

This is a scripted bug report about ADT failures while running linux tests for linux/5.13.0-23.23 on impish. Whether this is caused by the dep8 tests of the tested source or the kernel has yet to be determined.

This test was previously being skipped. After recent test changes, it's now showing up as a failure. Not a regression.

ubuntu_kernel_selftests.powerpc/security:spectre_v2 consistently failing on 5.13 and 5.11

Found failing on:
  Impish/linux 5.13.0-23.23
  Hirsute/linux 5.11.0-42.46 (passed on first run, though failing after retrigger)
  Foal/hwe-5.13 5.13.0-23.23~20.04.1
  Focal/hwe-5.11 5.11.0-42.46~20.04.1

23:45:31 DEBUG| [stdout] # selftests: powerpc/security: spectre_v2
23:45:31 DEBUG| [stdout] # test: spectre_v2
23:45:31 DEBUG| [stdout] # tags: git_version:d9c024c2-dirty
23:45:50 DEBUG| [stdout] # sysfs reports: 'Mitigation: Software count cache flush, Software link stack flush'
23:45:50 DEBUG| [stdout] # PM_BR_PRED_CCACHE: result 2147483649 running/enabled 19680067308
23:45:50 DEBUG| [stdout] # PM_BR_MPRED_CCACHE: result 2147475077 running/enabled 19680064034
23:45:50 DEBUG| [stdout] # PM_BR_PRED_PCACHE: result 0 running/enabled 19680062840
23:45:50 DEBUG| [stdout] # PM_BR_MPRED_PCACHE: result 0 running/enabled 19680061722
23:45:50 DEBUG| [stdout] # Miss percent 99 %
23:45:50 DEBUG| [stdout] # Branch misses > 15% unexpected in this configuration!
23:45:50 DEBUG| [stdout] # Possible mis-match between reported & actual mitigation
23:45:50 DEBUG| [stdout] # failure: spectre_v2
23:45:50 DEBUG| [stdout] not ok 1 selftests: powerpc/security: spectre_v2 # exit=1
23:45:50 DEBUG| [stdout] make: Leaving directory '/tmp/autopkgtest.XkeXuO/build.i7C/src/autotest/client/tmp/ubuntu_kernel_selftests/src/linux/tools/testing/selftests/powerpc/security'

Testing failed on:
    ppc64el: https://autopkgtest.ubuntu.com/results/autopkgtest-impish/impish/ppc64el/l/linux/20211204_000820_141a2@/log.gz

tags: added: kernel-adt-failure
summary: - linux ADT test failure with linux/5.13.0-23.23
+ spectre_v2 from ubuntu_kernel_selftests failure with Impish/Hirsute
+ ppc64el
tags: added: hirsute impish
summary: - spectre_v2 from ubuntu_kernel_selftests failure with Impish/Hirsute
+ spectre_v2 from ubuntu_kernel_selftests ADT test failure with 5.13/5.11
ppc64el
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1953366

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
description: updated
Po-Hsu Lin (cypressyew)
tags: added: 5.13 ubuntu-kernel-selftests
Po-Hsu Lin (cypressyew)
tags: added: sru-20211129
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

As this is failing on ADT, it is failing on VMs on an environment we don't have much control of. This could be caused by host kernel, qemu or libvirt combinations that will make the guest kernel observe a given mitigation while it's not really in place.

This test was added after 5.4, so the failure won't be observed on kernels before 5.11. I have fixed it once so it detects the Vulnerable case and have the test return the SKIP code.

We need to fix this sooner rather than later, otherwise ADT test results will continue to fail. The other option is to skip this on our tests.

Cascardo.

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

This looks like very similar to the vulnerable case that I changed to return as skipped. It's possible that the host is doing one mitigation while the guest is informed of a different mitigation, leading to this mis-match.

I will take this upstream and see how it goes.

Cascardo.

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

https://<email address hidden>/T/#u

Changed in linux (Ubuntu Impish):
status: New → Confirmed
Changed in linux (Ubuntu Jammy):
status: New → Confirmed
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Thadeu's patch "3c42e9542050 selftests/powerpc/spectre_v2: Return skip code when miss_percent is high" was merged on mainline for v5.17-rc1 and applied via upstream stable to jammy/linux for Ubuntu-5.15.0-19.19 and to impish/linux for Ubuntu-5.13.0-40.45.

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Changed in linux (Ubuntu Impish):
status: Confirmed → Fix Released
Changed in linux (Ubuntu Jammy):
status: Confirmed → Fix Released
Changed in ubuntu-kernel-tests:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.