linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: ccp: set max RSA modulus size for v3 platform devices as well
@ 2019-11-27 12:01 Ard Biesheuvel
  2019-11-27 21:04 ` Hook, Gary
  2019-12-11  9:39 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2019-11-27 12:01 UTC (permalink / raw)
  To: linux-crypto; +Cc: herbert, Ard Biesheuvel, Gary R Hook

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 <gary.hook@amd.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 drivers/crypto/ccp/ccp-dev-v3.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c
index 0186b3df4c87..0d5576f6ad21 100644
--- a/drivers/crypto/ccp/ccp-dev-v3.c
+++ b/drivers/crypto/ccp/ccp-dev-v3.c
@@ -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 = {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: ccp: set max RSA modulus size for v3 platform devices as well
  2019-11-27 12:01 [PATCH] crypto: ccp: set max RSA modulus size for v3 platform devices as well Ard Biesheuvel
@ 2019-11-27 21:04 ` Hook, Gary
  2019-12-11  9:39 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Hook, Gary @ 2019-11-27 21:04 UTC (permalink / raw)
  To: Ard Biesheuvel, linux-crypto; +Cc: herbert

On 11/27/2019 6:01 AM, Ard Biesheuvel wrote:
> 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 <gary.hook@amd.com>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Acked-by: Gary R Hook <gary.hook@amd.com>

> ---
>   drivers/crypto/ccp/ccp-dev-v3.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c
> index 0186b3df4c87..0d5576f6ad21 100644
> --- a/drivers/crypto/ccp/ccp-dev-v3.c
> +++ b/drivers/crypto/ccp/ccp-dev-v3.c
> @@ -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 = {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: ccp: set max RSA modulus size for v3 platform devices as well
  2019-11-27 12:01 [PATCH] crypto: ccp: set max RSA modulus size for v3 platform devices as well Ard Biesheuvel
  2019-11-27 21:04 ` Hook, Gary
@ 2019-12-11  9:39 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2019-12-11  9:39 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: linux-crypto, Gary R Hook

On Wed, Nov 27, 2019 at 01:01:36PM +0100, Ard Biesheuvel wrote:
> 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 <gary.hook@amd.com>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> ---
>  drivers/crypto/ccp/ccp-dev-v3.c | 1 +
>  1 file changed, 1 insertion(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-11  9:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 12:01 [PATCH] crypto: ccp: set max RSA modulus size for v3 platform devices as well Ard Biesheuvel
2019-11-27 21:04 ` Hook, Gary
2019-12-11  9:39 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).