Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753451AbbGBJ0z (ORCPT ); Thu, 2 Jul 2015 05:26:55 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:42412 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753159AbbGBJ0h (ORCPT ); Thu, 2 Jul 2015 05:26:37 -0400 Message-ID: <559503C0.2020200@ti.com> Date: Thu, 2 Jul 2015 14:56:24 +0530 From: Lokesh Vutla User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 MIME-Version: 1.0 To: CC: , , , , , , Subject: Re: [PATCH 01/10] crypto: omap-aes: Add support for lengths not aligned with AES_BLOCK_SIZE References: <1435814320-30347-1-git-send-email-lokeshvutla@ti.com> <1435814320-30347-2-git-send-email-lokeshvutla@ti.com> <20150702075341.GA4033@saruman.tx.rr.com> In-Reply-To: <20150702075341.GA4033@saruman.tx.rr.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1328 Lines: 35 On Thursday 02 July 2015 01:23 PM, Felipe Balbi wrote: > On Thu, Jul 02, 2015 at 10:48:31AM +0530, Lokesh Vutla wrote: >> OMAP AES driver returns an error if the data is not aligned with >> AES_BLOCK_SIZE bytes. >> But OMAP AES hw allows data input upto 1 byte aligned, but still >> zeros are to be appended and complete AES_BLOCK_SIZE has to be written. >> And correct length has to be passed in LENGTH field. >> Adding support for inputs not aligned with AES_BLOCK_SIZE. >> >> Signed-off-by: Lokesh Vutla >> --- >> drivers/crypto/omap-aes.c | 33 ++++++++++++++++----------------- >> 1 file changed, 16 insertions(+), 17 deletions(-) >> >> diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c >> index 9a28b7e..a923101 100644 >> --- a/drivers/crypto/omap-aes.c >> +++ b/drivers/crypto/omap-aes.c >> @@ -558,6 +558,9 @@ static int omap_aes_check_aligned(struct scatterlist *sg, int total) >> { >> int len = 0; >> >> + if (!IS_ALIGNED(total, AES_BLOCK_SIZE)) >> + return -1; > > -EINVAL? Okay, will update it. Thanks and regards, Lokesh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/