]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: caam - Pad SG length when allocating hash edesc
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 12 Sep 2024 09:57:13 +0000 (17:57 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 21 Sep 2024 09:14:59 +0000 (17:14 +0800)
commit5124bc96162667766f6120b19f57a640c2eccb2a
treed96f475455e029c9d636af6c379f294b5748aad1
parentce212d2afca47acd366a2e74c76fe82c31f785ab
crypto: caam - Pad SG length when allocating hash edesc

Because hardware will read in multiples of 4 SG entries, ensure
the allocated length is always padded.  This was already done
by some callers of ahash_edesc_alloc, but ahash_digest was conspicuously
missing.

In any case, doing it in the allocation function ensures that the
memory is always there.

Reported-by: Guangwu Zhang <guazhang@redhat.com>
Fixes: a5e5c13398f3 ("crypto: caam - fix S/G table passing page boundary")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamhash.c