diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2014-01-06 14:34:17 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-01-14 22:33:39 -0500 |
commit | 81a59f000e1d4a60a03081a1fc64aee46d6f0c3e (patch) | |
tree | 95c4c83dc6175c6aa6f286676fbbd6c77419d5b8 /include/linux/ccp.h | |
parent | 393897c5156a415533ff85aa381458840417b032 (diff) |
crypto: ccp - Change data length declarations to u64
When performing a hash operation if the amount of data buffered and a
request at or near the maximum data length is received then the length
calcuation could wrap causing an error in executing the hash operation.
Fix this by using a u64 type for the input and output data lengths in
all CCP operations.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/ccp.h')
-rw-r--r-- | include/linux/ccp.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/ccp.h b/include/linux/ccp.h index e8c23493ab4b..12f1cfdbd3a3 100644 --- a/include/linux/ccp.h +++ b/include/linux/ccp.h | |||
@@ -133,7 +133,7 @@ struct ccp_aes_engine { | |||
133 | u32 iv_len; /* In bytes */ | 133 | u32 iv_len; /* In bytes */ |
134 | 134 | ||
135 | struct scatterlist *src, *dst; | 135 | struct scatterlist *src, *dst; |
136 | u32 src_len; /* In bytes */ | 136 | u64 src_len; /* In bytes */ |
137 | 137 | ||
138 | u32 cmac_final; /* Indicates final cmac cmd */ | 138 | u32 cmac_final; /* Indicates final cmac cmd */ |
139 | struct scatterlist *cmac_key; /* K1/K2 cmac key required for | 139 | struct scatterlist *cmac_key; /* K1/K2 cmac key required for |
@@ -190,7 +190,7 @@ struct ccp_xts_aes_engine { | |||
190 | u32 iv_len; /* In bytes */ | 190 | u32 iv_len; /* In bytes */ |
191 | 191 | ||
192 | struct scatterlist *src, *dst; | 192 | struct scatterlist *src, *dst; |
193 | u32 src_len; /* In bytes */ | 193 | u64 src_len; /* In bytes */ |
194 | 194 | ||
195 | u32 final; | 195 | u32 final; |
196 | }; | 196 | }; |
@@ -237,7 +237,7 @@ struct ccp_sha_engine { | |||
237 | u32 ctx_len; /* In bytes */ | 237 | u32 ctx_len; /* In bytes */ |
238 | 238 | ||
239 | struct scatterlist *src; | 239 | struct scatterlist *src; |
240 | u32 src_len; /* In bytes */ | 240 | u64 src_len; /* In bytes */ |
241 | 241 | ||
242 | u32 final; /* Indicates final sha cmd */ | 242 | u32 final; /* Indicates final sha cmd */ |
243 | u64 msg_bits; /* Message length in bits required for | 243 | u64 msg_bits; /* Message length in bits required for |
@@ -328,7 +328,7 @@ struct ccp_passthru_engine { | |||
328 | u32 mask_len; /* In bytes */ | 328 | u32 mask_len; /* In bytes */ |
329 | 329 | ||
330 | struct scatterlist *src, *dst; | 330 | struct scatterlist *src, *dst; |
331 | u32 src_len; /* In bytes */ | 331 | u64 src_len; /* In bytes */ |
332 | 332 | ||
333 | u32 final; | 333 | u32 final; |
334 | }; | 334 | }; |