]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: skip tests for unavailable mitigations.
authorSachin Sant <sachinp@linux.vnet.ibm.com>
Mon, 13 Dec 2021 16:42:23 +0000 (22:12 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Dec 2021 10:31:46 +0000 (21:31 +1100)
commit5558feae6d630c5dc4d6a7b1f29bb4199ca02399
tree7530da75f9674bbd97c6d1168248aa175f9ee6e9
parentb0dc03c3c66593c5579fbb741993f7d590d803a4
selftests/powerpc: skip tests for unavailable mitigations.

Mitigation patching test iterates over a set of mitigations irrespective
of whether a certain mitigation is supported/available in the kernel.
This causes following messages on a kernel where some mitigations
are unavailable:

  Spawned threads enabling/disabling mitigations ...
  cat: entry_flush: No such file or directory
  cat: uaccess_flush: No such file or directory
  Waiting for timeout ...
  OK

This patch adds a check for available mitigations in the kernel.

Reported-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
Signed-off-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/163941374362.36967.18016981579099073379.sendpatchset@1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
tools/testing/selftests/powerpc/security/mitigation-patching.sh