From: Stephan Mueller <smueller@chronox.de>
To: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
Jeff Barnes <jeffbarnes@microsoft.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Vladis Dronov <vdronov@redhat.com>,
"marcelo.cerri@canonical.com" <marcelo.cerri@canonical.com>,
Tyler Hicks <Tyler.Hicks@microsoft.com>,
Shyam Saini <shyamsaini@microsoft.com>
Subject: Re: Intermittent EHEALTH Failure in FIPS Mode - jitterentropy jent_entropy_init() in Kernel 6.6.14
Date: Wed, 07 Aug 2024 15:21:04 +0200 [thread overview]
Message-ID: <2143341.7H5Lhh2ooS@tauon.atsec.com> (raw)
In-Reply-To: <DM4PR21MB360932816FA7B848D7D8F7B0C7B82@DM4PR21MB3609.namprd21.prod.outlook.com>
Am Mittwoch, 7. August 2024, 14:50:32 MESZ schrieb Jeff Barnes:
Hi Jeff,
> Hello,
>
> We are currently migrating to kernel 6.6.14 and encountering intermittent
> EHEALTH errors that cause a kernel panic in initrd (FIPS mode). The error
> occurs in the following section of the code:
>
> crypto/jitterentropy.c
> 722 /* Validate health test result */
> 723 if (jent_health_failure(&ec))
> 724 return JENT_EHEALTH;
>
> This is called from jent_mod_init():
>
> 337 ret = jent_entropy_init(desc);
> 338 shash_desc_zero(desc);
> 339 crypto_free_shash(tfm);
> 340 if (ret) {
> 341 /* Handle permanent health test error */
> 342 if (fips_enabled)
> 343 panic("jitterentropy: Initialization failed with
> host not compliant with requirements: %d\n", ret);
>
> We are experiencing up to a 90% failure rate.
>
> In my troubleshooting efforts, I followed the call to jent_condition_data()
> and attempted to increase the SHA3_HASH_LOOP to give the CPU more work,
> hoping to collect more entropy:
The proper way to handle it is the following: set
CONFIG_CRYPTO_JITTERENTROPY_OSR to a higer value as it is - like 3 (the
default is 1). The higher you set it the slower the collection will get as
more samples are collected.
>
> 356
> -#define SHA3_HASH_LOOP (1<<3)
> +#define SHA3_HASH_LOOP (1<<4)
>
> This adjustment reduced the failure rate to 40-50%, but the issue persists.
> It is intermittent. It is also intermittent without the change. Sometimes I
> get a 90% failure rate on 10 reboots, sometimes 0%.
>
> Given the difficulty in reproducing the kernel panic consistently, is there
> a more effective workaround or solution for this problem?
>
> Your assistance is greatly appreciated.
>
> Best regards,
> Jeff Barnes
Ciao
Stephan
next parent reply other threads:[~2024-08-07 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DM4PR21MB360932816FA7B848D7D8F7B0C7B82@DM4PR21MB3609.namprd21.prod.outlook.com>
2024-08-07 13:21 ` Stephan Mueller [this message]
2024-08-08 5:17 ` Intermittent EHEALTH Failure in FIPS Mode - jitterentropy jent_entropy_init() in Kernel 6.6.14 Herbert Xu
2024-08-08 5:56 ` Stephan Mueller
2024-08-08 6:10 ` Herbert Xu
2024-08-08 6:13 ` Stephan Mueller
2024-08-08 6:20 ` Herbert Xu
2024-08-08 14:08 ` [EXTERNAL] " Jeff Barnes
2024-08-12 6:25 ` [PATCH] crypto: JENT - set default OSR to 3 Stephan Mueller
2024-08-24 13:48 ` Herbert Xu
2024-08-07 13:07 Intermittent EHEALTH Failure in FIPS Mode - jitterentropy jent_entropy_init() in Kernel 6.6.14 Jeff Barnes
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=2143341.7H5Lhh2ooS@tauon.atsec.com \
--to=smueller@chronox.de \
--cc=Tyler.Hicks@microsoft.com \
--cc=herbert@gondor.apana.org.au \
--cc=jeffbarnes@microsoft.com \
--cc=linux-crypto@vger.kernel.org \
--cc=marcelo.cerri@canonical.com \
--cc=shyamsaini@microsoft.com \
--cc=vdronov@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.