Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751875AbdF1NnG (ORCPT ); Wed, 28 Jun 2017 09:43:06 -0400 Received: from mail-ve1eur01on0066.outbound.protection.outlook.com ([104.47.1.66]:7232 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751469AbdF1Nmz (ORCPT ); Wed, 28 Jun 2017 09:42:55 -0400 From: =?iso-8859-2?Q?Horia_Geant=E3?= To: David Gstir , Dan Douglass , "herbert@gondor.apana.org.au" , "davem@davemloft.net" CC: "richard@sigma-star.at" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: Re: [PATCH] crypto: caam - properly set IV after {en,de}crypt Thread-Topic: [PATCH] crypto: caam - properly set IV after {en,de}crypt Thread-Index: AQHS8BJRT1JvsDHapk2P0fMxyxi4Kg== Date: Wed, 28 Jun 2017 13:42:50 +0000 Message-ID: References: <20170602122446.2427-1-david@sigma-star.at> <20170628132710.97278-1-david@sigma-star.at> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: sigma-star.at; dkim=none (message not signed) header.d=none;sigma-star.at; dmarc=none action=none header.from=nxp.com; x-originating-ip: [192.88.146.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR0401MB2623;7:DGX9iVXEFvSycjtlOERoJuDCbOPO8n90CuVAm+ZquKOUfwCCmAJBnldybV/KCHDFSIDgfi3kHfELRKESCTJ1z2oQjzeJ5JCKmGIz98LrXeGA6FGFckx/VRi9L3NQtNez9R4pEIGyw8K5d232g2vxqFdxWYmmFnRxgag4gZvGJjDYXPfQCN8cUarxbiMRhs4rp0P4U3cf7kERGYbRcxMB8gt2tBGw42YO7A95IzMyOI76ncR/OijVzv9I5N10o1YqCC1diLhYAtJZxj51ZX9GFcARBEtaL+wiw3kVL8eIvahCghbFu/iKQL5/b8NLjgfDuTmjfFWf8T7syRjTEw0XJcriYzcdNVh7e9toeTysqQEENQFFTIPaxycZdc7k84jtjUOGbjZWHq7NzeVGudwqLwNuJUywtP3A3b+Xyd2A1tWgdDtqK69+04y+RUnuzj3IUB+yg88PFm6rssQbDBCkFNGkcmf9v+4nzDM703jBFxepnJxZRsUhS3NBGLiRQH9o1U3SMm7fi8qLKuY32zGoYOb4/h2h55rfiqtxS5pFjSkhnriU08icrQgn4nk9Bc8arDGUwYUQainDAdDXiY7S0sjhhnrqrYInmfFHXgpr+3h3in7OFlHc1ViFyyQyUKHAufj9AaM6WFatQPsLvJ76qJIC5PqDtxT2/dr/5wftYeH8EyTpKlzJzQfZ0GwSTVY0qqaKQovWufrxk6FIm5nSEH3PDpR7YwRlXhoTZNPpixkE4Lcy6dCm1aThzGq2Fxps2xS0xfp2PrwSKeesVImTHlBOL1oj01Cf+8UU4gjCqIk= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10009020)(6009001)(39840400002)(39850400002)(39860400002)(39410400002)(39400400002)(39450400003)(377454003)(24454002)(74316002)(3846002)(33656002)(2501003)(3660700001)(7696004)(66066001)(189998001)(54906002)(3280700002)(25786009)(2906002)(14454004)(6506006)(99286003)(53936002)(6246003)(86362001)(305945005)(81166006)(8676002)(229853002)(8936002)(6436002)(5660300001)(9686003)(38730400002)(478600001)(4326008)(6116002)(50986999)(54356999)(7736002)(76176999)(2900100001)(55016002)(53546010)(5250100002)(142933001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB2623;H:VI1PR0401MB2591.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; x-ms-office365-filtering-correlation-id: 4ad82cd8-74ee-4f9f-1415-08d4be2b9203 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:VI1PR0401MB2623; x-ms-traffictypediagnostic: VI1PR0401MB2623: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(236129657087228)(9452136761055)(185117386973197); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:VI1PR0401MB2623;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:VI1PR0401MB2623; x-forefront-prvs: 03524FBD26 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-2" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2017 13:42:50.7066 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2623 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v5SDh8F4019714 Content-Length: 781 Lines: 20 On 6/28/2017 4:27 PM, David Gstir wrote: > Certain cipher modes like CTS expect the IV (req->info) of > ablkcipher_request (or equivalently req->iv of skcipher_request) to > contain the last ciphertext block when the {en,de}crypt operation is done. > This is currently not the case for the CAAM driver which in turn breaks > e.g. cts(cbc(aes)) when the CAAM driver is enabled. > > This patch fixes the CAAM driver to properly set the IV after the > {en,de}crypt operation of ablkcipher finishes. > > This issue was revealed by the changes in the SW CTS mode in commit > 0605c41cc53ca ("crypto: cts - Convert to skcipher") > > Cc: # 4.8+ > Signed-off-by: David Gstir Reviewed-by: Horia Geant? Thanks, Horia