mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
Kernel: Make Random work on CPUs without rdrand
- If rdseed is not available, fallback to rdrand. - If rdrand is not available, block for entropy, or use insecure prng depending on if user wants fast or good random.
This commit is contained in:
parent
1eb338ab71
commit
e1aef94a40
Notes:
sideshowbarker
2024-07-19 05:21:11 +09:00
Author: https://github.com/petelliott
Commit: e1aef94a40
Pull-request: https://github.com/SerenityOS/serenity/pull/2646
Issue: https://github.com/SerenityOS/serenity/issues/2634
Reviewed-by: https://github.com/awesomekling
4 changed files with 71 additions and 12 deletions
|
@ -131,7 +131,7 @@ extern "C" [[noreturn]] void init()
|
|||
|
||||
klog() << "Starting SerenityOS...";
|
||||
|
||||
__stack_chk_guard = get_good_random<u32>();
|
||||
__stack_chk_guard = get_fast_random<u32>();
|
||||
|
||||
TimeManagement::initialize();
|
||||
|
||||
|
@ -169,7 +169,7 @@ extern "C" [[noreturn]] void init()
|
|||
extern "C" [[noreturn]] void init_ap(u32 cpu)
|
||||
{
|
||||
APIC::the().enable(cpu);
|
||||
|
||||
|
||||
#if 0
|
||||
Scheduler::idle_loop();
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue