lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cf2e09ba-108c-819d-cce1-3ee4818254d2@samsung.com>
Date:   Mon, 14 Oct 2019 09:26:46 +0200
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Herbert Xu <herbert@...dor.apana.org.au>,
        Laurent Vivier <lvivier@...hat.com>
Cc:     linux-kernel@...r.kernel.org, Matt Mackall <mpm@...enic.com>,
        linux-crypto@...r.kernel.org,
        'Linux Samsung SOC' <linux-samsung-soc@...r.kernel.org>
Subject: Re: [PATCH v2] hwrng: core - move add_early_randomness() out of
 rng_mutex

Hi

On 12.10.2019 14:09, Herbert Xu wrote:
> On Fri, Oct 11, 2019 at 03:47:24PM +0200, 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_randomness() is called from functions locking rng_mutex,
>> and if it hangs all the hw_random framework hangs: we can't read sysfs,
>> add or remove a backend.
>>
>> This patch moves add_early_randomness() out of the rng_mutex zone.
>> It only needs the reading_mutex.
>>
>> Signed-off-by: Laurent Vivier <lvivier@...hat.com>
>> ---
>>
>> Notes:
>>      v2: in hwrng_register, take rng->ref only if rng is the new current_rng
>>
>>   drivers/char/hw_random/core.c | 61 +++++++++++++++++++++++++----------
>>   1 file changed, 44 insertions(+), 17 deletions(-)
> Please rebase your patch on top of the cryptodev tree, i.e., make
> this an incremental patch with a Fixes header.

This v2 applied on the linux-next with reverted v1 fixes my issue.


When you prepare the incremental patch, feel free to add:

Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
Fixes: daae28debcb0 ("hwrng: core - move add_early_randomness() out of 
rng_mutex")
Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ