A mutex is useful when we need to be able to block the current thread
until it's available. This is overkill for OpenFileDescriptor.
First off, this patch wraps the main state member variables inside a
SpinlockProtected<State> to enforce synchronized access. This also
avoids "free locking" where figuring out which variables are guarded
by which lock is left as an unamusing exercise for the reader.
Then we remove mutex locking from the functions that simply call through
to the underlying File or Inode, since those fields never change anyway,
and the target objects perform their own synchronization.
Otherwise, any subclass which increased the size of the window would see
a very large reset button. The width chosen here is the same width as
the other buttons in this window.
I tried the OpenSSH port but it failed to compile due to a missing
definition of this macro. It's simple enough to add, and it's addition
allowed OpenSSH to compile once again.
I also went ahead and added spec comments for these macros as well.
The idea of locking the process veil in CrashReproter is well
intentioned, but ultimately frought with issues.
The fundamental premise is a bit flawed, as we are using the crashing
program as input to dynamically add new paths to the process veil.
This means that an attacker can potentially produce a custom or
malformed binary to trick CrashReporter into allowing an arbitrary
path to be read.
This lets us produce valid CSS in its to_string() method, instead of
always adding commas as before. :^)
Also, finally added a Formatter for StyleValues.
Many of these will need to change in the future in order to include
features we don't yet support, and touching StyleValue.h is a great way
to have to wait for all of LibWeb to rebuild. I'm hoping this saves me
time in the long run. :^)
If 'mount' is executed without any arguments we should print the mount
points and return early not printing the usage statement.
This fixes a regression introduced in commit: 9d48406
Raw whitespace is not allowed inside a name, but escaped whitespace is,
for example `\9`, which is the tab character.
This stops yakzz.com from crashing the Browser, since it was using `\9`
in various places as a hack to only apply those properties to IE8/9.
Add polling support to NVMe so that it does not use interrupt to
complete a IO but instead actively polls for completion. This probably
is not very efficient in terms of CPU usage but it does not use
interrupts to complete a IO which is beneficial at the moment as there
is no MSI(X) support and it can reduce the latency of an IO in a very
fast NVMe device.
The NVMeQueue class has been made the base class for NVMeInterruptQueue
and NVMePollQueue. The factory function `NVMeQueue::try_create` will
return the appropriate queue to the controller based on the polling
boot parameter.
The polling mode can be enabled by adding an extra boot parameter:
`nvme_poll`.
There is no use in calling disable_irq function in the IRQHandler
constructor if irq was not registered before. So add a condition where
we call disable_irq only if the irq was registered before.
As we don't currently support MSI(X) interrupts, it could be an issue
to boot on some newer hardware. NVMe devices support polling mode
where the driver actively polls for completion instead of waiting for
an interrupt.
At the point at which `mount -a` is executed by SystemServer, the
/proc fs is not yet mounted. That means that opening /proc/fd in
the `print_mounts()` function will always fail with an error.
0.976 mount(8:8): Exiting with runtime error:
No such file or directory (errno=2)
The fix is simple, just return gracefully after we execute mount all.