Received: by 10.223.176.46 with SMTP id f43csp790900wra; Fri, 19 Jan 2018 01:54:42 -0800 (PST) X-Google-Smtp-Source: ACJfBosD8Tg+LXU8QY1Vm7GG8aBLrMWA6+AE3Us9Ys7ijtr4UhwZNaMKR/8XDSmRV/Ehit9EaKIk X-Received: by 10.98.137.197 with SMTP id n66mr17268308pfk.70.1516355681989; Fri, 19 Jan 2018 01:54:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516355681; cv=none; d=google.com; s=arc-20160816; b=oGodtdXq0a5hL56ba1SLB5HeZhDK90V4tZmckUch1XJNKTKd8BuOBNmd0jt7+yge2M 4ZZIsbL7rlHxMcwfcqQuqnNFW7njvDx/388z2H4O0luBpjcyYKWus8GY4qZ8WFGeC+gh V4qwGaB8o/1ONhsEhQSVd9M99/P8oxAed6N6tB5qn5b3h8uc9qt/aDXrrS+HPBBiIGwM en6kYJQmOt5ylk4Ca23l8GLHAE7kA2MsHRV4XZFGzbUdbRDchB44RYAyyzuI9T/l0coz E9979lKWzl/SQV7sT2D5K3o06xHsNvP3aSrJBUBNEKMrI0pIdWzBbQflkOW96KoKtMLx R9Eg== 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:from:cc:to:subject:dkim-signature :dkim-filter:arc-authentication-results; bh=PJHVDCPDqBonlT7TUK/o66POaqVZSu+fWQrf5Urp4Lg=; b=XRmL3ShAHMldAngWPnXmlO1lYSzCn4jcubFk2fOsWCDPVCglJnOX6wUAPtmijt4VGI 7SGv0+6qWb4SGCUdQTGMY3r3h2RGyNBg+utDjvksKt98L63D1L7l8ANgFOxjnaVWbauA VeUyjVfIRHkoi0LmRDkwoGp9wNANPvzzO0yndx5BgFWng3phesXVIgaoE0R6Czcu6LHd t0wk5X7l2nJ6X2V2uWI0X+GB5PYZF342GdSsSGIV6TMU061E5edmVfYG6nKdTusRxbdL YvB/Tbdxa+gEoYyFY0ByC561joNFD4vSdwfI773xCWfXNsi5FZljxXvXL1UOxjzmW/2k ohTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Oix67xKo; 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 h127si7938372pgc.1.2018.01.19.01.54.27; Fri, 19 Jan 2018 01:54:41 -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=Oix67xKo; 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 S1754925AbeASJyD (ORCPT + 99 others); Fri, 19 Jan 2018 04:54:03 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:36583 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754070AbeASJx5 (ORCPT ); Fri, 19 Jan 2018 04:53:57 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180119095354euoutp02acea68858f18d7064036f8fbef4cf202~LLWp270d00195701957euoutp02R; Fri, 19 Jan 2018 09:53:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180119095354euoutp02acea68858f18d7064036f8fbef4cf202~LLWp270d00195701957euoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516355634; bh=PJHVDCPDqBonlT7TUK/o66POaqVZSu+fWQrf5Urp4Lg=; h=Subject:To:Cc:From:Date:In-reply-to:References:From; b=Oix67xKoiZV0OuKTeyTXPeEkqWfnKQUuU3n5dcU9kKVx2Ia9mkgs5Ha4SFKBnMs7w p5LmimxLfg5zgnVDB6yEN6rOiNgHQZ8zW16lLy6eGYW/x+zjkufny6X/u4/UmpSOsh 4HEmOBFqDzxLus+HansiePziumSogB0orEXG3i/U= Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180119095353eucas1p2a627ed3120d07fafa72f6d254c896d73~LLWpFR7F60122301223eucas1p2t; Fri, 19 Jan 2018 09:53:53 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges4.samsung.com (EUCPMTA) with SMTP id CF.E8.30163.130C16A5; Fri, 19 Jan 2018 09:53:53 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180119095353eucas1p24539e2a51580d8eb979e53f538508143~LLWodGnAv0122301223eucas1p2s; Fri, 19 Jan 2018 09:53:53 +0000 (GMT) X-AuditID: cbfec7f4-f790c6d0000075d3-cb-5a61c031eb2e Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B3.8F.20118.130C16A5; Fri, 19 Jan 2018 09:53:53 +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 <0P2S00EDMRHS7750@eusync4.samsung.com>; Fri, 19 Jan 2018 09:53:53 +0000 (GMT) Subject: Re: [PATCH 5/5] crypto: ahash.c: Require export/import in ahash To: Marek Vasut , linux-crypto@vger.kernel.org Cc: "David S. Miller" , Bartlomiej Zolnierkiewicz , Sonic Zhang , Fabio Estevam , Shawn Guo , Tom Lendacky , Jan Engelhardt , Arvind Yadav , Linus Walleij , Joakim Bech , linux-kernel@vger.kernel.org, Herbert Xu From: Kamil Konieczny Message-id: <9246bbcb-6cd0-8bc9-8286-02c44e6d01bc@partner.samsung.com> Date: Fri, 19 Jan 2018 10:53:51 +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: <5db6f843-cc51-09f2-f388-8dade440c6bc@denx.de> Content-type: text/plain; charset="utf-8" Content-language: en-US Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02SbUhTYRTHee597nbVJrc182C+1MAiqcyQfMyMBIkLfelLoPtQ3eqmkk7b UrIQbb6i5cxJxYiw8i2pTF1mJmlWrhdRy7LEtwqdKWnWJJLM2nYN/PY75/8/nPN/eFhaOcz4 sAnak6JOKySqZe64qXO+e3NIu6DZ+r15E+k/f40m9ZfrGHKlJwcTc+FmUjTlSwyT0xSx145j UrZQTZHRkXmK9LVckZGveWcRGb9TQZOhe9ky8rTsEbPbk89980fGT72L4i03Byj+qvk55hef GCn+gXlYzje1B/L1tgnMD/W3yvhiSy3i7Q3++zw07juPiokJaaIueNch9/iFtlqcYlKeams2 4CzU7VmI3FjgQqGnc1Ym8WroHalzsDur5CoR2GqMjFTYEfSYevH/iayWfsbJSq4KQWf1Mclk Q/BzwOISVnE8vGmtoZys4iLBYGnGThPNzdAwVvnCJci4MPh8v8vFCm4PGMsHXMOYC4TRKpvc yV5cDBTaWhjJsxJ+mUZcV7hxEfBsstF1N81thC9zpVhib8jOHVjiAGi8NU07FwPXIIfHgx8Z KUI02HPmlngVTFktcol9oc9UhKUBI4LqDy/lUlGGwHrxHSW5IuCJ9TUjrfCE0qZLjhWso6+A gjylZOGhqfL6kj0K3tqL5dIb5VDQ/v47LkEB5mWJzMtSmJelMC9LUY5wLVKJqfqkOFEf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b1b6JNUwOrD+du/zH7gWF2/52lz9l33Wq1VTuZWl8biRf12Ne dZ9Usderpsnuv9ordaHmVfwkNif/La33nqlsbja4dF7m4OVpX95v4C+XSL5bFCLhbqjEUpyR aKjFXFScCACjlO+3wwIAAA== X-CMS-MailID: 20180119095353eucas1p24539e2a51580d8eb979e53f538508143 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180118183441eucas1p2ee3f046a594945299ea7b75ffb13e2ca X-RootMTR: 20180118183441eucas1p2ee3f046a594945299ea7b75ffb13e2ca References: <20180118183404.12583-1-k.konieczny@partner.samsung.com> <20180118183404.12583-6-k.konieczny@partner.samsung.com> <5db6f843-cc51-09f2-f388-8dade440c6bc@denx.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18.01.2018 22:31, Marek Vasut wrote: > On 01/18/2018 07:34 PM, Kamil Konieczny wrote: >> Export and import are mandatory in async hash. As drivers were >> rewritten, drop empty wrappers and correct init of ahash transformation. > > Are you moving checks from the core subsystem to drivers ? This looks > really nonsensical and the commit message doesn't explain the rationale > for that at all. I am removing checks from core. Export and import were optional in beginnig of crypto framework, but as time goes on they become mandatory. > >> Signed-off-by: Kamil Konieczny >> --- >> crypto/ahash.c | 18 ++---------------- >> 1 file changed, 2 insertions(+), 16 deletions(-) >> >> diff --git a/crypto/ahash.c b/crypto/ahash.c >> index 3a35d67de7d9..c3cce508c1d4 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,6 @@ 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; >> >> if (tfm->__crt_alg->cra_type != &crypto_ahash_type) >> return crypto_init_shash_ops_async(tfm); >> @@ -462,15 +450,13 @@ static int crypto_ahash_init_tfm(struct crypto_tfm *tfm) >> hash->final = alg->final; >> hash->finup = alg->finup ?: ahash_def_finup; >> hash->digest = alg->digest; >> + hash->export = alg->export; >> + hash->import = alg->import; >> >> if (alg->setkey) { >> 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