Kernel: Move Random.{h,cpp} code to Security subdirectory

This commit is contained in:
Liav A 2023-02-24 19:49:37 +02:00 committed by Jelle Raaijmakers
parent 1b04726c85
commit 490856453d
Notes: sideshowbarker 2024-07-17 23:07:41 +09:00
36 changed files with 35 additions and 35 deletions

View File

@ -12,8 +12,8 @@
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Prekernel/Prekernel.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Thread.h>

View File

@ -14,7 +14,7 @@
#include <Kernel/Arch/aarch64/CPU.h>
#include <Kernel/Arch/aarch64/CPUID.h>
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Tasks/Thread.h>

View File

@ -43,8 +43,8 @@
#include <Kernel/Net/NetworkingManagement.h>
#include <Kernel/Panic.h>
#include <Kernel/Prekernel/Prekernel.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
#include <Kernel/TTY/ConsoleManagement.h>
#include <Kernel/TTY/PTYMultiplexer.h>
#include <Kernel/TTY/VirtualConsole.h>

View File

@ -11,7 +11,7 @@
#include <Kernel/API/KeyCode.h>
#include <Kernel/Arch/x86_64/ISABus/I8042Controller.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -10,7 +10,7 @@
#include <Kernel/API/MousePacket.h>
#include <Kernel/Arch/x86_64/ISABus/I8042Controller.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {
class PS2MouseDevice : public IRQHandler

View File

@ -11,7 +11,7 @@
#include <Kernel/Arch/x86_64/ISABus/HID/PS2MouseDevice.h>
#include <Kernel/Arch/x86_64/ISABus/I8042Controller.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -17,8 +17,8 @@
#include <Kernel/Interrupts/UnhandledInterruptHandler.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Tasks/Thread.h>

View File

@ -11,8 +11,8 @@
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Prekernel/Prekernel.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Thread.h>

View File

@ -14,8 +14,8 @@
#include <Kernel/Arch/x86_64/Interrupts/APIC.h>
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
#include <Kernel/StdLib.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Scheduler.h>

View File

@ -9,7 +9,7 @@
#include <AK/AtomicRefCounted.h>
#include <Kernel/Bus/VirtIO/Device.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel::VirtIO {

View File

@ -260,10 +260,10 @@ set(KERNEL_SOURCES
Net/UDPSocket.cpp
Panic.cpp
PerformanceEventBuffer.cpp
Random.cpp
ScopedCritical.cpp
StdLib.cpp
Syscall.cpp
Security/Random.cpp
Security/Jail.cpp
Syscalls/anon_create.cpp
Syscalls/alarm.cpp

View File

@ -8,8 +8,8 @@
#include <Kernel/Devices/Audio/Management.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Devices/Generic/RandomDevice.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -17,7 +17,7 @@
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -6,8 +6,8 @@
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Devices/Generic/RandomDevice.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -7,7 +7,7 @@
#pragma once
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -14,7 +14,7 @@
#include <Kernel/Devices/HID/Device.h>
#include <Kernel/Devices/HID/ScanCodeEvent.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -13,7 +13,7 @@
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/Devices/HID/Device.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -15,8 +15,8 @@
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {

View File

@ -22,8 +22,8 @@
#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/Memory/ScatterGatherList.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {

View File

@ -28,7 +28,7 @@
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {

View File

@ -14,7 +14,7 @@
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {

View File

@ -11,7 +11,7 @@
#include <Kernel/Graphics/VirtIOGPU/DisplayConnector.h>
#include <Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h>
#include <Kernel/Graphics/VirtIOGPU/Protocol.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -11,7 +11,7 @@
#include <Kernel/Graphics/VirtIOGPU/GPU3DDevice.h>
#include <Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h>
#include <Kernel/Graphics/VirtIOGPU/Protocol.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -13,7 +13,7 @@
#include <Kernel/Memory/InodeVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Scheduler.h>

View File

@ -9,7 +9,7 @@
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/PhysicalRegion.h>
#include <Kernel/Memory/PhysicalZone.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel::Memory {

View File

@ -8,7 +8,7 @@
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/RegionTree.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel::Memory {

View File

@ -13,7 +13,7 @@
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Net/Intel/E1000NetworkAdapter.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -12,7 +12,7 @@
#include <Kernel/IOWindow.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -12,7 +12,7 @@
#include <Kernel/IOWindow.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
namespace Kernel {

View File

@ -17,7 +17,7 @@
#include <Kernel/Net/Routing.h>
#include <Kernel/Net/TCP.h>
#include <Kernel/Net/TCPSocket.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
namespace Kernel {

View File

@ -10,7 +10,7 @@
#include <Kernel/Net/Routing.h>
#include <Kernel/Net/UDP.h>
#include <Kernel/Net/UDPSocket.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
namespace Kernel {

View File

@ -14,8 +14,8 @@
# include <Kernel/Arch/aarch64/ASM_wrapper.h>
#endif
#include <Kernel/Devices/Generic/RandomDevice.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {

View File

@ -17,7 +17,7 @@
#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Time/TimeManagement.h>

View File

@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Random.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/UserOrKernelBuffer.h>

View File

@ -97,7 +97,7 @@ public:
// Encryption, even when decrypting AES-CTR.
// TODO: How to deal with ciphers that take different arguments?
// FIXME: Add back the default intent parameter once clang-11 is the default in GitHub Actions.
// Once added back, remove the parameter where it's constructed in get_random_bytes in Kernel/Random.h.
// Once added back, remove the parameter where it's constructed in get_random_bytes in Kernel/Security/Random.h.
template<typename KeyType, typename... Args>
explicit constexpr CTR(KeyType const& user_key, size_t key_bits, Intent, Args... args)
: Mode<T>(user_key, key_bits, Intent::Encryption, args...)