Received: by 10.223.185.116 with SMTP id b49csp457993wrg; Fri, 16 Feb 2018 01:45:31 -0800 (PST) X-Google-Smtp-Source: AH8x226/JmHxOirM0bHJT86/qjdGIqIHth0Pbnne2vr1NmywhUED0R8vik2EJLhoXNoVDzCW+DhK X-Received: by 10.99.107.200 with SMTP id g191mr4627549pgc.165.1518774331731; Fri, 16 Feb 2018 01:45:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518774331; cv=none; d=google.com; s=arc-20160816; b=UdfIKOuhmMyUcX5BGYPhuJBPxAE/FbbWCMfCqAMaHH2FmyvzxR4Zw9SLviJJAMJ/q5 kX+qlC7uSfOnerjhEho7nmhSnSPvlEVK4zh5Q8hYL7NJOmTvJrrWZPA4VfQRqWFVwmG5 d9Ye6Ux/K3Fon77lk3B05T7stNVnrN2HoR6PRhSpDuT6vADO+uHkl73rJ95P+64NxMoC 1lW7dxbztlVIGhf6YoediB6Jv61+adDxsJkqN3DUYLsPzeFpwRMeWUMV+e8mvo7LNPfj +6mhwrFBA/g3801WNR3bPsiKga0U52/44VuYs9KcMrm50IobdQpee3SM/RqJRbfHhjXN K1Sw== 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=vd9Zx4wPMCV5it/J2e54dUpkL00+6/+4qbr36dJMY5I=; b=PA7qMdXuf4eS+i7OohB2Ym+r1UAQcDjNsnS8zGTZ78t6eSRpofLG9KUco8ZdMoY2hA oSdm7N0FvBrPLH5e1gbtF7wdFbd0Skhfrib4ZwhcxlXfrObZYKZimbApKgTVUks1gojt BR6hkZu1aw23zsM7M6dwtY8CKyLrsHXW7yqKci3zGLRHqN6SI1JgRbCM9A4uXHlIE8Yx jCJdY4qowC+N7zKW44tj+bxWH8qipF+jMqg0Pvf8IPz5vLXxWfqIwh/Fw5kpmdQMomzX eJ4Ro/1GW0H5MrOgpdoB+QBks6Sx+JRHMKFYo9Gk9uB/TRMXS+cOc0A3VeerXebJW1C6 b1pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=cnnFFTqD; 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 a64si1847417pfb.405.2018.02.16.01.45.17; Fri, 16 Feb 2018 01:45:31 -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=cnnFFTqD; 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 S1945949AbeBORAy (ORCPT + 99 others); Thu, 15 Feb 2018 12:00:54 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:54676 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423522AbeBORAu (ORCPT ); Thu, 15 Feb 2018 12:00:50 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180215170047euoutp01988adcd2eb04a00246a7eb065ebc83ad~TjmFCSo1j2824128241euoutp01H; Thu, 15 Feb 2018 17:00:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180215170047euoutp01988adcd2eb04a00246a7eb065ebc83ad~TjmFCSo1j2824128241euoutp01H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1518714047; bh=vd9Zx4wPMCV5it/J2e54dUpkL00+6/+4qbr36dJMY5I=; h=Subject:To:Cc:From:Date:In-reply-to:References:From; b=cnnFFTqDIelf4BOgbLGTxlhokDGtYcJwqkUNddJsOJm+VxsubUkMoal1UrUB94Ivo i9XocvM416zC1j6M20cLZNa2PBe/s7fw3oHtOFptvsabY9L1y6lSC1qY1hjWirSYe/ ZmWkYye6+yww5ckudvU58U9VtijO3UDxDsA5ROS4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180215170047eucas1p117c55d9e5d46adb53e90820fd760d932~TjmEZK-sW0051300513eucas1p1z; Thu, 15 Feb 2018 17:00:47 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 14.EB.10409.EBCB58A5; Thu, 15 Feb 2018 17:00:46 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180215170046eucas1p1584287a2d0eaf241673a2c57b26a1ec6~TjmDnaxF51372113721eucas1p1N; Thu, 15 Feb 2018 17:00:46 +0000 (GMT) X-AuditID: cbfec7f5-b45ff700000028a9-c2-5a85bcbeebc5 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id B0.DA.04178.EBCB58A5; Thu, 15 Feb 2018 17:00:46 +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 <0P470050FB99G410@eusync3.samsung.com>; Thu, 15 Feb 2018 17:00:46 +0000 (GMT) Subject: Re: [PATCH v3 0/5] crypto: ahash.c: Require export/import in ahash To: Marek Vasut , Herbert Xu Cc: linux-crypto@vger.kernel.org, "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 From: Kamil Konieczny Message-id: <32069edc-e816-6ab0-f057-b1dab5d30db4@partner.samsung.com> Date: Thu, 15 Feb 2018 18:00:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-version: 1.0 In-reply-to: <6b29116a-c39c-9813-34a0-d5c05bd30c9d@denx.de> Content-type: text/plain; charset="utf-8" Content-language: en-US Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMKsWRmVeSWpSXmKPExsWy7djPc7r79rRGGdyZqmFxrXchs8XGGetZ Leacb2GxmNWla9H9Ssai6eVbJovPq56yWEz5s5zJ4v69n0wWl3fNYbN409bIaPF03RJmiztb m9ksjkzZx+rA59F66S+bx6urjh5bVt5k8pg36wSLx7/D/UweO2fdZffYdkDVY+Oz5ywed67t YfPo27KK0ePzJrkA7igum5TUnMyy1CJ9uwSujOX7P7AXnBWouLBatIHxH08XIyeHhICJxLUX H1i6GLk4hARWMEpcmtLMDuF8ZpSYu/0II0zVtv1LGCESyxglDvR9YYZwnjFK7Pj4EyjDwSEs 4C3x648ASIOIgKfEw/0drCA1zAKPmCUmHVwLNolNwFzi0fYzTCA2r4CbROuFO2wgNouAqsS3 fd/ZQWxRgQiJhVOfMkLUCEr8mHyPBcTmFLCW2PXiOlgNs4CmxIsvk1ggbHGJ5tabULa8xOY1 b8GOkxBYxi5x7uwxdogXXCRWrZ7KAmELS7w6vgUqLiPR2XGQCaKhn1Gif95MVghnBqPE441n WSGqrCUOH7/ICrGCT2LStunMIC9LCPBKdLQJQZR4SPw+8hYaXo4S2/a+YoUE0XdGiZZ5j1gm MMrNQvLRLCRfzELyxSwkXyxgZFnFKJ5aWpyb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I5wuK/BS JMC/1/H9X3WJgss7OvIX1T1gbP+VkxPCybS0+8ghy0lMW3ZMV/g++3jLBcf9qZ/7RE6/zC8q vrs4cTOn7dVtF/c8Kp9/Sv5k5WWvA3rRSskJ3Tc7p6W9PRDhPM024aSGEktxRqKhFnNRcSIA 8Q1ncrUCAAA= X-CMS-MailID: 20180215170046eucas1p1584287a2d0eaf241673a2c57b26a1ec6 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180118183438eucas1p2e2e7be8625ae0950c519e27424f9301a X-RootMTR: 20180118183438eucas1p2e2e7be8625ae0950c519e27424f9301a References: <20180118183404.12583-1-k.konieczny@partner.samsung.com> <20180215154132.GA7352@gondor.apana.org.au> <6b29116a-c39c-9813-34a0-d5c05bd30c9d@denx.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15.02.2018 17:27, Marek Vasut wrote: > On 02/15/2018 04:41 PM, Herbert Xu wrote: >> On Thu, Jan 18, 2018 at 07:33:59PM +0100, Kamil Konieczny wrote: >>> First four patches add empty hash export and import functions to each driver, >>> with the same behaviour as in crypto framework. The last one drops them from >>> crypto framework. Last one for ahash.c depends on all previous. >>> >>> Changes in v3: >>> added change for bfin_crc.c >>> make this a patchset, instead of unreleated patches >>> make commit message more descriptive >>> >>> Kamil Konieczny (5): >>> crypto: mxs-dcp: Add empty hash export and import >>> crypto: n2_core: Add empty hash export and import >>> crypto: ux500/hash: Add empty export and import >>> crypto: bfin_crc: Add empty hash export and import >>> crypto: ahash.c: Require export/import in ahash >>> >>> crypto/ahash.c | 18 ++---------------- >>> drivers/crypto/bfin_crc.c | 12 ++++++++++++ >>> drivers/crypto/mxs-dcp.c | 14 ++++++++++++++ >>> drivers/crypto/n2_core.c | 12 ++++++++++++ >>> drivers/crypto/ux500/hash/hash_core.c | 18 ++++++++++++++++++ >>> 5 files changed, 58 insertions(+), 16 deletions(-) >> >> All applied. Thanks. > > This makes no sense, cfr my comment on 5/5 > > Seems like if the driver doesn't implement those, the core can easily > detect that and perform the necessary action. Moving the checks out of > core seems like the wrong thing to do, rather you should enhance the > checks in core if they're insufficient in my opinion. The bug can only be in driver which will not implement those two functions, but we already had all drivers with those due to patches 1..4 All other drivers do have them. Additionally, with crypto we want minimize code and run as fast as possible. Moving checks out of core will impose on driver author need for implement those functions, or declare them empty, but in case of empty ones crypto will not work properly with such driver. -- Best regards, Kamil Konieczny Samsung R&D Institute Poland