aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/nx/nx.h
diff options
context:
space:
mode:
authorLeonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>2015-04-23 17:41:43 -0300
committerHerbert Xu <herbert@gondor.apana.org.au>2015-04-26 14:33:19 +0800
commit10d87b730e1d9f1442cae6487bb3aef8632bed23 (patch)
tree4bffed8c0ee49a629ae7805334a2e56a52fec4c8 /drivers/crypto/nx/nx.h
parentcrypto: nx - Fixing NX data alignment with nx_sg list (diff)
downloadlinux-dev-10d87b730e1d9f1442cae6487bb3aef8632bed23.tar.xz
linux-dev-10d87b730e1d9f1442cae6487bb3aef8632bed23.zip
crypto: nx - Fixing SHA update bug
Bug happens when a data size less than SHA block size is passed. Since first attempt will be saved in buffer, second round attempt get into two step to calculate op.inlen and op.outlen. The issue resides in this step. A wrong value of op.inlen and outlen was being calculated. This patch fix this eliminate the nx_sha_build_sg_list, that is useless in SHA's algorithm context. Instead we call nx_build_sg_list directly and pass a previous calculated max_sg_len to it. Signed-off-by: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/nx/nx.h')
-rw-r--r--drivers/crypto/nx/nx.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/crypto/nx/nx.h b/drivers/crypto/nx/nx.h
index 6c9ecaaead52..41b87ee03fe2 100644
--- a/drivers/crypto/nx/nx.h
+++ b/drivers/crypto/nx/nx.h
@@ -153,8 +153,6 @@ void nx_crypto_ctx_exit(struct crypto_tfm *tfm);
void nx_ctx_init(struct nx_crypto_ctx *nx_ctx, unsigned int function);
int nx_hcall_sync(struct nx_crypto_ctx *ctx, struct vio_pfo_op *op,
u32 may_sleep);
-int nx_sha_build_sg_list(struct nx_crypto_ctx *, struct nx_sg *,
- s64 *, unsigned int *, u8 *, u32);
struct nx_sg *nx_build_sg_list(struct nx_sg *, u8 *, unsigned int *, u32);
int nx_build_sg_lists(struct nx_crypto_ctx *, struct blkcipher_desc *,
struct scatterlist *, struct scatterlist *, unsigned int *,