Skip to content

generic: crypto: fix jitterentropy initialization failed issue - #18399

Closed
DragonBluep wants to merge 1 commit into
openwrt:mainfrom
DragonBluep:jitterentropy
Closed

DragonBluep wants to merge 1 commit into
openwrt:mainfrom
DragonBluep:jitterentropy

Conversation

@DragonBluep

@DragonBluep DragonBluep commented Apr 2, 2025 •

Copy link
Copy Markdown
Contributor

Sync jitterentropy source code with linux-6.12 to solve the issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use permanent health test storage"), when FIPS crypto is disabled, the health test results are always explicitly skipped. That means it will never return error code 9 (health test failed) again.

Fixes: #16684

@github-actions github-actions Bot added the kernel pull request/issue with Linux kernel related changes label Apr 2, 2025
@hauke

hauke commented Apr 2, 2025

Copy link
Copy Markdown
Member

Does this have any impact on the boot time?
With some older versions I saw that the kernel was busy generating random data for a pretty long time at bootup.

@namiltd

namiltd commented Apr 2, 2025 •

Copy link
Copy Markdown
Contributor

The patch also requires adding the following line to target/linux/generic/config-6.6:
CONFIG_CRYPTO_JITTERENTROPY_OSR=3

Backported to version 24.10.0 and tested on ramips/mt7620/TP-Link Archer C5 v4.
Unfortunately, the error lines are still displayed:

[   15.654108] jitterentropy: Initialization failed with host not compliant with requirements: 9
[   19.110071] jitterentropy: Initialization failed with host not compliant with requirements: 9
[   20.025547] kmodloader: 1 module could not be probed
[   20.030958] kmodloader: - jitterentropy_rng - 0

@DragonBluep

Copy link
Copy Markdown
Contributor Author

Does this have any impact on the boot time?

No. It's negligible. I didn't catch significant differences on target ramips/mt7621.

With some older versions I saw that the kernel was busy generating random data for a pretty long time at bootup.

It seems that urngd module can not initialize under a dynamic clock frequency scaling environment. I noticed this issue on ramips/mt7620, and this patch helps to solve the issue.

@DragonBluep

DragonBluep commented Apr 3, 2025 •

Copy link
Copy Markdown
Contributor Author

I've done some reboot tests on ramips/mt7621 target. And this patch solved the issue for my ASUS RT-AC1200GU. With this patch, the jitterentropy initialization success rate has increased from 62.5% to 100%. (based on 48 reboot tests, 24 for each)

@Djfe Maybe you are interested in testing it. I saw your report on #16684 (comment).

@namiltd Please test it again. If you are using MT7620, pull this patch, too.

@namiltd

namiltd commented Apr 3, 2025 •

Copy link
Copy Markdown
Contributor

After recompiling with the current PR version and adding patch, the error messages disappeared.

root@OpenWrt:~# lsmod | grep jitt
jitterentropy_rng      16384  0
rng                    12288  3 jitterentropy_rng,drbg,geniv

Please integrate patch or x-wrt@1266739 with this PR and to add CONFIG_CRYPTO_JITTERENTROPY_OSR=3 to target/linux/generic/config-6.6

@namiltd namiltd mentioned this pull request Apr 3, 2025
1 task done
@DragonBluep

Copy link
Copy Markdown
Contributor Author

After recompiling with the current PR version and adding patch, the error messages disappeared.

root@OpenWrt:~# lsmod | grep jitt
jitterentropy_rng      16384  0
rng                    12288  3 jitterentropy_rng,drbg,geniv

Please integrate patch or x-wrt@1266739 with this PR

This should be another thread. It has already been sent to the OpenWrt mailing list. And I don't really like this patch because it doesn't have theoretical support, it's just based on my assumptions.

and to add CONFIG_CRYPTO_JITTERENTROPY_OSR=3 to target/linux/generic/config-6.6

Negative. It's not a configurable symbol, unless we enable CRYPTO_FIPS. details: torvalds/linux@e7ed647

Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
@DragonBluep DragonBluep changed the title [RFT] generic: crypto: increase default jitter oversampling rate to 3 generic: crypto: fix jitterentropy initialization failed issue Apr 3, 2025
@DragonBluep

Copy link
Copy Markdown
Contributor Author

This PR is ready now.

In backported commit gregkh/linux@cf27d94, jent_health_failure() will always return 0 because CRYPTO_FIPS is disabled by OpenWrt. Hence the jent_entropy_init() function will never return JENT_EHEALTH(error code 9) again.

@ptpt52

ptpt52 commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

I gona test the PR.

robimarko pushed a commit to DragonBluep/openwrt that referenced this pull request Apr 9, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
@robimarko

Copy link
Copy Markdown
Contributor

Thanks! Rebased on top of main and merged!

@robimarko robimarko closed this Apr 9, 2025
@Djfe

Djfe commented Apr 9, 2025

Copy link
Copy Markdown
Contributor

ups, I meant to post this here
#16684 (comment)

coolsnowwolf pushed a commit to coolsnowwolf/lede that referenced this pull request Apr 10, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
@lorand-horvath

Copy link
Copy Markdown

@DragonBluep Is there a backport to 24.10 for this?

ZT229 pushed a commit to ZT229/Xiaomi_AX1800 that referenced this pull request Apr 11, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
TheRootED24 pushed a commit to TheRootED24/openwrt that referenced this pull request Apr 11, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
467815891a pushed a commit to 467815891a/lede that referenced this pull request Apr 13, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Apr 18, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
rkboni pushed a commit to rkboni/openwrt that referenced this pull request Apr 30, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
DragonBluep added a commit to DragonBluep/openwrt that referenced this pull request May 17, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
(cherry picked from commit eec11fb)
robimarko pushed a commit to DragonBluep/openwrt that referenced this pull request May 18, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#18399
(cherry picked from commit eec11fb)
Link: openwrt#18822
Signed-off-by: Robert Marko <[email protected]>
gigibox pushed a commit to liudf0716/chawrt that referenced this pull request May 23, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
(cherry picked from commit eec11fb)
Link: openwrt/openwrt#18822
Signed-off-by: Robert Marko <[email protected]>
(cherry picked from commit a53d175)
lunatickochiya pushed a commit to lunatickochiya/openwrt-ipq-mod that referenced this pull request May 25, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
(cherry picked from commit eec11fb)
Link: openwrt/openwrt#18822
Signed-off-by: Robert Marko <[email protected]>
lunatickochiya pushed a commit to lunatickochiya/openwrt-ipq-mod that referenced this pull request May 25, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
(cherry picked from commit eec11fb)
Link: openwrt/openwrt#18822
Signed-off-by: Robert Marko <[email protected]>
talexbikes pushed a commit to talexbikes/openwrt that referenced this pull request May 25, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
lunatickochiya pushed a commit to lunatickochiya/openwrt-ipq-mod that referenced this pull request Jul 14, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
(cherry picked from commit eec11fb)
Link: openwrt/openwrt#18822
Signed-off-by: Robert Marko <[email protected]>
indraAsLesmana pushed a commit to indraAsLesmana/openwrt that referenced this pull request Sep 13, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
(cherry picked from commit eec11fbbb6eb70cfcae27ac6c055d2c1bd5d20d9)
Link: openwrt/openwrt#18822
Signed-off-by: Robert Marko <[email protected]>
indraAsLesmana pushed a commit to indraAsLesmana/openwrt that referenced this pull request Sep 23, 2025
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
(cherry picked from commit eec11fbbb6eb70cfcae27ac6c055d2c1bd5d20d9)
Link: openwrt/openwrt#18822
Signed-off-by: Robert Marko <[email protected]>
AaronElijah pushed a commit to botblox/openwrt that referenced this pull request Mar 3, 2026
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#18399
(cherry picked from commit eec11fb)
Link: openwrt#18822
Signed-off-by: Robert Marko <[email protected]>
LuisMitaHL pushed a commit to LuisMitaHL/LooperWrt that referenced this pull request Sep 21, 2026
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
Quarx2k pushed a commit to Quarx2k/OpenWRT-BE7000 that referenced this pull request Sep 22, 2026
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: openwrt/openwrt#16684
Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#18399
Signed-off-by: Robert Marko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel pull request/issue with Linux kernel related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kmodloader: jitterentropy_rng

7 participants