From patchwork Tue Jan 16 16:16:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Konieczny X-Patchwork-Id: 10167581 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 D915B600CA for ; Tue, 16 Jan 2018 16:16:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6D8E2871D for ; Tue, 16 Jan 2018 16:16:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9EF428722; Tue, 16 Jan 2018 16:16: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 B38B828720 for ; Tue, 16 Jan 2018 16:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750811AbeAPQQs (ORCPT ); Tue, 16 Jan 2018 11:16:48 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:51226 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817AbeAPQQq (ORCPT ); Tue, 16 Jan 2018 11:16:46 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180116161644euoutp01e5798014deff99d7b41f4fe5159c2fd8~KVpDQvQOc3171731717euoutp01-; Tue, 16 Jan 2018 16:16:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180116161644euoutp01e5798014deff99d7b41f4fe5159c2fd8~KVpDQvQOc3171731717euoutp01- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516119404; bh=qc+/Q5WpBmkxaS7LvwqDKlcBg389Shv0h2e8fuO14FU=; h=To:Cc:From:Subject:Date:References:From; b=OHJsK6xC/DUQlfg2bpiWT8Dx3qo5h8UTqAKY2oA/b6oy4Xxm+u/5T4oFAmqGPGLdO 2sKF55HXrOQsVrNaSPNK50hH09kEmNL2VC2np1Q8JJiEsHq33MlXkIRIR6Nfx3AI4K GlNX4hvTI6pyScHVxL0XOkQrlHS5FbSeYNkugY3s= Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180116161643eucas1p27d5c0200bee82cdb52d6cdacb4172e98~KVpCX0c2A0621006210eucas1p2O; Tue, 16 Jan 2018 16:16:43 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges4.samsung.com (EUCPMTA) with SMTP id 66.F3.30163.B652E5A5; Tue, 16 Jan 2018 16:16:43 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180116161641eucas1p1f776ccf0d08da2d3b670e5b2ad550ea6~KVpA22Mah0830008300eucas1p1P; Tue, 16 Jan 2018 16:16:41 +0000 (GMT) X-AuditID: cbfec7f4-f790c6d0000075d3-4e-5a5e256bb4dd Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 44.93.18832.9652E5A5; Tue, 16 Jan 2018 16:16:41 +0000 (GMT) Received: from [106.120.51.18] by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P2N00CTZP7T1V60@eusync3.samsung.com>; Tue, 16 Jan 2018 16:16:41 +0000 (GMT) To: Herbert Xu Cc: Marek Vasut , "David S. Miller" , Bartlomiej Zolnierkiewicz , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org From: Kamil Konieczny Subject: [PATCH] crypto: mxs-dcp: Add empty hash export and import Message-id: <4f3389a1-d6aa-b3cc-2299-d638058ddd48@partner.samsung.com> Date: Tue, 16 Jan 2018 17:16:40 +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+NgFupmleLIzCtJLcpLzFFi42LZduznOd1s1bgog2vHhC02zljPajHnfAuL RfcrGYv7934yWVzeNYfN4k1bI6MDm8eWlTeZPObNOsHise2AqkffllWMHp83yQWwRnHZpKTm ZJalFunbJXBlzD3wjLmghbuis7GbpYGxjbOLkZNDQsBEYkvrZRYIW0ziwr31bCC2kMBSRon9 y+u7GLmA7M+MEgd3TWeFaTg7eTETRNEyRomJWxkhip4xShx79wIsISKgI7Hy5WJWkASzwD5G iSuXn7CDJNgEzCUebT8DViQs4CRxaOMcZhCbV8BNYnPjBrAaFgFViVVtN8BOEhWIkOh6tosV okZQ4sfke2BxZgFNiRdfJkHZ4hLNrTehbHmJzWveMoMslhDYwCZxYutidoizXSQeP9kCZQtL vDoOY8tIdHYcZIJo6GeUWH7jFDuEM4VR4vi0q0wQVdYSh49fZIVYwScxadt0oBUcQHFeiY42 IYgSD4lHPyewQdiOEq07W6BhFCuxZ/UExgmMcrOQPDELyROzkDwxC8kTCxhZVjGKpJYW56an FpvoFSfmFpfmpesl5+duYgQmkdP/jn/Zwbj4mNUhRgEORiUeXoY/sVFCrIllxZW5hxglOJiV RHgbg2OihHhTEiurUovy44tKc1KLDzFKc7AoifPaRrVFCgmkJ5akZqemFqQWwWSZODilGhjz RHQnf5ZOLG643Mnu2G211HDx7Ir8FbPU2qNCZopHPStoCJ35LdbstZF7Y/y9kuzzUcc1lmU0 3b/RWfHqGEuyhKzt54tqYculbp5c+Me5ba/yU4nFVqc0TSLlvv28v/pd5SJmlSydMkXOVxN+ 5huX/Hv0rZ5L1eN21i8xMcZtt0+mnFrx6rwSS3FGoqEWc1FxIgC4kWOjHgMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsVy+t/xq7qZqnFRBvNfaFtsnLGe1WLO+RYW i+5XMhb37/1ksri8aw6bxZu2RkYHNo8tK28yecybdYLFY9sBVY++LasYPT5vkgtgjeKySUnN ySxLLdK3S+DKmHvgGXNBC3dFZ2M3SwNjG2cXIyeHhICJxNnJi5kgbDGJC/fWs3UxcnEICSxh lLixexkjhPOMUeL38Y2MIFUiAjoSK18uZgWxmQX2MUrMu68MYrMJmEs82n4GbJKwgJPEoY1z mEFsXgE3ic2NG9hBbBYBVYlVbTdYQGxRgQiJpplzWSFqBCV+TL4HFOcAmqkuMWVKLsR4cYnm 1pssELa8xOY1b5knMPLPQtIxC6FjFpKOWUg6FjCyrGIUSS0tzk3PLTbUK07MLS7NS9dLzs/d xAgM6W3Hfm7ewXhpY/AhRgEORiUeXoY/sVFCrIllxZW5hxglOJiVRHgbg2OihHhTEiurUovy 44tKc1KLDzFKc7AoifP27lkdKSSQnliSmp2aWpBaBJNl4uCUamDUMz9arb3Ab+WkY/EMJen7 uSQOcmnd23wrbSbPH6fXCvKXfKPrbi/6sYA769v2GW+3FwTLq03LNSk7lP3wyca/T9T610q8 47/wL/OAtWNVELP0lKPSN5ZKxGdeKWPTrJwfw/2Wa9rZZ30Tc90f731+XEJai/vW7CtnFqz+ eDBtz4rn63i8SnbdVGIpzkg01GIuKk4EAFRFUJ9lAgAA X-CMS-MailID: 20180116161641eucas1p1f776ccf0d08da2d3b670e5b2ad550ea6 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180116161641eucas1p1f776ccf0d08da2d3b670e5b2ad550ea6 X-RootMTR: 20180116161641eucas1p1f776ccf0d08da2d3b670e5b2ad550ea6 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/mxs-dcp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c index 764be3e6933c..a10c418d4e5c 100644 --- a/drivers/crypto/mxs-dcp.c +++ b/drivers/crypto/mxs-dcp.c @@ -759,6 +759,16 @@ static int dcp_sha_digest(struct ahash_request *req) return dcp_sha_finup(req); } +static int dcp_sha_noimport(struct ahash_request *req, const void *in) +{ + return -ENOSYS; +} + +static int dcp_sha_noexport(struct ahash_request *req, void *out) +{ + return -ENOSYS; +} + static int dcp_sha_cra_init(struct crypto_tfm *tfm) { crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), @@ -829,6 +839,8 @@ static struct ahash_alg dcp_sha1_alg = { .final = dcp_sha_final, .finup = dcp_sha_finup, .digest = dcp_sha_digest, + .import = dcp_sha_noimport, + .export = dcp_sha_noexport, .halg = { .digestsize = SHA1_DIGEST_SIZE, .base = { @@ -853,6 +865,8 @@ static struct ahash_alg dcp_sha256_alg = { .final = dcp_sha_final, .finup = dcp_sha_finup, .digest = dcp_sha_digest, + .import = dcp_sha_noimport, + .export = dcp_sha_noexport, .halg = { .digestsize = SHA256_DIGEST_SIZE, .base = {