From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 017F0C47071 for ; Thu, 16 Nov 2023 04:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235606AbjKPEgQ (ORCPT ); Wed, 15 Nov 2023 23:36:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234622AbjKPEgI (ORCPT ); Wed, 15 Nov 2023 23:36:08 -0500 Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9863BD73; Wed, 15 Nov 2023 20:36:01 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1r3U6W-000CFS-Lr; Thu, 16 Nov 2023 12:35:49 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Thu, 16 Nov 2023 12:35:56 +0800 Date: Thu, 16 Nov 2023 12:35:56 +0800 From: Herbert Xu To: Jia Jie Ho Cc: "David S . Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: starfive - Pad adata with zeroes Message-ID: References: <20231116021752.420680-1-jiajie.ho@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231116021752.420680-1-jiajie.ho@starfivetech.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 16, 2023 at 10:17:52AM +0800, Jia Jie Ho wrote: > > diff --git a/drivers/crypto/starfive/jh7110-aes.c b/drivers/crypto/starfive/jh7110-aes.c > index 9378e6682f0e..e0fe599f8192 100644 > --- a/drivers/crypto/starfive/jh7110-aes.c > +++ b/drivers/crypto/starfive/jh7110-aes.c > @@ -500,7 +500,7 @@ static int starfive_aes_prepare_req(struct skcipher_request *req, > scatterwalk_start(&cryp->out_walk, rctx->out_sg); > > if (cryp->assoclen) { > - rctx->adata = kzalloc(ALIGN(cryp->assoclen, AES_BLOCK_SIZE), GFP_KERNEL); > + rctx->adata = kzalloc(cryp->assoclen + AES_BLOCK_SIZE, GFP_KERNEL); Please explain why you're changing the allocation size here. This needs to go into the patch description. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt