From patchwork Tue Jan 16 16:32:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Konieczny X-Patchwork-Id: 10167609 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 89A29601E7 for ; Tue, 16 Jan 2018 16:32:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D450203B9 for ; Tue, 16 Jan 2018 16:32:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 720ED20408; Tue, 16 Jan 2018 16:32:40 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 1BF31203B9 for ; Tue, 16 Jan 2018 16:32:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750812AbeAPQc0 (ORCPT ); Tue, 16 Jan 2018 11:32:26 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:37989 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbeAPQcX (ORCPT ); Tue, 16 Jan 2018 11:32:23 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180116163220euoutp022ca6c7109b1c36557385a18e90644024~KV2rQTJBG2411024110euoutp02c; Tue, 16 Jan 2018 16:32:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180116163220euoutp022ca6c7109b1c36557385a18e90644024~KV2rQTJBG2411024110euoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516120340; bh=bJTuOgfUfWxPz/zv6v8H47+L44S7A1o59ixJKgiXC7I=; h=To:From:Subject:Cc:Date:References:From; b=PMQsywr64AWa/58gtwZPDHj0cC+qS1Z3RFmByFvGZUitnhojmnNsk+E2Q5NA0dRZ/ hAogEhDxmN8c3lOoVY8AYX8fcfildXUhDs7O5DEWdaVu2C57ECnrKlcuuvxvnA5tZb UgaYqvmOjKiQkl9sXhhYnj/ZwyjW+VSexCOS09i4= Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180116163220eucas1p13cbf71ced66529274468ca113521e54c~KV2qm5Ihu0791707917eucas1p1T; Tue, 16 Jan 2018 16:32:20 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id DC.15.30163.3192E5A5; Tue, 16 Jan 2018 16:32:19 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180116163219eucas1p132fafc2db8cb9b3af1a1f22d8bf2fdaf~KV2p3Zyaq0062200622eucas1p12; Tue, 16 Jan 2018 16:32:19 +0000 (GMT) X-AuditID: cbfec7f4-f790c6d0000075d3-7c-5a5e291351b8 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 76.52.20118.3192E5A5; Tue, 16 Jan 2018 16:32:19 +0000 (GMT) Received: from [106.120.51.18] by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P2N00GGPPXUDXA0@eusync1.samsung.com>; Tue, 16 Jan 2018 16:32:19 +0000 (GMT) To: Herbert Xu From: Kamil Konieczny Subject: [PATCH] crypto: ux500/hash: Add empty export and import Cc: "David S. Miller" , Linus Walleij , Bartlomiej Zolnierkiewicz , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Joakim Bech Message-id: Date: Tue, 16 Jan 2018 17:32:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-version: 1.0 Content-type: text/plain; charset="utf-8" Content-language: en-US Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42LZduzneV1hzbgogwmrzSw2zljPajHnfAuL RfcrGYvPq56yWEz5s5zJ4v69n0wWl3fNYXNg99iy8iaTx7YDqh53ru1h8+jbsorR4/MmuQDW KC6blNSczLLUIn27BK6M7XsnsRR8F6zY/nMDYwPjfr4uRk4OCQETidUbPjJC2GISF+6tZwOx hQSWMkpceSrSxcgFZH9mlDg5/y0jTEP7iy1MEEXLGCX2LeaAKHrGKPH2wwGwbhEBHYmVLxez gthsAuYSj7afAWsQFnCQ6LmzE2wQM8jUqZ3xIDavgJvEnMUr2EFsFgFVifffn4LViApESHQ9 28UKUSMo8WPyPRaIXk2JF18mQdniEs2tN6FseYnNa94ygxwkIbCHTeLx1F9sEFe7SEw4tgDK FpZ4dXwLO4QtI3F5cjcLREM/o8TyG6fYIZwpjBLHp11lgqiyljh8/CIrxAo+iUnbpgOt4ACK 80p0tAl1MbIDmR4ST2Qhih0lNj1fwwwJoFiJg1ubmSYwys1C8sIsJC/MQvLCLCQvLGBkWcUo klpanJueWmyiV5yYW1yal66XnJ+7iRGYSE7/O/5lB+PiY1aHGAU4GJV4eBn+xEYJsSaWFVfm HmKU4GBWEuFtDI6JEuJNSaysSi3Kjy8qzUktPsQozcGiJM5rG9UWKSSQnliSmp2aWpBaBJNl 4uCUamAM3r/tP0PsAWnRFcvs/iwV2NsmrPdM70S/1cRVPnlcv3Mvil47+WDvxttvKmP3Teds O3S7/53SCwVxK12XuvWxHxZ/SO9jVLj/Z1fWqrUf2WKfXnq642RG4eKe3A2vkhelrL8l9Kyo c7JnzI6QIHETjrwzRRYcDcur4spiF1+/Xa4VeWBBfHScEktxRqKhFnNRcSIABmCMZyADAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBLMWRmVeSWpSXmKPExsVy+t/xy7rCmnFRBg1PhC02zljPajHnfAuL RfcrGYvPq56yWEz5s5zJ4v69n0wWl3fNYXNg99iy8iaTx7YDqh53ru1h8+jbsorR4/MmuQDW KC6blNSczLLUIn27BK6M7XsnsRR8F6zY/nMDYwPjfr4uRk4OCQETifYXW5ggbDGJC/fWs3Ux cnEICSxhlDgwv40ZwnnGKLFs606wKhEBHYmVLxezgthsAuYSj7afAYsLCzhI9NzZyQjSwCzw lVFi7Y5djCAJXgE3iTmLV7CD2CwCqhLvvz8Fi4sKREg0zZzLClEjKPFj8j2WLkYOoGZ1iSlT ckHCzALiEs2tN1kgbHmJzWveMk9g5J+FpGMWQscsJB2zkHQsYGRZxSiSWlqcm55bbKRXnJhb XJqXrpecn7uJERje24793LKDsetd8CFGAQ5GJR5ehj+xUUKsiWXFlbmHGCU4mJVEeBuDY6KE eFMSK6tSi/Lji0pzUosPMUpzsCiJ8/buWR0pJJCeWJKanZpakFoEk2Xi4JRqYKy+u1p77z7x rpNWX+4lMupNYRXhm8W3zEhtncTc5YIP2md+FbuZt1tqX6SSwwqjJUmWOjetpicnMLhdfr/8 2OpdWjEaM5fLN0ZUlc4v/Fqr/PaEkl+GnmlZpvjztasU/5vM6dxZdrP0pecBaadd/f0rd63n Dj6pHu9/bB5vyDQn51XvO3J8FymxFGckGmoxFxUnAgBObnP0awIAAA== X-CMS-MailID: 20180116163219eucas1p132fafc2db8cb9b3af1a1f22d8bf2fdaf X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180116163219eucas1p132fafc2db8cb9b3af1a1f22d8bf2fdaf X-RootMTR: 20180116163219eucas1p132fafc2db8cb9b3af1a1f22d8bf2fdaf References: 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 Crypto framework will require async hash export/import, so add empty functions to prevent OOPS. Signed-off-by: Kamil Konieczny Acked-by: Linus Walleij --- drivers/crypto/ux500/hash/hash_core.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index 9acccad26928..2d0a677bcc76 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c @@ -1403,6 +1403,16 @@ static int ahash_sha256_digest(struct ahash_request *req) return ret1 ? ret1 : ret2; } +static int ahash_noimport(struct ahash_request *req, const void *in) +{ + return -ENOSYS; +} + +static int ahash_noexport(struct ahash_request *req, void *out) +{ + return -ENOSYS; +} + static int hmac_sha1_init(struct ahash_request *req) { struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); @@ -1507,6 +1517,8 @@ static struct hash_algo_template hash_algs[] = { .update = ahash_update, .final = ahash_final, .digest = ahash_sha1_digest, + .export = ahash_noexport, + .import = ahash_noimport, .halg.digestsize = SHA1_DIGEST_SIZE, .halg.statesize = sizeof(struct hash_ctx), .halg.base = { @@ -1529,6 +1541,8 @@ static struct hash_algo_template hash_algs[] = { .update = ahash_update, .final = ahash_final, .digest = ahash_sha256_digest, + .export = ahash_noexport, + .import = ahash_noimport, .halg.digestsize = SHA256_DIGEST_SIZE, .halg.statesize = sizeof(struct hash_ctx), .halg.base = { @@ -1553,6 +1567,8 @@ static struct hash_algo_template hash_algs[] = { .final = ahash_final, .digest = hmac_sha1_digest, .setkey = hmac_sha1_setkey, + .export = ahash_noexport, + .import = ahash_noimport, .halg.digestsize = SHA1_DIGEST_SIZE, .halg.statesize = sizeof(struct hash_ctx), .halg.base = { @@ -1577,6 +1593,8 @@ static struct hash_algo_template hash_algs[] = { .final = ahash_final, .digest = hmac_sha256_digest, .setkey = hmac_sha256_setkey, + .export = ahash_noexport, + .import = ahash_noimport, .halg.digestsize = SHA256_DIGEST_SIZE, .halg.statesize = sizeof(struct hash_ctx), .halg.base = {