Define fips_/nonfips_ variants of cryoto_{alg_list,alg_sem,chain} when the kernel is configured to use a standalone FIPS module. Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx> --- crypto/internal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crypto/internal.h b/crypto/internal.h index f4b12863d922..08f2f04b010d 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -62,6 +62,18 @@ enum { /* Maximum number of (rtattr) parameters for each template. */ #define CRYPTO_MAX_ATTRS 32 +#ifdef CONFIG_CRYPTO_FIPS140_EXTMOD +#ifdef FIPS_MODULE +#define crypto_alg_list fips_crypto_alg_list +#define crypto_alg_sem fips_crypto_alg_sem +#define crypto_chain fips_crypto_chain +#else +#define crypto_alg_list nonfips_crypto_alg_list +#define crypto_alg_sem nonfips_crypto_alg_sem +#define crypto_chain nonfips_crypto_chain +#endif +#endif + extern struct list_head crypto_alg_list; extern struct rw_semaphore crypto_alg_sem; extern struct blocking_notifier_head crypto_chain; -- 2.39.3