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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BF3EC433F5 for ; Mon, 9 May 2022 21:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Xpkoyk4xSnKWbxrLupjeFqdFdjdHRF5fTLlNUhlvBuw=; b=WjapOBXCLqONOf AdsrcrCkh3+oCJiH3ZcmbmSPjI2ZLWCML8t7ovPnNlg/LqD9EB5Biz22u51oNWBq4qCQOOuJMz7xl SCIZGpZUlF/W+azD4KDiqpT3OKu2KLEAM+2/yic6+T5lvsesHOaXYE1myJbmHhXpP2XyN2orRfH7a nYkSez1of8tebQ4ZxEev/8Uc1jRgqVEiP/cqTpxB1DhHUEU6Brr9irLctWAMWWHA+sNlOEVVSM9tm HAgvZTskJv+qnTxM0v8yv9rI+SjSWYxwjDKyFbVy3DCZjFwY7nrN40ySiscoM6qJWxxfLWFJJOhvU jQN/TJSSBBpDdFsTWouQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noBMr-00GSjC-6k; Mon, 09 May 2022 21:56:37 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1noBMn-00GSic-SI for linux-arm-kernel@lists.infradead.org; Mon, 09 May 2022 21:56:35 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4368660C0B; Mon, 9 May 2022 21:56:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C433EC385C2; Mon, 9 May 2022 21:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652133393; bh=wHLWT1Gll/cvK2j3e8LMoFzDmeDWBW7dkJOSEFpCqlk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=msh/uKHQvklZ0wtmp5N5Of0ULdBVEMKEg8ske61MFbi1y/PAYyOhfESYV7FT2qlfS btnhan/bTDBZvgENyc8vd/6SsewsY+NoV7a3+l7rL117i4eTpufFz4LMWltbuPmhvF cdHQb8D6oVaW2z38/EwfKBReboVoN3zIABXNTcx183dvsxdz+ntAHxi/Cz3nwJkGq8 uL1GVTACgW0+ggSEkvKfFM0QhvWhMOawGDf2WsNmjJD/rlNpKUOSoqZXvyZOE2HMf0 LNXqNrpZeSDFRGItCZq2XUzRsk2lgHNug9hz5F3NQNRGNKEYdA1VlF4htCGpvdob1g 7atWZNlj+I/kw== Date: Mon, 9 May 2022 14:56:31 -0700 From: Eric Biggers To: Nathan Huckleberry Cc: linux-crypto@vger.kernel.org, linux-fscrypt@vger.kernel.org, Herbert Xu , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Paul Crowley , Sami Tolvanen , Ard Biesheuvel Subject: Re: [PATCH v7 6/9] crypto: arm64/aes-xctr: Improve readability of XCTR and CTR modes Message-ID: References: <20220509191107.3556468-1-nhuck@google.com> <20220509191107.3556468-7-nhuck@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220509191107.3556468-7-nhuck@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220509_145633_989182_41A5DE55 X-CRM114-Status: GOOD ( 15.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 09, 2022 at 07:11:04PM +0000, Nathan Huckleberry wrote: > Added some clarifying comments, changed the register allocations to make > the code clearer, and added register aliases. > > Signed-off-by: Nathan Huckleberry > Reviewed-by: Eric Biggers Did you mean to add Ard's Reviewed-by that he gave on v6 as well? One comment about the v7 changes below: > /* > * aes_ctr_encrypt(u8 out[], u8 const in[], u8 const rk[], int rounds, > * int bytes, u8 ctr[]) > + * > + * The input and output buffers must always be at least 16 bytes even if > + * encrypting/decrypting less than 16 bytes. Otherwise out of bounds > + * accesses will occur. > */ This comment, along with the other similar ones you added, doesn't properly describe the behavior when bytes < 16, as it's not mentioned that the extra space needs to be before the pointed-to regions rather than after. That's the most unusual part of these functions, so it really should be mentioned. Separately, applying this patch and the previous one causes the following whitespace errors to be reported: Applying: crypto: arm64/aes-xctr: Add accelerated implementation of XCTR .git/rebase-apply/patch:299: space before tab in indent. ld1 {v5.16b-v7.16b}, [x1], #48 warning: 1 line adds whitespace errors. Applying: crypto: arm64/aes-xctr: Improve readability of XCTR and CTR modes .git/rebase-apply/patch:216: space before tab in indent. ld1 {v5.16b-v7.16b}, [IN], #48 warning: 1 line adds whitespace errors. - Eric _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel