ladybird/Kernel/Syscalls
Andreas Kling b466ede1ea Kernel: Make sure we can allocate kernel stack before creating thread
Wrap thread creation in a Thread::try_create() helper that first
allocates a kernel stack region. If that allocation fails, we propagate
an ENOMEM error to the caller.

This avoids the situation where a thread is half-constructed, without a
valid kernel stack, and avoids having to do messy cleanup in that case.
2021-02-07 19:27:00 +01:00
..
abort.cpp Kernel+LibC: Tidy up assertion failures with a dedicated syscall 2021-01-04 21:57:30 +01:00
access.cpp Kernel: Convert some more syscalls to Userspace<T> 2020-08-02 11:01:00 +02:00
alarm.cpp Kernel: Improve time keeping and dramatically reduce interrupt load 2020-12-21 18:26:12 +01:00
anon_create.cpp Kernel: Make sys$anon_create() fail if size == 0 2021-01-25 09:36:42 +01:00
beep.cpp Kernel: Move some time related code from Scheduler into TimeManagement 2020-11-30 13:17:02 +01:00
chdir.cpp Kernel+LibC: Make sys$getcwd truncate the result silently 2021-01-16 22:40:53 +01:00
chmod.cpp Kernel: Use Userspace<T> for the chmod syscall 2020-08-10 12:52:15 +02:00
chown.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
chroot.cpp Kernel: Use Userspace<T> for the chroot syscall 2020-08-10 12:52:15 +02:00
clock.cpp Kernel: Improve time keeping and dramatically reduce interrupt load 2020-12-21 18:26:12 +01:00
debug.cpp Kernel: Remove a bunch of no-longer-necessary SmapDisablers 2021-01-17 15:03:07 +01:00
disown.cpp Kernel: disown should unblock any potential waiters 2020-12-12 21:28:12 +01:00
dup2.cpp Kernel+LibC+UserspaceEmulator: Bring back sys$dup2() 2020-08-15 11:11:34 +02:00
execve.cpp Kernel: Add a way to specify which memory regions can make syscalls 2021-02-02 20:13:44 +01:00
exit.cpp Kernel: Don't generate a backtrace when a process exists with non-zero 2020-12-14 23:05:53 +01:00
fcntl.cpp Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00
fork.cpp Kernel: Add a way to specify which memory regions can make syscalls 2021-02-02 20:13:44 +01:00
ftruncate.cpp Kernel: Move syscall implementations out of Process.cpp 2020-07-30 23:40:57 +02:00
futex.cpp Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00
get_dir_entries.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
get_stack_bounds.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
getrandom.cpp Kernel: Remove a bunch of no-longer-necessary SmapDisablers 2021-01-17 15:03:07 +01:00
getuid.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
hostname.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
ioctl.cpp Kernel: Remove SmapDisabler in sys$ioctl() 2020-07-31 00:17:25 +02:00
keymap.cpp Kernel+keymap+KeyboardMapper: New pledge for getkeymap 2021-02-01 09:54:32 +01:00
kill.cpp Kernel+LibC: Turn errno codes into a strongly typed enum 2021-01-20 23:20:02 +01:00
link.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
lseek.cpp Kernel: Move syscall implementations out of Process.cpp 2020-07-30 23:40:57 +02:00
mkdir.cpp Kernel: Convert some more syscalls to Userspace<T> 2020-08-02 11:01:00 +02:00
mknod.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
mmap.cpp Kernel: Don't allow sys$msyscall() on non-mmap regions 2021-02-02 20:16:13 +01:00
module.cpp Everywhere: Replace a bundle of dbg with dbgln. 2021-01-11 11:55:47 +01:00
mount.cpp Revert "Kernel: Return -ENOTDIR for non-directory mount target" 2021-01-30 13:52:12 +01:00
open.cpp Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00
perf_event.cpp Kernel+Profiler: Make profiling per-process and without core dumps 2021-01-11 11:36:00 +01:00
pipe.cpp Kernel: Improve ProcFS behavior in low memory conditions 2021-01-03 22:12:19 +01:00
pledge.cpp Kernel: Don't drop pledge()'d promises/execpromises when passing nullptr 2021-01-26 18:18:01 +01:00
prctl.cpp Kernel+LibC: Introduce a "dumpable" flag for processes 2020-12-25 19:35:55 +01:00
process.cpp Kernel+Userland: Remove shared buffers (shbufs) 2021-01-17 09:07:32 +01:00
profiling.cpp Kernel: Use current process EUID in doing profiling access control 2021-01-12 23:34:01 +01:00
ptrace.cpp Kernel+LibC: Turn errno codes into a strongly typed enum 2021-01-20 23:20:02 +01:00
purge.cpp Kernel: Fix bad VMObject iteration in sys$purge() 2021-01-02 13:34:29 +01:00
read.cpp Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00
readlink.cpp Kernel: Move KBufferBuilder to the fallible KBuffer API 2020-12-18 19:22:26 +01:00
realpath.cpp Kernel: Make realpath return silently truncated data 2021-01-16 22:40:53 +01:00
rename.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
rmdir.cpp Kernel: Convert some more syscalls to Userspace<T> 2020-08-02 11:01:00 +02:00
sched.cpp Kernel+LibC+WindowServer: Remove unused thread/process boost mechanism 2021-01-16 14:52:04 +01:00
select.cpp Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00
sendfd.cpp Kernel: Move syscall implementations out of Process.cpp 2020-07-30 23:40:57 +02:00
setpgid.cpp Kernel: Distinguish between new and old process groups with equal pgids 2020-08-19 21:21:34 +02:00
setuid.cpp Kernel+LibC: Introduce a "dumpable" flag for processes 2020-12-25 19:35:55 +01:00
shutdown.cpp Everywhere: Replace a bundle of dbg with dbgln. 2021-01-09 21:11:09 +01:00
sigaction.cpp Kernel: Don't allow modifying IOPL via sys$ptrace() or sys$sigreturn() 2020-12-22 19:38:25 +01:00
socket.cpp Kernel: Remove pledge exception for sys$getsockopt() with SO_PEERCRED 2021-01-31 09:29:27 +01:00
stat.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
sync.cpp Kernel: Move syscall implementations out of Process.cpp 2020-07-30 23:40:57 +02:00
sysconf.cpp Kernel+LibC: Add _SC_TTY_NAME_MAX 2021-01-18 22:28:56 +01:00
thread.cpp Kernel: Make sure we can allocate kernel stack before creating thread 2021-02-07 19:27:00 +01:00
times.cpp Kernel: Move some time related code from Scheduler into TimeManagement 2020-11-30 13:17:02 +01:00
ttyname.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
umask.cpp Kernel: Move syscall implementations out of Process.cpp 2020-07-30 23:40:57 +02:00
uname.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
unlink.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
unveil.cpp Kernel: Allow 'elevating' unveil permissions if implicitly inherited from '/' 2020-12-26 16:10:04 +01:00
utime.cpp Kernel: Make copy_to/from_user safe and remove unnecessary checks 2020-09-13 21:19:15 +02:00
waitid.cpp Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00
watch_file.cpp Kernel: Improve ProcFS behavior in low memory conditions 2021-01-03 22:12:19 +01:00
write.cpp Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00