Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1673296 > unrolled thread

[PATCH] crypto: brcm - Fix SHA3-512 algorithm failure

Started byRaveendra Padasalagi <raveendra.padasalagi@broadcom.com>
First post2017-06-23 08:50 +0200
Last post2017-06-23 10:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] crypto: brcm - Fix SHA3-512 algorithm failure Raveendra Padasalagi <raveendra.padasalagi@broadcom.com> - 2017-06-23 08:50 +0200
    Re: [PATCH] crypto: brcm - Fix SHA3-512 algorithm failure Anup Patel <anup.patel@broadcom.com> - 2017-06-23 10:40 +0200

#1673296 — [PATCH] crypto: brcm - Fix SHA3-512 algorithm failure

FromRaveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Date2017-06-23 08:50 +0200
Subject[PATCH] crypto: brcm - Fix SHA3-512 algorithm failure
Message-ID<tVqzL-78A-9@gated-at.bofh.it>
In Broadcom SPU driver, due to missing break statement
in spu2_hash_xlate() while mapping SPU2 equivalent
SHA3-512 value, -EINVAL is chosen and hence leading to
failure of SHA3-512 algorithm. This patch fixes the same.

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
---
 drivers/crypto/bcm/spu2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/bcm/spu2.c b/drivers/crypto/bcm/spu2.c
index ef04c97..bf7ac62 100644
--- a/drivers/crypto/bcm/spu2.c
+++ b/drivers/crypto/bcm/spu2.c
@@ -302,6 +302,7 @@ static int spu2_hash_mode_xlate(enum hash_mode hash_mode,
 		break;
 	case HASH_ALG_SHA3_512:
 		*spu2_type = SPU2_HASH_TYPE_SHA3_512;
+		break;
 	case HASH_ALG_LAST:
 	default:
 		err = -EINVAL;
-- 
1.9.1

[toc] | [next] | [standalone]


#1673371

FromAnup Patel <anup.patel@broadcom.com>
Date2017-06-23 10:40 +0200
Message-ID<tVsid-8gZ-5@gated-at.bofh.it>
In reply to#1673296
On Fri, Jun 23, 2017 at 12:15 PM, Raveendra Padasalagi
<raveendra.padasalagi@broadcom.com> wrote:
> In Broadcom SPU driver, due to missing break statement
> in spu2_hash_xlate() while mapping SPU2 equivalent
> SHA3-512 value, -EINVAL is chosen and hence leading to
> failure of SHA3-512 algorithm. This patch fixes the same.
>
> Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
> Reviewed-by: Ray Jui <ray.jui@broadcom.com>
> Reviewed-by: Scott Branden <scott.branden@broadcom.com>
> ---
>  drivers/crypto/bcm/spu2.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/crypto/bcm/spu2.c b/drivers/crypto/bcm/spu2.c
> index ef04c97..bf7ac62 100644
> --- a/drivers/crypto/bcm/spu2.c
> +++ b/drivers/crypto/bcm/spu2.c
> @@ -302,6 +302,7 @@ static int spu2_hash_mode_xlate(enum hash_mode hash_mode,
>                 break;
>         case HASH_ALG_SHA3_512:
>                 *spu2_type = SPU2_HASH_TYPE_SHA3_512;
> +               break;
>         case HASH_ALG_LAST:
>         default:
>                 err = -EINVAL;
> --
> 1.9.1
>

This should go in linux-stable too.

Please CC Linux stable and include "Fixes:".

Regards,
Anup

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web