Commit graph

31494 commits

Author SHA1 Message Date
Junior Rantila
105f741131 Piano: Make Key_Space shortcut to toggle playback 2021-12-20 10:39:37 -08:00
Lady Gegga
bb7f32376c Base: Add some Old South Arabian characters to font Katica Regular 10
10A60-10A7F https://www.unicode.org/charts/PDF/U10A60.pdf
2021-12-20 10:39:09 -08:00
Jelle Raaijmakers
4e3ed16527 LibGL: Only pass bound texture units to rasterizer
Before, `SoftwareRasterizer` was iterating over all 32 possible texture
units for each fragment and checking each if they're bound to a texture.

After this change, an intrusive list containing only texture units with
bound textures is passed to the rasterizer. In GLQuake, this results in
a performance improvement of ~30% (from 12 to 16 FPS in the first demo)
on my machine.
2021-12-20 10:36:53 -08:00
Jelle Raaijmakers
f201567153 LibGL: Use 8x8 block size in SoftwareRasterizer
This smaller block size allows us to use an `u8` for the pixel mask
during triangle rasterization. These changes result in better FPS in
3DFileViewer, which periodically shoots up to 250-300 FPS on my
machine. Before, the peaks were somewhere in the range of 160-170 FPS.
2021-12-20 10:36:53 -08:00
Liav A
5a649d0fd5 Kernel: Return EINVAL when specifying -1 for setuid and similar syscalls
For setreuid and setresuid syscalls, -1 means to set the current
uid/euid/gid/egid value, to be more convenient for programming.
However, for other syscalls where we pass only one argument, there's no
justification to specify -1.

This behavior is identical to how Linux handles the value -1, and is
influenced by the fact that the manual pages for the group of one
argument syscalls that handle ID operations is ambiguous about this
topic.
2021-12-20 11:32:16 +01:00
Rok Povsic
a3c732b8ae Profiler: Display tooltip when hovering over flamegraph bars 2021-12-20 11:31:47 +01:00
Rok Povsic
d3a80b1a6e Profiler: Extract the bar label String into a private method 2021-12-20 11:31:47 +01:00
Stephan Unverwerth
47a4737110 LibGL: Fix texture sampling texel coordinate calculation
Previously we multiplied the interpolated texture coordinates by
width - 1 and height - 1 instead of width and height which resulted in
some wrongly mapped textures, especially visible in the glquake light
maps.

This also corrects the wrap mode being wrongly swapped for s/t
coordinates.

Since we do not have texture borders implemented yet we always use
GL_CLAMP_TO_EDGE for all clamping wrap modes for the time being.
2021-12-19 18:39:26 -08:00
Junior Rantila
3d63e688f7 watch: Port to LibMain 2021-12-19 18:26:57 -08:00
Junior Rantila
4178479ee5 LibCore: Add wrapper for signal() 2021-12-19 18:26:57 -08:00
Tim Schumacher
8eca395e4c LibC: Implement wcsdup 2021-12-19 18:22:41 -08:00
Michel Hermier
7a44c11378 LibTest: Add EXPECT_NO_CRASH 2021-12-19 14:22:06 -08:00
Michel Hermier
4c6e826c05 LibTest: Add EXPECT_CRASH_WITH_SIGNAL 2021-12-19 14:22:06 -08:00
Michel Hermier
b1b94692e6 LibTest: Handle test reporting in the a unique path 2021-12-19 14:22:06 -08:00
Michel Hermier
2f8fac3528 LibTest: Change Crash forked process communication
Now it returns `Failure` value via `exit`, and the caller is
responsible of reporting errors to the user.
2021-12-19 14:22:06 -08:00
Michel Hermier
c8cabd433a LibTest: Handle Crash printing in a private method 2021-12-19 14:22:06 -08:00
Michel Hermier
c22c1900c0 Tests: Add test for raise 2021-12-19 14:22:06 -08:00
Michel Hermier
0ec35d6d81 Tests: Add test for assert 2021-12-19 14:22:06 -08:00
Michel Hermier
181f759dc9 Tests: Add test for abort 2021-12-19 14:22:06 -08:00
Jonta
18dab0384d SystemServer: Fixed grammatical error "a charm" 2021-12-19 13:43:34 -08:00
Liav A
a875083739 Base: Add shutdown(1) manpage 2021-12-19 11:13:58 -08:00
Liav A
f94dacf90e Base: Add reboot(1) manpage 2021-12-19 11:13:58 -08:00
networkException
121bcc267d Base: Add rm(1) manpage 2021-12-19 11:03:29 -08:00
Andreas Kling
e0521cfb9d Kernel: Stop ProcFS stack walk on bogus userspace->kernel traversal
Unsurprisingly, the /proc/PID/stacks/TID stack walk had the same
arbitrary memory read problem as the perf event stack walk.

It would be nice if the kernel had a single stack walk implementation,
but that's outside the scope of this commit.
2021-12-19 18:18:38 +01:00
Andreas Kling
bc518e39bf Kernel: Make perfcore files owned by UID=0, GID=0
Since perfcore files can be generated during process finalization,
we can't just allow them to contain sensitive kernel information
if they're gonna be owned by the process's own UID+GID.

So instead, perfcores are now owned by 0:0. This is not the most
ergonomic solution, but I'm not sure what we could do to make it nicer.
We'll have to think more about that. In the meantime, this patches up
a kernel info leak. :^)
2021-12-19 18:18:38 +01:00
Andreas Kling
1cdc7aa038 Kernel: Mask kernel addresses in perf event streams for non-superuser
We now turn kernel addresses into 0xdeadc0de, same as /proc/PID/stacks/
2021-12-19 18:18:38 +01:00
Andreas Kling
369c7a7e9f Kernel: Don't include kmalloc perf events in JSON for non-superuser
These events contain sensitive kernel information and should not be
available to regular users.
2021-12-19 18:18:38 +01:00
Andreas Kling
8ef9b003ad Kernel: Stop perf event stack walk on bogus userspace->kernel traversal
When walking the stack to generate a perf_event sample, we now check
if a userspace stack frame points back into kernel memory.

It was possible to use this as an arbitrary kernel memory read. :^)
2021-12-19 18:18:38 +01:00
Idan Horowitz
d82c91ac2c SystemMonitor: Add back accidentally removed veil lock
Since the call to lock the veil was missing, the protections provided
by unveil() were not actually enabled.
2021-12-19 13:41:35 +01:00
PerikiyoXD
ff49285a02 LibGUI: Adjust focus rect for Buttons with icons
Reduced focus rect inflation value for buttons with icons
to match the expected focus rect for buttons without icons.

As mentioned in 'SerenityOS Office Hours / Q&A (2021-12-17)'
2021-12-19 13:39:02 +01:00
Linus Groh
9271005357 LibJS: Fix typo in spec comment 2021-12-19 09:35:02 +00:00
Linus Groh
f7fe7f8c77 LibJS: Capture TimeFraction parse result instead of Fraction
Not much of a difference as TimeFraction just parses Fraction, but let's
do it correctly. Small mistake I did in 4b7f716.

Thanks to YouTube user gla3dr for noticing this :^)
2021-12-19 09:29:46 +00:00
Max Trussell
99b263a2db Userland/Notify: Check if optional icon arg is null before loading
The commandline "notify" application was always attempting to load an
icon path from an optional argument, even when the argument was
omitted. In this case, the image icon argument would be a null pointer
and the notify program would crash.

This fix adds a conditional to only attempt to load the icon file if
the icon_path variable is not a null pointer
2021-12-19 00:50:53 -08:00
Michel Hermier
060e5ccbbc Lagom: Bind time_zone_list_index_type in the generator
The variable `s_time_zone_list_index_type` seems to be unused (detected
when compiling with clang), and it seems logical to bind it even it if
it is not used for now.
2021-12-18 21:01:10 -08:00
Michel Hermier
0bfb7f9675 LibC: Move _abort next to abort
It should be now the only user of it, and it is more logical to have it
in `stdlib.h` than in `assert.h`
2021-12-18 21:01:10 -08:00
Michel Hermier
2c62d51e25 LibC: Remove VERIFY_NOT_REACHED() from assert.h
Both `AK/Assertions.h` and `assert.h` would define the macro if `NDEBUG`
is set.

Remove the definition from `assert.h` since it is not an ISO-C
requirement.
2021-12-18 21:01:10 -08:00
Michel Hermier
ee42acddf8 LibC: Make __assertion_failed always defined
The symbol should be always defined, in case Serenity is built with
`NDEBUG` defined, and users wants to use `assert` from `LibC`.
2021-12-18 21:01:10 -08:00
Michel Hermier
35a5305264 LibC: Remove undefined __generate_unique_filename declaration 2021-12-18 21:01:10 -08:00
Luke Wilde
cf5f08b317 LibJS: Only allow TimeZone this value in TimeZone#getPlainDateTimeFor
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2644fc6
2021-12-19 00:13:01 +00:00
Luke Wilde
7729598b5b LibJS: Only allow TimeZone this value in Temporal.TimeZone#toJSON
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2644fc6
2021-12-19 00:13:01 +00:00
Luke Wilde
6c8c34ed6c LibJS: Only allow TimeZone this value in Temporal.TimeZone#id
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2644fc6
2021-12-19 00:13:01 +00:00
Luke Wilde
803e96f0c5 LibJS: Only allow Calendar this value in Temporal.Calendar#toJSON
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2644fc6
2021-12-19 00:13:01 +00:00
Linus Groh
5277646f46 LibJS: Fix 'precision != "auto"' check in temporal_duration_to_string()
If the Variant does *not* have a StringView, it *also* is not "auto".

Thanks to YouTube user JWeis for noticing this :^)
2021-12-18 23:20:00 +00:00
Astraeus-
a961a51692 Profiler: Convert to try_create_default_icon
and sprinkle in some more TRY() statements
2021-12-18 23:36:59 +01:00
Astraeus-
8513aff1cd Playground: Convert to try_create_default_icon
and sprinkle in some more TRY() statements
2021-12-18 23:36:59 +01:00
Astraeus-
64a5f990b1 Inspector: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
d12359ff20 WidgetGallery: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
1adc808664 Mouse: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
b9579de2b5 ModelGallery: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
683077c894 LibGfxScaleDemo: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00