OSDN Git Service

crypto: omap-aes-gcm - fix failure with assocdata only
authorTero Kristo <t-kristo@ti.com>
Tue, 5 Nov 2019 14:01:06 +0000 (16:01 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 11 Dec 2019 08:36:59 +0000 (16:36 +0800)
commit5d5f3eed29379b3edc499729bb6f8651a9848fe4
tree7a5f613caba029891ff0b9eb431a97108a8dae4e
parentf0956d42c14abfeda9d0be7f06999363cab3e99a
crypto: omap-aes-gcm - fix failure with assocdata only

If we only have assocdata with an omap-aes-gcm, it currently just
completes it directly without passing it over to the crypto HW. This
produces wrong results.

Fix by passing the request down to the crypto HW, and fix the DMA
support code to accept a case where we don't expect any output data.
In the case where only assocdata is provided, it just passes through
the accelerator and provides authentication results, without any
encrypted/decrypted buffer via DMA.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-aes-gcm.c
drivers/crypto/omap-aes.c