aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel/kcsan
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-10-16 22:42:25 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2022-11-17 17:36:47 +0100
commit6ce625939e58174df5a006ba8aa9d4c0013dfcf8 (patch)
treeec7c0756dd7d4fc55d6238e640c28054568e5cb5 /kernel/kcsan
parentLinux 6.1-rc5 (diff)
downloadwireguard-linux-6ce625939e58174df5a006ba8aa9d4c0013dfcf8.tar.xz
wireguard-linux-6ce625939e58174df5a006ba8aa9d4c0013dfcf8.zip
kcsan: remove rng selftest
The first test of the kcsan selftest appears to test if get_random_u32() returns two zeros in a row, and requires that it doesn't. This seems like a bogus criteron. Remove it. Acked-by: Marco Elver <elver@google.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'kernel/kcsan')
-rw-r--r--kernel/kcsan/selftest.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/kernel/kcsan/selftest.c b/kernel/kcsan/selftest.c
index 00cdf8fa5693..1740ce389e7f 100644
--- a/kernel/kcsan/selftest.c
+++ b/kernel/kcsan/selftest.c
@@ -22,13 +22,6 @@
#define ITERS_PER_TEST 2000
-/* Test requirements. */
-static bool __init test_requires(void)
-{
- /* random should be initialized for the below tests */
- return get_random_u32() + get_random_u32() != 0;
-}
-
/*
* Test watchpoint encode and decode: check that encoding some access's info,
* and then subsequent decode preserves the access's info.
@@ -259,7 +252,6 @@ static int __init kcsan_selftest(void)
pr_err("selftest: " #do_test " failed"); \
} while (0)
- RUN_TEST(test_requires);
RUN_TEST(test_encode_decode);
RUN_TEST(test_matching_access);
RUN_TEST(test_barrier);