mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
crypto: cavium - remove bogus code handling cryptd
The cavium crypto driver adds 'sizeof(struct ablkcipher_request)' to its request size because "the cryptd daemon uses this memory for request_ctx information". This is incorrect and unnecessary; cryptd doesn't require wrapped algorithms to reserve extra request space. So remove this. Also remove the unneeded memset() of the tfm context to 0. It's already zeroed on allocation. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
0a877e354a
commit
0edf8593eb
1 changed files with 1 additions and 11 deletions
|
@ -10,7 +10,6 @@
|
||||||
#include <crypto/aes.h>
|
#include <crypto/aes.h>
|
||||||
#include <crypto/algapi.h>
|
#include <crypto/algapi.h>
|
||||||
#include <crypto/authenc.h>
|
#include <crypto/authenc.h>
|
||||||
#include <crypto/cryptd.h>
|
|
||||||
#include <crypto/crypto_wq.h>
|
#include <crypto/crypto_wq.h>
|
||||||
#include <crypto/des.h>
|
#include <crypto/des.h>
|
||||||
#include <crypto/xts.h>
|
#include <crypto/xts.h>
|
||||||
|
@ -356,16 +355,7 @@ static int cvm_ecb_des3_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
|
||||||
|
|
||||||
static int cvm_enc_dec_init(struct crypto_tfm *tfm)
|
static int cvm_enc_dec_init(struct crypto_tfm *tfm)
|
||||||
{
|
{
|
||||||
struct cvm_enc_ctx *ctx = crypto_tfm_ctx(tfm);
|
tfm->crt_ablkcipher.reqsize = sizeof(struct cvm_req_ctx);
|
||||||
|
|
||||||
memset(ctx, 0, sizeof(*ctx));
|
|
||||||
tfm->crt_ablkcipher.reqsize = sizeof(struct cvm_req_ctx) +
|
|
||||||
sizeof(struct ablkcipher_request);
|
|
||||||
/* Additional memory for ablkcipher_request is
|
|
||||||
* allocated since the cryptd daemon uses
|
|
||||||
* this memory for request_ctx information
|
|
||||||
*/
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue