summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-07-24 20:51:55 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-08-02 14:44:32 +1000
commitdec0fb3946c478e7bb6165a1b7a03092ceefd419 (patch)
treeabbf9c5080bb67997f3547aa956a9a9fd5200fcd /crypto
parent3bd4952853d69659e58d1d4a4964383cb536b5be (diff)
downloadlinux-dec0fb3946c478e7bb6165a1b7a03092ceefd419.tar.bz2
crypto: jitterentropy - build without sanitizer
Recent clang-9 snapshots double the kernel stack usage when building this file with -O0 -fsanitize=kernel-hwaddress, compared to clang-8 and older snapshots, this changed between commits svn364966 and svn366056: crypto/jitterentropy.c:516:5: error: stack frame size of 2640 bytes in function 'jent_entropy_init' [-Werror,-Wframe-larger-than=] int jent_entropy_init(void) ^ crypto/jitterentropy.c:185:14: error: stack frame size of 2224 bytes in function 'jent_lfsr_time' [-Werror,-Wframe-larger-than=] static __u64 jent_lfsr_time(struct rand_data *ec, __u64 time, __u64 loop_cnt) ^ I prepared a reduced test case in case any clang developers want to take a closer look, but from looking at the earlier output it seems that even with clang-8, something was very wrong here. Turn off any KASAN and UBSAN sanitizing for this file, as that likely clashes with -O0 anyway. Turning off just KASAN avoids the warning already, but I suspect both of these have undesired side-effects for jitterentropy. Link: https://godbolt.org/z/fDcwZ5 Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/Makefile b/crypto/Makefile
index 93375e124ff7..cfcc954e59f9 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -132,6 +132,8 @@ obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o
obj-$(CONFIG_CRYPTO_DRBG) += drbg.o
obj-$(CONFIG_CRYPTO_JITTERENTROPY) += jitterentropy_rng.o
CFLAGS_jitterentropy.o = -O0
+KASAN_SANITIZE_jitterentropy.o = n
+UBSAN_SANITIZE_jitterentropy.o = n
jitterentropy_rng-y := jitterentropy.o jitterentropy-kcapi.o
obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
obj-$(CONFIG_CRYPTO_GHASH) += ghash-generic.o