Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1191989ybg; Fri, 18 Oct 2019 13:32:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4MDZ8Y/v9gk3HeBpMxKUjF8AB4L/eXVUqXBQzhY+LRmxUtjpbc3sKKTlRmN7NVaWgEYg3 X-Received: by 2002:a17:906:54c7:: with SMTP id c7mr10224953ejp.226.1571430739996; Fri, 18 Oct 2019 13:32:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571430739; cv=none; d=google.com; s=arc-20160816; b=zm+mW5fbF2KrHWZ4dYAEB+nDjDrXpWbnrYhahX9dVzn6xgk7NqDWXYS2psZRtPH5JG wJh3b7VuGFaBOsW/0mFuRZPHKBkVzXLK6rMZt12oxYUxis9rzEOHwtZRLC5GWngoGNOl x4hvWZ2O/Nsksm6xw2OTAn7XdSmv74gw6B/ovI9HtAMpklLPjWJr6J+PR3/2fSHFwDhR kLI5hLwwASzD139n99q1fKUkwFC0hLgyY4pgWMkFgtzbUju7J+f+vpcGqPN/0Aobq//5 0DhEhCGtVRa1LMwh64L/x5QDyyD0uNhJJH2AIN7Z9NJj4be4PFHQxlwm6b82wDhISfnb LABA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8ekt2r633krBIKdm2MRWn1/pbuY6S29TraTxsvnoK4k=; b=b9/XTu4xWc1shUhSXZN3PM7LdiXhr1amM99I0coOnmdhtU+1V+7pt5GxJoNYBHa/So tZsG3ck9j9ejx4pGYAoHn+IzsJryGI1MVk0S4RrxSSfRmazzsjDscqzmBry1pW8X5PPP PDO0Z206W6hmw/lFGJGRJpSsSXBoVNfNl8//GE6lX4Nb2rwgKVtzOqY32/sGspyLeVsc aC176yoRJZWZUgkxydUIaxHh87yZ9j7R1m2jW7KoXmYhHIX8vZMer+8P9uQNoyMDG6sw cayQG5DIC1xWpKaQ2KVgGXmxhsVTG3JnD6BRawkMyYY2SDch9M8+w363mrvWji5oHIJY 9/kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="rtG7U/WF"; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fj16si4402384ejb.385.2019.10.18.13.31.54; Fri, 18 Oct 2019 13:32:19 -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=@linaro.org header.s=google header.b="rtG7U/WF"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407699AbfJQP3C (ORCPT + 99 others); Thu, 17 Oct 2019 11:29:02 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36512 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407690AbfJQP3C (ORCPT ); Thu, 17 Oct 2019 11:29:02 -0400 Received: by mail-wm1-f68.google.com with SMTP id m18so3013256wmc.1 for ; Thu, 17 Oct 2019 08:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8ekt2r633krBIKdm2MRWn1/pbuY6S29TraTxsvnoK4k=; b=rtG7U/WFEJB937Z+UVa7zX93QaONAQY6vMOSjaE/oYZkhh4E4IlI7dU+lRGEsJwSyA mymkOhBUkVE6YLDzZhDWJIWv/XRTly2XbhE+BioypJNcpOJW7FBP2z/j7nHOhQecV+fu fL2/XPHmaAkSk3IaJA+V050VgvfGv2HtmATwlaUVKV6+ePESSqHNCk62XsACKWvn+edL HkANTtvyN4Wfo62Boe8Nclhv5FwClad+EPHthVIPdHYQKxQMh4TQjTITGGS0ARd5gkJj Op5jHtvoqsuSyRVNPiNSE5/UtL5/7TYcnJ5c2mjYYijHfDfynZOaj2XkOcs5jTbNfNkc nErw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8ekt2r633krBIKdm2MRWn1/pbuY6S29TraTxsvnoK4k=; b=U8T63wyLHXExnveWX6/nRLaSE7UorAGie6Dlyr+Own0GUjUTAXoq33GI24rZ6d1lWI Lb44F9x/XqWXrBJQHFPRGIxPqdjupOQy196ygZ0tqWXGG8k5RLNbtsYL3w6cRrZ9y8jU bF+vwx2/bTNichi9qOsKv0ymrLZMe4qFrhW0+w+v5DtGijeZsG4QJi7+hdFKaxlUWFHW d14UWh3EqTcXsqmehdKWMpeBRqkoZa2jAqCGbgr/1WcWW2sVnp1DFRI7HZ73GwrsKAiu 4aJYgVvaxxhlXR442AVz8n5PXNaQxyEhLAB2xEDfsuGiZcd3Cong0ygJ5SsGhirYRk1p xQHw== X-Gm-Message-State: APjAAAU3GNpBxa/p+y/Br8GG+J8mLqjxij4RgYhez6vXCihxaCi1sLVb FvxIIlJIEPQ/4JKozsGbPlVHqGfsj5k7LC33GApGZg== X-Received: by 2002:a1c:a651:: with SMTP id p78mr3454453wme.53.1571326138344; Thu, 17 Oct 2019 08:28:58 -0700 (PDT) MIME-Version: 1.0 References: <20191014121910.7264-1-ard.biesheuvel@linaro.org> <20191014121910.7264-8-ard.biesheuvel@linaro.org> In-Reply-To: From: Ard Biesheuvel Date: Thu, 17 Oct 2019 17:28:48 +0200 Message-ID: Subject: Re: [PATCH 07/25] crypto: s5p - switch to skcipher API To: Kamil Konieczny Cc: "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , Herbert Xu , "David S. Miller" , Eric Biggers , linux-arm-kernel , Krzysztof Kozlowski , Vladimir Zapolskiy , Kamil Konieczny , linux-samsung-soc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 17 Oct 2019 at 17:18, Kamil Konieczny wrote: > > 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 > Thanks! > > 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 >