public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Eric Biggers via ltp <ltp@lists.linux.it>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: lkp@intel.com, "Horia Geantă" <horia.geanta@nxp.com>,
	"Russell King (Oracle)" <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	"kernel test robot" <oliver.sang@intel.com>,
	linux-crypto@vger.kernel.org, oe-lkp@lists.linux.dev,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	ltp@lists.linux.it
Subject: Re: [LTP] [v3 PATCH 3/3] crypto: simd - Do not call crypto_alloc_tfm during registration
Date: Tue, 27 Aug 2024 11:48:39 -0700	[thread overview]
Message-ID: <20240827184839.GD2049@sol.localdomain> (raw)
In-Reply-To: <ZsBKG0la0m69Dyq3@gondor.apana.org.au>

On Sat, Aug 17, 2024 at 02:58:35PM +0800, Herbert Xu wrote:
> Algorithm registration is usually carried out during module init,
> where as little work as possible should be carried out.  The SIMD
> code violated this rule by allocating a tfm, this then triggers a
> full test of the algorithm which may dead-lock in certain cases.
> 
> SIMD is only allocating the tfm to get at the alg object, which is
> in fact already available as it is what we are registering.  Use
> that directly and remove the crypto_alloc_tfm call.
> 
> Also remove some obsolete and unused SIMD API.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> ---
>  arch/arm/crypto/aes-ce-glue.c     |  2 +-
>  arch/arm/crypto/aes-neonbs-glue.c |  2 +-
>  crypto/simd.c                     | 76 ++++++-------------------------
>  include/crypto/internal/simd.h    | 12 +----
>  4 files changed, 19 insertions(+), 73 deletions(-)
> 

I'm getting a test failure with this series applied:

[    0.383128] alg: aead: failed to allocate transform for gcm_base(ctr(aes-generic),ghash-generic): -2
[    0.383500] alg: self-tests for gcm(aes) using gcm_base(ctr(aes-generic),ghash-generic) failed (rc=-2)

This is on x86_64 with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y.

- Eric

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-08-27 18:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ZrbTUk6DyktnO7qk@gondor.apana.org.au>
2024-08-16  8:45 ` [LTP] [PATCH 1/3] crypto: api - Remove instance larval fulfilment kernel test robot
2024-08-17  6:56   ` [LTP] [v3 PATCH " Herbert Xu via ltp
2024-08-17  6:57     ` [LTP] [v3 PATCH 2/3] crypto: api - Do not wait for tests during registration Herbert Xu via ltp
2024-08-17  6:58       ` [LTP] [v3 PATCH 3/3] crypto: simd - Do not call crypto_alloc_tfm " Herbert Xu via ltp
2024-08-27 18:48         ` Eric Biggers via ltp [this message]
2024-08-28  2:59           ` Herbert Xu via ltp
2024-08-30 17:51             ` Eric Biggers via ltp
2024-09-01  8:05               ` [LTP] [PATCH] crypto: api - Fix generic algorithm self-test races Herbert Xu via ltp
2024-09-02 17:05                 ` Eric Biggers via ltp
     [not found]                   ` <ZtZFOgh3WylktM1E@gondor.apana.org.au>
2024-10-05 22:24                     ` Eric Biggers via ltp
2024-10-06  0:53                       ` Herbert Xu via ltp
2024-10-06  3:06                         ` Eric Biggers via ltp
2024-10-07  4:32                           ` Herbert Xu via ltp
2024-10-07  7:58                             ` Herbert Xu via ltp
2024-10-07  8:31                             ` Herbert Xu via ltp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240827184839.GD2049@sol.localdomain \
    --to=ltp@lists.linux.it \
    --cc=ardb@kernel.org \
    --cc=davem@davemloft.net \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox