From patchwork Fri Jun 23 09:04:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raveendra Padasalagi X-Patchwork-Id: 9806007 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8AB6C60349 for ; Fri, 23 Jun 2017 09:04:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BA6328358 for ; Fri, 23 Jun 2017 09:04:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E3212853D; Fri, 23 Jun 2017 09:04:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AD3328358 for ; Fri, 23 Jun 2017 09:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754177AbdFWJE1 (ORCPT ); Fri, 23 Jun 2017 05:04:27 -0400 Received: from mail-qt0-f182.google.com ([209.85.216.182]:34395 "EHLO mail-qt0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753920AbdFWJEZ (ORCPT ); Fri, 23 Jun 2017 05:04:25 -0400 Received: by mail-qt0-f182.google.com with SMTP id v20so30008169qtg.1 for ; Fri, 23 Jun 2017 02:04:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=HbA+gerJFKAHWpdWN59KLnqn5vcqbXn6laeOJGUGCaY=; b=K7TKigyMlvpv4U/M3K9tCDhv4Eo1w2QgCKXMogi73Za3DEVi0/4LMzZCHUF/PGYUIu e77e/+McXp/h7MrEnipk9pc4VltG48wBE98eE97IOxn3Q9WeK7Rb5xdWhpOU0Uqb+f4p NYIY/uXCxctRB6o4fsJoo1vppEw13BAHB2Z9g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HbA+gerJFKAHWpdWN59KLnqn5vcqbXn6laeOJGUGCaY=; b=XfvT/yaURs6sWxS+mss8yHYjU6u9Ie9hEpdVJrVKBR9j3KM23AraNeetNYfUSJLh+H 6mPcgrbCQkvhkjdMC589zKxRkJm+ptpdTkPZnpI3gcDUWtanIhJiift5nwkIdEMKBuyn xmk0iUuZiI1kb1Th0SQGLuMh2wWW1YGdPQ+TynNtITtwn2ObSR7RyDTt5uUm9ZuS99kX xmaarxwm57/c9OakKvqifWNMolIylTq+wNmcdcQsspuxzCptkeRqbvOg7llChxc4TS+c L4a9+wgJ0Ys7X1vMCs70SyLhE0cKBtWBijmhdqq7cptX0x6zyEwQ0KpJpU/SYFP4+0hI 9maw== X-Gm-Message-State: AKS2vOzsAK/NQykJyWFz2f/x8xh9Kj2oXQFR9zJxpZYa3kZXajHPyehr ZoAS54cEauJQhVOX X-Received: by 10.237.58.227 with SMTP id o90mr8442234qte.51.1498208664409; Fri, 23 Jun 2017 02:04:24 -0700 (PDT) Received: from rpadasal-OptiPlex-7010.dhcp.avagotech.net ([192.19.237.250]) by smtp.gmail.com with ESMTPSA id w9sm3112249qta.29.2017.06.23.02.04.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Jun 2017 02:04:23 -0700 (PDT) From: Raveendra Padasalagi To: Herbert Xu , "David S. Miller" , Rob Rice , Scott Branden , Ray Jui , Steve Lin , linux-crypto@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Raveendra Padasalagi Subject: [PATCH v1] crypto: brcm - Fix SHA3-512 algorithm failure Date: Fri, 23 Jun 2017 14:34:08 +0530 Message-Id: <1498208648-15948-1-git-send-email-raveendra.padasalagi@broadcom.com> X-Mailer: git-send-email 1.9.1 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver") Signed-off-by: Raveendra Padasalagi Reviewed-by: Ray Jui Reviewed-by: Scott Branden Cc: stable@vger.kernel.org --- Changes in v1: - Added Cc and fixes tag in the Signed-off area to send the patch to stable kernel 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;