* [PATCH] lib: random: make srand_xor a no-op in PBL
@ 2025-04-29 7:56 Ahmad Fatoum
2025-04-29 14:57 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-04-29 7:56 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
We are going to add srand_xor calls at more places in future, so do not
trigger a BUG() for it on use in PBL. There is still a BUG() call in
random32 and friends, so use of unseeded PRNG won't get unnoticed.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
This replaces
https://lore.barebox.org/barebox/174555956247.545067.10905121643082274040.b4-ty@pengutronix.de/T/#t
But there is no breakage if both are applied at the same time.
---
include/stdlib.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/include/stdlib.h b/include/stdlib.h
index f0f7cfd2ed28..18f58abad988 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -21,10 +21,7 @@ static inline void randbuf_r(u64 *x, void *buf, size_t len)
{
BUG();
}
-static inline void srand_xor(u64 entropy)
-{
- BUG();
-}
+static inline void srand_xor(u64 entropy) { }
static inline u32 random32(void)
{
BUG();
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-29 15:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-29 7:56 [PATCH] lib: random: make srand_xor a no-op in PBL Ahmad Fatoum
2025-04-29 14:57 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox