Commit graph

37692 commits

Author SHA1 Message Date
Timon Kruiper
0d6d4508df Kernel: Add the .ksyms section to the aarch64 Kernel binary
Previously the embedmap.sh script generated a warning, since there was
no section defined where the actual kernel.map could be stored. This is
necesarry for generating kernel backtraces.
2022-05-03 21:53:36 +02:00
Timon Kruiper
9f76b16124 Kernel: Implement safe_memcpy for the aarch64 build
The implementation just calls the regular memcpy, and is not safe yet.
This can be done later.
2022-05-03 21:53:36 +02:00
Timon Kruiper
feba7bc8a8 Kernel: Move Kernel/Arch/x86/SafeMem.h to Kernel/Arch/SafeMem.h
The file does not contain any specific architectural code, thus it can
be moved to the Kernel/Arch directory.
2022-05-03 21:53:36 +02:00
Timon Kruiper
267febae55 Kernel: Add KSyms.cpp to the aarch64 build
This is the first step in making dump_backtrace() work.
2022-05-03 21:53:36 +02:00
Timon Kruiper
442800db3e Kernel: Fetch the frame pointer using __builtin_frame_address()
This compiler builtin abstracts away the specifics of fetching the frame
pointer. This will allow the KSyms.cpp to be build for the aarch64
target. While we're here, lets also change the
PerformanceEventBuffer.cpp to not rely on x86_64 specifics.
2022-05-03 21:53:36 +02:00
Tim Schumacher
dcd76db319 LibC: Hide posix_memalign by default
This should keep ports from preferring `posix_memalign` over other
implementations of aligned memory.
2022-05-03 21:53:19 +02:00
Linus Groh
45995aaeb6 Ports: Add RISCVEmu 2022-05-03 21:38:35 +02:00
Patrick Meyer
5510b98dc8 DHCPClient: Don't crash if DHCP options contain no gateway
Fixes #13879
2022-05-03 12:37:51 +04:30
Patrick Meyer
7b76bc2b49 Ports: Update openssh to 9.0 2022-05-02 17:12:51 -07:00
Patrick Meyer
6020364476 Ports: Make openssh server not crash during startup
Before, the openssh server tried to chroot. The startup always aborted
after that, as our chroot stub currently simply returns -1. Luckily we
can use unveil instead.

Furthermore the missing ssh_host_ed25519_key also prevented the server
from successfully starting.

The previous ReadMe.md entry about socketpair missing was already
resolved by #6705.
2022-05-02 17:12:51 -07:00
Linus Groh
9f3f3b0864 LibJS: Remove implicit wrapping/unwrapping of completion records
This is an editorial change in the ECMA-262 spec, with similar changes
in some proposals.

See:
- https://github.com/tc39/ecma262/commit/7575f74
- https://github.com/tc39/proposal-array-grouping/commit/df899eb
- https://github.com/tc39/proposal-shadowrealm/commit/9eb5a12
- https://github.com/tc39/proposal-shadowrealm/commit/c81f527
2022-05-03 01:09:29 +02:00
Timon Kruiper
15f32379bb Kernel: Remove UART::{print_num, print_hex} since they are unused 2022-05-03 00:59:35 +02:00
Timon Kruiper
47a58c51c6 Kernel: Modify UART::print_str() to also take into account the length
Previously in the aarch64 Kernel, this would cause dbgln() to actually
print more characters of the next string in memory, because strings in
the Kernel are not zero terminated by default. Prevent this by using the
passed in length of the string.
2022-05-03 00:59:35 +02:00
Timon Kruiper
4a2dcea685 Kernel: Remove aarch64/Utils.{cpp, h} since they are not used anymore 2022-05-03 00:59:35 +02:00
Timon Kruiper
83265b4cb2 Kernel: Replace calls to UART::print_str() with dbgln()
Since we can now use dbgln() in the aarch64 Kernel, lets use it! :^)
2022-05-03 00:59:35 +02:00
Timon Kruiper
b046c82f75 Kernel: Let Processor::is_initialized() of aarch64 return false
When calling dbgln(), the formatting code in AK/Format.h calls
Processor::is_initialized() to determine whether to add some text about
the current processor to the debug output. Instead of crashing, we just
return false, such that we can use dbgln() etc in the aarch64 Kernel.
2022-05-03 00:59:35 +02:00
Timon Kruiper
b9944ca905 Kernel: Add aarch64 version of kprintf.cpp
This allows us to use the AK formatting functions in the aarch64 Kernel.
Also add FIXME to make sure that this file will be removed when the
proper abstractions are in place in the normal Kernel/kprintf.cpp.
2022-05-03 00:59:35 +02:00
Timon Kruiper
b3346aa08d Kernel: Fix aarch64 build by adding -Wno-nonnull flag
The compiler figured out that the MemoryManager is not initialised, and
thus MemoryManager::the() cannot return a valid reference. Once the
necesarry code is in place, this compiler flag can be removed.
2022-05-03 00:59:35 +02:00
Kenneth Myhra
b8de830683 base64: Replace char pointer with StringView 2022-05-02 22:18:27 +02:00
Kenneth Myhra
bd81e15bc9 base64: Use TRY() instead of VERIFY(!result.is_error()) 2022-05-02 22:18:27 +02:00
Kenneth Myhra
ec1f5fd20f base64: Use Core::File standard_input() standard_output() 2022-05-02 22:18:27 +02:00
electrikmilk
8ae492ba4d Base: Add More Emojis
Adds Cat face emojis U+1F63B, U+1F63C, U+1F63D, U+1F63E, U+1F639,
U+1F640

Adds Party Popper emoji U+1F389

Adds Rocket Emoji U+1F680
2022-05-02 12:45:21 +02:00
Patrick Meyer
0bd131ad06 Kernel: Stop requiring working malloc for syscall.h includes
Fixes #13869
2022-05-02 12:44:34 +02:00
cflip
e02579bdab PixelPaint: Set title of default image to 'Untitled' 2022-05-02 12:43:46 +02:00
Andrew Kaster
44bcd7c7aa CI: Add x86_64 Clang Coverage pipeline in Azure
Add a job to the Azure pipelines to run tests with coverage enabled, and
aggregate the test results in a folder of html pages showing the
coverage results overall, and per-file.

Future work is needed to take the published pipeline artifact for the
coverage results and display them somewhere interesting.
2022-05-02 01:46:18 +02:00
Andrew Kaster
3e32fb911e Meta: Add script to analyze coverage data from an existing disk image
The analyze-qemu-coverage.sh script cracks open the _disk_image for the
given SERENITY_ARCH and SERENITY_TOOLCHAIN and extracts llvm profile
data into a local directory owned by the current user. It then calls a
coverage artifact script from llvm to create a nice html report for all
the source files referenced by the profile data files.

We currently grab a script from llvm via wget. In the future a custom
script to call llvm-cov and llvm-profdata should probably be used.
2022-05-02 01:46:18 +02:00
Andrew Kaster
0e45b21e45 Base: Set $LLVM_PROFILE_FILE before running run-tests
Set LLVM_PROFILE_FILE to a pattern that is easily extractable as "these
are the profile data files we generated while running tests" for later
post-processing.
2022-05-02 01:46:18 +02:00
Andrew Kaster
f08e91f67e Kernel: Don't check pledges or veil against code coverage data files
Coverage tools like LLVM's source-based coverage or GNU's --coverage
need to be able to write out coverage files from any binary, regardless
of its security posture. Not ignoring these pledges and veils means we
can't get our coverage data out without playing some serious tricks.

However this is pretty terrible for normal exeuction, so only skip these
checks when we explicitly configured userspace for coverage.
2022-05-02 01:46:18 +02:00
Andrew Kaster
5120b39d0e Meta+Userland: Add ENABLE_USERSPACE_COVERAGE_COLLECTION CMake option
This option sets -fprofile-instr-generate -fcoverage-mapping for Clang
builds only on almost all of Userland. Loader and LibTimeZone are
exempt. This can be used for generating code coverage reports, or even
PGO in the future.
2022-05-02 01:46:18 +02:00
Andrew Kaster
a6b2c34746 Meta: Remove unused serenity_libc_static helper function 2022-05-02 01:46:18 +02:00
Andrew Kaster
3c80a4caeb LibM: Remove stale commented out CMake commands 2022-05-02 01:46:18 +02:00
Andrew Kaster
f75edeb9ad DynamicLoader: Remove stale FIXME for removing -nodefaultlibs
The FIXME says "Remove after next toolchain update" and I'm very certain
we've had some :tool: :chain: in the last 7 months.
2022-05-02 01:46:18 +02:00
Andrew Kaster
4334bd06b8 Toolchain: Enable LLVM Profile instrumentation
Add a patch to let llvm's InstrProfiling modules know serenity supports
all the Unix-y features required to make -fprofile-instr-generate and
-fcoverage-mapping work properly on target.
2022-05-02 01:46:18 +02:00
Andrew Kaster
9b041786ac readelf: Don't error out on invalid interpreter path
This lets us inspect ELF binaries with un-loadable program interpreters,
same as binutils and llvm-readelf.
2022-05-02 01:45:49 +02:00
César Torres
4b0b22d897 LibGfx: Fix typo in Color constructor 2022-05-02 01:45:14 +02:00
Linus Groh
8cbd25f553 LibJS: Simplify Is{Accessor,Data,Generic}Descriptor AOs
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/1c7ae4b
2022-05-01 22:47:38 +02:00
Linus Groh
07ac8b7021 LibJS: Change "Record {}" to "Iterator Record {}" in comments
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/85d910c
2022-05-01 22:47:38 +02:00
Linus Groh
c9bdd59e20 LibJS: Change "Completion {}" to "Completion Record {}" in comments
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/15a7d8a
2022-05-01 22:47:38 +02:00
Linus Groh
719137418d LibJS: Change "as [the] argument[s]" to "with arguments" in comments
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/e671b96
2022-05-01 22:47:38 +02:00
Linus Groh
214d5e3e83 LibJS: Update outdated table reference in BoundFunctionCreate 2022-05-01 22:47:38 +02:00
Linus Groh
7767f9be37 LibJS: Rename some variables from "script body" to "script"
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/38a2584
2022-05-01 22:47:38 +02:00
Linus Groh
acda12597a LibJS: Rename scope to environment
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/3246553
2022-05-01 22:47:38 +02:00
Linus Groh
cb66474fb5 LibJS: Update spec comments testing presence of a field
This is an editorial change in the ECMA-262 spec.

See:
- https://github.com/tc39/ecma262/commit/497f99a
- https://github.com/tc39/ecma262/commit/0b35749
2022-05-01 22:47:38 +02:00
Linus Groh
d33fcad87f LibJS: Update ValidateAndApplyPropertyDescriptor implementation
These are editorial changes in the ECMA-262 spec.

See:
- https://github.com/tc39/ecma262/commit/b9efa97
- https://github.com/tc39/ecma262/commit/6f4ff96
- https://github.com/tc39/ecma262/commit/3d18997
- https://github.com/tc39/ecma262/commit/b3c29fd
2022-05-01 22:47:38 +02:00
Linus Groh
85c16452f9 LibJS: Simplify Array.prototype.splice()
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/193211a
2022-05-01 22:47:38 +02:00
Linus Groh
5a26a547db LibJS: Update a couple of outdated spec comments
These are editorial changes in the ECMA-262 spec.

See:
- https://github.com/tc39/ecma262/commit/e080a7f
- https://github.com/tc39/ecma262/commit/c5a9094
- https://github.com/tc39/ecma262/commit/5091520
- https://github.com/tc39/ecma262/commit/1c6564b
- https://github.com/tc39/ecma262/commit/e06c80c
2022-05-01 22:47:38 +02:00
Linus Groh
ce659e5eeb LibJS: Remove assertions that are now part of structured headers
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/4fde514
2022-05-01 22:13:21 +02:00
Linus Groh
86e3840202 LibJS: Add missing comment in OrdinaryToPrimitive 2022-05-01 22:13:21 +02:00
python-69
bfb4f070ba Documentation: Fix Typo in TransferringFiles.md
Changed typo in command from Meta/serenity.run to Meta/serenity.sh run
2022-05-01 18:11:07 +02:00
Maciej
66ab4d61a4 Kernel: Stop exposing gateway field
It doesn't make sense after introduction of routing table which allows
having multiple gateways for every interface, and isn't used by any of
the userspace programs now.
2022-05-01 13:34:27 +02:00