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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C605C04AB4 for ; Fri, 17 May 2019 06:00:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE62A2083E for ; Fri, 17 May 2019 06:00:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727520AbfEQGAx (ORCPT ); Fri, 17 May 2019 02:00:53 -0400 Received: from [128.1.224.119] ([128.1.224.119]:54078 "EHLO deadmen.hmeau.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727242AbfEQGAx (ORCPT ); Fri, 17 May 2019 02:00:53 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hRVvE-0007sM-0Z; Fri, 17 May 2019 14:00:48 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hRVvD-0000Z1-SS; Fri, 17 May 2019 14:00:47 +0800 Date: Fri, 17 May 2019 14:00:47 +0800 From: Herbert Xu To: Daniel Axtens Cc: mpe@ellerman.id.au, ebiggers@kernel.org, linux-crypto@vger.kernel.org, marcelo.cerri@canonical.com, Stephan Mueller , leo.barbosa@canonical.com, linuxppc-dev@lists.ozlabs.org, nayna@linux.ibm.com, pfsmorigo@gmail.com, leitao@debian.org, gcwilson@linux.ibm.com, omosnacek@gmail.com Subject: Re: [PATCH] crypto: vmx - ghash: do nosimd fallback manually Message-ID: <20190517060047.jelbwbn66qdoshwu@gondor.apana.org.au> References: <20190516154002.26246-1-dja@axtens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190516154002.26246-1-dja@axtens.net> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, May 17, 2019 at 01:40:02AM +1000, Daniel Axtens wrote: > VMX ghash was using a fallback that did not support interleaving simd > and nosimd operations, leading to failures in the extended test suite. > > If I understood correctly, Eric's suggestion was to use the same > data format that the generic code uses, allowing us to call into it > with the same contexts. I wasn't able to get that to work - I think > there's a very different key structure and data layout being used. > > So instead steal the arm64 approach and perform the fallback > operations directly if required. > > Reported-by: Eric Biggers > Signed-off-by: Daniel Axtens > > --- > > Tested on BE and LE in qemu-tcg, so more testing would be lovely. > --- > drivers/crypto/vmx/ghash.c | 211 +++++++++++++++---------------------- > 1 file changed, 86 insertions(+), 125 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt 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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_NEOMUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92F9DC04AB4 for ; Fri, 17 May 2019 06:02:17 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E03F2083E for ; Fri, 17 May 2019 06:02:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E03F2083E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 454yP24vCDzDqTh for ; Fri, 17 May 2019 16:02:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gondor.apana.org.au (client-ip=128.1.224.119; helo=deadmen.hmeau.com; envelope-from=herbert@gondor.apana.org.au; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Received: from deadmen.hmeau.com (unknown [128.1.224.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 454yMb50NYzDqR6 for ; Fri, 17 May 2019 16:00:59 +1000 (AEST) Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hRVvE-0007sM-0Z; Fri, 17 May 2019 14:00:48 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hRVvD-0000Z1-SS; Fri, 17 May 2019 14:00:47 +0800 Date: Fri, 17 May 2019 14:00:47 +0800 From: Herbert Xu To: Daniel Axtens Subject: Re: [PATCH] crypto: vmx - ghash: do nosimd fallback manually Message-ID: <20190517060047.jelbwbn66qdoshwu@gondor.apana.org.au> References: <20190516154002.26246-1-dja@axtens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190516154002.26246-1-dja@axtens.net> User-Agent: NeoMutt/20170113 (1.7.2) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leo.barbosa@canonical.com, Stephan Mueller , nayna@linux.ibm.com, omosnacek@gmail.com, ebiggers@kernel.org, leitao@debian.org, pfsmorigo@gmail.com, linux-crypto@vger.kernel.org, marcelo.cerri@canonical.com, gcwilson@linux.ibm.com, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, May 17, 2019 at 01:40:02AM +1000, Daniel Axtens wrote: > VMX ghash was using a fallback that did not support interleaving simd > and nosimd operations, leading to failures in the extended test suite. > > If I understood correctly, Eric's suggestion was to use the same > data format that the generic code uses, allowing us to call into it > with the same contexts. I wasn't able to get that to work - I think > there's a very different key structure and data layout being used. > > So instead steal the arm64 approach and perform the fallback > operations directly if required. > > Reported-by: Eric Biggers > Signed-off-by: Daniel Axtens > > --- > > Tested on BE and LE in qemu-tcg, so more testing would be lovely. > --- > drivers/crypto/vmx/ghash.c | 211 +++++++++++++++---------------------- > 1 file changed, 86 insertions(+), 125 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt