[EXT] [PATCH v6 3/4] crypto: caam - add in-kernel interface for blob generator
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Mar 22 07:32:34 UTC 2022
Hello Pankaj,
On 22.03.22 07:25, Pankaj Gupta wrote:
> Hi Ahmad,
>
> Suggested to define macro with more details.
> Please find comments in-line.
>
> len = 4 + (4 + ALIGN(keymod_len, 4)) + 2*(4 + 4 +
>>>>> + CAAM_PTR_SZ_MAX) + 4;
>
>> +/* header + (key mod immediate) + 2x seq_intlen pointers + op */
>> +#define CAAM_BLOB_DESC_BYTES_MAX \
>> + (CAAM_CMD_SZ + \
>> + CAAM_CMD_SZ + CAAM_BLOB_KEYMOD_LENGTH + \
>> + 2 * (CAAM_CMD_SZ + CAAM_PTR_SZ_MAX) + \
>> + CAAM_CMD_SZ)
>> +
>
> Suggested to replace the above macro like below:
>
> +#define CAAM_BLOB_DESC_BYTES_MAX \
> + (CAAM_CMD_SZ + \ /* Command to initialize & stating length of descriptor */
> + CAAM_CMD_SZ + CAAM_BLOB_KEYMOD_LENGTH + \ /* Command to append the key-modifier + followed by the key-modifier data */
> + (CAAM_CMD_SZ + CAAM_PTR_SZ_MAX) + \ /* Command to include input plain key and pointer to the input key */
> + (CAAM_CMD_SZ + CAAM_PTR_SZ_MAX) + \ /* Command to include output-key blob and pointer to the output-key blob */
> + CAAM_CMD_SZ) /* Command describing the Operation to perform */
Sure thing, will do for v7. Otherwise, if all looks good to you,
can I have your Reviewed-by?
Thanks,
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 |
More information about the Linux-security-module-archive
mailing list