summaryrefslogtreecommitdiff
path: root/Kernel/API
AgeCommit message (Collapse)Author
2023-04-06Kernel: Mark sys$msync as not needing the big lockIdan Horowitz
All accesses to shared mutable data are already serialized behind the process address space spinlock.
2023-04-06Kernel: Mark sys$mremap as not needing the big lockIdan Horowitz
All accesses to shared mutable data are already serialized behind the process address space spinlock.
2023-04-06Kernel: Mark sys$munmap as not needing the big lockIdan Horowitz
All accesses to shared mutable data are already serialized behind the process address space spinlock.
2023-04-06Kernel: Mark sys$set_mmap_name as not needing the big lockIdan Horowitz
All accesses to shared mutable data are already serialized behind the process address space spinlock.
2023-04-06Kernel: Mark sys$mprotect as not needing the big lockIdan Horowitz
All accesses to shared mutable data are already serialized behind the process address space spinlock.
2023-04-06Kernel: Mark sys$mmap as not needing the big lockIdan Horowitz
All accesses to shared mutable data are already serialized behind the process address space spinlock.
2023-04-06Kernel: Mark sys$map_time_page as not needing the big lockIdan Horowitz
All accesses to shared mutable data are already serialized behind the process address space spinlock.
2023-04-06Kernel: Mark sys$madvise as not needing the big lockIdan Horowitz
All accesses to shared mutable data are already serialized behind the process address space spinlock.
2023-04-05Kernel: Mark sys$setpgid as not needing the big lockAndreas Kling
This function is already serialized by access to process protected data.
2023-04-05Kernel: Mark sys$setsid as not needing the big lockAndreas Kling
This function is now serialized by access to the process group list, and to the current process's protected data.
2023-04-05Kernel: Mark sys$faccessat as not needing the big lockAndreas Kling
2023-04-04Kernel: Mark inode watcher syscalls as not needing the big lockAndreas Kling
These syscalls are already protected by existing locking mechanisms, including the mutex inside InodeWatcher.
2023-04-04Kernel: Mark sys$killpg as not needing the big lockAndreas Kling
Same as sys$kill, nothing here that isn't already protected by existing locks.
2023-04-04Kernel: Mark sys$kill as not needing the big lockAndreas Kling
This syscall sends a signal to other threads or itself. This mechanism is already guarded by locking mechanisms, and widely used within the kernel without help from the big lock.
2023-04-04Kernel: Mark sys$getrusage as not needing the big lockAndreas Kling
Same deal as sys$times, nothing here that needs locking at the moment.
2023-04-04Kernel: Make sys$times not use the big lockAndreas Kling
...and also make the Process tick counters clock_t instead of u32. It seems harmless to get interrupted in the middle of reading these counters and reporting slightly fewer ticks in some category.
2023-04-04Kernel+Userland: Make some of the POSIX types largerAndreas Kling
Expand the following types from 32-bit to 64-bit: - blkcnt_t - blksize_t - dev_t - nlink_t - suseconds_t - clock_t This matches their size on other 64-bit systems.
2023-04-04Kernel: Mark sys$umask as not needing the big lockAndreas Kling
The body of this syscall is already serialized by calling with_mutable_protected_data().
2023-04-04Kernel: Mark sys$sigtimedwait as not needing the big lockAndreas Kling
Yet another syscall that only messes with the current thread.
2023-04-04Kernel: Mark sys$sigpending as not needing the big lockAndreas Kling
Another one that only touches the current thread.
2023-04-04Kernel: Mark sys$sigprocmask as not needing the big lockAndreas Kling
Another one that only messes with the current thread.
2023-04-04Kernel: Mark sys$sigsuspend as not needing the big lockAndreas Kling
This syscall is only concerned with the current thread.
2023-04-04Kernel: Mark sys$sigreturn as not needing the big lockAndreas Kling
This syscall is only concerned with the current thread (except in the case of a pledge violation, when it will add some details about that to the process coredump metadata. That stuff is already serialized.)
2023-04-04Kernel: Mark sys$open as not needing the big lockAndreas Kling
All the individual sub-operations of this syscall are protected by their own locking mechanisms, so it should be okay to get it off the big lock.
2023-04-04Kernel: Make sys$getsid not require the big lockAndreas Kling
Reorganize the code slightly to avoid creating a TOCTOU bug, then mark the syscall as not needing the big lock anymore.
2023-04-04Kernel: Mark sys$getpgrp as not needing the big lockAndreas Kling
Access to the process's process group is already serialized by SpinlockProtected.
2023-04-04Kernel: Mark sys$getpgid as not needing the big lockAndreas Kling
Access to the process's process group is already serialized by SpinlockProtected.
2023-04-04Kernel: Mark sys$fcntl as not needing the big lockAndreas Kling
This syscall operates on the file descriptor table, and on individual open file descriptions. Both of those are already protected by scoped locking mechanisms.
2023-04-04Kernel: Make sys$disown not require the big lockAndreas Kling
This syscall had a TOCTOU where it checked the peer's PPID before locking the protected data (where the PPID is stored). After closing the race window, we can mark the syscall as not needing the big lock.
2023-04-04Kernel: Mark sys$alarm as not needing the big lockAndreas Kling
Access to Process::m_alarm_timer is serialized via SpinlockProtected, so there's no longer need for this syscall to use the big lock.
2023-03-15Kernel: Merge {get,set}_process_name syscalls to the prctl syscallLiav A
It makes much more sense to have these actions being performed via the prctl syscall, as they both require 2 plain arguments to be passed to the syscall layer, and in contrast to most syscalls, we don't get in these removed syscalls an automatic representation of Userspace<T>, but two FlatPtr(s) to perform casting on them in the prctl syscall which is suited to what has been done in the removed syscalls. Also, it makes sense to have these actions in the prctl syscall, because they are strongly related to the process control concept of the prctl syscall.
2023-03-13Kernel: Don't include Kernel/Arch/RegisterState from userspaceAndrew Kaster
Any userspace cpp file that included <syscall.h> would end up with a large glob of Kernel headers included, all the way down to Kernel/Arch/x86_64/CPU.h and friends. Only the kernel needs RegisterState, so hide it from userspace.
2023-03-11Kernel: Add non standard value to sys$sysconfFabian Dellwing
Add `_SC_PHYS_PAGES` to sys$sysconf syscall. This value is needed for a port I'm working on.
2023-03-05Kernel: Move process coredump metadata modification to the prctl syscallLiav A
2023-03-01Kernel: Move TYPEDEF_* TTY macros to API/ttydefaults.h fileLiav A
This allows us to get rid of an include to LibC/sys/ttydefaults.h in the Kernel TTY implementation. Also, move ttydefchars static const struct to another file called Kernel/API/ttydefaultschars.h, so it could be used too in the Kernel TTY implementation without the need to include anything from LibC.
2023-03-01Kernel+LibC: Move the FD_SETSIZE declaration to API/POSIX/select.h fileLiav A
2023-02-25Kernel: Mark sys$prctl() as not needing the big lockLiav A
This syscall has sufficient locking and therefore it doesn't need the big lock being taken.
2023-02-24Kernel+Userland: Refine preventing syscall annotations of Regions optionLiav A
Instead of using a special case of the annotate_mapping syscall, let's introduce a new prctl option to disallow further annotations of Regions as new syscall Region(s).
2023-02-24Kernel+Userland: Unify declarations for KCOV in Kernel/API/kcov.hLiav A
2023-02-24Kernel+Userland: Move prctl numbers header file to Kernel/API directoryLiav A
2023-02-19Kernel: Support sending filedescriptors with sendmsg(2) and SCM_RIGHTSPeter Elliott
This is necessary to support the wayland protocol. I also moved the CMSG_* macros to the kernel API since they are used in both kernel and userspace. this does not break ntpquery/SCM_TIMESTAMP.
2023-02-19Kernel: Support F_DUPFD_CLOEXEC command to fcntl(2)Peter Elliott
Specified by POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
2023-02-06Kernel: Protect Thread::m_name with a spinlockSam Atkins
This replaces manually grabbing the thread's main lock. This lets us remove the `get_thread_name` and `set_thread_name` syscalls from the big lock. :^)
2023-02-06Kernel: Protect Process::m_name with a spinlockSam Atkins
This also lets us remove the `get_process_name` and `set_process_name` syscalls from the big lock. :^)
2023-02-06Kernel: Remove create_inode_watcher syscall from the big lockSam Atkins
2023-02-06Kernel: Remove pledge syscall from the big lockSam Atkins
This already does all its dangerous work inside `with_mutable_protected_data()`.
2023-02-03Kernel/aarch64: Include Error.h to fix aarch64 missing ErrorOrSteffen Rusitschka
2023-02-02Kernel: Remove trap based syscall handlingAgustin Gianni
This patch removes the x86 mechanism for calling syscalls, favoring the more modern syscall instruction. It also moves architecture dependent code from functions that are meant to be architecture agnostic therefore paving the way for adding more architectures.
2023-01-21Kernel+Libraries: Don't include limits.h from LibELF/Validation.hAndrew Kaster
The fallout of this is that Kernel/Syscalls/execve.cpp doesn't have access to ARG_MAX anymore, so move that definition to Kernel/API as well
2023-01-21Kernel+Libraries: Move defines and types from sys/auxv.h to Kernel/APIAndrew Kaster
And don't include <sys/auxv.h> from LibELF/AuxiliaryVector.h, to reduce the number of Kernel files that include LibC headers.