serenity/Kernel
Liav A 12b6e69150 Kernel: Introduce the new ProcFS design
The new ProcFS design consists of two main parts:
1. The representative ProcFS class, which is derived from the FS class.
The ProcFS and its inodes are much more lean - merely 3 classes to
represent the common type of inodes - regular files, symbolic links and
directories. They're backed by a ProcFSExposedComponent object, which
is responsible for the functional operation behind the scenes.
2. The backend of the ProcFS - the ProcFSComponentsRegistrar class
and all derived classes from the ProcFSExposedComponent class. These
together form the entire backend and handle all the functions you can
expect from the ProcFS.

The ProcFSExposedComponent derived classes split to 3 types in the
manner of lifetime in the kernel:
1. Persistent objects - this category includes all basic objects, like
the root folder, /proc/bus folder, main blob files in the root folders,
etc. These objects are persistent and cannot die ever.
2. Semi-persistent objects - this category includes all PID folders,
and subdirectories to the PID folders. It also includes exposed objects
like the unveil JSON'ed blob. These object are persistent as long as the
the responsible process they represent is still alive.
3. Dynamic objects - this category includes files in the subdirectories
of a PID folder, like /proc/PID/fd/* or /proc/PID/stacks/*. Essentially,
these objects are always created dynamically and when no longer in need
after being used, they're deallocated.
Nevertheless, the new allocated backend objects and inodes try to use
the same InodeIndex if possible - this might change only when a thread
dies and a new thread is born with a new thread stack, or when a file
descriptor is closed and a new one within the same file descriptor
number is opened. This is needed to actually be able to do something
useful with these objects.

The new design assures that many ProcFS instances can be used at once,
with one backend for usage for all instances.
2021-06-29 20:53:59 +02:00
..
ACPI Kernel: Introduce the new SysFS 2021-06-29 20:53:59 +02:00
API WindowServer: Coalesce flushing buffers into one ioctl() call 2021-06-27 09:46:27 +02:00
Arch Kernel: Introduce the new SysFS 2021-06-29 20:53:59 +02:00
Devices Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
FileSystem Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
Graphics WindowServer: Coalesce flushing buffers into one ioctl() call 2021-06-27 09:46:27 +02:00
Heap Kernel: Add a sanity check for CHUNK_SIZE 2021-06-28 15:55:00 +02:00
Interrupts Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
Modules Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Net Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
PCI Kernel/SysFS: Add PCI exposed folder 2021-06-29 20:53:59 +02:00
Storage Kernel: Specify I/O size for BMIDEChannel 2021-06-28 15:55:00 +02:00
Syscalls Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
Tasks Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
Time Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
TTY Kernel: Don't clear VirtualConsoles when initializing 2021-06-25 19:26:30 +02:00
VirtIO Kernel: Add VirtIOGPU graphics device 2021-06-25 19:26:30 +02:00
VM Kernel: Fix GDT and segment selectors to make userland work on x86_64 2021-06-28 22:29:28 +02:00
AddressSanitizer.cpp Everywhere: Use bgianf@serenityos.org for my copyright attribution 2021-04-22 21:15:54 +02:00
AddressSanitizer.h Everywhere: Use bgianf@serenityos.org for my copyright attribution 2021-04-22 21:15:54 +02:00
Assertions.h Kernel: Add [[unlikely]] attribute to VERIFY 2021-06-29 22:57:52 +04:30
CMakeLists.txt Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
CMOS.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CMOS.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CommandLine.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
CommandLine.h Kernel/CommandLine: Add option to disable physical networking hardware 2021-06-09 22:44:09 +04:30
ConsoleDevice.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
ConsoleDevice.h Kernel: Rename Console => ConsoleDevice 2021-05-16 19:58:33 +02:00
CoreDump.cpp Kernel+LibCoreDump: Implement more x86_64 coredump functionality 2021-06-29 20:03:36 +02:00
CoreDump.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Debug.h.in USB: Further Implement USB Structures 2021-06-12 18:17:25 +04:30
DoubleBuffer.cpp Kernel: Pull apart CPU.h 2021-06-24 00:38:23 +02:00
DoubleBuffer.h Kernel: Use KResultOr<size_t> for the DoubleBuffer class 2021-06-16 21:29:36 +02:00
Forward.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FutexQueue.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
FutexQueue.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
init.cpp Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
IO.h Kernel: Specify I/O size for BMIDEChannel 2021-06-28 15:55:00 +02:00
KBuffer.h Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
KBufferBuilder.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
KBufferBuilder.h Kernel: Avoid allocations in KBufferBuilder::appendff 2021-05-13 08:27:42 +02:00
kprintf.cpp Kernel: Add dbgputch() to kstdio.h 2021-06-24 10:29:09 +02:00
KResult.h Kernel: Remove superfluous alignas(T) from KResultOr<T> 2021-06-24 17:35:49 +04:30
kstdio.h Kernel: Add dbgputch() to kstdio.h 2021-06-24 10:29:09 +02:00
KString.cpp Kernel: Add operator delete for KString 2021-06-02 22:59:39 +01:00
KString.h Kernel: Add operator delete for KString 2021-06-02 22:59:39 +01:00
KSyms.cpp Kernel: Make and use KERNEL_BASE 2021-06-28 19:26:06 +02:00
KSyms.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
linker.ld Kernel: Make sure the kernel's ELF PHDRs don't use rwx 2021-06-19 12:54:33 +02:00
Lock.cpp Kernel: Utilize AK::SourceLocation for LOCK_DEBUG instrumentation. 2021-04-25 09:38:27 +02:00
Lock.h Kernel: Pull apart CPU.h 2021-06-24 00:38:23 +02:00
LockMode.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
mkmap.sh Kernel: Build the x86_64 kernel as an ELF32 executable 2021-06-25 15:19:09 +02:00
Module.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Multiboot.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Panic.cpp Kernel: Pull apart CPU.h 2021-06-24 00:38:23 +02:00
Panic.h Kernel/Graphics + SystemServer: Support text mode properly 2021-05-16 19:58:33 +02:00
PerformanceEventBuffer.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
PerformanceEventBuffer.h Kernel: Add support for profiling kmalloc()/kfree() 2021-05-19 22:51:42 +02:00
PerformanceManager.h Kernel+Userland: Add x86_64 registers to RegisterState/PtraceRegisters 2021-06-27 15:46:42 +02:00
PhysicalAddress.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Process.cpp Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
Process.h Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
ProcessExposed.cpp Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
ProcessExposed.h Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
ProcessGroup.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
ProcessGroup.h Kernel: Switch ProcessGroup to IntrusiveList from InlineLinkedList 2021-06-03 13:27:40 +02:00
Random.cpp Kernel: Don't use function-level static variables 2021-06-24 09:27:13 +02:00
Random.h Kernel: Pull apart CPU.h 2021-06-24 00:38:23 +02:00
RTC.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RTC.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Scheduler.cpp Kernel: Get Alt-Shift-F12 to work on x86_64 2021-06-28 22:29:28 +02:00
Scheduler.h Kernel: Add Scheduler::is_initialized 2021-06-25 19:26:30 +02:00
Sections.h Kernel: Make and use KERNEL_BASE 2021-06-28 19:26:06 +02:00
SpinLock.h Kernel: Pull apart CPU.h 2021-06-24 00:38:23 +02:00
StdLib.cpp Kernel: Fix memcpy and memset for x86_64 2021-06-26 11:08:52 +02:00
StdLib.h Kernel: Add try_copy_kstring_from_user() 2021-05-28 09:37:09 +02:00
Syscall.cpp Kernel: Implement syscall entry for x86_64 2021-06-28 22:29:28 +02:00
SystemExposed.cpp Kernel: Introduce the new SysFS 2021-06-29 20:53:59 +02:00
SystemExposed.h Kernel: Introduce the new SysFS 2021-06-29 20:53:59 +02:00
Thread.cpp Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
Thread.h Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
ThreadBlockers.cpp Kernel: Fix error propagation if Thread::WaitBlocker constructor fails 2021-06-07 09:43:30 +02:00
ThreadTracer.cpp Kernel: Pull apart CPU.h 2021-06-24 00:38:23 +02:00
ThreadTracer.h Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
TimerQueue.cpp Kernel: Fix use after AK::move in Kernel::TimerQueue 2021-06-25 19:26:30 +02:00
TimerQueue.h Kernel: Replace TimerQueue InlinedLinkedList usage with IntrusiveList 2021-06-16 10:40:01 +02:00
UBSanitizer.cpp Kernel: Pull apart CPU.h 2021-06-24 00:38:23 +02:00
UnixTypes.h LibC: Define MSG_OOB 2021-06-04 10:39:41 +02:00
UnveilNode.h Kernel: Allow unveiling subfolders regardless of parent's permissions 2021-06-08 12:15:04 +02:00
UserOrKernelBuffer.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
UserOrKernelBuffer.h Kernel: Remove obsolete size_t casts 2021-06-17 19:52:54 +02:00
VirtualAddress.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
WaitQueue.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
WaitQueue.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
WorkQueue.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
WorkQueue.h Kernel: Use plain Function objects for the WorkQueue 2021-05-19 21:36:57 +02:00