mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 05:05:32 +03:00
Kernel: Move Random.{h,cpp} code to Security subdirectory
This commit is contained in:
parent
1b04726c85
commit
490856453d
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/490856453d Pull-request: https://github.com/SerenityOS/serenity/pull/17604 Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/kleinesfilmroellchen ✅
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/Devices/CharacterDevice.h>
|
||||
#include <Kernel/Random.h>
|
||||
#include <Kernel/Security/Random.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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...)
|
||||
|
Loading…
Reference in New Issue
Block a user