From patchwork Thu Oct 17 12:25:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 176568 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp847646ill; Thu, 17 Oct 2019 05:26:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNmCnUWI5GuZCAK9gtTiVkNdU5O/Xz59e4CY1dsV6mm7i6GB0X6Po48Zaov6Ud//yybrta X-Received: by 2002:a50:e606:: with SMTP id y6mr3390308edm.261.1571315177249; Thu, 17 Oct 2019 05:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571315177; cv=none; d=google.com; s=arc-20160816; b=oIyEjuR60PrJ6eXBSEZ5FOXE5xVdAgsk3Ouqr2Hyrt3l7X/hA6y6+du7eYeuIawTGH vavbn6F969LxxGxo8WyVw5bh8WQmG9qoocBeUNBDhXgiPV9nDf3PGojppoUTT6nRYS7x FBIf3HGJzQfP1ACghgiS7vLTE4ipybNIwjMrqw+PrqpY5tZ+zC6PID+y5y0JyBExkSdU phnenppCvKu2c0kruSjbVrYdyqqTJzdiXcEiTnHztbh4XZxJHUIWuM1pipcNn6FnwshW nv1ZaS+oNB144jW+42zjxNtGxgQ8B9e2ahePbMX46gAC39uk3uabnICByNrkvLgPsR/U 07yQ== 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=LtkTVpWL6TMo5645N6f1i/Ciz76+fqNN9ZgDR0Mf4kQ=; b=e7LZngbYAitVYH/jffSefiRAjst0xaTMqMrPnAtoXHSnmlt6GMFz4AhBMEGqO+n9EP SZUUdHn+y0nSIaJCpL5dj4XLKB5kh0H/WTEuHmNge3BrDo2bnxw/jveGVfoeRr5rZiKW VezFJYuGZTB8foMPffTlT/0TgKx6dKRsIVSTQInxpKWFDnxBspJm4+GW1ZOk5JPG1l57 bYQDFh7Lkzt7GGH3bXPRhbLwrUKN5OtdZXT3U6GQwydfWbMHcQT5sRsrhpFl1p92PmRm FLwFrbfioixqIYw7PVbcHSs7mhNLN6QITdZd0cgeJUT4JLIxIT6vcdBSWEda3SCFWK7+ QSSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XX7LXUOb; 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 p15si1265537ejx.56.2019.10.17.05.26.16; Thu, 17 Oct 2019 05:26:17 -0700 (PDT) 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=XX7LXUOb; 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 S2406144AbfJQM0O (ORCPT + 5 others); Thu, 17 Oct 2019 08:26:14 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:50356 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729240AbfJQM0N (ORCPT ); Thu, 17 Oct 2019 08:26:13 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9HCQ5HR084573; Thu, 17 Oct 2019 07:26:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571315165; bh=LtkTVpWL6TMo5645N6f1i/Ciz76+fqNN9ZgDR0Mf4kQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=XX7LXUObavUFpH+Bscao7vNlsF6s2NSQLr9N0VW1LKOe8dE8AHDnMLH44yiN0Koee aLjftTjgvppWAxVfaxAnMpq3NNn9AtIGV+G4xP3dtRtS6Tk8qLbVL7Awvzi9lm7FRH BdpSPJfDBP7TWA04gNLH27/YIZeuFj4y1D2rf7Oo= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9HCQ5u5039171 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 17 Oct 2019 07:26:05 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 17 Oct 2019 07:26:04 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 17 Oct 2019 07:25:57 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9HCPxNX073246; Thu, 17 Oct 2019 07:26:03 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCH 02/10] crypto: omap-sham: remove the sysfs group during driver removal Date: Thu, 17 Oct 2019 15:25:41 +0300 Message-ID: <20191017122549.4634-3-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191017122549.4634-1-t-kristo@ti.com> References: <20191017122549.4634-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 The driver removal should also cleanup the created sysfs group. If not, the driver fails the subsequent probe as the files exist already. Signed-off-by: Tero Kristo --- drivers/crypto/omap-sham.c | 2 ++ 1 file changed, 2 insertions(+) -- 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-sham.c b/drivers/crypto/omap-sham.c index 2e9435577cea..0bf07a7c060b 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -2270,6 +2270,8 @@ static int omap_sham_remove(struct platform_device *pdev) if (!dd->polling_mode) dma_release_channel(dd->dma_lch); + sysfs_remove_group(&dd->dev->kobj, &omap_sham_attr_group); + return 0; } From patchwork Thu Oct 17 12:25:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 176578 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp847762ill; Thu, 17 Oct 2019 05:26:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/eHYBhNJ/6EiIqkrRlYB1OC4k9rQwjveYoHbk3yA/mS3rUEkxum8T5zQPf1/hFnOxBtOh X-Received: by 2002:a17:906:7e17:: with SMTP id e23mr3243567ejr.205.1571315183174; Thu, 17 Oct 2019 05:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571315183; cv=none; d=google.com; s=arc-20160816; b=UIYS6+AR2+D7FYO9oT4Ru9aBtT3G3GtHLgBNXxHtNYySGtPf/DYXh7hvPl4sNwoaCZ 5xNUssgsbaHC8Q6WXxyRT90nZKnex8ua0ylI44k9bX6gz1XL7HcbkmPYhL9pr9qKNQ22 VkfNm4iT2Ap3Z8gmgtMmr5WIzEzQAmYtq7+iv/uHj9vFtdFNqIO7QI4g1PJ66wEezw9A Y88RCZQhCq7nvrKknMA75bk5NSmJ+OP8wdn989Xz0BL3z9Ot9YMpGxH/8prvZJkG+DUg ka19eoHlKaycnA0B6GKsbFZp90fmFc8kIH2H+8/8+bWCehytwycKFbZyqQrJZ3/JbL53 1fBQ== 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=hmNAPQfmgr7QrBR8MmHXs44ME0uvJ0gm3L6xlCrIGdo=; b=hy/eqsmPNOFg2Gf+HA7mYlm4SlZfT8ER3LfMhX5H4aXZywnS9pxXnTvqGtF5hd26+m GKzM6c4u9q1Y0P1yNn/z4IEN7rd0fUsNKhFJ9DsIrzeBILKNvtZi51Tl2LRjeFx3lzET NJEg2V0tmXTCZQ9xqAQOi7j9FNHAGo+dHmlCIvs6+IBiZLp9J1LqC0Y7fTczfrXn3+qb 3+UUJMzFZWYcNUDeMHZO7Kp2b1Ny4b4UTCGRSTgV6XQeHjcTLtYOSK4CpsE6AZcLkvii pT7v2CsHLdsnSG/BPv1rHZmnEbc5aQBsD7C+cevTTWPgPeJwUI44DAan03VjQPaxR87X OQ7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Xb6bTmXF; 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 ot22si1288436ejb.153.2019.10.17.05.26.22; Thu, 17 Oct 2019 05:26:23 -0700 (PDT) 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=Xb6bTmXF; 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 S2409376AbfJQM0U (ORCPT + 5 others); Thu, 17 Oct 2019 08:26:20 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:47750 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728554AbfJQM0U (ORCPT ); Thu, 17 Oct 2019 08:26:20 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9HCQADT091680; Thu, 17 Oct 2019 07:26:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571315170; bh=hmNAPQfmgr7QrBR8MmHXs44ME0uvJ0gm3L6xlCrIGdo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Xb6bTmXFN96YtX1wBXHM58x7EkP8BS3eEkoRBIAqnF94m9joZ/waJnup2YrBmuAu5 SekTXOxsfBBhh3+Wof5+G6Z42pbD1ph5sU9YbtwvFzZ2mfalbl/7L2LG2pw4qZMA71 SqHZ4CNCM7JVAPYwCGm8z/sPrLOabsbtBaI22608= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9HCQA21117882; Thu, 17 Oct 2019 07:26:10 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 17 Oct 2019 07:26:10 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 17 Oct 2019 07:26:10 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9HCPxNa073246; Thu, 17 Oct 2019 07:26:08 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCH 05/10] crypto: omap-aes: add IV output handling Date: Thu, 17 Oct 2019 15:25:44 +0300 Message-ID: <20191017122549.4634-6-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191017122549.4634-1-t-kristo@ti.com> References: <20191017122549.4634-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 Currently omap-aes driver does not copy end result IV out at all. This is evident with the additional checks done at the crypto test manager. Fix by copying out the IV values from HW. Signed-off-by: Tero Kristo --- drivers/crypto/omap-aes.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 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 38c750e83dbe..c40876353b19 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -479,6 +479,14 @@ static int omap_aes_crypt_req(struct crypto_engine *engine, return omap_aes_crypt_dma_start(dd); } +static void omap_aes_copy_ivout(struct omap_aes_dev *dd, u8 *ivbuf) +{ + int i; + + for (i = 0; i < 4; i++) + ((u32 *)ivbuf)[i] = omap_aes_read(dd, AES_REG_IV(dd, i)); +} + static void omap_aes_done_task(unsigned long data) { struct omap_aes_dev *dd = (struct omap_aes_dev *)data; @@ -500,6 +508,10 @@ static void omap_aes_done_task(unsigned long data) omap_crypto_cleanup(&dd->out_sgl, dd->orig_out, 0, dd->total_save, FLAGS_OUT_DATA_ST_SHIFT, dd->flags); + /* Update IV output */ + if (dd->flags & (FLAGS_CBC | FLAGS_CTR)) + omap_aes_copy_ivout(dd, dd->req->iv); + omap_aes_finish_req(dd, 0); pr_debug("exit\n"); From patchwork Thu Oct 17 12:25:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 176577 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp848000ill; Thu, 17 Oct 2019 05:26:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfxw6ngrXp6Ejd3I1+WHLigU+I4N79GCsmwaoAiZRpYu9VXZ2nDrySxDUZw/2LojzTw1zM X-Received: by 2002:a05:6402:b16:: with SMTP id bm22mr3515792edb.160.1571315194586; Thu, 17 Oct 2019 05:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571315194; cv=none; d=google.com; s=arc-20160816; b=jNWiHk0MsOUxFJ+f0kd1aVFeLn0Aj5L4GbkCYJtI47JQPDfqt5ukwH7XqyKglE6pky nUOfnnz/tnlO+MTbMlfRGkded59dkYuJ7XHtUyzk1DQt9QGJCLB8cIjBVDsxSYbZ1yA3 i7Bnw4T2WSNdBejkcDmMOfcxljyTKFQ4ZhxCNEzXaZM0LeNERFWZ948EU/GpliMub/ob rSxMD/9swrfMnG9UUqJmI3sJtFOmIc72NhB0RlpZMZqmpn3IRGmHjasNkEA3dawVYwTT xK7vyccWGyOnxI9azbF34COaz4yHFL0/KsvTjNWPAQe4sDON9fyjStl7Aw3joviyylya 5vZg== 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=yP6xPhlj18H6iTp8pG1xyYarjc/HONgaPVPk1rzTYts=; b=JNoU/8zn/ZbvtWDg2UAnPWPTrgpZYMN0NSMJXD6j0PRWHv81OotA7BU6vxH7OWrt0r mn2oJwOqI36X0xdfSmDG+hp5V3v0BuMJ7IkHe6xf6jNozlQKwcvfhCpJ3katS8YTlcZ0 jy+AoeiGEaqSRYTBOP/njkyyRIzxlB/GypulwEwTRpEUPw6fcaRvXxeY/L4cfb7/sfjX Fh5sTJRtR+r0/Hp5H5RVdNIuil2hoOpyU9rdBNTrVSFtlvNbV238OYWFzHraGl2xfy0l rRtOlSvhSOnqITt4zfwzDgbfyZKKJp1Sr0eU4l1nYBaBAsv80PVHkUCc8b1jZs/60na3 xjCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=cN6IGpc1; 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 ot22si1288436ejb.153.2019.10.17.05.26.34; Thu, 17 Oct 2019 05:26:34 -0700 (PDT) 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=cN6IGpc1; 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 S2406181AbfJQM0e (ORCPT + 5 others); Thu, 17 Oct 2019 08:26:34 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:54500 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728368AbfJQM0d (ORCPT ); Thu, 17 Oct 2019 08:26:33 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9HCQJRg086571; Thu, 17 Oct 2019 07:26:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571315179; bh=yP6xPhlj18H6iTp8pG1xyYarjc/HONgaPVPk1rzTYts=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=cN6IGpc12pN5UdK4ufEN2GnQgH13Wcv/dQ6DBb9a4U/7U3rg4+mKlASdX1hQPxroJ J4GvqO5QsBgTDcJJgVVJjQ1EINcbOnyg+NIBJmot4lk7/wOAXPEDDeT4MeSJ3pDRAm UrrLPy95a1RSDS1zTIRuCh2zg7gVWTY3iRJpCSDk= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9HCQJMt118129; Thu, 17 Oct 2019 07:26:19 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 17 Oct 2019 07:26:19 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 17 Oct 2019 07:26:11 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9HCPxNf073246; Thu, 17 Oct 2019 07:26:17 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCH 10/10] crypto: omap-aes: fixup aligned data cleanup Date: Thu, 17 Oct 2019 15:25:49 +0300 Message-ID: <20191017122549.4634-11-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191017122549.4634-1-t-kristo@ti.com> References: <20191017122549.4634-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 c40876353b19..649abbc92fd4 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 */