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 | 305806d113f6aa210f98475ab157de72aa245c74 (patch) | |
tree | de8a0a73257b19ed579c44c4fe2ede7d735388ec | |
parent | crypto: do not waste space on selftest items (diff) | |
download | wireguard-monolithic-historical-305806d113f6aa210f98475ab157de72aa245c74.tar.xz wireguard-monolithic-historical-305806d113f6aa210f98475ab157de72aa245c74.zip |
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.
-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()) |