Skip to contentSkip to conversation

geode: fix not inplace encryption

PATCH In review Sebastian Siewior 3 participants 5 messages Nov 6, 2007 – Nov 11, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 geode: fix not inplace encryption

Currently the Geode AES module fails to encrypt or decrypt if the coherent bits are not set what is currently the case if the encryption does not occur inplace. However, the encryption works on my Geode machine _only_ if the coherent bits are always set.

---
 drivers/crypto/geode-aes.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/crypto/geode-aes.c +1 -2
index f2d4fba..0ca92d4 100644
@@ -81,8 +81,7 @@ geode_aes_crypt(struct geode_aes_op *op)
 	 * we don't need to worry
 	 */
 
-	if (op->src == op->dst)
-		flags |= (AES_CTRL_DCA | AES_CTRL_SCA);
+	flags |= (AES_CTRL_DCA | AES_CTRL_SCA);
 
 	if (op->dir == AES_DIR_ENCRYPT)
 		flags |= AES_CTRL_ENCRYPT;
Signature · 1 line
1.5.3.4
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Sebastian Siewior

Currently the Geode AES module fails to encrypt or decrypt if the coherent bits are not set what is currently the case if the encryption does not occur inplace. However, the encryption works on my Geode machine _only_ if the coherent bits are always set.

Anything in the cache is suspect - turning on coherency is the best plan to be rock solid.

Quoted 23 lines
---
 drivers/crypto/geode-aes.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/crypto/geode-aes.c +1 -2
index f2d4fba..0ca92d4 100644
@@ -81,8 +81,7 @@ geode_aes_crypt(struct geode_aes_op *op)
 	 * we don't need to worry
 	 */
 
-	if (op->src == op->dst)
-		flags |= (AES_CTRL_DCA | AES_CTRL_SCA);
+	flags |= (AES_CTRL_DCA | AES_CTRL_SCA);
 
 	if (op->dir == AES_DIR_ENCRYPT)
 		flags |= AES_CTRL_ENCRYPT;
Signature · 1 line
1.5.3.4
Signature · 3 lines
Jordan Crouse
Systems Software Development Engineer 
Advanced Micro Devices, Inc.
maintainer
#2 lore raw
Quoted 6 lines · Jordan Crouse
Quoted 5 lines · Sebastian Siewior

Currently the Geode AES module fails to encrypt or decrypt if the coherent bits are not set what is currently the case if the encryption does not occur inplace. However, the encryption works on my Geode machine _only_ if the coherent bits are always set.

Quoted 7 lines
Quoted 2 lines

Anything in the cache is suspect - turning on coherency is the best plan to be rock solid.

Patch applied. Thanks.

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#3 lore raw
Quoted 10 lines · * Herbert Xu | 2007-11-10 19:39:14 [+0800]:
Quoted 9 lines · Jordan Crouse
Quoted 7 lines · Sebastian Siewior

Currently the Geode AES module fails to encrypt or decrypt if the coherent bits are not set what is currently the case if the encryption does not occur inplace. However, the encryption works on my Geode machine _only_ if the coherent bits are always set.

Quoted 6 lines
Quoted 4 lines

Anything in the cache is suspect - turning on coherency is the best plan to be rock solid.

Patch applied. Thanks.

I haven't seen this patch in your crypto tree. Do you think about pushing this into .24?

Sebastian

maintainer
#4 lore raw
Quoted 3 lines · Sebastian Siewior

I haven't seen this patch in your crypto tree. Do you think about pushing this into .24?

Yes I'll take care of that.

Thanks,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt