summaryrefslogtreecommitdiff
path: root/net/hsr/hsr_device.h
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2017-10-04 02:00:11 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2017-10-12 17:55:15 +0300
commitcd4dcd6da7a2610e0562a6e130bb68cc544a8fb1 (patch)
treea7305d6dcc158067b37f5427aab044e3f8cf2171 /net/hsr/hsr_device.h
parent4865b122d4aff5151c88d2f7442d5a87f7e795ae (diff)
downloadlinux-cd4dcd6da7a2610e0562a6e130bb68cc544a8fb1.tar.xz
crypto: crypto4xx - overhaul crypto4xx_build_pd()
This patch overhauls and fixes code related to crypto4xx_build_pd() * crypto4xx_build_pd() did not handle chained source scatterlist. This is fixed by replacing the buggy indexed-access of &src[idx] with sg_next() in the gather array setup loop. * The redundant is_hash, direction, save_iv and pd_ctl members in the crypto4xx_ctx struct have been removed. - is_hash can be derived from the crypto_async_request parameter. - direction is already part of the security association's bf.dir bitfield. - save_iv is unused. - pd_ctl always had the host_ready bit enabled anyway. (the hash_final case is rather pointless, since the ahash code has been deactivated). * make crypto4xx_build_pd()'s caller responsible for converting the IV to the LE32 format. * change crypto4xx_ahash_update() and crypto4xx_ahash_digest() to initialize a temporary destination scatterlist. This allows the removal of an ugly cast of req->result (which is a pointer to an u8-array) to a scatterlist pointer. * change crypto4xx_build_pd() return type to int. After all it returns -EINPROGRESS/-EBUSY. * fix crypto4xx_build_pd() thread-unsafe sa handling. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'net/hsr/hsr_device.h')
0 files changed, 0 insertions, 0 deletions