Re: [PATCH] Revert "hwrng: core - zeroize buffers with random data"

2017-02-09 Thread Stephan Müller
Am Mittwoch, 8. Februar 2017, 17:57:23 CET schrieb Linus Torvalds: Hi Linus, > Stephan, Herbert? The zeroes in /dev/hwrng output are obviously > complete crap, so there's something badly wrong somewhere. > > The locking, for example, is completely buggered. There's even a > comment about it, but

Re: [PATCH] Revert "hwrng: core - zeroize buffers with random data"

2017-02-08 Thread Linus Torvalds
Stephan, Herbert? The zeroes in /dev/hwrng output are obviously complete crap, so there's something badly wrong somewhere. The locking, for example, is completely buggered. There's even a comment about it, but that comment makes the correct observation of "but y'know: randomness". But the memset()

[PATCH] Revert "hwrng: core - zeroize buffers with random data"

2017-02-07 Thread David Daney
This reverts commit 2cc751545854d7bd7eedf4d7e377bb52e176cd07. With this commit in place I get on a Cavium ThunderX (arm64) system: $ if=/dev/hwrng bs=256 count=1 | od -t x1 -A x -v > rng-bad.txt 1+0 records in 1+0 records out 256 bytes (256 B) copied, 9.1171e-05 s, 2.8 MB/s $ dd if=/dev/hwrng bs=