Skip to content

Commit 2d33f57

Browse files
yekai123123herbertx
authored andcommitted
crypto: hisilicon/sec - delete the flag CRYPTO_ALG_ALLOCATES_MEMORY
Should not to uses the CRYPTO_ALG_ALLOCATES_MEMORY in SEC2. The SEC2 driver uses the pre-allocated buffers, including the src sgl pool, dst sgl pool and other qp ctx resources. (e.g. IV buffer, mac buffer, key buffer). The SEC2 driver doesn't allocate memory during request processing. The driver only maps software sgl to allocated hardware sgl during I/O. So here is fix it. Signed-off-by: Kai Ye <yekai13@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent fbdab61 commit 2d33f57

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/crypto/hisilicon/sec2/sec_crypto.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,7 +2113,6 @@ static int sec_skcipher_decrypt(struct skcipher_request *sk_req)
21132113
.cra_driver_name = "hisi_sec_"sec_cra_name,\
21142114
.cra_priority = SEC_PRIORITY,\
21152115
.cra_flags = CRYPTO_ALG_ASYNC |\
2116-
CRYPTO_ALG_ALLOCATES_MEMORY |\
21172116
CRYPTO_ALG_NEED_FALLBACK,\
21182117
.cra_blocksize = blk_size,\
21192118
.cra_ctxsize = sizeof(struct sec_ctx),\
@@ -2366,7 +2365,6 @@ static int sec_aead_decrypt(struct aead_request *a_req)
23662365
.cra_driver_name = "hisi_sec_"sec_cra_name,\
23672366
.cra_priority = SEC_PRIORITY,\
23682367
.cra_flags = CRYPTO_ALG_ASYNC |\
2369-
CRYPTO_ALG_ALLOCATES_MEMORY |\
23702368
CRYPTO_ALG_NEED_FALLBACK,\
23712369
.cra_blocksize = blk_size,\
23722370
.cra_ctxsize = sizeof(struct sec_ctx),\

0 commit comments

Comments
 (0)