[RFC 3/3] random: disable interrupt random source

From: Johannes Berg

Date: Thu Nov 19 2026 - 08:24:14 EST


From: Benjamin Berg <benjamin.berg@xxxxxxxxx>

Interrupts in our UML environment are signals, which can be delivered at
somewhat random times depending on host scheduling. Disable these as a
source to make the random reproducible between runs.

Signed-off-by: Benjamin Berg <benjamin.berg@xxxxxxxxx>
Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
drivers/char/random.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 64d0cfc99ac4..be9f744f3e72 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1104,6 +1104,9 @@ void add_interrupt_randomness(int irq)
struct pt_regs *regs = get_irq_regs();
unsigned int new_count;

+ /* UML seems to not always get the signals entirely at the same time */
+ return;
+
fast_mix(fast_pool->pool, entropy,
(regs ? instruction_pointer(regs) : _RET_IP_) ^ swab(irq));
new_count = ++fast_pool->count;
--
2.56.1