Age | Commit message (Collapse) | Author |
|
These syscalls are already protected by existing locking mechanisms,
including the mutex inside InodeWatcher.
|
|
Same as sys$kill, nothing here that isn't already protected by existing
locks.
|
|
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.
|
|
These are artifacts from the pre-SMP times.
|
|
Same deal as sys$times, nothing here that needs locking at the moment.
|
|
Instead of templatizing on a bool parameter, use an enum for clarity.
|
|
...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.
|
|
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.
|
|
The body of this syscall is already serialized by calling
with_mutable_protected_data().
|
|
Yet another syscall that only messes with the current thread.
|
|
Another one that only touches the current thread.
|
|
Another one that only messes with the current thread.
|
|
This syscall is only concerned with the current thread.
|
|
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.)
|
|
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.
|
|
This simplifies a lot of syscalls, some of which were doing very
unnecessarily verbose things instead of calling this.
|
|
|
|
Reorganize the code slightly to avoid creating a TOCTOU bug, then mark
the syscall as not needing the big lock anymore.
|
|
Access to the process's process group is already serialized by
SpinlockProtected.
|
|
Access to the process's process group is already serialized by
SpinlockProtected.
|
|
This syscall operates on the file descriptor table, and on individual
open file descriptions. Both of those are already protected by scoped
locking mechanisms.
|
|
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.
|
|
Access to Process::m_alarm_timer is serialized via SpinlockProtected,
so there's no longer need for this syscall to use the big lock.
|
|
|
|
Had to wrap Process::m_pg in a SpinlockProtected for this to be safe.
|
|
There was a whole bunch of ref counting churn coming from Mutex, which
had a RefPtr<Thread> m_holder to (mostly) point at the thread holding
the mutex.
Since we never actually dereference the m_holder value, but only use it
for identity checks against thread pointers, we can store it as an
uintptr_t and skip the ref counting entirely.
Threads can't die while holding a mutex anyway, so there's no risk of
them going missing on us.
|
|
These were stored in a bunch of places. The main one that's a bit iffy
is the Mutex::m_holder one, which I'm going to simplify in a subsequent
commit.
In Plan9FS and WorkQueue, we can't make the NNRPs const due to
initialization order problems. That's probably doable with further
cleanup, but left as an exercise for our future selves.
Before starting this, I expected the thread blockers to be a problem,
but as it turns out they were super straightforward (for once!) as they
don't mutate the thread after initiating a block, so they can just use
simple const-ified NNRPs.
|
|
- Instead of taking the first new thread as an out-parameter, we now
bundle the process and its first thread in a struct and use that
as the return value.
- Make all Process factory functions return ErrorOr. Use this to convert
some places to more TRY().
- Drop the "try_" prefix on Process factory functions.
|
|
The only persistent one of these was Thread::m_process and that never
changes after initialization. Make it const to enforce this and switch
everything over to RefPtr & NonnullRefPtr.
|
|
- The host custody never changes after initialization, so there's no
need to protect it with a spinlock.
- To enforce the fact that some members don't change after
initialization, make them const.
|
|
There was only one permanent storage location for these: as a member
in the Mount class.
That member is never modified after Mount initialization, so we don't
need to worry about races there.
|
|
|
|
|
|
This allows us to share this code between the x86_64 and aarch64 build.
|
|
|
|
This is for the upcoming commit that merges the x86_64 and aarch64
init.cpp files.
|
|
This is for the upcoming commit that merges the x86_64 and aarch64
init.cpp files.
|
|
This is for a upcoming commit that merges the x86_64 and aarch64
init.cpp files.
|
|
This code expects to be executed with interrupts disabled, however we
currently spawn (kernel) threads with interrupts enabled on aarch64.
|
|
Also pass the cpu number to Processor::initialize. This way the init
code can be shared between the x86_64 and aarch64 build.
|
|
The default SortingProxyModel does not allow to react to reodering.
As we would like to keep the column width on sorting, we create a
subclass and inject our code into the sorting method.
|
|
|
|
This commit adds a new method to create a PEM encoded ASN1 from
its DER variant.
|
|
|
|
This commit adds a new application named CertificateSettings that
houses our Cert Store. It should be expanded in the future.
|
|
|
|
Previously, we would unconditionally build GDB from source for the
AArch64 toolchain. This commit makes it possible to use the system's
`gdb` binary if it supports the architecture, or `aarch64-elf-gdb` if
such a package is installed.
An `aarch64-elf-gdb` package will be available through Homebrew once
this PR is merged: https://github.com/Homebrew/homebrew-core/pull/127323
|
|
|
|
I'm the author of the image.
|
|
|