From b3472cb4a7083f3a487e0fd9c0455bfcf275fc60 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sat, 25 Jul 2020 06:05:14 +0200 Subject: [PATCH] Kernel: Allow process creation during low-entropy condition Fixes #2871. Ignoring the 'securely generated bytes' constraint seems to be fine for Linux, so it's probably fine for Serenity. Note that there *might* be more bottlenecks down the road if Serenity is started in a non-GUI way. Currently though, loading the GUI seems to generate enough interrupts to seed the entropy pool, even on my non-RDRAND setup. Yay! :^) --- Kernel/Process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index a051e8145b..8bca1bce5c 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -1118,7 +1118,7 @@ Vector Process::generate_auxiliary_vector() const auxv.append({ AuxiliaryValue::Secure, ((m_uid != m_euid) || (m_gid != m_egid)) ? 1 : 0 }); char random_bytes[16] {}; - get_good_random_bytes((u8*)random_bytes, sizeof(random_bytes)); + get_fast_random_bytes((u8*)random_bytes, sizeof(random_bytes)); auxv.append({ AuxiliaryValue::Random, String(random_bytes, sizeof(random_bytes)) });