diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2018-05-21 20:43:57 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-10-20 13:26:47 +1100 |
commit | d2bf793237b3aa9c4275a466eef3893eef593691 (patch) | |
tree | 50d5fce87bd72bc5eb8793a229020d636afd0b16 /tools/testing/selftests/powerpc/Makefile | |
parent | db3848515aff369404c31ef5a63699799913518f (diff) | |
download | linux-d2bf793237b3aa9c4275a466eef3893eef593691.tar.gz linux-d2bf793237b3aa9c4275a466eef3893eef593691.tar.bz2 linux-d2bf793237b3aa9c4275a466eef3893eef593691.zip |
selftests/powerpc: Add test to verify rfi flush across a system call
This adds a test to verify proper functioning of the rfi flush
capability implemented to mitigate meltdown. The test works by
measuring the number of L1d cache misses encountered while loading
data from memory. Across a system call, since the L1d cache is flushed
when rfi_flush is enabled, the number of cache misses is expected to
be relative to the number of cachelines corresponding to the data
being loaded.
The current system setting is reflected via powerpc/rfi_flush under
debugfs (assumed to be /sys/kernel/debug/). This test verifies the
expected result with rfi_flush enabled as well as when it is disabled.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
[mpe: Add SPDX tags, clang format, skip if the debugfs is missing, use
__u64 and SANE_USERSPACE_TYPES to avoid printf() build errors.]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/Makefile')
-rw-r--r-- | tools/testing/selftests/powerpc/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile index 201b598558b9..b3ad909aefbc 100644 --- a/tools/testing/selftests/powerpc/Makefile +++ b/tools/testing/selftests/powerpc/Makefile @@ -28,7 +28,8 @@ SUB_DIRS = alignment \ tm \ vphn \ math \ - ptrace + ptrace \ + security endif |