]> 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:35:12 +0000 (10:35 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Nov 2020 09:14:10 +0000 (10:14 +0100)
commitbcf7f2d3fcec8a47ddfee6d8801ab57162922480
treea9325d07ee4a10df1bc5abbcc9aa64c690d1e76a
parent315443293a2d0d7c183ca6dd4624d9e4f8a7054a
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