aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/nx/nx.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-10-12 21:39:15 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2019-10-23 19:46:58 +1100
commit7740bd51efd697fe3750c7317229ec83571f5d98 (patch)
tree2e40c28085ac630f59d207bd5029a832ab01fe67 /drivers/crypto/nx/nx.h
parentcrypto: padlock-aes - convert to skcipher API (diff)
downloadlinux-dev-7740bd51efd697fe3750c7317229ec83571f5d98.tar.xz
linux-dev-7740bd51efd697fe3750c7317229ec83571f5d98.zip
crypto: nx - don't abuse blkcipher_desc to pass iv around
The NX crypto driver is using 'struct blkcipher_desc' to pass the IV around, even for AEADs (for which it creates the struct on the stack). This is not appropriate since this structure is part of the "blkcipher" API, which is deprecated and will be removed. Just pass around the IV directly instead. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--drivers/crypto/nx/nx.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/crypto/nx/nx.h b/drivers/crypto/nx/nx.h
index 7ecca168f8c4..768ebae9731e 100644
--- a/drivers/crypto/nx/nx.h
+++ b/drivers/crypto/nx/nx.h
@@ -155,9 +155,9 @@ 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);
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 *,
- unsigned int, u8 *);
+int nx_build_sg_lists(struct nx_crypto_ctx *nx_ctx, const u8 *iv,
+ struct scatterlist *dst, struct scatterlist *src,
+ unsigned int *nbytes, unsigned int offset, u8 *oiv);
struct nx_sg *nx_walk_and_build(struct nx_sg *, unsigned int,
struct scatterlist *, unsigned int,
unsigned int *);