linux-next: build failure after merge of the random tree
From: Stephen Rothwell
Date: Sun Oct 23 2022 - 22:23:39 EST
Hi all,
After merging the random tree, today's linux-next build (x86_64
allmodconfig) failed like this:
arch/x86/mm/cpu_entry_area.c: In function 'init_cea_offsets':
arch/x86/mm/cpu_entry_area.c:38:23: error: implicit declaration of function 'prandom_u32_max'; did you mean 'prandom_u32_state'? [-Werror=implicit-function-declaration]
38 | cea = prandom_u32_max(max_cea);
| ^~~~~~~~~~~~~~~
| prandom_u32_state
cc1: all warnings being treated as errors
Caused by commit
921b09c09fe7 ("prandom: remove prandom_u32_max()")
interacting with commit
1248fb6a8201 ("x86/mm: Randomize per-cpu entry area")
from the tip tree.
I have applied the following fix up patch for today.
From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Mon, 24 Oct 2022 12:37:28 +1100
Subject: [PATCH] fix up for "prandom: remove prandom_u32_max()"
Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
arch/x86/mm/cpu_entry_area.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c
index ad1f750517a1..7a1b63fb80d3 100644
--- a/arch/x86/mm/cpu_entry_area.c
+++ b/arch/x86/mm/cpu_entry_area.c
@@ -35,7 +35,7 @@ static __init void init_cea_offsets(void)
unsigned int cea;
again:
- cea = prandom_u32_max(max_cea);
+ cea = get_random_u32_below(max_cea);
/* Make sure that no previous CPU shares the offset: */
for_each_possible_cpu(j) {
--
2.34.1
--
Cheers,
Stephen Rothwell
Attachment:
pgp_qsI16FFy4.pgp
Description: OpenPGP digital signature