Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp169171pxj; Fri, 28 May 2021 00:44:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznrgkmwQKSdShEMymKk0UJ2Cdog2VeujldP165R15uYG7iTbV3HgNk9zRITYp6kkqcvugR X-Received: by 2002:a05:6402:1158:: with SMTP id g24mr8420470edw.134.1622187842172; Fri, 28 May 2021 00:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622187842; cv=none; d=google.com; s=arc-20160816; b=abY8ysFRDterWF0xKZS70f6/2a/r0P2C1RRLKEi0Bs4clEnFt7Q86piQs0uM6U4iWr YSoo7m1za4yqA/13N+gCU3B8cBFjxluJyD26l73MKZtCHa9dPuxwkYpYvXia1C4u+LA3 nr60hDLKYXsi7MQzUKdcojRPwr6pBAYLdJ/ZK64KwcBji/L16i3v+5RS4llddZbQUans Tk6WygL0D7yPt35n0u71ANif/mOpWlFopC7icueW1l0qYTJcV9PeNzi2RLvdC5otV40v XLA3nsGodcXyjBrSEHpY4SrBm71DG1RoZMfFjVjBK501usTP/HtL6k2aKAtNYHUedVqQ k0Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Hwyxqk6exyA/sIiNIMMXFLyhMHlr5KrKJUpr2ictbz0=; b=CpQ/G5bmPUxXZ5ZpqcpUn7QveHgAq8/CDsRL8lYz6KrA/0eKzy9a3PfoZxwQTL4yBw O09l/ifpFGg0Vv8sqS8FwzvPhwPg1FLZoiormj5fiza7RYp/xYjcRNI9qYGg6xjFBB8I 7i1tnff9DllGihea8s+Krw6Q+7sCuptF6j/60psRe1KyzwRjMi9qOBFQkKmMyTU3ru1w UU6xH5U3UoB61BsNrseR4ILmTfT26OwOHh8+wFBTJkTOZy8dpLwf8gmCB0ZySz5Dd5cm VF21JbcxRr3sRJ4/lFphgqoPZzN0M0TK1MOEpCi7s74RiAq2thGeBEZIzAmbBsMvwoSB PbtA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f26si3310852eja.104.2021.05.28.00.43.38; Fri, 28 May 2021 00:44:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235823AbhE1H2x (ORCPT + 99 others); Fri, 28 May 2021 03:28:53 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:50312 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234520AbhE1H2w (ORCPT ); Fri, 28 May 2021 03:28:52 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1lmWtl-0003gx-43; Fri, 28 May 2021 15:27:13 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1lmWtk-00020H-Dp; Fri, 28 May 2021 15:27:12 +0800 Date: Fri, 28 May 2021 15:27:12 +0800 From: Herbert Xu To: Thara Gopinath Cc: davem@davemloft.net, bjorn.andersson@linaro.org, ebiggers@google.com, ardb@kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] crypto: qce: skcipher: Fix incorrect sg count for dma transfers Message-ID: <20210528072712.GK7392@gondor.apana.org.au> References: <20210521022023.1237148-1-thara.gopinath@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210521022023.1237148-1-thara.gopinath@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, May 20, 2021 at 10:20:23PM -0400, Thara Gopinath wrote: > Use the sg count returned by dma_map_sg to call into > dmaengine_prep_slave_sg rather than using the original sg count. dma_map_sg > can merge consecutive sglist entries, thus making the original sg count > wrong. This is a fix for memory coruption issues observed while testing > encryption/decryption of large messages using libkcapi framework. > > Patch has been tested further by running full suite of tcrypt.ko tests > including fuzz tests. > > Signed-off-by: Thara Gopinath > --- > drivers/crypto/qce/skcipher.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt