Received: by 10.223.148.5 with SMTP id 5csp7239520wrq; Thu, 18 Jan 2018 02:52:14 -0800 (PST) X-Google-Smtp-Source: ACJfBoupNQJjPmGWaChVuMrcRHSaAns+MkRsIFU5E81Ba9vjouP9y2yV0Ib7kwfnzfGQq6sifMxU X-Received: by 10.98.33.82 with SMTP id h79mr21665287pfh.139.1516272734492; Thu, 18 Jan 2018 02:52:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516272734; cv=none; d=google.com; s=arc-20160816; b=tpu0org1uJSJXHCk4mMOkV5AbASocG2Kzlf9andIZ46Tf5drtX9pBMkW5dBxwuK/nq Re0nqqkDj1vwe8eLXtTm4QCXoKlH1Rfo6W02sB2Bx4Fxl7H+PlFVxkkULWX08ZURsN6Z KM1yOIges1kGKrMtErngiEfIwvh8xV9olE5P7Tp3a/LAFAJwcgo/4um00Wr/5276LhDc RV+gHnlqkMGXF6kvJsgGACi+Mtz3daODm8p5vsVEuxrqKNnu6fQw0U2iSg0yTsx+vGam pVT6zrf7fD+XavQdDXDXVd0JC65CMAZToTu4prO8dO2pzG76hE9hg7VHnmst4xi5K9t6 TOvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:cc:to:from:subject:dkim-signature :dkim-filter:arc-authentication-results; bh=XrauGPiwZZkOvp2sYdFfrwoJA5yjCWVpTzngKZo3o04=; b=CroDBF+nEuSu+3QnwWuYs2iGDF/cIz/49N/aBkKEKNnbKGmson6UQG5IY7RDCQ2Nxr 8LWnnQ9BJK26cWbFJBu0wyXK08O44NrX7VJC5aYQbJnWV+hb3wyqsvycTmXqbu8iw1iC Q7QXuEnPXNzX8u8dh9Yvc0ZQmnroXu6Svo/31Evn7IiObrUcsqK3xnf/7LDumv86avPV 8U0BBEcVdvs3LPj97/JNU1hEuVUlozm9Xh+opl3pvMwXnR4612mCQqtY6jUZTR1EBQLG d89Omy58x+y8QaBxuuIDK5ynx6tPgSNNklgn4+aVnawZmWJgRGEnfMJdH0nfnCyWt0R8 NKpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=V6G6PkBx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si5753644pgt.469.2018.01.18.02.52.00; Thu, 18 Jan 2018 02:52:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=V6G6PkBx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755738AbeARKvg (ORCPT + 99 others); Thu, 18 Jan 2018 05:51:36 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:43098 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755395AbeARKve (ORCPT ); Thu, 18 Jan 2018 05:51:34 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180118105131euoutp01478a195b81bf06a15c7bd05147c032f5~K4frD2PyQ0440404404euoutp01e; Thu, 18 Jan 2018 10:51:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180118105131euoutp01478a195b81bf06a15c7bd05147c032f5~K4frD2PyQ0440404404euoutp01e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516272691; bh=XrauGPiwZZkOvp2sYdFfrwoJA5yjCWVpTzngKZo3o04=; h=Subject:From:To:Cc:Date:In-reply-to:References:From; b=V6G6PkBxviLWOg5vidI++8bEGGBxx3CUdu9HMieK6+5yx0njVfnL1qQP1geq/Eym4 wVyGTC1l/p9Cx5C2iBNbXHe08hKcGl/TvvijMjviMdIJ9opKe4UWUwBJETMn0NBCD6 EpekUVnHZ5KTbMj2tSIl+YLEDyKYvMCPp4pZdHsc= Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180118105130eucas1p255bb9c709d74e9dbd9fd267cd9cb35b6~K4fqXNR5l1736217362eucas1p22; Thu, 18 Jan 2018 10:51:30 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 9B.2A.12907.23C706A5; Thu, 18 Jan 2018 10:51:30 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180118105130eucas1p19b15ab2e6ae6b7c4fafea3c52dec5e9b~K4fplUdk00365203652eucas1p16; Thu, 18 Jan 2018 10:51:30 +0000 (GMT) X-AuditID: cbfec7f1-f793a6d00000326b-87-5a607c326fc8 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 86.CF.20118.23C706A5; Thu, 18 Jan 2018 10:51:30 +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 <0P2Q001NHZHT8P20@eusync4.samsung.com>; Thu, 18 Jan 2018 10:51:30 +0000 (GMT) Subject: Re: [PATCH v2] crypto/ahash: Require export/import in ahash From: Kamil Konieczny To: Herbert Xu Cc: "David S. Miller" , Bartlomiej Zolnierkiewicz , linux-crypto@vger.kernel.org, linux-kernel Message-id: <9370ae6a-71fd-52b9-bfeb-af44956dea0e@partner.samsung.com> Date: Thu, 18 Jan 2018 11:51:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset="utf-8" Content-language: en-US Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42LZduznOV2jmoQog9mfNC02zljPajHnfAuL RfcrGYv7934yWVzeNYfNgdVjy8qbTB7bDqh69G1ZxejxeZNcAEsUl01Kak5mWWqRvl0CV8aF 5Z/ZC/4KVyw5rd/AOFGgi5GTQ0LARGLdmReMELaYxIV769m6GLk4hASWMkrM6ljADpIQEvjM KNHwORqmYfHOm4wQRcsYJV63/ofqeMYocafnBzNIlbCAi8SGV4fAbDYBc4lH288wgdgiAjoS K18uZgVpYBbYwCix49JNsASvgJvE6mVfwWwWAVWJ7t+tLCC2qECERNezXawQNYISPybfA4tz CrhLTDq0gw3EZhbQlHjxZRILhC0u0dx6E8qWl9i85i0zyDIJgT1sErd3fQZyOIAcF4nmCzIQ 7whLvDq+hR3ClpG4PLmbBaK+n1Fi+Y1T7BDOFEaJ49OuMkFUWUscPn6RFWIDn8SkbdOhhvJK dLQJQZR4SNx6vwBqqKPE2QcvWSFBNItRYk5bM9MERvlZSB6aheSJWUiemIXkiQWMLKsYRVJL i3PTU4uN9IoTc4tL89L1kvNzNzECE8npf8c/7mB8f8LqEKMAB6MSD69RUHyUEGtiWXFl7iFG CQ5mJRHed94JUUK8KYmVValF+fFFpTmpxYcYpTlYlMR5baPaIoUE0hNLUrNTUwtSi2CyTByc Ug2M20uYFJb3H7qdzl4cLLN2WwLDFc46s+dLxFdVas0o8/tnpJUUH2GRb36J/dv1w9qSr76f f//Hjud5euR1UcbzDgeOXIt16b9ls+qj7qkSJ7nwOLbi6MtH/l3NE5l+YO6LC4ujDmomnp3+ SWXWeosCa945PawK328cE7Np2/9dxvdQhfDikCh9JZbijERDLeai4kQANvHlMCADAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRmVeSWpSXmKPExsVy+t/xa7pGNQlRBnumsllsnLGe1WLO+RYW i+5XMhb37/1ksri8aw6bA6vHlpU3mTy2HVD16NuyitHj8ya5AJYoLpuU1JzMstQifbsErowL yz+zF/wVrlhyWr+BcaJAFyMnh4SAicTinTcZIWwxiQv31rN1MXJxCAksYZQ4fucdI4TzjFFi 3YnFzCBVwgIuEhteHQKz2QTMJR5tP8MEYosI6EisfLmYFaSBWWADo8TOeytZILrnMEq0P+wE q+IVcJNYvewrmM0ioCrR/buVBcQWFYiQaJo5lxWiRlDix+R7YHFOAXeJSYd2AN3EATRVXWLK lFyQMLOAuERz600WCFteYvOat8wTGAVnIemehdAxC0nHLCQdCxhZVjGKpJYW56bnFhvpFSfm Fpfmpesl5+duYgQG/LZjP7fsYOx6F3yIUYCDUYmH1yAoPkqINbGsuDL3EKMEB7OSCO8774Qo Id6UxMqq1KL8+KLSnNTiQ4zSHCxK4ry9e1ZHCgmkJ5akZqemFqQWwWSZODilGhh1FPPjVwo2 s75wCrDJXLv441sxly8c726aPL144vPZlRf5903LOVnBsLBWd0mIBEf/n4ZLD+d4vjXaFZA7 eUbR9S8+EVKbz/+xNCmb49QpxXv/6erlPC2l/ip6s+y6C8/uvnhH87q+Y/QhxV9JbzuXrH/S NfGs5n4ttyWeDXcOPnM825D+svCAEktxRqKhFnNRcSIA+PXZ8HQCAAA= X-CMS-MailID: 20180118105130eucas1p19b15ab2e6ae6b7c4fafea3c52dec5e9b X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180116183836eucas1p18da0aa4ef25452069e8f64ef95950f53 X-RootMTR: 20180116183836eucas1p18da0aa4ef25452069e8f64ef95950f53 References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16.01.2018 19:38, Kamil Konieczny wrote: > Export and import were optional in async hash. As most drivers were > rewritten, they become mandatory now, so correct init of ahash > transformation. > > Signed-off-by: Kamil Konieczny Please drop this patch, as there is one more driver needed for convert, namely bfin_crc.c I will also prepare this as patch series, to be sure that this patch is last > --- > This is resend of previous patch. As Bartlomiej Zolnierkiewicz pointed out, > there are still three crypto drivers that didn't have export/import implemented: > > drivers/crypto/mxs-dcp.c > drivers/crypto/n2_core.c > drivers/crypto/ux500/hash/hash_core.c > > I have no documentation for them, so I sended patches with the behaviour taken > from crypto framework, but maybe that hardware is capable of import/export, > so proper implementation is possible. Unfortunatly, there is no maintainer > for any of these files. > > Please take this patch after these remainig drivers will be patched. > > crypto/ahash.c | 18 ++---------------- > 1 file changed, 2 insertions(+), 16 deletions(-) > > diff --git a/crypto/ahash.c b/crypto/ahash.c > index 3a35d67de7d9..7a8906d5af53 100644 > --- a/crypto/ahash.c > +++ b/crypto/ahash.c > @@ -434,16 +434,6 @@ static int ahash_def_finup(struct ahash_request *req) > return ahash_def_finup_finish1(req, err); > } > > -static int ahash_no_export(struct ahash_request *req, void *out) > -{ > - return -ENOSYS; > -} > - > -static int ahash_no_import(struct ahash_request *req, const void *in) > -{ > - return -ENOSYS; > -} > - > static int crypto_ahash_init_tfm(struct crypto_tfm *tfm) > { > struct crypto_ahash *hash = __crypto_ahash_cast(tfm); > @@ -451,8 +441,8 @@ static int crypto_ahash_init_tfm(struct crypto_tfm *tfm) > > hash->setkey = ahash_nosetkey; > hash->has_setkey = false; > - hash->export = ahash_no_export; > - hash->import = ahash_no_import; > + hash->export = alg->export; > + hash->import = alg->import; > > if (tfm->__crt_alg->cra_type != &crypto_ahash_type) > return crypto_init_shash_ops_async(tfm); > @@ -467,10 +457,6 @@ static int crypto_ahash_init_tfm(struct crypto_tfm *tfm) > hash->setkey = alg->setkey; > hash->has_setkey = true; > } > - if (alg->export) > - hash->export = alg->export; > - if (alg->import) > - hash->import = alg->import; > > return 0; > } > -- Best regards, Kamil Konieczny Samsung R&D Institute Poland