From fe243d9ca31d9752255041f63d7489238dee47e8 Mon Sep 17 00:00:00 2001 From: Tudor Ambarus Date: Wed, 30 Apr 2014 19:23:58 +0300 Subject: crypto: caam/qi - make (#2) tls10 descriptors compatible with Era3 and Era2 Prior commit - 96357638ce888b4a4c52622463370507eb54a904 (crypto: caam/qi - make tls10 descriptors compatible with Era3 and Era2) replaced Era3 and Era2 unsupported instructions. The length of the descriptor text was increased, but the specific macro (DESC_TLS10_ENC_LEN) was not updated. This led to uncovering two issues: - an incorect length value is being computed when checking if keys fit inline. - an incorect index in the descriptor buffer will be computed when using this macro. Signed-off-by: Tudor Ambarus Change-Id: I39a2e7cf795c4935a2fcec1315bc0cb5dd71e045 Reviewed-on: http://git.am.freescale.net:8181/11728 Tested-by: Review Code-CDREVIEW Reviewed-by: Mircea Pop Reviewed-by: Madalin-Cristian Bucur diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c index 1e7ce50..6bfa967 100644 --- a/drivers/crypto/caam/caamalg_qi.c +++ b/drivers/crypto/caam/caamalg_qi.c @@ -36,7 +36,7 @@ #define DESC_AEAD_GIVENC_LEN (DESC_AEAD_ENC_LEN + 7 * CAAM_CMD_SZ) #define DESC_TLS_BASE (4 * CAAM_CMD_SZ) -#define DESC_TLS10_ENC_LEN (DESC_TLS_BASE + 23 * CAAM_CMD_SZ) +#define DESC_TLS10_ENC_LEN (DESC_TLS_BASE + 29 * CAAM_CMD_SZ) #define DESC_MAX_USED_BYTES (DESC_AEAD_GIVENC_LEN + \ CAAM_MAX_KEY_SIZE) -- cgit v0.10.2