diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-20 00:57:21 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-20 19:41:22 +0200 |
commit | a9c625a9ad963f70fd68c61c714d517ffba2b88b (patch) | |
tree | 91722eb1ff18fac2296b11636a926b0431b4e5e2 /src/selftest/ratelimiter.h | |
parent | 111bb8f3b2ba4ee9b3899946df17f06a25728cc4 (diff) |
ratelimiter: disable selftest with KASAN
This this relies on instructions taking a "normal" amount of time, we
really can't run this with KASAN, especially inside QEMU, so just
disable it for KASAN, since it's hard to make it complete on slow
systems.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/selftest/ratelimiter.h')
-rw-r--r-- | src/selftest/ratelimiter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/selftest/ratelimiter.h b/src/selftest/ratelimiter.h index f9f9996..43a68f8 100644 --- a/src/selftest/ratelimiter.h +++ b/src/selftest/ratelimiter.h @@ -41,6 +41,10 @@ bool __init ratelimiter_selftest(void) struct sk_buff *skb4; struct iphdr *hdr4; +#if defined(CONFIG_KASAN) || defined(CONFIG_UBSAN) + return true; +#endif + BUILD_BUG_ON(MSEC_PER_SEC % PACKETS_PER_SECOND != 0); if (ratelimiter_init()) |