From 0bab9a9313ccc773ee2fe8aa8239c4136590a9db Mon Sep 17 00:00:00 2001 From: "Liav A." Date: Fri, 1 Mar 2024 13:03:49 +0200 Subject: [PATCH] Kernel: Move VirtIO RNG implementation to the Security/Random directory --- Kernel/Bus/VirtIO/Transport/PCIe/Detect.cpp | 2 +- Kernel/CMakeLists.txt | 2 +- Kernel/{Bus => Security/Random}/VirtIO/RNG.cpp | 2 +- Kernel/{Bus => Security/Random}/VirtIO/RNG.h | 0 Meta/gn/secondary/Kernel/BUILD.gn | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename Kernel/{Bus => Security/Random}/VirtIO/RNG.cpp (98%) rename Kernel/{Bus => Security/Random}/VirtIO/RNG.h (100%) diff --git a/Kernel/Bus/VirtIO/Transport/PCIe/Detect.cpp b/Kernel/Bus/VirtIO/Transport/PCIe/Detect.cpp index 2135fd6c4d7..84d3217a2ae 100644 --- a/Kernel/Bus/VirtIO/Transport/PCIe/Detect.cpp +++ b/Kernel/Bus/VirtIO/Transport/PCIe/Detect.cpp @@ -10,10 +10,10 @@ #include #include #include -#include #include #include #include +#include namespace Kernel::VirtIO { diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt index 5e66e44415d..64e2514f62c 100644 --- a/Kernel/CMakeLists.txt +++ b/Kernel/CMakeLists.txt @@ -50,7 +50,6 @@ set(KERNEL_SOURCES Bus/VirtIO/Transport/InterruptHandler.cpp Bus/VirtIO/Device.cpp Bus/VirtIO/Queue.cpp - Bus/VirtIO/RNG.cpp Devices/AsyncDeviceRequest.cpp Devices/Audio/AC97/AC97.cpp Devices/Audio/Channel.cpp @@ -277,6 +276,7 @@ set(KERNEL_SOURCES Net/Socket.cpp Net/TCPSocket.cpp Net/UDPSocket.cpp + Security/Random/VirtIO/RNG.cpp Security/AddressSanitizer.cpp Security/Credentials.cpp Security/Random.cpp diff --git a/Kernel/Bus/VirtIO/RNG.cpp b/Kernel/Security/Random/VirtIO/RNG.cpp similarity index 98% rename from Kernel/Bus/VirtIO/RNG.cpp rename to Kernel/Security/Random/VirtIO/RNG.cpp index a028b0d2788..066f03bd4cc 100644 --- a/Kernel/Bus/VirtIO/RNG.cpp +++ b/Kernel/Security/Random/VirtIO/RNG.cpp @@ -4,9 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include +#include namespace Kernel::VirtIO { diff --git a/Kernel/Bus/VirtIO/RNG.h b/Kernel/Security/Random/VirtIO/RNG.h similarity index 100% rename from Kernel/Bus/VirtIO/RNG.h rename to Kernel/Security/Random/VirtIO/RNG.h diff --git a/Meta/gn/secondary/Kernel/BUILD.gn b/Meta/gn/secondary/Kernel/BUILD.gn index 6d3175050e1..f0a402cb731 100644 --- a/Meta/gn/secondary/Kernel/BUILD.gn +++ b/Meta/gn/secondary/Kernel/BUILD.gn @@ -496,7 +496,6 @@ executable("Kernel_bin") { "Bus/USB/USBTransfer.cpp", "Bus/VirtIO/Device.cpp", "Bus/VirtIO/Queue.cpp", - "Bus/VirtIO/RNG.cpp", "Devices/AsyncDeviceRequest.cpp", "Devices/Audio/AC97/AC97.cpp", "Devices/Audio/Channel.cpp", @@ -718,6 +717,7 @@ executable("Kernel_bin") { "Security/Credentials.cpp", "Security/Jail.cpp", "Security/Random.cpp", + "Security/Random/VirtIO/RNG.cpp", "Security/UBSanitizer.cpp", "Syscalls/SyscallHandler.cpp", "Syscalls/alarm.cpp",