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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 24 Mar 2022 11:10:07 +0100
From:   Ahmad Fatoum <a.fatoum@...gutronix.de>
To:     Pankaj Gupta <pankaj.gupta@....com>,
        Horia Geanta <horia.geanta@....com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>
Cc:     "linux-security-module@...r.kernel.org" 
        <linux-security-module@...r.kernel.org>,
        Eric Biggers <ebiggers@...nel.org>,
        David Gstir <david@...ma-star.at>,
        Matthias Schiffer <matthias.schiffer@...tq-group.com>,
        Sumit Garg <sumit.garg@...aro.org>,
        Jan Luebbe <j.luebbe@...gutronix.de>,
        Richard Weinberger <richard@....at>,
        "tharvey@...eworks.com" <tharvey@...eworks.com>,
        Franck Lenormand <franck.lenormand@....com>,
        James Morris <jmorris@...ei.org>,
        Mimi Zohar <zohar@...ux.ibm.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        David Howells <dhowells@...hat.com>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        "keyrings@...r.kernel.org" <keyrings@...r.kernel.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
        James Bottomley <jejb@...ux.ibm.com>,
        "Serge E. Hallyn" <serge@...lyn.com>
Subject: Re: [EXT] [PATCH v6 3/4] crypto: caam - add in-kernel interface for
 blob generator

Hello Pankaj,

On 24.03.22 10:55, Pankaj Gupta wrote:
> Hi Ahmad,
> 
> Please find the comments in-line.

Thanks for you review.

> Suggest to continue to use two separate descriptor-creation-function for 'encap' and 'decap'.
> This will help these API(s) to be maintained easily going forward. 

We can still split them up in future once there is a real need.
But currently they are exactly the same, except for input/output length,
so I think it's correct to not introduce duplication unless needed.

>>   - use append_seq_(in|out)_ptr_intlen for both encap/decap as a result

Case in point. The intlen omission was because the two functions are largely
identical and I only fixed up one of them. This is prone to repeat when
we go back to have identical code with minor differences.

> In continuation to the previous comment, there is another suggestion:
> 
> Either: 
> struct keyblob_info {
>         void *key;
>         size_t key_len;
> 
>         void *blob;
>         size_t blob_len;
> 
>         size_t key_mod_len;
>         const void *key_mod;
> };

I can do that.

Whats your opinion on the desc size computation? Comment the macro or add
the static inline helper?

Cheers,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ