summary refs log tree commit diff
path: root/include/crypto/drbg.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-10-06 14:01:11 +0200
committerTakashi Iwai <tiwai@suse.de>2014-10-06 14:01:11 +0200
commit8df22a4d6f5b81c9c1703579d4907b57002689ed (patch)
tree064e9662d427a82076e1151fcd9aa78a1066f9f4 /include/crypto/drbg.h
parent0cae90a96c15f2fd3bd139ba5505755c9c9ef2eb (diff)
parenta5448c88b812390a3622e76d774e10c0da1fb970 (diff)
downloadlinux-8df22a4d6f5b81c9c1703579d4907b57002689ed.tar.gz
Merge tag 'asoc-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.18

 - More componentisation work from Lars-Peter, this time mainly
   cleaning up the suspend and bias level transition callbacks.
 - Real system support for the Intel drivers and a bunch of fixes and
   enhancements for the associated CODEC drivers, this is going to need
   a lot quirks over time due to the lack of any firmware description of
   the boards.
 - Jack detect support for simple card from Dylan Reid.
 - A bunch of small fixes and enhancements for the Freescale drivers.
 - New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32, Everest
   Semiconductor ES8328 and Freescale cards using the ASRC in newer i.MX
   processors.
Diffstat (limited to 'include/crypto/drbg.h')
-rw-r--r--include/crypto/drbg.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/crypto/drbg.h b/include/crypto/drbg.h
index 831d786976c5..882675e7c055 100644
--- a/include/crypto/drbg.h
+++ b/include/crypto/drbg.h
@@ -162,12 +162,25 @@ static inline size_t drbg_max_request_bytes(struct drbg_state *drbg)
 
 static inline size_t drbg_max_addtl(struct drbg_state *drbg)
 {
+#if (__BITS_PER_LONG == 32)
+	/*
+	 * SP800-90A allows smaller maximum numbers to be returned -- we
+	 * return SIZE_MAX - 1 to allow the verification of the enforcement
+	 * of this value in drbg_healthcheck_sanity.
+	 */
+	return (SIZE_MAX - 1);
+#else
 	return (1UL<<(drbg->core->max_addtllen));
+#endif
 }
 
 static inline size_t drbg_max_requests(struct drbg_state *drbg)
 {
+#if (__BITS_PER_LONG == 32)
+	return SIZE_MAX;
+#else
 	return (1UL<<(drbg->core->max_req));
+#endif
 }
 
 /*