Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3475551pxu; Sun, 11 Oct 2020 11:02:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFdYBKuBIhaUoWsxFrZ3HSszl+zwA/FLMaEQTyCoJ2CRIIwl6gOmy0fCDSuJsY7V6woipy X-Received: by 2002:a17:906:2bc5:: with SMTP id n5mr24159308ejg.476.1602439335116; Sun, 11 Oct 2020 11:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602439335; cv=none; d=google.com; s=arc-20160816; b=Our4t7t6/2/PrkZ7R1J2gOcHYheSuopZiSX91aZq3O4KLfzXLuEBd8fP8PQppyXZQL D8p7fWOgcXkNvwmPXvvOl8g/1jt7a0guu8y+rU/W8JLtoFn52hMISwitDwBe+s/Ot+by mTLQyzT0ot2bZ6ZQfzPWN2AUSQKP8n0p4D6fGOLg1Jpx0aOYPfPx5sF9k+Ezg4SFH6nc sammLwowGAmP63edgAqDRQm7WjpleQntbTPm18KbX951uFRExtpkN6xWlivaDSpYq8Uz n6noPcARr9K8RuWV24gN1XebSevcyLtKpmVeF0DiJpRWmkSHQYXrW3b9696A4NPVwEkP 0edg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:from:to:cc:subject:references :in-reply-to:content-transfer-encoding:mime-version:dkim-signature; bh=Nt1prLRZKKzs5M+xwcMwo03uQ9LY7KSVRYtdFAJrFe8=; b=b2FfTJ+NoCFt0+kM5OfTztA1LpKM+tMtyqzhVeMUKqwxMBy2G4hshra0A9zISV6zRO xBzrba8s0oEKPc2Z1O/ktJ+76wdGILkmFCoeSc9a9r4qvKBFw5Oc0Pm44FWZiERcKYz+ 52Fmj6ImH5ftqUxk6dISpXh5v5Ry1FJHUI2wU4nqCenwnVWzqagXrP+e00ScsIYIPQ1U e/kBxfMDtiUUi/tLCVVSiP8AayQ2HnJ0dNluAPbQ5z7dCEQ8le5TjsfFyIEBKim620J+ uqUKUp4utov2CN/sJE1+rvkD9qtuBxlrn2uZ18sRR/jcVvjqEes6VOv3C+FkDolU75wL /RUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hmeuo20e; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si10452194ejh.16.2020.10.11.11.01.42; Sun, 11 Oct 2020 11:02:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hmeuo20e; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728290AbgJKKTT (ORCPT + 99 others); Sun, 11 Oct 2020 06:19:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:47250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbgJKKTS (ORCPT ); Sun, 11 Oct 2020 06:19:18 -0400 Received: from localhost (pop.92-184-102-180.mobile.abo.orange.fr [92.184.102.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 95343207F7; Sun, 11 Oct 2020 10:19:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602411558; bh=E80FqfqRXRL4++0Ml+FlpdDwAKsno997KrBJ1rNmCSQ=; h=In-Reply-To:References:Subject:Cc:To:From:Date:From; b=Hmeuo20eDt1ccuObCbtaRLqtUJtZ/RSoYdy9vMnE+wboS/MLVi47ODeEVkxHWZETU PUctPHQxfaGFZ0NDz/W7dy/0QLd34JPyCW+a69WPdzSP1cOKFWf60+gOmaVEw8WrO2 isz6sz/KNqijdMoGBVUkBTqUW/hdC03BmtxdHEaw= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20201010164736.12871-1-colin.king@canonical.com> References: <20201010164736.12871-1-colin.king@canonical.com> Subject: Re: [PATCH] crypto: inside-secure: Fix sizeof() mismatch Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org To: "David S . Miller" , Colin King , Herbert Xu , Ofer Heifetz , linux-crypto@vger.kernel.org From: Antoine Tenart Message-ID: <160241154768.6233.86808650362778908@surface> Date: Sun, 11 Oct 2020 12:19:12 +0200 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hello, Quoting Colin King (2020-10-10 18:47:36) > From: Colin Ian King >=20 > An incorrect sizeof() is being used, sizeof(priv->ring[i].rdr_req) is > not correct, it should be sizeof(*priv->ring[i].rdr_req). Note that > since the size of ** is the same size as * this is not causing any > issues. >=20 > Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") > Fixes: 9744fec95f06 ("crypto: inside-secure - remove request list to impr= ove performance") > Signed-off-by: Colin Ian King Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/inside-secure/safexcel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/ins= ide-secure/safexcel.c > index eb2418450f12..2e1562108a85 100644 > --- a/drivers/crypto/inside-secure/safexcel.c > +++ b/drivers/crypto/inside-secure/safexcel.c > @@ -1639,7 +1639,7 @@ static int safexcel_probe_generic(void *pdev, > =20 > priv->ring[i].rdr_req =3D devm_kcalloc(dev, > EIP197_DEFAULT_RING_SIZE, > - sizeof(priv->ring[i].rdr_req), > + sizeof(*priv->ring[i].rdr_req), > GFP_KERNEL); > if (!priv->ring[i].rdr_req) > return -ENOMEM; > --=20 > 2.27.0 >=20