]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6f5c03121f18528958b9421127b1ffe75adbdc42
tree7a5f613caba029891ff0b9eb431a97108a8dae4e
parent7c28f686fec2fde1255fe1aca9066064cd80d76c
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