[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aNJe3HZHG2uiXNAx@earth.li>
Date: Tue, 23 Sep 2025 09:48:28 +0100
From: Jonathan McDowell <noodles@...th.li>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Olivia Mackall <olivia@...enic.com>, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-integrity@...r.kernel.org
Subject: Re: [PATCH v2] hwrng: core - Allow runtime disabling of the HW RNG
On Tue, Sep 23, 2025 at 11:43:12AM +0800, Herbert Xu wrote:
>On Mon, Sep 15, 2025 at 05:02:15PM +0100, Jonathan McDowell wrote:
>>
>> diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
>> index 018316f54621..1682a9f1b28c 100644
>> --- a/drivers/char/hw_random/core.c
>> +++ b/drivers/char/hw_random/core.c
>> @@ -341,6 +341,10 @@ static ssize_t rng_current_store(struct device *dev,
>> if (sysfs_streq(buf, "")) {
>> err = enable_best_rng();
>> + } else if (sysfs_streq(buf, "none")) {
>> + if (current_rng)
>> + cur_rng_set_by_user = 1;
>
>Shouldn't this be set unconditionally?
Yes, I guess so. I'd been guided by enable_best_rng() which only clears
it if it changes the current RNG, but re-reading I agree that's probably
the wrong thing here.
J.
--
101 things you can't have too much of : 16 - Time.
Powered by blists - more mailing lists