From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>,
ltp@lists.linux.it, Petr Cervinka <pcervinka@suse.com>,
Eric Biggers <ebiggers@google.com>
Subject: Re: [LTP] [PATCH v2 1/1] tst_af_alg: Another fix for disabled weak cipher
Date: Wed, 22 Dec 2021 15:45:29 +0100 [thread overview]
Message-ID: <YcM6CZnV5v/UpvI6@pevik> (raw)
In-Reply-To: <YcHChO+A8Cc8ZDqv@pevik>
Hi Cyril,
...
> > > if (!tst_have_alg("hash", hash_algname)) {
> > > - tst_res(TCONF, "kernel doesn't have hash algorithm '%s'",
> > > - hash_algname);
> > > + if (errno != ELIBBAD)
> > > + tst_res(TCONF, "kernel doesn't have hash algorithm '%s'",
> > > + hash_algname);
> > What about moving the tst_res(TCONF, ...) in the case of ENOENT to the
> > tst_have_alg() function?
> > That way we would have here just
> > if (!tst_have_alg("hash", hash_algname))
> > return;
> Hm, if I haven't overlook anything, it could work even for af_alg04.c,
> which uses it !tst_have_alg() once without TCONF:
> 28 sprintf(vmac_algname, "vmac64(%s)", symm_enc_algname);
> 29 if (!tst_have_alg("hash", vmac_algname)) {
> 30 sprintf(vmac_algname, "vmac(%s)", symm_enc_algname);
> Moved to tst_have_alg():
> tst_fips.c:22: TINFO: FIPS: on
> tst_af_alg.c:90: TCONF: FIPS enabled => hash algorithm 'vmac64(aes)' disabled
> tst_af_alg.c:94: TCONF: kernel doesn't have hash algorithm 'vmac(aes)'
> tst_af_alg.c:94: TCONF: kernel doesn't have hash algorithm 'vmac64(sm4)'
> tst_af_alg.c:94: TCONF: kernel doesn't have hash algorithm 'vmac(sm4)'
> tst_af_alg.c:94: TCONF: kernel doesn't have hash algorithm 'vmac64(sm4-generic)'
> tst_af_alg.c:94: TCONF: kernel doesn't have hash algorithm 'vmac(sm4-generic)'
> => I'll send v3.
OK, this would not work for af_alg03.c, where false positive TCONF would be
printed:
tst_test.c:1426: TINFO: Timeout per run is 0h 05m 00s
tst_af_alg.c:81: TCONF: kernel doesn't have aead algorithm 'rfc7539(chacha20,sha256)'
af_alg03.c:24: TPASS: couldn't instantiate rfc7539 template with wrong digest size
Kind regards,
Petr
> Kind regards,
> Petr
> > Other than these two minor things this version does look good:
> > Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
> > > return;
> > > }
> > > sprintf(hmac_algname, "hmac(%s)", hash_algname);
> > > --
> > > 2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2021-12-22 14:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 21:27 [LTP] [PATCH v2 1/1] tst_af_alg: Another fix for disabled weak cipher Petr Vorel
2021-12-21 11:11 ` Cyril Hrubis
2021-12-21 12:03 ` Petr Vorel
2021-12-22 14:45 ` Petr Vorel [this message]
2021-12-22 16:01 ` Cyril Hrubis
2021-12-22 16:49 ` Petr Vorel
2021-12-22 15:31 ` Eric Biggers
2021-12-22 17:01 ` Petr Vorel
2021-12-22 17:58 ` Eric Biggers
2021-12-22 19:01 ` Petr Vorel
2022-01-04 11:54 ` Petr Vorel
2022-01-11 5:29 ` Herbert Xu
2022-01-11 6:44 ` Petr Vorel
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=YcM6CZnV5v/UpvI6@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=ebiggers@google.com \
--cc=ltp@lists.linux.it \
--cc=pcervinka@suse.com \
/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