RE: [EXT] [PATCH] crypto: caam - Use helper to set reqsize

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Gaurav Jain <gaurav.jain@xxxxxxx>

> -----Original Message-----
> From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Sent: Tuesday, November 22, 2022 3:11 PM
> To: Horia Geanta <horia.geanta@xxxxxxx>; Pankaj Gupta
> <pankaj.gupta@xxxxxxx>; Gaurav Jain <gaurav.jain@xxxxxxx>; Linux Crypto
> Mailing List <linux-crypto@xxxxxxxxxxxxxxx>
> Subject: [EXT] [PATCH] crypto: caam - Use helper to set reqsize
> 
> Caution: EXT Email
> 
> The value of reqsize must only be changed through the helper.
> 
> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> 
> diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c
> index 886727576710..642846693d7c 100644
> --- a/drivers/crypto/caam/caampkc.c
> +++ b/drivers/crypto/caam/caampkc.c
> @@ -1099,6 +1099,8 @@ static int caam_rsa_init_tfm(struct crypto_akcipher
> *tfm)  {
>         struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm);
> 
> +       akcipher_set_reqsize(tfm, sizeof(struct caam_rsa_req_ctx));
> +
>         ctx->dev = caam_jr_alloc();
> 
>         if (IS_ERR(ctx->dev)) {
> @@ -1141,7 +1143,6 @@ static struct caam_akcipher_alg caam_rsa = {
>                 .max_size = caam_rsa_max_size,
>                 .init = caam_rsa_init_tfm,
>                 .exit = caam_rsa_exit_tfm,
> -               .reqsize = sizeof(struct caam_rsa_req_ctx),
>                 .base = {
>                         .cra_name = "rsa",
>                         .cra_driver_name = "rsa-caam",
> --
> Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page:
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgondor.ap
> ana.org.au%2F~herbert%2F&amp;data=05%7C01%7Cgaurav.jain%40nxp.com%
> 7Ca470497faa5540d2b14508dacc6da6d8%7C686ea1d3bc2b4c6fa92cd99c5c301
> 635%7C0%7C0%7C638047068575576790%7CUnknown%7CTWFpbGZsb3d8eyJ
> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C
> 3000%7C%7C%7C&amp;sdata=vTJzDwXqxU3VydsCSr2myyfTiY3DQ2IFc8Qyxads
> BkA%3D&amp;reserved=0
> PGP Key:
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgondor.ap
> ana.org.au%2F~herbert%2Fpubkey.txt&amp;data=05%7C01%7Cgaurav.jain%40
> nxp.com%7Ca470497faa5540d2b14508dacc6da6d8%7C686ea1d3bc2b4c6fa92c
> d99c5c301635%7C0%7C0%7C638047068575576790%7CUnknown%7CTWFpbGZ
> sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0
> %3D%7C3000%7C%7C%7C&amp;sdata=gJ0koAZ3Rw6SNDquvcLWMat6IkOGbO
> wn94sM8XlMtq4%3D&amp;reserved=0




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux