1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:47:37 +00:00

Kernel: Harvest randomness from various drivers

Random now gets entropy from the following drivers:
- KeyboardDevice
- PATAChannel
- PS2MouseDevice
- E1000NetworkAdapter
- RTL8139NetworkAdapter

Of these devices,  PS2MouseDevice and PATAChannel provide the vast
majority of the entropy.
This commit is contained in:
Peter Elliott 2020-06-24 14:07:28 -06:00 committed by Andreas Kling
parent 2e8cfe5435
commit af0b2d1d86
12 changed files with 71 additions and 7 deletions

View file

@ -27,10 +27,11 @@
#pragma once
#include <AK/OwnPtr.h>
#include <Kernel/IO.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/PCI/Device.h>
#include <Kernel/IO.h>
#include <Kernel/Random.h>
namespace Kernel {
@ -73,5 +74,6 @@ private:
u8 m_tx_next_buffer { 0 };
OwnPtr<Region> m_packet_buffer;
bool m_link_up { false };
EntropySource m_entropy_source;
};
}