serenity/Kernel/API/POSIX
Liav A. dd59fe35c7 Kernel+Userland: Reduce jails to be a simple boolean flag
The whole concept of Jails was far more complicated than I actually want
it to be, so let's reduce the complexity of how it works from now on.
Please note that we always leaked the attach count of a Jail object in
the fork syscall if it failed midway.
Instead, we should have attach to the jail just before registering the
new Process, so we don't need to worry about unsuccessful Process
creation.

The reduction of complexity in regard to jails means that instead of
relying on jails to provide PID isolation, we could simplify the whole
idea of them to be a simple SetOnce, and let the ProcessList (now called
ScopedProcessList) to be responsible for this type of isolation.

Therefore, we apply the following changes to do so:
- We make the Jail concept no longer a class of its own. Instead, we
  simplify the idea of being jailed to a simple ProtectedValues boolean
  flag. This means that we no longer check of matching jail pointers
  anywhere in the Kernel code.
  To set a process as jailed, a new prctl option was added to set a
  Kernel SetOnce boolean flag (so it cannot change ever again).
- We provide Process & Thread methods to iterate over process lists.
  A process can either iterate on the global process list, or if it's
  attached to a scoped process list, then only over that list.
  This essentially replaces the need of checking the Jail pointer of a
  process when iterating over process lists.
2024-07-21 11:44:23 +02:00
..
net Kernel: Add support for route flags 2022-05-26 16:33:10 +02:00
netinet Everywhere: Run clang-format 2024-04-24 16:50:01 -04:00
sys Everywhere: Run clang-format 2024-04-24 16:50:01 -04:00
dirent.h Kernel: Alias MAXNAMLEN to NAME_MAX 2023-08-18 11:43:19 +02:00
errno.h Kernel+Userland: Reduce jails to be a simple boolean flag 2024-07-21 11:44:23 +02:00
fcntl.h Kernel: Support F_DUPFD_CLOEXEC command to fcntl(2) 2023-02-19 00:37:37 +01:00
futex.h Everywhere: Run clang-format 2024-04-24 16:50:01 -04:00
ifaddrs.h Kernel+LibC: Stub out getifaddrs() and freeifaddrs() 2021-12-22 00:02:36 -08:00
poll.h Kernel: Add support for the POLLWRBAND poll event 2021-12-05 12:53:29 +01:00
sched.h Kernel+LibC: Report correct scheduling priority limits 2022-10-27 11:30:19 +01:00
select.h Kernel+LibC: Move the FD_SETSIZE declaration to API/POSIX/select.h file 2023-03-01 19:36:53 -07:00
serenity.h Kernel+ProfileViewer: Display additional filesystem events 2023-09-09 11:26:51 -06:00
signal.h Everywhere: Run clang-format 2024-04-24 16:50:01 -04:00
signal_numbers.h Kernel+LibC: Move LibC/signal_numbers.h to Kernel/API/POSIX 2023-01-21 10:43:59 -07:00
stdio.h Kernel+LibC: Share definitions for stdio.h 2021-08-14 19:58:11 +02:00
termios.h Kernel+LibC: Share definitions for termios.h 2021-08-14 19:58:11 +02:00
time.h Kernel+LibC: Share definitions for time.h and sys/stat.h 2021-08-14 19:58:11 +02:00
ucontext.h Kernel: Add missing include in API 2022-09-18 13:27:24 -04:00
unistd.h Kernel+Userland: Add mount MS_SRCHIDDEN option 2024-03-13 15:33:47 -06:00