summaryrefslogtreecommitdiff
path: root/include
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 07:51:57 +0300
commit9552389c465ed1ded39edf4a5642a861b53c2955 (patch)
tree38fd9580bdd5495075e63e950eda864aabaea16f /include
parent76a95bd8f9e10cade9c4c8df93b5c20ff45dc0f5 (diff)
downloadlinux-9552389c465ed1ded39edf4a5642a861b53c2955.tar.xz
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')
-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