mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
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>
This commit is contained in:
parent
393897c515
commit
81a59f000e
5 changed files with 57 additions and 37 deletions
|
@ -133,7 +133,7 @@ struct ccp_aes_engine {
|
|||
u32 iv_len; /* In bytes */
|
||||
|
||||
struct scatterlist *src, *dst;
|
||||
u32 src_len; /* In bytes */
|
||||
u64 src_len; /* In bytes */
|
||||
|
||||
u32 cmac_final; /* Indicates final cmac cmd */
|
||||
struct scatterlist *cmac_key; /* K1/K2 cmac key required for
|
||||
|
@ -190,7 +190,7 @@ struct ccp_xts_aes_engine {
|
|||
u32 iv_len; /* In bytes */
|
||||
|
||||
struct scatterlist *src, *dst;
|
||||
u32 src_len; /* In bytes */
|
||||
u64 src_len; /* In bytes */
|
||||
|
||||
u32 final;
|
||||
};
|
||||
|
@ -237,7 +237,7 @@ struct ccp_sha_engine {
|
|||
u32 ctx_len; /* In bytes */
|
||||
|
||||
struct scatterlist *src;
|
||||
u32 src_len; /* In bytes */
|
||||
u64 src_len; /* In bytes */
|
||||
|
||||
u32 final; /* Indicates final sha cmd */
|
||||
u64 msg_bits; /* Message length in bits required for
|
||||
|
@ -328,7 +328,7 @@ struct ccp_passthru_engine {
|
|||
u32 mask_len; /* In bytes */
|
||||
|
||||
struct scatterlist *src, *dst;
|
||||
u32 src_len; /* In bytes */
|
||||
u64 src_len; /* In bytes */
|
||||
|
||||
u32 final;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue