mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 15:11:31 +00:00
d2bf793237
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> |
||
---|---|---|
.. | ||
alignment | ||
benchmarks | ||
cache_shape | ||
copyloops | ||
dscr | ||
include | ||
lib | ||
math | ||
mm | ||
pmu | ||
primitives | ||
ptrace | ||
scripts | ||
security | ||
signal | ||
stringloops | ||
switch_endian | ||
syscalls | ||
tm | ||
vphn | ||
harness.c | ||
Makefile | ||
utils.c |