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 913D3C433EF for ; Mon, 9 May 2022 21:44:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229947AbiEIVsK (ORCPT ); Mon, 9 May 2022 17:48:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbiEIVsJ (ORCPT ); Mon, 9 May 2022 17:48:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 182D12421BB; Mon, 9 May 2022 14:44:15 -0700 (PDT) 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 A4B1D616CD; Mon, 9 May 2022 21:44:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5D69C385BA; Mon, 9 May 2022 21:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652132654; bh=OrpYST3eh9LQhsA/mepy9kiYu9eAXLw7s6pP10mWGCk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o+lUDrb8wqHZOpKJE926dscuSEUWeQI0+AP5lcM9mwrBpw7gaTtxhiZPgRcYgkNcL 76cqppg/QPzuM8EkFt0VB76e+QHWu236Z8PgVzuKriRH6ZYXzBYnkyJJSfFXH5kSw3 xncL646ZEt1FAlUeUbnnD26qOK/aPq6a9Y6V86AnrQ4yNUa7jrkI6fSkMzrK0mjpAv M457SKaFA+nAqzx1BbPNHj1J12i0tr7WlRSCkqb0cJ4uSlwzbUrx1SUC2STsRpnQ1E l2DzUcwXq2NzFjcOXc/LMeRueLG1CbDHZZwuxgAbhe6XhY1l7wdDCTr2Kwun+vRI7R Hqh3gmKYGVWJQ== Date: Mon, 9 May 2022 14:44:12 -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 7/9] crypto: x86/polyval: Add PCLMULQDQ accelerated implementation of POLYVAL Message-ID: References: <20220509191107.3556468-1-nhuck@google.com> <20220509191107.3556468-8-nhuck@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220509191107.3556468-8-nhuck@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org On Mon, May 09, 2022 at 07:11:05PM +0000, Nathan Huckleberry wrote: > diff --git a/arch/x86/crypto/polyval-clmulni_asm.S b/arch/x86/crypto/polyval-clmulni_asm.S [...] > +/* > + * Computes the product of two 128-bit polynomials at the memory locations > + * specified by (MSG + 16*i) and (KEY_POWERS + 16*i) and XORs the components of > + * the 256-bit product into LO, MI, HI. > + * > + * Given: > + * X = [X_1 : X_0] > + * Y = [Y_1 : Y_0] > + * > + * We compute: > + * LO += X_0 * Y_0 > + * MI += (X_0 + X_1) * (Y_0 + Y_1) > + * HI += X_1 * Y_1 The above comment (changed in v7) is describing Karatsuba multiplication, but the actual code is using schoolbook multiplication. Otherwise this looks good: Reviewed-by: Eric Biggers - Eric