Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
This has KString, KBuffer, DoubleBuffer, KBufferBuilder, IOWindow,
UserOrKernelBuffer and ScopedCritical classes being moved to the
Kernel/Library subdirectory.
Also, move the panic and assertions handling code to that directory.
|
|
|
|
|
|
|
|
|
|
After examination of all overriden Inode::traverse_as_directory methods
it seems like proper locking is already existing everywhere, so there's
no need to take the big process lock anymore, as there's no access to
shared process structures anyway.
|
|
All shared structures are already protected by "atomic" spinlocks for
those structures, so there's no need to take the big process lock.
|
|
All accesses to the mount table are already serialized by the actual
spinlock of that table.
|
|
"Wherever applicable" = most places, actually :^), especially for
networking and filesystem timestamps.
This includes changes to unzip, which uses DOSPackedTime, since that is
changed for the FAT file systems.
|
|
That's what this class really is; in fact that's what the first line of
the comment says it is.
This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
|
|
These 2 are an actual separate types of syscalls, so let's stop using
special flags for bind mounting or re-mounting and instead let userspace
calling directly for this kind of actions.
|
|
This is quite useful for userspace applications that can't cope with the
restriction, but it's still useful to impose other non-configurable
restrictions by using jails.
|
|
Instead of storing x86_64 register names in `SC_create_thread_params`,
let the Kernel figure out how to pass the parameters to
`pthread_create_helper`.
|
|
|
|
|
|
|
|
We have a problem with the original utimensat syscall because when we
do call LibC futimens function, internally we provide an empty path,
and the Kernel get_syscall_path_argument method will detect this as an
invalid path.
This happens to spit an error for example in the touch utility, so if a
user is running "touch non_existing_file", it will create that file, but
the user will still see an error coming from LibC futimens function.
This new syscall gets an open file description and it provides the same
functionality as utimensat, on the specified open file description.
The new syscall will be used later by LibC to properly implement LibC
futimens function so the situation described with relation to the
"touch" utility could be fixed.
|
|
|
|
We were accidentally not enforcing the map_fixed pledge
|
|
When switching to the new address space, we also have to switch the
Process::m_master_tls_* variables as they may refer to a region in
the old address space.
This was causing `su` to not run correctly.
Regression from 65641187ffb15e3512fcf9c260c02287f83b5d09.
|
|
And make sure to also restore it in sys$sigreturn.
|
|
This replaces the previous owning address space pointer. This commit
should not change any of the existing functionality, but it lays down
the groundwork needed to let us properly access the region table under
the address space spinlock during page fault handling.
|
|
Instead of setting up the new address space on it's own, and only swap
to the new address space at the end, we now immediately swap to the new
address space (while still keeping the old one alive) and only revert
back to the old one if we fail at any point.
This is done to ensure that the process' active address space (aka the
contents of m_space) always matches actual address space in use by it.
That should allow us to eventually make the page fault handler process-
aware, which will let us properly lock the process address space lock.
|
|
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
|
|
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
|
|
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
|
|
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
|
|
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
|
|
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
|
|
For some reason GCC did not complain about this.
|
|
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
|
|
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
|
|
This function is already serialized by access to process protected data.
|
|
The SID was duplicated between the process credentials and protected
data. And to make matters worse, the credentials SID was not updated in
sys$setsid.
This patch fixes this by removing the SID from protected data and
updating the credentials SID everywhere.
|
|
This function is now serialized by access to the process group list,
and to the current process's protected data.
|
|
This closes two race windows:
- ProcessGroup removed itself from the "all process groups" list in its
destructor. It was possible to walk the list between the last unref()
and the destructor invocation, and grab a pointer to a ProcessGroup
that was about to get deleted.
- sys$setsid() could end up creating a process group that already
existed, as there was a race window between checking if the PGID
is used, and actually creating a ProcessGroup with that PGID.
|
|
|
|
Now that it's no longer using LockRefPtr, we can actually move it into
protected data. (LockRefPtr couldn't be stored there because protected
data is immutable at times, and LockRefPtr uses some of its own bits
for locking.)
|
|
TTY was only stored in Process::m_tty, so make that a SpinlockProtected.
|
|
This was some pre-SMP historical artifact.
|
|
|
|
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.
|