mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-15 18:03:30 +00:00

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: https://github.com/openwrt/openwrt/issues/16684 Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Link: https://github.com/openwrt/openwrt/pull/18399 Signed-off-by: Robert Marko <robimarko@gmail.com>
31 lines
950 B
Diff
31 lines
950 B
Diff
From 6e61ee1ca551292d8714c35c92a019c41db79e4e Mon Sep 17 00:00:00 2001
|
|
From: Thorsten Blum <thorsten.blum@toblux.com>
|
|
Date: Wed, 27 Mar 2024 23:25:09 +0100
|
|
Subject: [PATCH] crypto: jitter - Use kvfree_sensitive() to fix Coccinelle
|
|
warning
|
|
|
|
Replace memzero_explicit() and kvfree() with kvfree_sensitive() to fix
|
|
the following Coccinelle/coccicheck warning reported by
|
|
kfree_sensitive.cocci:
|
|
|
|
WARNING opportunity for kfree_sensitive/kvfree_sensitive
|
|
|
|
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
|
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
|
---
|
|
crypto/jitterentropy-kcapi.c | 3 +--
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
--- a/crypto/jitterentropy-kcapi.c
|
|
+++ b/crypto/jitterentropy-kcapi.c
|
|
@@ -61,8 +61,7 @@ void *jent_kvzalloc(unsigned int len)
|
|
|
|
void jent_kvzfree(void *ptr, unsigned int len)
|
|
{
|
|
- memzero_explicit(ptr, len);
|
|
- kvfree(ptr);
|
|
+ kvfree_sensitive(ptr, len);
|
|
}
|
|
|
|
void *jent_zalloc(unsigned int len)
|