]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/powerpc: rfi_flush: disable entry flush if present
authorRussell Currey <ruscur@russell.cc>
Thu, 19 Nov 2020 23:22:46 +0000 (10:22 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Nov 2020 09:15:31 +0000 (10:15 +0100)
commit401ef334343a305f9e1582920b81d8d731fa78ff
tree35af2ae394120ca47ce4598bccd92fc39c8a8eff
parent1398820fee515873379809a6415930ad0764b2f6
selftests/powerpc: rfi_flush: disable entry flush if present

commit fcb48454c23c5679d1a2e252f127642e91b05cbe upstream.

We are about to add an entry flush. The rfi (exit) flush test measures
the number of L1D flushes over a syscall with the RFI flush enabled and
disabled. But if the entry flush is also enabled, the effect of enabling
and disabling the RFI flush is masked.

If there is a debugfs entry for the entry flush, disable it during the RFI
flush and restore it later.

Reported-by: Spoorthy S <spoorts2@in.ibm.com>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/powerpc/security/rfi_flush.c