Commit Graph

327 Commits

Author SHA1 Message Date
Linus Groh
eb5b2b4b4f Lagom: Add 'test' command to serenity.sh 2021-03-12 21:27:09 +01:00
Linus Groh
04fc4a8134 Meta: Make 'serenity.sh run lagom' run Lagom executables
Running the tests will be moved to a separate test command which can
then leverage the availability of different targets and run either unit
tests on the host or the image in QEMU in self-test mode. :^)
2021-03-12 21:27:09 +01:00
Linus Groh
1c85ce0324 Meta: Don't depend on toolchain for lagom target in serenity.sh
- Only call ensure_toolchain for non-lagom targets
- Use host addr2line, we can't expect the i686 toolchain's addr2line to
  support the host's binary executable format
- Don't export SERENITY_ARCH and TOOLCHAIN_DIR, don't need them anymore
2021-03-12 21:27:09 +01:00
Linus Groh
cab2982feb Meta: Add lagom_unsupported helper function to serenity.sh 2021-03-12 21:27:09 +01:00
Andreas Kling
9769542bc2 FuzzilliJs: Add missing <errno.h> include 2021-03-12 17:43:48 +01:00
Linus Groh
e93a147f26 Meta: Remove old CLion-specific files
This is not needed anymore, and likely outdated anyway.
2021-03-11 21:01:29 +01:00
Andreas Kling
cd745baa86 Meta: Add KMALLOC_DEBUG to all_the_debug_macros 2021-03-11 15:38:35 +01:00
Tom
929c90f8c8 Meta: Add gdb command to serenity.sh
This uses tmux for a split screen setup, which makes it easy do debug
the kernel while viewing the QEMU output in the same terminal.
2021-03-11 08:29:23 +01:00
Andreas Kling
2fc684f6bc Kernel: Remove ancient FIFO_DEBUG code 2021-03-09 22:10:41 +01:00
Tom
389dddd4b3 Meta: Add a build helper script
This script automatically manages the toolchain and cmake/ninja folders
making it easier to manage the different target architectures.
2021-03-09 07:28:59 +01:00
Andreas Kling
0918dd0460 Website: Add link to @ABigPickle's VLA exploit 2021-03-08 22:53:28 +01:00
Andreas Kling
dfca6b03e4 Website: Reorganize bounty page history section a little bit 2021-03-08 22:53:28 +01:00
Emanuele Torre
26c4cae77c Meta: check-newlines-at-eof.py now checks .json files and files in Base/
This makes it also check man pages and keymap files. :^)
2021-03-08 09:20:53 +01:00
Emanuele Torre
1f81bc6879 Everywhere: Remove unnecessary whitespace at the end of some lines. 2021-03-08 09:20:53 +01:00
Emanuele Torre
b7de2046e6 Meta: serenityos.org: Fix javascript error in the 2nd anniversary page.
The error as seen from chromium's devtools:

    Uncaught ReferenceError: I is not defined
        at (index):455
2021-03-08 09:20:53 +01:00
Linus Groh
a013a38e24 Meta: Make 'run.sh qgrub' work via SERENITY_RUN
It is possible to set the run.sh mode via the SERENITY_RUN environment
variable, but the SERENITY_DISK_IMAGE="grub_disk_image" override for
qgrub mode was only checking $1. This makes qgrub mode work via 'ninja
run' without explicitly setting SERENITY_DISK_IMAGE:

    SERENITY_RUN=qgrub ninja run
2021-03-06 19:55:53 +01:00
Liav A
e65fd83e23 Meta: Boot Q35 machine with SATA drive instead of using IDE drive 2021-03-05 11:29:34 +01:00
Liav A
c4463cb5df Kernel: Add basic AHCI functionality
The hierarchy is AHCIController, AHCIPortHandler, AHCIPort and
SATADiskDevice. Each AHCIController has at least one AHCIPortHandler.

An AHCIPortHandler is an interrupt handler that takes care of
enumeration of handled AHCI ports when an interrupt occurs. Each
AHCIPort takes care of one SATADiskDevice, and later on we can add
support for Port multiplier.

When we implement support of Message signalled interrupts, we can spawn
many AHCIPortHandlers, and allow each one of them to be responsible for
a set of AHCIPorts.
2021-03-05 11:29:34 +01:00
Andreas Kling
38c8dc22cf Kernel: Remove unused KMALLOC_DEBUG_LARGE_ALLOCATIONS mode
This was a thing back when the system was so little that any kernel
allocation above 1 MiB was basically guaranteed to be a bug. :^)
2021-03-04 11:25:45 +01:00
AnotherTest
e59a631511 HackStudio/LanguageServers: Move some components out of Cpp
This makes them available for use by other language servers.
Also as a bonus, update the Shell language server to discover some
symbols and add go-to-definition functionality :^)
2021-03-04 11:21:43 +01:00
Luke
28a705d3c7 Lagom/Fuzzers: Add fuzzers for LibCompess
Adds fuzzers for Deflate, Gzip and Zlib.
2021-03-04 09:19:29 +01:00
Idan Horowitz
45a11ead9a Meta: Stop excluding getopt.cpp from linting
This file was already "serenified" by @bugaevc long ago.
2021-03-03 23:42:32 +01:00
Idan Horowitz
c12781a6a2 LibCore+LibHTTP+LibGfx: Switch to LibCompress
This commit removes the only 3rd party library (and its usages)
in serenity: puff, which is used for deflate decompression. and
replaces it with the existing original serenity implementation
in LibCompress. :^)
2021-03-03 23:42:32 +01:00
Andrew Kaster
1aa605bc03 Meta: Run test-js and test-compress as CTest executables
Reduces the number of steps in the Actions workflow this way :^)
2021-03-02 09:00:21 +01:00
Andrew Kaster
669b6c43aa AK/Lagom: Modify TestSuite to return how many tests failed from main
This allows us to remove the FAIL_REGEX logic from the CTest invocation
of AK and LibRegex tests, as they will return a non-zero exit code on
failure :^).

Also means that running a failing TestSuite-enabled test with the
run-test-and-shutdown script will actually print that the test failed.
2021-03-01 11:12:36 +01:00
Tom
5b1edc0678 Meta: Allow specifying custom grub config file for build-image-grub.sh
This allows passing a custom grub config file as second argument to
build-image-grub.sh.
2021-03-01 11:11:56 +01:00
Luke
a66f96ff62 Lagom/Fuzzers: Add WAV fuzzer 2021-03-01 11:09:09 +01:00
Andrew Kaster
611bbc43be Base/CI: Boot serenity in CI in a mode that runs tests on target
Build a new version of Serenity in CI that doesn't have all the debug
symbols on, or we'd be waiting a very long time to boot.

Insert a TestRunner entry into SystemServer.ini that will run a shell
script that runs tests in /bin and /usr/Tests and shuts down the system
in the new self-test boot mode. Also make sure enough basic services are
started in self-test such that the tests will actually run properly.
2021-02-28 18:19:37 +01:00
Andrew Kaster
ca8319f800 Meta: Add run target for CI
This invocation of qemu has no VGA, no sound, no graphics, debug output
going to a file, and defaults to printing /dev/ttyS0 to stdout.
2021-02-28 18:19:37 +01:00
Andrew Kaster
e787738c24 Meta: Build AK and LibRegex tests in Lagom and for Serenity
These tests were never built for the serenity target. Move their Lagom
build steps to the Lagom CMakeLists.txt, and add serenity build steps
for them. Also, fix the build errors when building them with the
serenity cross-compiler :^)
2021-02-28 18:19:37 +01:00
Sviatoslav Peleshko
183ebaee91 LibWeb: Add actual document loading for the CSS (at)import rule 2021-02-28 10:27:32 +01:00
Linus Groh
24120d9dca Lagom: Build with -Wno-literal-suffix when using GCC
This is already set in the root CMakeLists.txt as well as here for Clang
(-Wno-user-defined-literals), but was forgotten for GCC which made an
Lagom-only build (cmake ../Meta/Lagom [...]) fail.
2021-02-27 16:38:21 +01:00
Linus Groh
590ae7a36d Lagom: CMakeLists.txt housekeeping
- Remove unused LIBM_SOURCES
- Some cosmetic and whitespace changes
2021-02-27 16:38:21 +01:00
Jakub Berkop
9aa91e6c6f Meta: Enable qemu virtualization acceleration on mac 2021-02-27 06:20:52 +01:00
Linus Groh
e265054c12 Everywhere: Remove a bunch of redundant 'AK::' namespace prefixes
This is basically just for consistency, it's quite strange to see
multiple AK container types next to each other, some with and some
without the namespace prefix - we're 'using AK::Foo;' a lot and should
leverage that. :^)
2021-02-26 16:59:56 +01:00
Brian Gianforcaro
31e1b08e15 AK: Add support for AK::StringView literals with operator""sv
A new operator, operator""sv was added as of C++17 to support
string_view literals. This allows string_views to be constructed
from string literals and with no runtime cost to find the string
length.

See: https://en.cppreference.com/w/cpp/string/basic_string_view/operator%22%22sv

This change implements that functionality in AK::StringView.
We do have to suppress some warnings about implementing reserved
operators as we are essentially implementing STL functions in AK
as we have no STL :).
2021-02-24 14:38:31 +01:00
Andreas Kling
5d180d1f99 Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)

Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.

We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
2021-02-23 20:56:54 +01:00
Ben Wiederhake
b46da5c2cb Meta: Make CMakeLists accessible to QtCreator
We end up having to edit various CMakeLists.txt all the time, and having to open
them in a different editor becomes old quite fast.
2021-02-21 22:34:09 +01:00
AnotherTest
074e2ffdfd LibLine: Avoid refreshing the entire line when inserting at the end
This patchset allows the editor to avoid redrawing the entire line when
the changes cause no unrecoverable style updates, and are at the end of
the line (this applies to most normal typing situations).
Cases that this does not resolve:
- When the cursor is not at the end of the buffer
- When a display refresh changes the styles on the already-drawn parts
  of the line
- When the prompt has not yet been drawn, or has somehow changed

Fixes #5296.
2021-02-20 22:28:23 +01:00
Andreas Kling
c2c7c7368b Website: Add @cees-elzinga's ptrace race + ASLR bypass to bounty page 2021-02-18 12:51:13 +01:00
Andreas Kling
5625a1d608 Lagom: Build LibTextCodec into Lagom 2021-02-16 19:00:02 +01:00
Andreas Kling
4ac286903d Meta: Add Ports/build_installed.sh to the lint-ports ignore list 2021-02-15 07:51:40 +01:00
Ben Wiederhake
ad4d9eaaf9 Meta: Lint AvailablePorts.md
As requested by popular demand ;)
https://github.com/SerenityOS/serenity/pull/5325#discussion_r575657614
2021-02-15 07:41:16 +01:00
AnotherTest
3fe7ac0924 LibCrypto: Make a better ASN.1 parser
And use it to parse RSA keys.
As a bonus, this one shouldn't be reading out of bounds or messing with
the stack (as much) anymore.
2021-02-14 13:30:10 +01:00
joshua stein
0d215b5548 Build: Sprinkle some portability, fix on OpenBSD
realpath(1) is specific to coreutils and its behavior can be had
with readlink -f

Create the Toolchain Build directory if it doesn't exist before
calling readlink, since realpath(3) on at least OpenBSD will error
on a non-existent path
2021-02-14 09:29:22 +01:00
Andreas Kling
3551198f99 Website: Add vakzz's exploit & writeup to the bounty page 2021-02-14 01:33:17 +01:00
Ben Wiederhake
363cc09091 Meta: Fix debug-flag detection
Detection broke when we moved from '#ifdef DEBUG_FOO dbgln()' to 'dbgln<DEBUG_FOO>()'.
This patch makes detection more general, which sadly runs into more false-positives.

No rotten code was found, hooray! :^)
2021-02-13 19:50:31 +01:00
Nick Vella
b671577223 HackStudio: Project templates and New Project dialog
This commit adds a simple project template system to HackStudio,
as well as a pretty New Project dialog, inspired by early VS.NET
and MS Office.
2021-02-13 19:49:30 +01:00
Luke
5b891b0c36 Lagom/Fuzzers: Add RSA key parser fuzzer
First issue: #5317
2021-02-13 11:03:06 +01:00
Ben Wiederhake
5963f2084e Utilities: Make syscall(1) explain what it's doing 2021-02-13 00:40:31 +01:00