forked from luck/tmp_suning_uos_patched
crypto: aead - Preserve in-place processing in old_crypt
This patch tries to preserve in-place processing in old_crypt as various algorithms are optimised for in-place processing where src == dst. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
fdaef75f66
commit
b455eb80f1
|
@ -107,7 +107,8 @@ static int old_crypt(struct aead_request *req,
|
|||
return crypt(req);
|
||||
|
||||
src = scatterwalk_ffwd(nreq->srcbuf, req->src, req->assoclen);
|
||||
dst = scatterwalk_ffwd(nreq->dstbuf, req->dst, req->assoclen);
|
||||
dst = req->src == req->dst ?
|
||||
src : scatterwalk_ffwd(nreq->dstbuf, req->dst, req->assoclen);
|
||||
|
||||
aead_request_set_tfm(&nreq->subreq, aead);
|
||||
aead_request_set_callback(&nreq->subreq, aead_request_flags(req),
|
||||
|
|
Loading…
Reference in New Issue
Block a user