]> 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)
commit680014e4897e4e719dd553b95d8cc2b875864f08
tree7a5f613caba029891ff0b9eb431a97108a8dae4e
parentfd2cd833d78c3eff3a58d3f41572e0b7a47a3bb3
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