/s
# dd if=/dev/hwrng of=/dev/null bs=4096 count=256000
1048576000 bytes (1.0 GB, 1000 MiB) copied, 14.394 s, 72.8 MB/s
Signed-off-by: Laurent Vivier
---
drivers/char/hw_random/core.c | 37 -
drivers/char/hw_random/virtio-rng.c | 1 +
include/linux
[] (hwrng_register+0x13c/0x1b4)
[] (hwrng_register) from [] (tpm_chip_register+0xc4/0x274)
...
Reported-by: Marek Szyprowski
Fixes: daae28debcb0 ("hwrng: core - move add_early_randomness() out of
rng_mutex")
Tested-by: Marek Szyprowski
Signed-off-by: Laurent Vivier
---
drivers/char/hw_random/c
This patch moves add_early_randomness() out of the rng_mutex zone.
It only needs the reading_mutex.
Signed-off-by: Laurent Vivier
---
Notes:
v2: in hwrng_register, take rng->ref only if rng is the new current_rng
drivers/char/hw_random/core.c | 61 +--
On 11/10/2019 10:45, Marek Szyprowski wrote:
> Hi Laurent,
>
> On 12.09.2019 15:30, Laurent Vivier wrote:
>> add_early_randomness() is called every time a new rng backend is added
>> and every time it is set as the current rng provider.
>>
>> add_early_rand
On 04/10/2019 16:26, Herbert Xu wrote:
> On Thu, Sep 12, 2019 at 03:30:22PM +0200, Laurent Vivier wrote:
>>
>> @@ -496,19 +510,24 @@ int hwrng_register(struct hwrng *rng)
>> goto out_unlock;
>> }
>>
>> -if (old_rng
On 17/09/2019 14:40, Herbert Xu wrote:
> On Tue, Sep 17, 2019 at 11:54:50AM +0200, Laurent Vivier wrote:
>> add_early_randomness() is called by hwrng_register() when the
>> hardware is added. If this hardware and its module are present
>> at boot, and if there is no data ava
ait=0)
from add_early_randomness().
Signed-off-by: Laurent Vivier
---
drivers/char/hw_random/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 9044d31ab1a1..8d53b8ef545c 100644
--- a/drivers/char/hw_r
This patch move add_early_randomness() out of the rng_mutex zone.
It only needs the reading_mutex.
Signed-off-by: Laurent Vivier
---
drivers/char/hw_random/core.c | 60 +--
1 file changed, 44 insertions(+), 16 deletions(-)
diff --git a/drivers/char/hw_random/cor