From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932487AbdKFPp6 (ORCPT ); Mon, 6 Nov 2017 10:45:58 -0500 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:5464 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932155AbdKFPp5 (ORCPT ); Mon, 6 Nov 2017 10:45:57 -0500 X-IronPort-AV: E=Sophos;i="5.43,434,1503385200"; d="scan'208";a="8360878" Subject: Re: [PATCH 2/2] crypto: atmel-aes - Reset the controller before each use To: Romain Izard CC: Herbert Xu , "David S . Miller" , Nicolas Ferre , , , References: <20171031152524.25216-1-romain.izard.pro@gmail.com> <20171031152524.25216-3-romain.izard.pro@gmail.com> From: Tudor Ambarus Message-ID: Date: Mon, 6 Nov 2017 17:45:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20171031152524.25216-3-romain.izard.pro@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Romain, On 10/31/2017 05:25 PM, Romain Izard wrote: > When using the rfc4543(gcm(aes))) mode, the registers of the hardware > engine are not empty after use. If the engine is not reset before its > next use, the following results will be invalid. > > Always reset the hardware engine. Thanks for the fix! I could reproduce the issue only when running rfc4543(gcm(aes))) and then, immediately after, ecb(aes). Have you encountered this bug with other combination of algorithms? I'm trying to isolate the bug so that we can have a more fine-grained fix. Cheers, ta