Skip to contentSkip to conversation

crypto: ccp: set max RSA modulus size for v3 platform devices as well

PATCH In review Ard Biesheuvel 3 participants 3 messages Nov 27, 2019 – Dec 11, 2019

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

PATCH 1/1 crypto: ccp: set max RSA modulus size for v3 platform devices as well

AMD Seattle incorporates a non-PCI version of the v3 CCP crypto accelerator, and this version was left behind when the maximum RSA modulus size was parameterized in order to support v5 hardware which supports larger moduli than v3 hardware does. Due to this oversight, RSA acceleration no longer works at all on these systems.

Fix this by setting the .rsamax property to the appropriate value for v3 platform hardware.

Fixes e28c190db66830c0 ("csrypto: ccp - Expand RSA support for a v5 ccp")
Cc Gary R Hook <[email protected]>
---
 drivers/crypto/ccp/ccp-dev-v3.c | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/ccp/ccp-dev-v3.c +1 -0
index 0186b3df4c87..0d5576f6ad21 100644
@@ -586,6 +586,7 @@ const struct ccp_vdata ccpv3_platform = {
 	.setup = NULL,
 	.perform = &ccp3_actions,
 	.offset = 0,
+	.rsamax = CCP_RSA_MAX_WIDTH,
 };
 
 const struct ccp_vdata ccpv3 = {
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Ard Biesheuvel

AMD Seattle incorporates a non-PCI version of the v3 CCP crypto accelerator, and this version was left behind when the maximum RSA modulus size was parameterized in order to support v5 hardware which supports larger moduli than v3 hardware does. Due to this oversight, RSA acceleration no longer works at all on these systems.

Quoted 6 lines

Fix this by setting the .rsamax property to the appropriate value for v3 platform hardware.

Fixes e28c190db66830c0 ("csrypto: ccp - Expand RSA support for a v5 ccp")
Cc Gary R Hook <[email protected]>
Quoted 16 lines
---
  drivers/crypto/ccp/ccp-dev-v3.c | 1 +
  1 file changed, 1 insertion(+)
drivers/crypto/ccp/ccp-dev-v3.c +1 -0
index 0186b3df4c87..0d5576f6ad21 100644
@@ -586,6 +586,7 @@ const struct ccp_vdata ccpv3_platform = {
  	.setup = NULL,
  	.perform = &ccp3_actions,
  	.offset = 0,
+	.rsamax = CCP_RSA_MAX_WIDTH,
  };
 
  const struct ccp_vdata ccpv3 = {
maintainer
#2 lore raw
In reply to Ard Biesheuvel
Quoted 9 lines · Ard Biesheuvel

AMD Seattle incorporates a non-PCI version of the v3 CCP crypto accelerator, and this version was left behind when the maximum RSA modulus size was parameterized in order to support v5 hardware which supports larger moduli than v3 hardware does. Due to this oversight, RSA acceleration no longer works at all on these systems.

Fix this by setting the .rsamax property to the appropriate value for v3 platform hardware.

Quoted 6 lines
Fixes e28c190db66830c0 ("csrypto: ccp - Expand RSA support for a v5 ccp")
Cc Gary R Hook <[email protected]>
---
 drivers/crypto/ccp/ccp-dev-v3.c | 1 +
 1 file changed, 1 insertion(+)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt