Linux cryptographic layer development
 help / color / mirror / Atom feed
* adiantum testmgr tests not running?
@ 2019-12-12 15:33 Jason A. Donenfeld
  2019-12-12 17:21 ` Eric Biggers
  0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2019-12-12 15:33 UTC (permalink / raw)
  To: Linux Crypto Mailing List, Eric Biggers; +Cc: Ard Biesheuvel

Hey Eric,

I had to do this ugly hack to get the adiantum testmgr tests running.
Did you wind up doing the same when developing it, or was there some
other mechanism that invoked this naturally? I see all the other
primitives running, but not adiantum.

Jason

diff --git a/crypto/chacha_generic.c b/crypto/chacha_generic.c
index 8beea79ab117..f446b19429e9 100644
--- a/crypto/chacha_generic.c
+++ b/crypto/chacha_generic.c
@@ -117,7 +117,9 @@ static struct skcipher_alg algs[] = {

 static int __init chacha_generic_mod_init(void)
 {
- return crypto_register_skciphers(algs, ARRAY_SIZE(algs));
+ int ret = crypto_register_skciphers(algs, ARRAY_SIZE(algs));
+ BUG_ON(alg_test("adiantum(xchacha20,aes)", "adiantum", 0, 0));
+ return ret;
 }

 static void __exit chacha_generic_mod_fini(void)
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 82513b6b0abd..7de24e431c5e 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -5328,7 +5328,7 @@ int alg_test(const char *driver, const char
*alg, u32 type, u32 mask)
        driver, alg, fips_enabled ? "fips" : "panic_on_fail");
  }

- if (fips_enabled && !rc)
+ if (!rc)
  pr_info("alg: self-tests for %s (%s) passed\n", driver, alg);

  return rc;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-12 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-12 15:33 adiantum testmgr tests not running? Jason A. Donenfeld
2019-12-12 17:21 ` Eric Biggers
2019-12-12 17:28   ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox