lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue,  6 Oct 2015 17:12:51 +0100
From:	Lee Jones <>
	Lee Jones <>
Subject: [RESEND 3/3] hwrng: st: Report correct FIFO size

The values supplied to the 'read random data from FIFO' arithmetic
are not correct.  The value fed in to initialise the iterator
describes the FIFO depth, but then the iterator is treated in
Bytes and subsequently increased by 2 in value for every read
word.  This means only 4 of the 8 available values are being read
during each invocation of .read().

This change increased the device bandwidth by a factor of 2.

Reported-by: Daniel Thompson <>
Reviewed-by: Daniel Thompson <>
Signed-off-by: Lee Jones <>
 drivers/char/hw_random/st-rng.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
index a1ff080..3b1432c 100644
--- a/drivers/char/hw_random/st-rng.c
+++ b/drivers/char/hw_random/st-rng.c
@@ -29,8 +29,9 @@
-#define ST_RNG_FIFO_SIZE		8
 #define ST_RNG_SAMPLE_SIZE		2 /* 2 Byte (16bit) samples */
+#define ST_RNG_FIFO_DEPTH		8
  * Samples are documented to be available every 0.667us, so in theory

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists