diff --git a/crypto/Makefile b/crypto/Makefile index 6651b9f1a685..f353273de018 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -202,12 +202,17 @@ ifneq ($(CONFIG_CRYPTO_FIPS140_MOD),) FIPS140_CFLAGS := -D__DISABLE_EXPORTS -DBUILD_FIPS140_KO +CFLAGS_jitterentropy-fips.o := -O0 +KASAN_SANITIZE_jitterentropy-fips.o = n +UBSAN_SANITIZE_jitterentropy-fips.o = n + # # Create a separate FIPS archive containing a duplicate of each builtin generic # module that is in scope for FIPS 140-2 certification # crypto-fips-objs := drbg.o ecb.o cbc.o ctr.o cts.o gcm.o xts.o hmac.o cmac.o \ memneq.o gf128mul.o aes_generic.o lib-crypto-aes.o \ + jitterentropy.o jitterentropy-kcapi.o \ sha1_generic.o sha256_generic.o sha512_generic.o \ lib-sha1.o lib-crypto-sha256.o crypto-fips-objs := $(foreach o,$(crypto-fips-objs),$(o:.o=-fips.o)) diff --git a/crypto/fips140-module.c b/crypto/fips140-module.c index 5b991163a971..10ab5658737d 100644 --- a/crypto/fips140-module.c +++ b/crypto/fips140-module.c @@ -93,6 +93,7 @@ static const char * const fips140_algorithms[] __initconst = { "sha512", "stdrng", + "jitterentropy_rng", }; static bool __init is_fips140_algo(struct crypto_alg *alg)