From: Magali Lemes <magali.lemes@canonical.com>
To: davem@davemloft.net, dsahern@gmail.com, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org,
tianjia.zhang@linux.alibaba.com, vfedorenko@novek.ru
Cc: andrei.gherzan@canonical.com, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH net v2 0/3] Check if FIPS mode is enabled when running selftests
Date: Fri, 9 Jun 2023 13:43:21 -0300 [thread overview]
Message-ID: <20230609164324.497813-1-magali.lemes@canonical.com> (raw)
Some test cases from net/tls, net/fcnal-test and net/vrf-xfrm-tests
that rely on cryptographic functions to work and use non-compliant FIPS
algorithms fail in FIPS mode.
In order to allow these tests to pass in a wider set of kernels,
- for net/tls, skip the test variants that use the ChaCha20-Poly1305
and SM4 algorithms, when FIPS mode is enabled;
- for net/fcnal-test, skip the MD5 tests, when FIPS mode is enabled;
- for net/vrf-xfrm-tests, replace the algorithms that are not
FIPS-compliant with compliant ones.
Changes in v2:
- Add R-b tags.
- Put fips_non_compliant into the variants.
- Turn fips_enabled into a static global variable.
- Read /proc/sys/crypto/fips_enabled only once at main().
v1: https://lore.kernel.org/netdev/20230607174302.19542-1-magali.lemes@canonical.com/
Magali Lemes (3):
selftests: net: tls: check if FIPS mode is enabled
selftests: net: vrf-xfrm-tests: change authentication and encryption
algos
selftests: net: fcnal-test: check if FIPS mode is enabled
tools/testing/selftests/net/fcnal-test.sh | 27 ++-
tools/testing/selftests/net/tls.c | 175 +++++++++++++++++-
tools/testing/selftests/net/vrf-xfrm-tests.sh | 32 ++--
3 files changed, 209 insertions(+), 25 deletions(-)
--
2.34.1
next reply other threads:[~2023-06-09 16:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 16:43 Magali Lemes [this message]
2023-06-09 16:43 ` [PATCH net v2 1/3] selftests: net: tls: check if FIPS mode is enabled Magali Lemes
2023-06-09 17:53 ` Jakub Kicinski
2023-06-09 18:52 ` Magali Lemes do Sacramento
2023-06-09 19:21 ` Jakub Kicinski
2023-06-09 20:15 ` Magali Lemes do Sacramento
2023-06-09 21:08 ` Jakub Kicinski
2023-06-09 16:43 ` [PATCH net v2 2/3] selftests: net: vrf-xfrm-tests: change authentication and encryption algos Magali Lemes
2023-06-09 16:43 ` [PATCH net v2 3/3] selftests: net: fcnal-test: check if FIPS mode is enabled Magali Lemes
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=20230609164324.497813-1-magali.lemes@canonical.com \
--to=magali.lemes@canonical.com \
--cc=andrei.gherzan@canonical.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=tianjia.zhang@linux.alibaba.com \
--cc=vfedorenko@novek.ru \
/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;
as well as URLs for NNTP newsgroup(s).