From patchwork Tue Jan 16 16:18:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Konieczny X-Patchwork-Id: 10167589 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 96EB5600CA for ; Tue, 16 Jan 2018 16:18:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 879492856B for ; Tue, 16 Jan 2018 16:18:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BD5C28591; Tue, 16 Jan 2018 16:18:50 +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=ham 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 044F728707 for ; Tue, 16 Jan 2018 16:18:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750825AbeAPQSs (ORCPT ); Tue, 16 Jan 2018 11:18:48 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:51629 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750764AbeAPQSr (ORCPT ); Tue, 16 Jan 2018 11:18:47 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180116161845euoutp012e98cf2fbc3d699311371300e80350c8~KVq0R_sKY0046600466euoutp01K; Tue, 16 Jan 2018 16:18:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180116161845euoutp012e98cf2fbc3d699311371300e80350c8~KVq0R_sKY0046600466euoutp01K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516119525; bh=dpLAaF1YBNvNXNVq02QUmOxdOfuz7ENgH7lR6dXU5TA=; h=To:Cc:From:Subject:Date:References:From; b=od9OCFSZmBR5g54kdk8OJUlVlBHYaA+AcvWF+4rsRmDwo03DqKPORGeQTM34z29IV xu0Udwo8l1Zi78ecDdIxiY0f8AKXQ6pjAXGZsjGLRqUQ/KBNVbNvGAYE9jFRnfxcR0 Oj1qHUGnNATkntc5Rq5aBzBYvwke5Yn8deKLYWkI= Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180116161845eucas1p29fea4004dde980e3ba3b93421e37453c~KVqznPXdc0754807548eucas1p2l; Tue, 16 Jan 2018 16:18:45 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 59.37.12743.4E52E5A5; Tue, 16 Jan 2018 16:18:44 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180116161844eucas1p27634e8860ca620b45224fa9efe491e2c~KVqyzo5941777617776eucas1p2J; Tue, 16 Jan 2018 16:18:44 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d0000031c7-bd-5a5e25e41552 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 71.C3.18832.4E52E5A5; Tue, 16 Jan 2018 16:18:44 +0000 (GMT) Received: from [106.120.51.18] by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P2N0056TPB7EK90@eusync4.samsung.com>; Tue, 16 Jan 2018 16:18:44 +0000 (GMT) To: Herbert Xu Cc: "David S. Miller" , Bartlomiej Zolnierkiewicz , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org From: Kamil Konieczny Subject: [PATCH] crypto: n2_core: Add empty hash export and import Message-id: Date: Tue, 16 Jan 2018 17:18:43 +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+NgFmpileLIzCtJLcpLzFFi42LZduzned0nqnFRBpePWVhsnLGe1WLO+RYW i+5XMhb37/1ksri8aw6bA6vHlpU3mTy2HVD16NuyitHj8ya5AJYoLpuU1JzMstQifbsEroz2 51OZCv5wVmx4tpC5gXEPRxcjJ4eEgInE9f61LBC2mMSFe+vZuhi5OIQEljJK3PjxBMr5zChx bcN7FpiOFXefQiWWMUpcXLCaEcJ5xijRsucwO0iViICOxMqXi1lBEswCCxklfvSfB0uwCZhL PNp+hgnEFhZwkljYfxlsLK+Am8Sdn7eAbA4OFgFViQPnUkDCogIREl3PdrFClAhK/Jh8D6yc WUBT4sWXSVC2uERz600oW15i85q3zCB7JQSWsEncm7uOHeJsF4n1uw6wQdjCEq+Ob4GKy0h0 dhxkgmjoZ5RYfuMUO4QzhVHi+LSrTBBV1hKHj19khVjBJzFp23RmkEslBHglOtqEIEo8JGYu +M8IYTtKHHvUCNYqJBArMfP3KZYJjHKzkDwxC8kTs5A8MQvJEwsYWVYxiqSWFuempxab6hUn 5haX5qXrJefnbmIEpozT/45/3cG49JjVIUYBDkYlHl6GP7FRQqyJZcWVuYcYJTiYlUR4G4Nj ooR4UxIrq1KL8uOLSnNSiw8xSnOwKInz2ka1RQoJpCeWpGanphakFsFkmTg4pRoY1/wxqA9/ bGOfYGfU+2V2/KX7BUm30yZMFdm2YcbKoPpTZhPv1bxKtjg2+f4SH8PVCSUblgrP5ym4M9mI ++zizSvVkmaamGslrs7e/bTovvGjF/e3PEiYPkHPNtj17/7j4WpVxRee7itk1Zb2vb1X82vF FIZv6yY9NZsQ+dhCvWpTgEdv0e0ZdUosxRmJhlrMRcWJACWvBCsVAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBLMWRmVeSWpSXmKPExsVy+t/xa7pPVOOiDDbcELTYOGM9q8Wc8y0s Ft2vZCzu3/vJZHF51xw2B1aPLStvMnlsO6Dq0bdlFaPH501yASxRXDYpqTmZZalF+nYJXBnt z6cyFfzhrNjwbCFzA+Meji5GTg4JAROJFXefskHYYhIX7q0Hsrk4hASWMEoc+t/FDuE8Y5R4 cfILI0iViICOxMqXi1lBEswCCxklJi0+xgqSYBMwl3i0/QwTiC0s4CSxsP8yC4jNK+Amcefn LSCbg4NFQFXiwLkUkLCoQIRE08y5rBAlghI/Jt8DK2EWUJeYMiUXJMwsIC7R3HqTBcKWl9i8 5i3zBEb+WUg6ZiF0zELSMQtJxwJGllWMIqmlxbnpucWGesWJucWleel6yfm5mxiB4bvt2M/N OxgvbQw+xCjAwajEw8vwJzZKiDWxrLgy9xCjBAezkghvY3BMlBBvSmJlVWpRfnxRaU5q8SFG aQ4WJXHe3j2rI4UE0hNLUrNTUwtSi2CyTBycUg2MrbcuzTqvftr6ZmR//tQjnGrPb3nNd+hc zSv64LCz/hO5mTF8qy777zgkWHRoj8rUAklZ8X2Jkax3W3TfuM39fdb27Ko4Ng05Q+VGcd2d Ub0vpkkpqixeNN+sWSDi19HKQw8/tc1bLnD/wKFo0R1lM75xd57NUC6wkJfR013eEeqoYZzV r1ytxFKckWioxVxUnAgA3qRGEVsCAAA= X-CMS-MailID: 20180116161844eucas1p27634e8860ca620b45224fa9efe491e2c X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180116161844eucas1p27634e8860ca620b45224fa9efe491e2c X-RootMTR: 20180116161844eucas1p27634e8860ca620b45224fa9efe491e2c 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 --- drivers/crypto/n2_core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index 662e709812cc..80e9c842aad4 100644 --- a/drivers/crypto/n2_core.c +++ b/drivers/crypto/n2_core.c @@ -359,6 +359,16 @@ static int n2_hash_async_finup(struct ahash_request *req) return crypto_ahash_finup(&rctx->fallback_req); } +static int n2_hash_async_noimport(struct ahash_request *req, const void *in) +{ + return -ENOSYS; +} + +static int n2_hash_async_noexport(struct ahash_request *req, void *out) +{ + return -ENOSYS; +} + static int n2_hash_cra_init(struct crypto_tfm *tfm) { const char *fallback_driver_name = crypto_tfm_alg_name(tfm); @@ -1467,6 +1477,8 @@ static int __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl) ahash->final = n2_hash_async_final; ahash->finup = n2_hash_async_finup; ahash->digest = n2_hash_async_digest; + ahash->export = n2_hash_async_noexport; + ahash->import = n2_hash_async_noimport; halg = &ahash->halg; halg->digestsize = tmpl->digest_size;