Commit graph

43761 commits

Author SHA1 Message Date
Linus Groh
0d63b7a515 LibCodeComprehension: Add .clang-format to disable formatting for tests
Same as 42865b8975.
2022-12-03 23:52:23 +00:00
Andrew Kaster
106c04d807 Ports: Update qt6-qt5compat to 6.4.0 2022-12-03 23:16:16 +00:00
Andrew Kaster
042e33cb13 Ports: Clean up host path detection in qt6-serenity
Follow the same pattern as the other Qt ports to use qmake to determine
the location of host binaries and libraries.
2022-12-03 23:16:16 +00:00
Andrew Kaster
b7cc7b4e02 Ports: Update Qt6 port to 6.4.0
While we're here, make the host path detection more portable.
2022-12-03 23:16:16 +00:00
Andrew Kaster
ad9c24ffc2 LibC: Add definitions for missing ELF constants
Qt 6.4.0 relies on the definitions of ELFOSABI_GNU, ELFOSABI_AIX, and
EM_S390 existing.
2022-12-03 23:16:16 +00:00
Andrew Kaster
7555804572 Ports: Use CMake to build the zstd port
This makes the port install drop the CMake install files into the
sysroot, which is friendlier to macOS users. Homebrew CMake really
likes to pick homebrew zstd, even for cross-builds.
2022-12-03 23:16:16 +00:00
Andrew Kaster
6d9d9cb7f8 Ports: Add port for double-conversion 3.2.1
This IEEE floating point conversion library is required by Qt
2022-12-03 23:16:16 +00:00
Vitriol1744
e3e1566fd7 Kernel: Implement PIT::set_periodic() and PIT::set_non_periodic() 2022-12-03 23:10:36 +00:00
sno2
36f6e09f7e Documentation: Update WSL QEMU Installation Requirements
As Evil stated in the Discord, WSL users must install the DLL
libraries with their QEMU Installation or else they will receive
obscure errors about the syntax of the Meta/run.sh file as shown in
SerenityOS#14033.
2022-12-03 16:04:38 -07:00
davidot
cf0d30add6 LibJS: Add a function to ensure calls are made within the same second
Before these tests could be flaky if they happened to be called around
the edge of a second. Now we try up to 5 times to execute the tests
while staying within the same second.
2022-12-03 23:04:08 +00:00
Taj Morton
146d45a652 LibC: Return h_aliases array from gethostbyname() and gethostbyaddr()
The hostent struct's h_aliases field conventionally contains a pointer
to an array of alternate hostnames, where the final entry in this array
is a nullptr (signifying the end of the list).
At least one POSIX application (Pine email client) does not expect
`h_aliases` itself to be nullptr.
2022-12-03 22:12:13 +00:00
Taj Morton
14baf35441 Ports/alpine: Add patches to build Alpine on Serenity 2022-12-03 22:12:13 +00:00
Liav A
69f41eb062 Kernel: Reject create links on paths that were not unveiled as writable
This solves one of the security issues being mentioned in issue #15996.
We simply don't allow creating hardlinks on paths that were not unveiled
as writable to prevent possible bypass on a certain path that was
unveiled as non-writable.
2022-12-03 11:00:34 -07:00
Idan Horowitz
0eeba7084d CI: Run test262 tests with optimized bytecode as well 2022-12-03 17:48:05 +00:00
Idan Horowitz
1141e2b56a test262-runner: Add option to enable bytecode optimizations 2022-12-03 17:48:05 +00:00
MacDue
6dbe7b06b3 LibWeb: Fix integer overflow in gradient painting
This would cause rendering glitches at the edges of gradients (at
certain angles).
2022-12-03 16:05:02 +00:00
MacDue
40e978df85 LibGfx: Fix some more antialiased line off-by-ones
Turns out most things expect lines to include the endpoint,
e.g. 0,0 -> 3,0 is a 4px long line. But the fill_path() implementation
seems to expect the line to be the distance between the two points
(so the above example is a 3px line instead).

This now adds an option to pick between PointToPoint line length or
Distance line length and uses the latter for fill_path().
2022-12-03 15:36:58 +00:00
MacDue
acc0fceaae LibGfx: Remove some unused AntiAliasingPainter methods 2022-12-03 15:36:58 +00:00
MacDue
b85af4e9bf LibGfx: Add some AntiAliasingPainter FIXMEs
Also fixup the style on some comments.

See #16270... Hopefully someone will land on these :^)
2022-12-03 15:36:58 +00:00
Hendiadyoin1
eb50969781 LibJS: Add an EliminateLoads pass to Bytecode
This pass tries to eliminate repeated lookups of variables by name, by
remembering where these where last loaded to.

For now the lookup cache needs to be fully cleared with each call or
property access, because we do not have a way to check if these have any
side effects on the currently visible scopes.

Note that property accesses can cause getters/setters to be called, so
these are treated as calls in all cases.
2022-12-03 15:25:05 +00:00
Hendiadyoin1
fafe498238 LibJS: Expose some internals of Instructions
These will be needed in the future to allow optimization passes to check
against these
2022-12-03 15:25:05 +00:00
Hendiadyoin1
fd6e75fd01 LibJS: Add a way to replace references to registers in Bytecode 2022-12-03 15:25:05 +00:00
Hendiadyoin1
f5e7fa4d0e LibJS: Make Register comparable 2022-12-03 15:25:05 +00:00
Clemens Wasser
9a5ae8a92a Ports: Add qt5compat port 2022-12-03 08:21:56 -07:00
MacDue
cdf6e568f6 Base: Add some repeating-radial-gradient() HTML examples 2022-12-03 09:06:51 -05:00
MacDue
28028be2fc LibWeb: Support repeating-radial-gradient()s 2022-12-03 09:06:51 -05:00
Andrew Kaster
f539bf467c Meta+CI: Add CI job specifically for bundling serenity-js artifacts
These are used by esvu, and it is sad that we don't have macOS binaries
availble for consumption by esvu users. Add a matrix job to handle this
separately from the test262 results.
2022-12-03 09:05:40 -05:00
Hendiadyoin1
186237aec8 LibJS: Don't try to merge blocks not ending in Jumps 2022-12-03 17:07:30 +03:30
Hendiadyoin1
192897c269 LibJS: Remeber which instruction terminated a block 2022-12-03 17:07:30 +03:30
Hendiadyoin1
8c4717fc6e LibJS: Add a debug_position helper to the Bytecode Interpreter
This also changes argument_list_evaluation's dbgln to use it.
2022-12-03 17:07:30 +03:30
Hendiadyoin1
b86f1c2fe7 LibJS: Restore cached current_block on return in Bytecode
Otherwise debug prints will show the wrong block until we preform a jump
2022-12-03 17:07:30 +03:30
Hendiadyoin1
a00c421d61 LibJS: Handle FinishUnwind in GenerateCFG 2022-12-03 17:07:30 +03:30
Hendiadyoin1
6998b72d22 LibJS: Mark FinishUnwind as a terminator 2022-12-03 17:07:30 +03:30
Hendiadyoin1
ded7545db1 LibJS: Use a switch statement in GenerateCFG 2022-12-03 17:07:30 +03:30
Hendiadyoin1
7697e09660 LibJS: Don't mark blocks for unification multiple times
This would cause a UAF otherwise
2022-12-03 17:07:30 +03:30
Hendiadyoin1
35db0c5e18 js: Force optimizations when setting the -p flag 2022-12-03 17:07:30 +03:30
Sam Atkins
0fc673e759 LibCore: Mark connections to InspectorServer as MSG_NOSIGNAL
If InspectorServer closes for some reason at the wrong time, there is no
need for the inspected application to terminate.
2022-12-03 14:27:05 +01:00
Sam Atkins
9eb26ddd21 LibCore: Mark LocalServer client sockets as MSG_NOSIGNAL
Make LocalServer connections not terminate their process from SIGPIPE,
which fixes the issue where closing DisplaySettings with the[OK] button
would often crash WindowServer.
2022-12-03 14:27:05 +01:00
Sam Atkins
cb5f83606a LibCore: Optionally pass MSG_NOSIGNAL to socket read/writes
When creating a `Core::Stream::Socket`, you can now choose to prevent
SIGPIPE signals from firing and terminating your process. This is done
by passing MSG_NOSIGNAL to the `System::recv()` or `System::send()`
calls when you `read()` or `write()` to that Socket.
2022-12-03 14:27:05 +01:00
Liav A
0bb7c8f4c4 Kernel+SystemServer: Don't hardcode coredump directory path
Instead, allow userspace to decide on the coredump directory path. By
default, SystemServer sets it to the /tmp/coredump directory, but users
can now change this by writing a new path to the sysfs node at
/sys/kernel/variables/coredump_directory, and also to read this node to
check where coredumps are currently generated at.
2022-12-03 05:56:59 -07:00
Liav A
7dcf8f971b Kernel: Rename SysFSSystemBoolean => SysFSSystemBooleanVariable 2022-12-03 05:56:59 -07:00
Liav A
756d2a7f63 Base: Add a description about Jails to the Mitigations(7) document
We add a new document entry to mention jailed processes' restrictions,
so it is clear which restrictions apply when using Jails.
2022-12-03 05:47:58 -07:00
Liav A
95d8aa2982 Kernel: Allow read access sparingly to some /sys/kernel directory nodes
Those nodes are not exposing any sensitive information so there's no
harm in exposing them.
2022-12-03 05:47:58 -07:00
Liav A
1ca0ac5207 Kernel: Disallow jailed processes to read files in /sys/kernel directory
By default, disallow reading of values in that directory. Later on, we
will enable sparingly read access to specific files.

The idea that led to this mechanism was suggested by Jean-Baptiste
Boric (also known as boricj in GitHub), to prevent access to sensitive
information in the SysFS if someone adds a new file in the /sys/kernel
directory.
2022-12-03 05:47:58 -07:00
Liav A
2e55956784 Kernel: Forbid access to /sys/kernel/power_state for Jailed processes
There's simply no benefit in allowing sandboxed programs to change the
power state of the machine, so disallow writes to the mentioned node to
prevent malicious programs to request that.
2022-12-03 05:47:58 -07:00
Steffen Rusitschka
1aa07d7328 AK: Implement FloatExtractor<f128>
This patch adds support for 128-bit floating points in FloatExtractor.

This is required to build SerenityOS on MacOS/aarch64. It might break
building for Raspberry Pi.
2022-12-02 16:22:51 +01:00
Idan Horowitz
2e806dab07 LibJS: Implement Set.prototype.isDisjointFrom 2022-12-02 13:09:15 +01:00
Idan Horowitz
3470f33a0f LibJS: Implement Set.prototype.isSupersetOf 2022-12-02 13:09:15 +01:00
Idan Horowitz
e29be4eaa8 LibJS: Implement Set.prototype.isSubsetOf 2022-12-02 13:09:15 +01:00
Idan Horowitz
e359eeabe8 LibJS: Implement Set.prototype.symmetricDifference 2022-12-02 13:09:15 +01:00