From patchwork Thu Nov 5 07:48:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 7558841 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7F851BEEA4 for ; Thu, 5 Nov 2015 07:49:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A59FC20828 for ; Thu, 5 Nov 2015 07:49:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2A3620824 for ; Thu, 5 Nov 2015 07:49:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032723AbbKEHtQ (ORCPT ); Thu, 5 Nov 2015 02:49:16 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:37747 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032203AbbKEHtP (ORCPT ); Thu, 5 Nov 2015 02:49:15 -0500 Received: by wmll128 with SMTP id l128so5693619wml.0; Wed, 04 Nov 2015 23:49:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=bFEEP7WFgll5tzZZ5WYJ6AUbpRrIrOXmrPrKESEZ1j4=; b=oUBxWe5zG0v44/zb9sAOG9S7Ehr5wF0P7n14jNBw7R0eyqLBO2PVKyrJYjpFfHhP4g +qJzpExRzA0Im+m6AinFT/tuNJuIrfd2xd+aXlt7tlMjDdq1QGnhXwafWiADVChmavIL lEFh00xtpjSgJWHCo/dCQZruRO9PNrH3qaMsfLaprDBR+zPeZhV60altnUiHroCRvzMb E3MDmDQi0kYKp6icXo/2vs2FPUe2AjyiMZiM5Kt74GeZGG8eDkNBV2s8YonwGwdmdbXm wCzJ3jWcSIJaZQnU3CCF8CHnM1WIXbQWImXZY5h+SCo1U3mBGVRb/6bD7aLxMzV/D2+6 kimQ== X-Received: by 10.28.146.146 with SMTP id u140mr1626614wmd.85.1446709753773; Wed, 04 Nov 2015 23:49:13 -0800 (PST) Received: from Red.local (ANice-651-1-289-62.w83-201.abo.wanadoo.fr. [83.201.177.62]) by smtp.googlemail.com with ESMTPSA id m7sm2200785wma.16.2015.11.04.23.49.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Nov 2015 23:49:13 -0800 (PST) From: LABBE Corentin To: herbert@gondor.apana.org.au, davem@davemloft.net, maxime.ripard@free-electrons.com, wens@csie.org Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, LABBE Corentin , stable@vger.kernel.org Subject: [PATCH] crypto: sun4i-ss: add missing statesize Date: Thu, 5 Nov 2015 08:48:57 +0100 Message-Id: <1446709737-11316-1-git-send-email-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.4.10 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP sun4i-ss implementaton of md5/sha1 is via ahash algorithms. A recent change make impossible to load them without giving statesize. This patch specifiy statesize for sha1 and md5. Signed-off-by: LABBE Corentin Cc: stable@vger.kernel.org Tested-by: Chen-Yu Tsai --- drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c index eab6fe2..107cd2a 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c @@ -39,6 +39,7 @@ static struct sun4i_ss_alg_template ss_algs[] = { .import = sun4i_hash_import_md5, .halg = { .digestsize = MD5_DIGEST_SIZE, + .statesize = sizeof(struct md5_state), .base = { .cra_name = "md5", .cra_driver_name = "md5-sun4i-ss", @@ -66,6 +67,7 @@ static struct sun4i_ss_alg_template ss_algs[] = { .import = sun4i_hash_import_sha1, .halg = { .digestsize = SHA1_DIGEST_SIZE, + .statesize = sizeof(struct sha1_state), .base = { .cra_name = "sha1", .cra_driver_name = "sha1-sun4i-ss",