diff options
author | Liav A <liavalb@gmail.com> | 2023-02-24 19:49:37 +0200 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-06-04 21:32:34 +0200 |
commit | 490856453d9bfcf282c24db3a40c7e18c66bd852 (patch) | |
tree | 3a6e5888a63c871459fb6494a50fe4af55fbdd81 | |
parent | 1b04726c854f59fbd12d1a0eeef0b21d7aa6b832 (diff) | |
download | serenity-490856453d9bfcf282c24db3a40c7e18c66bd852.zip |
Kernel: Move Random.{h,cpp} code to Security subdirectory
36 files changed, 35 insertions, 35 deletions
diff --git a/Kernel/Arch/aarch64/PageDirectory.cpp b/Kernel/Arch/aarch64/PageDirectory.cpp index e0b8bfde99..e27f831ba9 100644 --- a/Kernel/Arch/aarch64/PageDirectory.cpp +++ b/Kernel/Arch/aarch64/PageDirectory.cpp @@ -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> diff --git a/Kernel/Arch/aarch64/Processor.cpp b/Kernel/Arch/aarch64/Processor.cpp index 7f9e4d46a2..b049ac4b9b 100644 --- a/Kernel/Arch/aarch64/Processor.cpp +++ b/Kernel/Arch/aarch64/Processor.cpp @@ -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> diff --git a/Kernel/Arch/init.cpp b/Kernel/Arch/init.cpp index 22d09ae0b4..0cfa86b6db 100644 --- a/Kernel/Arch/init.cpp +++ b/Kernel/Arch/init.cpp @@ -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> diff --git a/Kernel/Arch/x86_64/ISABus/HID/PS2KeyboardDevice.h b/Kernel/Arch/x86_64/ISABus/HID/PS2KeyboardDevice.h index 4c459f49c8..250e7fd48b 100644 --- a/Kernel/Arch/x86_64/ISABus/HID/PS2KeyboardDevice.h +++ b/Kernel/Arch/x86_64/ISABus/HID/PS2KeyboardDevice.h @@ -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 { diff --git a/Kernel/Arch/x86_64/ISABus/HID/PS2MouseDevice.h b/Kernel/Arch/x86_64/ISABus/HID/PS2MouseDevice.h index c77830bd60..d3325dbf1a 100644 --- a/Kernel/Arch/x86_64/ISABus/HID/PS2MouseDevice.h +++ b/Kernel/Arch/x86_64/ISABus/HID/PS2MouseDevice.h @@ -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 diff --git a/Kernel/Arch/x86_64/ISABus/HID/VMWareMouseDevice.h b/Kernel/Arch/x86_64/ISABus/HID/VMWareMouseDevice.h index 34104b447b..65059d33e8 100644 --- a/Kernel/Arch/x86_64/ISABus/HID/VMWareMouseDevice.h +++ b/Kernel/Arch/x86_64/ISABus/HID/VMWareMouseDevice.h @@ -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 { diff --git a/Kernel/Arch/x86_64/Interrupts.cpp b/Kernel/Arch/x86_64/Interrupts.cpp index 1bff3a707d..7dba1a1195 100644 --- a/Kernel/Arch/x86_64/Interrupts.cpp +++ b/Kernel/Arch/x86_64/Interrupts.cpp @@ -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> diff --git a/Kernel/Arch/x86_64/PageDirectory.cpp b/Kernel/Arch/x86_64/PageDirectory.cpp index ff905cfcf6..22b8381f25 100644 --- a/Kernel/Arch/x86_64/PageDirectory.cpp +++ b/Kernel/Arch/x86_64/PageDirectory.cpp @@ -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> diff --git a/Kernel/Arch/x86_64/Processor.cpp b/Kernel/Arch/x86_64/Processor.cpp index 593a7816b2..01feeccfe4 100644 --- a/Kernel/Arch/x86_64/Processor.cpp +++ b/Kernel/Arch/x86_64/Processor.cpp @@ -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> diff --git a/Kernel/Bus/VirtIO/RNG.h b/Kernel/Bus/VirtIO/RNG.h index 0070add908..edf8bc811a 100644 --- a/Kernel/Bus/VirtIO/RNG.h +++ b/Kernel/Bus/VirtIO/RNG.h @@ -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 { diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt index c9c7f470b0..0b1f445aae 100644 --- a/Kernel/CMakeLists.txt +++ b/Kernel/CMakeLists.txt @@ -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 diff --git a/Kernel/Devices/Audio/Channel.cpp b/Kernel/Devices/Audio/Channel.cpp index c76afd4199..d70e08f253 100644 --- a/Kernel/Devices/Audio/Channel.cpp +++ b/Kernel/Devices/Audio/Channel.cpp @@ -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 { diff --git a/Kernel/Devices/Audio/Controller.h b/Kernel/Devices/Audio/Controller.h index dfe39e9d84..1771d5aeee 100644 --- a/Kernel/Devices/Audio/Controller.h +++ b/Kernel/Devices/Audio/Controller.h @@ -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 { diff --git a/Kernel/Devices/Generic/RandomDevice.cpp b/Kernel/Devices/Generic/RandomDevice.cpp index b8f703d796..b59c5a8043 100644 --- a/Kernel/Devices/Generic/RandomDevice.cpp +++ b/Kernel/Devices/Generic/RandomDevice.cpp @@ -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 { diff --git a/Kernel/Devices/HID/Device.h b/Kernel/Devices/HID/Device.h index 891f215bcd..ec99422548 100644 --- a/Kernel/Devices/HID/Device.h +++ b/Kernel/Devices/HID/Device.h @@ -7,7 +7,7 @@ #pragma once #include <Kernel/Devices/CharacterDevice.h> -#include <Kernel/Random.h> +#include <Kernel/Security/Random.h> namespace Kernel { diff --git a/Kernel/Devices/HID/KeyboardDevice.h b/Kernel/Devices/HID/KeyboardDevice.h index fe52305444..9c7d7042c3 100644 --- a/Kernel/Devices/HID/KeyboardDevice.h +++ b/Kernel/Devices/HID/KeyboardDevice.h @@ -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 { diff --git a/Kernel/Devices/HID/MouseDevice.h b/Kernel/Devices/HID/MouseDevice.h index a571692f5d..06e31626e4 100644 --- a/Kernel/Devices/HID/MouseDevice.h +++ b/Kernel/Devices/HID/MouseDevice.h @@ -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 { diff --git a/Kernel/Devices/Storage/ATA/AHCI/InterruptHandler.h b/Kernel/Devices/Storage/ATA/AHCI/InterruptHandler.h index 0c2e16d6ba..f3931789d0 100644 --- a/Kernel/Devices/Storage/ATA/AHCI/InterruptHandler.h +++ b/Kernel/Devices/Storage/ATA/AHCI/InterruptHandler.h @@ -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 { diff --git a/Kernel/Devices/Storage/ATA/AHCI/Port.h b/Kernel/Devices/Storage/ATA/AHCI/Port.h index cbabd3b9c5..d05fe938bb 100644 --- a/Kernel/Devices/Storage/ATA/AHCI/Port.h +++ b/Kernel/Devices/Storage/ATA/AHCI/Port.h @@ -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 { diff --git a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h index f7a097d6b6..c58b00ae35 100644 --- a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h +++ b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h @@ -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 { diff --git a/Kernel/Devices/Storage/StorageController.h b/Kernel/Devices/Storage/StorageController.h index 13923bc60c..9a217d5372 100644 --- a/Kernel/Devices/Storage/StorageController.h +++ b/Kernel/Devices/Storage/StorageController.h @@ -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 { diff --git a/Kernel/Graphics/VirtIOGPU/DisplayConnector.cpp b/Kernel/Graphics/VirtIOGPU/DisplayConnector.cpp index 0a4d32f46d..d5acdb96d6 100644 --- a/Kernel/Graphics/VirtIOGPU/DisplayConnector.cpp +++ b/Kernel/Graphics/VirtIOGPU/DisplayConnector.cpp @@ -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 { diff --git a/Kernel/Graphics/VirtIOGPU/GPU3DDevice.cpp b/Kernel/Graphics/VirtIOGPU/GPU3DDevice.cpp index 12a3e01d05..0d9bcb0a93 100644 --- a/Kernel/Graphics/VirtIOGPU/GPU3DDevice.cpp +++ b/Kernel/Graphics/VirtIOGPU/GPU3DDevice.cpp @@ -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 { diff --git a/Kernel/Memory/AddressSpace.cpp b/Kernel/Memory/AddressSpace.cpp index e3eae985d5..643f6bd94a 100644 --- a/Kernel/Memory/AddressSpace.cpp +++ b/Kernel/Memory/AddressSpace.cpp @@ -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> diff --git a/Kernel/Memory/PhysicalRegion.cpp b/Kernel/Memory/PhysicalRegion.cpp index 71cd9d58ea..bae809e297 100644 --- a/Kernel/Memory/PhysicalRegion.cpp +++ b/Kernel/Memory/PhysicalRegion.cpp @@ -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 { diff --git a/Kernel/Memory/RegionTree.cpp b/Kernel/Memory/RegionTree.cpp index 1de4bb7999..505fe21f7d 100644 --- a/Kernel/Memory/RegionTree.cpp +++ b/Kernel/Memory/RegionTree.cpp @@ -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 { diff --git a/Kernel/Net/Intel/E1000ENetworkAdapter.h b/Kernel/Net/Intel/E1000ENetworkAdapter.h index eec3a3d4bd..5b8b45a22e 100644 --- a/Kernel/Net/Intel/E1000ENetworkAdapter.h +++ b/Kernel/Net/Intel/E1000ENetworkAdapter.h @@ -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 { diff --git a/Kernel/Net/Intel/E1000NetworkAdapter.h b/Kernel/Net/Intel/E1000NetworkAdapter.h index 47ed34b6c8..143e0db120 100644 --- a/Kernel/Net/Intel/E1000NetworkAdapter.h +++ b/Kernel/Net/Intel/E1000NetworkAdapter.h @@ -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 { diff --git a/Kernel/Net/Realtek/RTL8168NetworkAdapter.h b/Kernel/Net/Realtek/RTL8168NetworkAdapter.h index 13172ddb34..c8a0bfb131 100644 --- a/Kernel/Net/Realtek/RTL8168NetworkAdapter.h +++ b/Kernel/Net/Realtek/RTL8168NetworkAdapter.h @@ -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 { diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp index ad858f4d05..0a23ae177f 100644 --- a/Kernel/Net/TCPSocket.cpp +++ b/Kernel/Net/TCPSocket.cpp @@ -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 { diff --git a/Kernel/Net/UDPSocket.cpp b/Kernel/Net/UDPSocket.cpp index db562a7880..a9c1c46eef 100644 --- a/Kernel/Net/UDPSocket.cpp +++ b/Kernel/Net/UDPSocket.cpp @@ -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 { diff --git a/Kernel/Random.cpp b/Kernel/Security/Random.cpp index b713f6469d..b785dadb92 100644 --- a/Kernel/Random.cpp +++ b/Kernel/Security/Random.cpp @@ -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 { diff --git a/Kernel/Random.h b/Kernel/Security/Random.h index 2ae6bd91f1..2ae6bd91f1 100644 --- a/Kernel/Random.h +++ b/Kernel/Security/Random.h diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index dc2499e4fe..737a8ddddf 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -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> diff --git a/Kernel/Syscalls/getrandom.cpp b/Kernel/Syscalls/getrandom.cpp index 76144d6315..cdbe94f4f6 100644 --- a/Kernel/Syscalls/getrandom.cpp +++ b/Kernel/Syscalls/getrandom.cpp @@ -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> diff --git a/Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h b/Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h index a17bb3514c..5e51fede44 100644 --- a/Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h +++ b/Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h @@ -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...) |