ladybird/Kernel/Syscalls
Liav A 01b79910b3 Kernel/Process: Move protected values to the end of the object
The compiler can re-order the structure (class) members if that's
necessary, so if we make Process to inherit from ProcFSExposedComponent,
even if the declaration is to inherit first from ProcessBase, then from
ProcFSExposedComponent and last from Weakable<Process>, the members of
class ProcFSExposedComponent (including the Ref-counted parts) are the
first members of the Process class.

This problem made it impossible to safely use the current toggling
method with the write-protection bit on the ProcessBase members, so
instead of inheriting from it, we make its members the last ones in the
Process class so we can safely locate and modify the corresponding page
write protection bit of these values.

We make sure that the Process class doesn't expand beyond 8192 bytes and
the protected values are always aligned on a page boundary.
2021-08-12 20:57:32 +02:00
..
access.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
alarm.cpp Kernel: Do not cancel stale timers when servicing sys$alarm 2021-08-03 18:44:01 +02:00
anon_create.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
beep.cpp Kernel: Disable big process lock for sys$beep() 2021-08-06 23:36:12 +02:00
chdir.cpp Kernel: Remove unused header includes 2021-08-01 08:10:16 +02:00
chmod.cpp Kernel: Remove unused header includes 2021-08-01 08:10:16 +02:00
chown.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
chroot.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
clock.cpp Kernel+LibC: Allow clock_gettime() to run without syscalls 2021-08-10 19:21:16 +02:00
debug.cpp Kernel: Disable big process lock for sys$dbgputch 2021-08-06 23:36:12 +02:00
disown.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
dup2.cpp Kernel: Track allocated FileDescriptionAndFlag elements in each Process 2021-07-28 19:07:00 +02:00
emuctl.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
execve.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
exit.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
fcntl.cpp Kernel: Track allocated FileDescriptionAndFlag elements in each Process 2021-07-28 19:07:00 +02:00
fork.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
ftruncate.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
futex.cpp Everywhere: Replace AK::Singleton => Singleton 2021-08-08 00:03:45 +02:00
get_dir_entries.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
get_stack_bounds.cpp Kernel: Disable big process lock for sys$get_stack_bounds 2021-08-06 23:36:12 +02:00
getrandom.cpp Kernel: Disable big process lock for sys$getrandom 2021-08-06 23:36:12 +02:00
getuid.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
hostname.cpp Kernel: Migrate hostname locking to ProtectedValue 2021-08-07 11:48:00 +02:00
inode_watcher.cpp Kernel: Track allocated FileDescriptionAndFlag elements in each Process 2021-07-28 19:07:00 +02:00
ioctl.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
keymap.cpp Kernel: Disable big process lock for sys$getkeymap 2021-08-06 23:36:12 +02:00
kill.cpp Kernel: Migrate process list locking to ProtectedValue 2021-08-07 11:48:00 +02:00
link.cpp Kernel: Use try_copy_kstring_from_user() in sys$link() 2021-08-06 00:37:47 +02:00
lseek.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
mkdir.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
mknod.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
mmap.cpp Kernel: Rename a very long enum to ShouldDeallocateVirtualRange 2021-08-06 21:45:05 +02:00
module.cpp Kernel: Add convenience values to the Memory::Region::Access enum 2021-08-06 22:25:00 +02:00
mount.cpp Kernel: Implement a ISO 9660 filesystem reader :^) 2021-08-07 15:21:58 +02:00
open.cpp Kernel: Remove unused header includes 2021-08-01 08:10:16 +02:00
perf_event.cpp Kernel: Don't record sys$perf_event() if profiling is not enabled 2021-08-12 00:03:40 +02:00
pipe.cpp Kernel: Handle OOM from DoubleBuffer creation in FIFO creation 2021-08-03 18:54:23 +02:00
pledge.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
prctl.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
process.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
profiling.cpp Kernel: Migrate process list locking to ProtectedValue 2021-08-07 11:48:00 +02:00
ptrace.cpp Kernel: Rename Process::space() => Process::address_space() 2021-08-06 14:05:58 +02:00
purge.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
read.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
readlink.cpp Kernel: Remove unused header includes 2021-08-01 08:10:16 +02:00
realpath.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
rename.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
rmdir.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
sched.cpp Kernel: Fix kernel panic when blocking on the process' big lock 2021-08-10 22:33:50 +02:00
select.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
sendfd.cpp Kernel: Track allocated FileDescriptionAndFlag elements in each Process 2021-07-28 19:07:00 +02:00
setpgid.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
setuid.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
shutdown.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
sigaction.cpp Kernel: Remove unused header includes 2021-08-01 08:10:16 +02:00
socket.cpp Kernel: Remove unused header includes 2021-08-01 08:10:16 +02:00
stat.cpp Kernel: Remove unused header includes 2021-08-01 08:10:16 +02:00
statvfs.cpp Kernel: Remove unused header includes 2021-08-01 08:10:16 +02:00
sync.cpp Kernel: Disable big process lock for sys$sync 2021-08-07 15:30:26 +02:00
sysconf.cpp Kernel: Disable big process lock for sys$sysconf 2021-08-06 23:36:12 +02:00
thread.cpp Kernel: Rename Process::space() => Process::address_space() 2021-08-06 14:05:58 +02:00
times.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
ttyname.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
umask.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
uname.cpp Kernel: Migrate hostname locking to ProtectedValue 2021-08-07 11:48:00 +02:00
unlink.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
unveil.cpp Kernel: Migrate sys$unveil to use the KString API 2021-07-23 19:02:25 +02:00
utime.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
waitid.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
write.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00