Commit graph

33861 commits

Author SHA1 Message Date
Andreas Kling
f92ee94fe2 LibWeb: Expose KeyboardEvent's constructor on the window object 2022-02-03 22:35:13 +01:00
Andreas Kling
926d5271b4 LibWeb: Forward CanvasRenderingContext.strokeText() to fillText()
This is a hack until we get an actual text stroking implementation.
2022-02-03 22:35:13 +01:00
Andreas Kling
dc3bf32307 LibWeb: Add barebones CanvasGradient object
Also add the CanvasRenderingContext2D APIs to go along with it.
Note that it can't be used for anything yet.
2022-02-03 22:35:13 +01:00
Andreas Kling
545ec334f0 LibWeb: Add Document.hasFocus() stub
This always returns true for now. A proper implementation needs to check
if the document is in the focused widget within an active window.
2022-02-03 22:35:13 +01:00
Andreas Kling
90a8744823 LibWeb: Add CanvasRenderingContext2D.bezierCurveTo() 2022-02-03 22:35:13 +01:00
Andreas Kling
34f6c88ffd Revert "Kernel: Protect InodeWatcher internals with spinlock instead of mutex"
This reverts commit 0bebf013e3.

This caused a deadlock when handling a crashed process, so let's revert
it until we can figure out what went wrong.
2022-02-03 18:25:55 +01:00
Andreas Kling
e7dc9f71b8 Kernel: Protect Inode flock list with spinlock instead of mutex 2022-02-03 17:28:45 +01:00
Andreas Kling
a81aebfd6e Kernel: Remove unnecessary mutex for ubsan-is-deadly ProcFS node 2022-02-03 16:11:26 +01:00
Andreas Kling
e86ab57078 AK+Kernel+LibSanitizer: Store "ubsan-is-deadly" flag as Atomic<bool> 2022-02-03 16:11:26 +01:00
Andreas Kling
0bebf013e3 Kernel: Protect InodeWatcher internals with spinlock instead of mutex 2022-02-03 16:11:26 +01:00
Andreas Kling
64254b5df8 Kernel: Protect PCI access with spinlock instead of mutex 2022-02-03 16:11:26 +01:00
Andreas Kling
200589ba27 Kernel: Turn VirtIOGPU operation lock from mutex into spinlock 2022-02-03 16:11:26 +01:00
Andreas Kling
ca42621be1 Kernel: Protect FramebufferDevice with spinlock instead of mutex 2022-02-03 16:11:26 +01:00
Andreas Kling
ddde9e7ee5 Kernel: Protect global device map with spinlock instead of mutx 2022-02-03 16:11:26 +01:00
Andreas Kling
e0d9472ced Kernel: Protect Inode's list of watchers with spinlock instead of mutex 2022-02-03 16:11:26 +01:00
Andreas Kling
210689281f Kernel: Protect mounted filesystem list with spinlock instead of mutex 2022-02-03 16:11:26 +01:00
Andreas Kling
3becff9eae Kernel: Protect network adapter list with spinlock instead of mutex 2022-02-03 16:11:26 +01:00
Andreas Kling
0899153170 Kernel: Protect PTYMultiplexer freelist with spinlock instead of mutex 2022-02-03 16:11:26 +01:00
Andreas Kling
6fbb924bbf Kernel: Protect ARP table with spinlock instead of mutex 2022-02-03 16:11:26 +01:00
Andreas Kling
248832f438 Kernel: Convert OpenFileDescriptor from mutex to spinlock
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.
2022-02-03 16:11:26 +01:00
Andreas Kling
35e24bc774 Kernel: Move Spinlock lock/unlock functions out of line
I don't see why these have to be inlined everywhere in the kernel.
2022-02-03 16:11:26 +01:00
Timothy Flynn
362e167239 ClockSettings: Display a text bubble with extra time zone information 2022-02-03 16:11:15 +01:00
Timothy Flynn
4d2ea773db ClockSettings: Display a map to show the current time zone's location 2022-02-03 16:11:15 +01:00
Timothy Flynn
35cacb850a LibGUI: Add a const accessor to ImageWidget's bitmap 2022-02-03 16:11:15 +01:00
Timothy Flynn
4cf4a7cc87 LibGUI: Forward declare ImageWidget 2022-02-03 16:11:15 +01:00
Timothy Flynn
ea814a3ce6 LibTimeZone: Parse and generate time zone coordinate data 2022-02-03 16:11:15 +01:00
Timothy Flynn
7b41a09540 LibGUI: Set a fixed width for the SettingsWindow reset-to-default button
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.
2022-02-03 16:11:15 +01:00
Rummskartoffel
2560d0b9ad Documentation: Update reference to obsolete config option 2022-02-03 14:57:46 +01:00
Rummskartoffel
85c3852b8f KeyboardPreferenceLoader: Don't crash when "Keymaps" is empty 2022-02-03 14:57:46 +01:00
Brian Gianforcaro
2b14a11238 LibC: Add IN6_IS_ADDR_LINKLOCAL to in.h
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.
2022-02-03 14:57:16 +01:00
Brian Gianforcaro
e8857f9b2d CrashReporter: Stop attempting to lockdown the process veil
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.
2022-02-03 14:57:01 +01:00
Timur Sultanov
6edb34aa56 Base: Update keymap man page to include new functionality
Adding examples on how to use keymap tool to set a list of keymaps
2022-02-03 00:47:22 +01:00
Timur Sultanov
c7bd47c87c Base+WindowsServer+keymap: Store multiple keymaps in a config 2022-02-03 00:47:22 +01:00
Timur Sultanov
5a31697bcf Base: Start Keymap.Applet automatically 2022-02-03 00:47:22 +01:00
Timur Sultanov
b9c558f6c6 WindowServer+Keymap+LibGUI: Add widget to display current keymap 2022-02-03 00:47:22 +01:00
Timur Sultanov
68a01f0e27 WindowManager: Basic support for system keymap switching 2022-02-03 00:47:22 +01:00
Sam Atkins
181d1e2dd6 LibWeb: Implement TransformationStyleValue::to_string() 2022-02-03 00:45:49 +01:00
Sam Atkins
5826fe094f LibWeb: Allow comma- or space-separated StyleValueLists
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.
2022-02-03 00:45:49 +01:00
Sam Atkins
f71db4afd8 LibWeb: Make StyleValue::to_string() output valid CSS
Having clear debug output was useful, but most places that use to_string
() expect to get valid CSS, so let's do that. :^)
2022-02-03 00:45:49 +01:00
Sam Atkins
f22d8c8f77 LibWeb: Move non-trivial StyleValue to_string() methods to cpp file
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. :^)
2022-02-03 00:45:49 +01:00
Kenneth Myhra
760eeb20da mount: Do not print usage if executed without any arguments
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
2022-02-02 21:43:27 +01:00
sin-ack
f1c00bb439 Documentation: Add FAQ entry about running the system 2022-02-02 21:40:28 +01:00
Linus Groh
40ba12aa7d LibJS: Consider calls of parse_iso_date_time() fallible
See: https://github.com/tc39/proposal-temporal/pull/2027
2022-02-02 18:55:00 +00:00
Sam Atkins
2a7a8d2cab LibWeb: Don't verify that a dimension unit isn't whitespace
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.
2022-02-02 18:29:05 +01:00
Pankaj Raghav
d93ffe3cf8 Documentation: Update BareMetalInstallation's storage support section
NVMe drive has been tested on a BareMetal HW :^) . Update the
BareMetalInstallation instruction to reflect the same.
2022-02-02 18:26:59 +01:00
Pankaj Raghav
d234e6b801 Kernel: Add polling support to NVMe
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`.
2022-02-02 18:26:59 +01:00
Pankaj Raghav
aa832ee251 Kernel: Add conditional call to disable_irq in IRQHandler constructor
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.
2022-02-02 18:26:59 +01:00
Pankaj Raghav
e5a6d12ff8 Kernel: Add nvme_poll command line parameters
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.
2022-02-02 18:26:59 +01:00
Linus Groh
19a2b32065 LibJS: Reject '-000000' as extended year
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/e60ef9e
2022-02-02 14:46:52 +00:00
Brian Gianforcaro
8215b99df1 mount: Exit without error when handling mount all on system boot
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.
2022-02-02 11:21:43 +01:00