From patchwork Tue Nov 5 14:00:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 178506 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp709756ocf; Tue, 5 Nov 2019 06:01:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyPbh5aO3cpg/dWMm7gtQssUhJ1do/hjr0drlZit0ytOQSIsniAql6VfWm3ntB5O+Dkg1WA X-Received: by 2002:ac2:46c9:: with SMTP id p9mr19226502lfo.166.1572962510817; Tue, 05 Nov 2019 06:01:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572962510; cv=none; d=google.com; s=arc-20160816; b=QdWb6KvZYujOOjDsIG+ahtbH1JaghsH35WBq6eIfNecy2qByP0F6iot2cp/ETE5wt5 M+Ihe5DJfaK+alp/DL86SwB87Bo6S2XsBQ3JD1bZWw/AHh+K7zr5CCl0ELW+ffotLJOb f796WBJPhA7gNboHIuqcvhdEBNtBysbOueqtk+GOHbQHo35pqn/mhNjPYWpmfsS1JYox 79RzJtiXhg+YcwBwcGDJ8mbVAN7jjhiXmTH76FkH6swWJmwLZCqH9tZNzokcubiqHnou 4aWyzDkm1u+GFir7+CTVMldxGjcmAARM6COIKbSQjfCFAsb9YDM2DrDH0ANbcYKkI8BJ eMDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=8Qb0rbFmtCeLFsP63eWPse1DK88m1awgJzuGanBPJcY=; b=QjF/9TBz21aUkkCjKYIcePPCDKUN8IfFDqajGytnOoaSep28t9PBOCqSIesR8G1U9O P/ghenWl+fD4kYpoR281Hv7jEEZVKtunJ7zgc8vvRZ7uMn6TdOpFn0uWTv/N9gfk0mrU JM/oeCQy70OpjeorladfkF+sJB9HiKF8ZEaBp1V/rA2P8iaa421QK55W7TyKpEocIBnw ENI1X7MiTI3KsdLxJjHhR6/qoZbuo0xLgVJoCFuWwBeSsa6qceOuDTnA6+EdrJKiy2QD LAB3SiYki/ifQeTLWhqwyT1zkcXwQs5AHAGORBKjOGWLjX3x2I62PD1k+neys/PJGlWD dULw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=RAuv6iax; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dk11si13340421ejb.97.2019.11.05.06.01.50; Tue, 05 Nov 2019 06:01:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-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=@ti.com header.s=ti-com-17Q1 header.b=RAuv6iax; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389413AbfKEOBq (ORCPT + 5 others); Tue, 5 Nov 2019 09:01:46 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43976 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389377AbfKEOBq (ORCPT ); Tue, 5 Nov 2019 09:01:46 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xA5E1fvU071574; Tue, 5 Nov 2019 08:01:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572962501; bh=8Qb0rbFmtCeLFsP63eWPse1DK88m1awgJzuGanBPJcY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=RAuv6iaxRCpWAWs0mwbfhmUmlh7KyyKi+PPtwwaBU1xpKi2iTFUDHMKQHLlUfB+aR CCArs4q6OToe/zgSWaN7l+6nhM/PxaJ09ikL17pE6OIVaiFl5amdr/l81a8ojr2jQ3 9GyGLyhyLu+2MMVHXyUEKG+fl+C9/fUHBa8oYBOA= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xA5E1fBZ087778 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 5 Nov 2019 08:01:41 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 5 Nov 2019 08:01:41 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 5 Nov 2019 08:01:26 -0600 Received: from sokoban.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xA5E1FFn068289; Tue, 5 Nov 2019 08:01:39 -0600 From: Tero Kristo To: , , CC: , Subject: [PATCHv2 10/22] crypto: omap-aes: fixup aligned data cleanup Date: Tue, 5 Nov 2019 16:00:59 +0200 Message-ID: <20191105140111.20285-11-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191105140111.20285-1-t-kristo@ti.com> References: <20191105140111.20285-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Aligned data cleanup is using wrong pointers in the cleanup calls. Most of the time these are right, but can cause mysterious problems in some cases. Fix to use the same pointers that were used with the align call. Signed-off-by: Tero Kristo --- drivers/crypto/omap-aes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index e3f2ed0184f8..de05b35283bf 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -502,10 +502,10 @@ static void omap_aes_done_task(unsigned long data) omap_aes_crypt_dma_stop(dd); } - omap_crypto_cleanup(dd->in_sgl, NULL, 0, dd->total_save, + omap_crypto_cleanup(dd->in_sg, NULL, 0, dd->total_save, FLAGS_IN_DATA_ST_SHIFT, dd->flags); - omap_crypto_cleanup(&dd->out_sgl, dd->orig_out, 0, dd->total_save, + omap_crypto_cleanup(dd->out_sg, dd->orig_out, 0, dd->total_save, FLAGS_OUT_DATA_ST_SHIFT, dd->flags); /* Update IV output */