Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1190674ybg; Fri, 18 Oct 2019 13:31:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeAzYWYy0nG2T9kktbPYV6xUo9gZZ227VYv3QASVt5FUfu/k898GHLy1C3UmspDOvP3Av/ X-Received: by 2002:a17:906:4d06:: with SMTP id r6mr10699117eju.90.1571430668024; Fri, 18 Oct 2019 13:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571430668; cv=none; d=google.com; s=arc-20160816; b=vVWPCE7ICHYsUhxypnkLpkqtG17YUcYpdbEHHBz+nke7HdCbfbQG0iv/fol02bmar7 Sr5ajiiJtmdQMc5YBQrlU95hBitMiwE3IUC1fs4tV6fh71ppqR2izxEQB2xeJSIRu0zs EqtTEIIIauJRPsbzQm3GBsevPiOLgZ340E1EZObBP8mqax19Azlgk2HMDM1A2AJ25WqT DWn2NnwA6z5uwhM0N7Vj/0FEDkGQxG9LUkmgIVIkVH23ZhSFOFjOqIuZjirIc8Pw2KfE Jk1Zo9U3fT3mks91ZsXSM0fkVF9XX012O6bj0GEPkTY1YWfVWVBjmLMi0+wGhn12bGsV TA7g== 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; bh=b58jRUiLzLvFOzzV75NY0MJsBJnVwcCEZB0VgXzKFqY=; b=PO/m5owlIWnZt2EyUv8VtHXd7LmRXHm0A0YZRCjGZOUE0AZAo9+R1aXCBXbBERPQXw FkLYn4az/MlZQagHAC5lUcj8enHQ1B5oaAlNlJyIlVo6CxDpl2w0Yhky9qxNtTUDbcgc HeonemKYI8gu+8+pn210ywgxVCoZCs9keGQ0izzYSW9s14PERAQiIwed66UJDW1v3dKR dahxrvwwaDjCKsGhNumKFUM/9hs7YCWf0N/RdHWSVizeM69cYc3rnD8pJsHYTXFLmA2P 8C3a+avHIe8L2kQEO+4q1d8DLVlWGgpukZAoIRIMDU/VzIc2Xm+PRwekUYbJTZUAYLvU uwYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KoI2j82P; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 k6si4962735edb.235.2019.10.18.13.30.34; Fri, 18 Oct 2019 13:31:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=KoI2j82P; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 S2406249AbfJQPSW (ORCPT + 99 others); Thu, 17 Oct 2019 11:18:22 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:43298 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405685AbfJQPSW (ORCPT ); Thu, 17 Oct 2019 11:18:22 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20191017151819euoutp01fb981d143cb42b8ab4caece64e472656~OeDeG2WOK1440014400euoutp01h for ; Thu, 17 Oct 2019 15:18:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20191017151819euoutp01fb981d143cb42b8ab4caece64e472656~OeDeG2WOK1440014400euoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1571325499; bh=b58jRUiLzLvFOzzV75NY0MJsBJnVwcCEZB0VgXzKFqY=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=KoI2j82PLGh1wg7sLUblTVfMbdBsxsEe+GQe5RdgeTZMD3804mt/bg3MVUPMuPp1F kCL2TxCs98le9x4d8WLc0fMuer7Vwtv2dov25EBG6dUlBHoQDGl7NOgVejEqMEKkOA aKMgP/LBW8YO8eywblDBA8LKb/z5dT6AhfYdoTGs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20191017151819eucas1p23f6db447f5d15df979b3c508469b776c~OeDd177R12006720067eucas1p2O; Thu, 17 Oct 2019 15:18:19 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 00.DA.04469.B3688AD5; Thu, 17 Oct 2019 16:18:19 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20191017151819eucas1p174dff9a7d813114dc62b8fa6eda42a46~OeDdktV9G3273232732eucas1p1N; Thu, 17 Oct 2019 15:18:19 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20191017151819eusmtrp2b9a32bcb61e1aaf65d1c50301fe23ace~OeDdkFq2T0061800618eusmtrp28; Thu, 17 Oct 2019 15:18:19 +0000 (GMT) X-AuditID: cbfec7f2-569ff70000001175-f6-5da8863b5125 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 9F.00.04117.B3688AD5; Thu, 17 Oct 2019 16:18:19 +0100 (BST) Received: from [106.120.51.18] (unknown [106.120.51.18]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20191017151818eusmtip1ec4b79ccaa04c600121e918e6c9c70ca~OeDdEM3-82563425634eusmtip1P; Thu, 17 Oct 2019 15:18:18 +0000 (GMT) Subject: Re: [PATCH 07/25] crypto: s5p - switch to skcipher API To: Ard Biesheuvel , linux-crypto@vger.kernel.org Cc: Herbert Xu , "David S. Miller" , Eric Biggers , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Vladimir Zapolskiy , Kamil Konieczny , linux-samsung-soc@vger.kernel.org From: Kamil Konieczny Message-ID: Date: Thu, 17 Oct 2019 17:18:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191014121910.7264-8-ard.biesheuvel@linaro.org> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02SbUhTYRTHe+7Ldh1OrtPaSaNsMKJJWiR1K9GkPtyoD9aHiMLy1m4qzZd2 nZoWKcrKGWYRVsNSIUotSqeYL2O5ZQ6LJhpI9mppb9LCmhL2tna9SX77Pef8z3P+fzgUruoj I6iMrFzemMUZNDIF0d4341m1ydyQsrpsKIrxT3YjpmagjGAGb5aRTMXEEqbS4UfMwECznLGN DZPM61czGHNpwIEx/h+l+GYF29Y4grHtPVq2zmZibU3lMvbFsF3Gtl47yf6pv0Cwzi92jPXZ liYH7VXE63lDRh5vjE1IVaRXO2tlOeZFBY1Vt1AxehtqQUEU0HHQY7+Oi6yiGxAMN7MWpAjw FIIqZzeSGj4Epb5tcwON1YOkJLqBwPPEJZMeXgRjJSOEBVFUGJ0Iz0YxEcPpHTDUrxYlOO3G wNpYSYofyehYcD7uJ0RW0gnwuNs764KgtVD+0iEXZxfSe+DRNCdJQqH/8visPCggHzFXyEXG aTU8G6/FJF4Gd701uLgL6FdyKPedwSTTW6Gp1CqTOAwm3G1yiZeAv7P2nyYf3tVXyqXhMgSj p74SUmM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anF hxhNgZ6byCwlmpwPTCZ5JfGGpobmFpaG5sbmxmYWSuK8HQIHY4QE0hNLUrNTUwtSi2D6mDg4 pRoYN3ycK8n8aP7HOj7DiMP8sl8yTG9c73QzOlZq7L75kkze/8WmvxzEdmrt2T/HiathZVGH jPop1dtCxru25nQ6V20y+cKnY1Qj8zNvklLDy4h/N8R+SxrNWSS//M3thIx7f0rM7xndPTXh c0i+XMODp2yxGecXfYt/ZbL5q6S2ijR7mJlS3jleJZbijERDLeai4kQAccrNH+4CAAA= X-CMS-MailID: 20191017151819eucas1p174dff9a7d813114dc62b8fa6eda42a46 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20191014121950epcas4p18dbe227632fbee9b09f322d80deeb1c1 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20191014121950epcas4p18dbe227632fbee9b09f322d80deeb1c1 References: <20191014121910.7264-1-ard.biesheuvel@linaro.org> <20191014121910.7264-8-ard.biesheuvel@linaro.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi, On 14.10.2019 14:18, Ard Biesheuvel wrote: > Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") > dated 20 august 2015 introduced the new skcipher API which is supposed to > replace both blkcipher and ablkcipher. While all consumers of the API have > been converted long ago, some producers of the ablkcipher remain, forcing > us to keep the ablkcipher support routines alive, along with the matching > code to expose [a]blkciphers via the skcipher API. > > So switch this driver to the skcipher API, allowing us to finally drop the > blkcipher code in the near future. > > Cc: Krzysztof Kozlowski > Cc: Vladimir Zapolskiy > Cc: Kamil Konieczny > Cc: linux-samsung-soc@vger.kernel.org > Signed-off-by: Ard Biesheuvel > --- There are comments for hash functions changed, see below. With that fixed, you can add my Reviewed-by: Kamil Konieczny Tested-by: Kamil Konieczny > drivers/crypto/s5p-sss.c | 191 ++++++++++---------- > 1 file changed, 91 insertions(+), 100 deletions(-) > [...] > diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c > index 010f1bb20dad..e6f1d4d5186c 100644 > --- a/drivers/crypto/s5p-sss.c > +++ b/drivers/crypto/s5p-sss.c > [...] > @@ -660,7 +660,7 @@ static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id) > { > struct platform_device *pdev = dev_id; > struct s5p_aes_dev *dev = platform_get_drvdata(pdev); > - struct ablkcipher_request *req; > + struct skcipher_request *req; > int err_dma_tx = 0; > int err_dma_rx = 0; > int err_dma_hx = 0; These two comments below should not be touched, they are for hash part. > @@ -1208,7 +1208,7 @@ static int s5p_hash_prepare_sgs(struct s5p_hash_reqctx *ctx, > * > * Note 1: we can have update flag _and_ final flag at the same time. > * Note 2: we enter here when digcnt > BUFLEN (=HASH_BLOCK_SIZE) or > - * either req->nbytes or ctx->bufcnt + req->nbytes is > BUFLEN or > + * either req->cryptlen or ctx->bufcnt + req->cryptlen is > BUFLEN or > * we have final op > */ > static int s5p_hash_prepare_request(struct ahash_request *req, bool update) > @@ -1555,7 +1555,7 @@ static int s5p_hash_final_shash(struct ahash_request *req) > * s5p_hash_final() - close up hash and calculate digest > * @req: AHASH request > * > - * Note: in final req->src do not have any data, and req->nbytes can be > + * Note: in final req->src do not have any data, and req->cryptlen can be > * non-zero. > * > * If there were no input data processed yet and the buffered hash data is > [...] -- Best regards, Kamil Konieczny Samsung R&D Institute Poland