aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fips.h
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2019-07-02 14:39:20 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-07-26 14:51:57 +1000
commit9552389c465ed1ded39edf4a5642a861b53c2955 (patch)
tree38fd9580bdd5495075e63e950eda864aabaea16f /include/linux/fips.h
parentcrypto: ccree - account for TEE not ready to report (diff)
downloadlinux-dev-9552389c465ed1ded39edf4a5642a861b53c2955.tar.xz
linux-dev-9552389c465ed1ded39edf4a5642a861b53c2955.zip
crypto: fips - add FIPS test failure notification chain
Crypto test failures in FIPS mode cause an immediate panic, but on some system the cryptographic boundary extends beyond just the Linux controlled domain. Add a simple atomic notification chain to allow interested parties to register to receive notification prior to us kicking the bucket. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/fips.h')
-rw-r--r--include/linux/fips.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fips.h b/include/linux/fips.h
index afeeece92302..c6961e932fef 100644
--- a/include/linux/fips.h
+++ b/include/linux/fips.h
@@ -4,8 +4,15 @@
#ifdef CONFIG_CRYPTO_FIPS
extern int fips_enabled;
+extern struct atomic_notifier_head fips_fail_notif_chain;
+
+void fips_fail_notify(void);
+
#else
#define fips_enabled 0
+
+static inline void fips_fail_notify(void) {}
+
#endif
#endif