Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1395171rdb; Wed, 24 Jan 2024 14:05:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmJ9J2y+AvyDeIZZMLb1ZKoM2DKOTH5FKq+Nk7ujVbPxjrs5UeGXnTs2g3wcKv698kB0ON X-Received: by 2002:a05:6830:1456:b0:6df:b685:203a with SMTP id w22-20020a056830145600b006dfb685203amr2568687otp.59.1706133915828; Wed, 24 Jan 2024 14:05:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706133915; cv=pass; d=google.com; s=arc-20160816; b=hHM0b7G9Uu26HGx26oavlquStGzSDB9EjTXvyeQjICQAEoFZY02A7YffOpvQ3/z+nU 2vTFueIpKQjNu7dBrE6hAFI7+tjduapDl6i/mm+kmZHyLYMK6k8qNXc4n0DEjMAl41/M 338hRp1GUXX6xSE64vCqe70BD2N0d/IhcZAkHC5JDiyk7GWcjm+G2sBAx+ktl27N8ysA ZWZZBRr+ShbIJQTgXjaf7BpDQkk0/f/u38QtA/L4Hou0xCkPOd3qYsMoPpRMpE99U+e3 EJKhFU1RlY0i5DHl2bLSDI2akykNzqr+BmAadSmo1fNtPRYa3g87CMQ94SPO3UVlN4uf 7f4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/zbY1zaj1+gXjFAuOSb273rk6aYR2ZxgWzyrd+0MqdM=; fh=gqI1gzu8S9Yi0E/WRS2dPhzFUHRcRb8gg8I7EPQWMyY=; b=fEd2WcqBdEaitKqsEe6qNtdB4pBj8k5XvhWvLiEyZrVAawFLsMKHn9q7jiN79yNzUb cwK7zAMQPeRge73pTUi2iyxXdbNkpPiWKX2XKIGgk2UJitqNlr+Z6o5hK5/nelVH/zKx IGkw4+cx03zFlXCa7gs44lnEWTuQaZtDLm65rdB8W0IQddBpjQ4rUPrjM8TCA2uQZAwv N7NYSU9JowJI1PcEzxE9Q5Jeh556SYdz26xQe2bFjY+SOrihuOf435Ive5FXMSSqGkPe B1Gl+/ghNdTcQB1zSfANxS/axGkLBdWHRqHhPlxRQ33HZqU6ess2R+uj3Q8CSvu3c6t/ HnuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NUEx4VCi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-1593-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x17-20020ac87ed1000000b0042a084929d8si10226561qtj.787.2024.01.24.14.05.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 14:05:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1593-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NUEx4VCi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-1593-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 776DC1C21A48 for ; Wed, 24 Jan 2024 22:05:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3ECE1353F5; Wed, 24 Jan 2024 22:04:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NUEx4VCi" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEA4E7C091; Wed, 24 Jan 2024 22:04:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706133899; cv=none; b=RUH3Q79SM27ZbV/CBov9qXGFAHltDcPa7w8ogRFOMm31sTlm2zF2v1MHSKh01u/9mPRBzQcKmXQRzrxYYOV3HTRWXZ1d5x/2IJtkdngDuwgY9Md50xwmmfxFUiLk3FZyTO7VIHwafQdU/mArO8YiEX87t0TPYQQW0EoCzU4W500= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706133899; c=relaxed/simple; bh=9zUcVp2ujzaeHfxPkzuhcekSZufyO5TtKSBCw+uG7bo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=K/YS8H1SSIJdyBHgPdq8hMI9ARlYEUGRwcogolJzTkhY6fY4wd5ABh3UKGGZlqDs5Pp4jVZiqaFd9nViJx02ZztPcn5Ms+N8swGzt2pOcf/JFYj5BqqJ6yYmlSsajIpsfmpp1yi+3CNK3foxE9Qn93npH+ro50tQH2ZWe7OGGk0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NUEx4VCi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5378C433C7; Wed, 24 Jan 2024 22:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706133899; bh=9zUcVp2ujzaeHfxPkzuhcekSZufyO5TtKSBCw+uG7bo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NUEx4VCiHh7exFUAlS5vMvV8z1f+EN+LnVMA5BbLiiZ80ldsdWzRxI9LQxNvDLgQd R+HWVb9Y44U1pzmIVkNRp1VBIa2vK8kpuReL1PBeHD33vJ7yjP3ONu/f9y/VZ9TD+Y SM/Vb3x+5+1BRuObUuuGNQXpKKWVjnVpLVGgf1d0YdNnnJ68JzWuVkvXa49+5WEiAR gDEjcYb8Z1fGs0Gs3Vi9y5LfQs5u7CQDaH7Hiw1GjiNNQmDcafW6uaS8L2yb9zLo8n T3R5oOSBOqhTLNUBwQNq66TbzJNwZdEonq5k0TRmwEQbptVr5tOxMHK39Am9swu0ra pDAPzfptHuBlg== Date: Wed, 24 Jan 2024 14:04:57 -0800 From: Eric Biggers To: Gaurav Jain Cc: Herbert Xu , "David S . Miller" , Horia Geanta , Pankaj Gupta , Varun Sethi , Meenakshi Aggarwal , Aisheng Dong , Silvano Di Ninno , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: Re: [PATCH v2] crypto: caam: fix asynchronous hash Message-ID: <20240124220457.GC1088@sol.localdomain> References: <20240118092557.1891120-1-gaurav.jain@nxp.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240118092557.1891120-1-gaurav.jain@nxp.com> On Thu, Jan 18, 2024 at 02:55:57PM +0530, Gaurav Jain wrote: > ahash_alg->setkey is updated to ahash_nosetkey in ahash.c > so checking setkey() function to determine hmac algorithm is not valid. > > to fix this added is_hmac variable in structure caam_hash_alg to determine > whether the algorithm is hmac or not. > > Fixes: 2f1f34c1bf7b ("crypto: ahash - optimize performance when wrapping shash") > Signed-off-by: Gaurav Jain > --- > changes in v2: > - remove if condition based on crypto_hash_alg_has_setkey() funcion. > - added is_hmac variable in caam_hash_alg and updated the if > condition for checking hmac algorithm. > > drivers/crypto/caam/caamalg_qi2.c | 7 +++++-- > drivers/crypto/caam/caamhash.c | 7 +++++-- > 2 files changed, 10 insertions(+), 4 deletions(-) Reviewed-by: Eric Biggers - Eric