2022-04-16 12:35:50

by Fabio Estevam

[permalink] [raw]
Subject: Re: [EXT] Re: [PATCH] crypto: caam - enable prediction resistance conditionally

Hi Varun,

On Thu, Apr 14, 2022 at 11:56 AM Varun Sethi <[email protected]> wrote:
>
> Yes Fabio, we will be posting patch by next week.

Is the kernel patch that you plan to send along the lines of the
following U-Boot patch?
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks


2022-04-16 13:56:02

by Fabio Estevam

[permalink] [raw]
Subject: Re: [EXT] Re: [PATCH] crypto: caam - enable prediction resistance conditionally

Hi Varun,

On Sat, Apr 16, 2022 at 9:24 AM Fabio Estevam <[email protected]> wrote:

> Is the kernel patch that you plan to send along the lines of the
> following U-Boot patch?
> https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Following the U-Boot fix, the kernel patch would look like this:

--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -648,6 +648,8 @@ static int caam_probe(struct platform_device *pdev)
return ret;
}

+ if (of_machine_is_compatible("fsl,imx6sx"))
+ ent_delay = 12000;

/* Get configuration properties from device tree */
/* First, get register page */
@@ -871,6 +873,8 @@ static int caam_probe(struct platform_device *pdev)
*/
ret = instantiate_rng(dev, inst_handles,
gen_sk);
+ if (of_machine_is_compatible("fsl,imx6sx"))
+ break;
if (ret == -EAGAIN)
/*
* if here, the loop will rerun,

What do you think?