Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: skcipher - use scatterwalk_start_at_pos()

In skcipher_walk_aead_common(), use scatterwalk_start_at_pos() instead
of a sequence of scatterwalk_start(), scatterwalk_copychunks(..., 2),
and scatterwalk_done(). This is simpler and faster.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Eric Biggers and committed by
Herbert Xu
cb25dbb6 84b15763

+2 -8
+2 -8
crypto/skcipher.c
··· 363 363 if (unlikely(!walk->total)) 364 364 return 0; 365 365 366 - scatterwalk_start(&walk->in, req->src); 367 - scatterwalk_start(&walk->out, req->dst); 368 - 369 - scatterwalk_copychunks(NULL, &walk->in, req->assoclen, 2); 370 - scatterwalk_copychunks(NULL, &walk->out, req->assoclen, 2); 371 - 372 - scatterwalk_done(&walk->in, 0, walk->total); 373 - scatterwalk_done(&walk->out, 0, walk->total); 366 + scatterwalk_start_at_pos(&walk->in, req->src, req->assoclen); 367 + scatterwalk_start_at_pos(&walk->out, req->dst, req->assoclen); 374 368 375 369 /* 376 370 * Accessing 'alg' directly generates better code than using the