diff options
| author | Pascal van Leeuwen <pascalvanl@gmail.com> | 2019-08-30 09:52:30 +0200 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-09-05 14:37:29 +1000 |
| commit | 3e450886ec573cb9d7cb1758317b5e4e0f308b52 (patch) | |
| tree | 7299e7a6ee67da108c6c56b0d6ac6ac39c6986a2 /drivers/crypto/inside-secure/safexcel_ring.c | |
| parent | d2d9e6fd6d1cd9bd0654c9f7ed2317a7fd220aef (diff) | |
| download | linux-next-3e450886ec573cb9d7cb1758317b5e4e0f308b52.tar.gz linux-next-3e450886ec573cb9d7cb1758317b5e4e0f308b52.zip | |
crypto: inside-secure - Added support for basic AES-GCM
This patch adds support for the basic AES-GCM AEAD cipher suite.
Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/inside-secure/safexcel_ring.c')
| -rw-r--r-- | drivers/crypto/inside-secure/safexcel_ring.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/crypto/inside-secure/safexcel_ring.c b/drivers/crypto/inside-secure/safexcel_ring.c index 2402a623759a..0f269b89cfd4 100644 --- a/drivers/crypto/inside-secure/safexcel_ring.c +++ b/drivers/crypto/inside-secure/safexcel_ring.c @@ -137,7 +137,13 @@ struct safexcel_command_desc *safexcel_add_cdesc(struct safexcel_crypto_priv *pr struct safexcel_token *token = (struct safexcel_token *)cdesc->control_data.token; - cdesc->control_data.packet_length = full_data_len; + /* + * Note that the length here MUST be >0 or else the EIP(1)97 + * may hang. Newer EIP197 firmware actually incorporates this + * fix already, but that doesn't help the EIP97 and we may + * also be running older firmware. + */ + cdesc->control_data.packet_length = full_data_len ?: 1; cdesc->control_data.options = EIP197_OPTION_MAGIC_VALUE | EIP197_OPTION_64BIT_CTX | EIP197_OPTION_CTX_CTRL_IN_CMD; |
