[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANc+2y4Yzf_kKKEDpeS_ZccC61j3RCEJbFPEz5MrjyB6GcLi2g@mail.gmail.com>
Date: Sun, 8 Oct 2017 19:41:15 +0530
From: PrasannaKumar Muralidharan <prasannatsmkumar@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Mathieu Malaterre <malat@...ian.org>, nhorman@...driver.com,
"David S . Miller" <davem@...emloft.net>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] crypto: make the seed() function optional
Hi Herbert,
On 7 October 2017 at 09:03, Herbert Xu <herbert@...dor.apana.org.au> wrote:
> Mathieu Malaterre <malat@...ian.org> wrote:
>> This makes it simplier for driver author to not provide the seed() function
>> in case of a pseudo RNG where the seed operation is a no-op.
>>
>> Document that the seed() function pointer is optional in header.
>>
>> Signed-off-by: Mathieu Malaterre <malat@...ian.org>
>> ---
>> The PRNG as found on Ingenic JZ4780 is one such example. This is found on a
>> MIPS Creator CI20 SoC.
>
> So how does it seed itself? This also contradicts with the JZ4780
> driver that's currently in the patch queue as it does contain a
> seed function.
The current version of JZ4780 driver in the patch queue indeed has
seed function. But when Mathieu sent this email based on v2 of the
driver. V2 did not have seed callback. Using v2 resulted in a NULL
pointer in kernel. This patch prevents that NULL pointer access.
Regardless of what JZ4780 driver has this patch makes sense.
Currently crypto framework does not mandate seed callback's presence.
If mandatory, crypto framework should error out if seed is not
implemented while registering the PRNG.
Thanks,
PrasannaKumar
Powered by blists - more mailing lists