Commit graph

559 commits

Author SHA1 Message Date
Liav A 3d89938c4a SystemServer+Meta: Use the new SysFS
We make SystemServer to mount the new SysFS in /sys.
2021-06-29 20:53:59 +02:00
Gunnar Beutner 449d34a154 Meta: Change default GDB layout
This adds a TUI window that displays disassembly/source code which
I've found quite useful.
2021-06-29 20:03:36 +02:00
Gunnar Beutner 0cb937416b Meta: Install 64-bit libgcc_s.so for x86_64 targets 2021-06-28 22:29:28 +02:00
Sahan Fernando 16eb0803fc Meta: Choose the QEMU display backend based on whats available 2021-06-28 07:01:11 +04:30
stelar7 1f33c517df Meta: Do not use gl=on if building in WSL 2021-06-27 15:48:08 +02:00
Sahan Fernando 44174a44bd Meta: Use virtio-vga instead of virtio-gpu if using multiple monitors 2021-06-26 18:45:35 +02:00
Tom 8fe52b8306 Meta: Force relative mouse coordinates with multiple screens
QEMU appears to always relay absolute mouse coordinates relative to the
screen that the mouse is pointed to, without any way for us to know
what screen it was. So, when dealing with multiple displays force using
relative coordinates only.
2021-06-25 23:54:37 +02:00
Tom 3d5340d033 Meta: Add SERENITY_SCREENS environment variable
This allows specifying how many screens we should use. This also then
only enables virtio-gpu if more than one display is requested.

This also adds an environment variable SERENITY_QEMU_DISPLAY_BACKEND
which allows overriding the default qemu display backend, as it may
not be available.
2021-06-25 22:20:55 +02:00
Sahan Fernando b9ad6058aa Kernel: Add VirtIOGPU graphics device 2021-06-25 19:26:30 +02:00
kleines Filmröllchen 988763c0ef Toolchain: Add the AFLACLOADER_DEBUG macro
This enables FLAC debugging output, which is used
with the new FLAC loader introduced in later commits.
2021-06-25 20:48:14 +04:30
Gunnar Beutner f17b4e561f Meta: Increase RAM amount for Bochs
Booting with 128 MB of RAM is kind of tough.
2021-06-25 15:19:09 +02:00
Gunnar Beutner c9747a3236 Kernel: Build the x86_64 kernel as an ELF32 executable
Multiboot only supports ELF32 executables. This changes the build
process to build an ELF32 executable which has a 32-bit entry point,
but consists of mostly 64-bit code.
2021-06-25 15:19:09 +02:00
Gunnar Beutner 1979c7d185 Meta: Run 64-bit kernels with qemu-system-x86_64 2021-06-25 15:19:09 +02:00
Jan de Visser 4198f7e1af LibSQL: Move Lexer and Parser machinery to AST directory
The SQL engine is expected to be a fairly sizeable piece of software.
Therefore we're starting to restructure the codebase for growth.
2021-06-24 00:36:53 +02:00
coderdreams 9ffb3e7e30 LibCore: Add unit test for File::read_line 2021-06-22 18:54:40 +04:30
Ali Mohammad Pur 79d4913f76 LibWasm: Generate all spec tests, even ones that aren't valid modules
`wasm-as` will do some semantic analysis on the modules, which is not
something we're looking for here.
Instead, use `wat2wasm` to generate the exact module.
2021-06-22 00:26:25 +04:30
Ali Mohammad Pur 9c5d38b7db Meta+LibWasm: Add support for module linking tests
This commit makes the linking tests in the wasm spec test run.
2021-06-22 00:26:25 +04:30
Peter Bocan 4d5ffd364a LibCrypto+LibTLS: Split and move test suite into Tests directory
This change splits test-crypto.cpp from Userland into separate test
suites located in Tests/ directory.
2021-06-19 19:05:36 +04:30
Itamar 03ef2a479a LibCoreDump: Include source locations of inlined functions in backtrace 2021-06-19 14:51:18 +02:00
Luke f29036dc98 Lagom/Fuzzers: Add fuzzers for all current hashing functions
Namely MD5, SHA1, SHA256, SHA384 and SHA512.
2021-06-18 21:44:56 +01:00
Sam Atkins 0e680cb17a Meta: Ensure long messages fit in commit tweet
Abbreviating the commit message to 240 characters was not always enough.
As a bonus, we now add an ellipsis to abbreviated messages.
2021-06-18 13:34:17 +01:00
sin-ack e2215cc0e1 Lagom: Add an install target
This is used by libjs-test262-runner to be able to copy the libraries
within its own build directory in order to link with them.
2021-06-17 21:20:24 +01:00
Gunnar Beutner 6e094b8dbe Meta: Increase additional space for disk images
Previously we'd add 100MB on top of what du returned for the Root
directory. This increases that to 500MB.
2021-06-17 11:03:51 +02:00
Gunnar Beutner d7a03397af Meta: Allow building images without most utilities
Previously the build script assumed that certain utilities were always
available.
2021-06-17 11:03:51 +02:00
Gunnar Beutner 0dd03413d6 Meta: Add support for declaring components
Components are a group of build targets that can be built and installed
separately. Whether a component should be built can be configured with
CMake arguments: -DBUILD_<NAME>=ON|OFF, where <NAME> is the name of the
component (in all caps).

Components can be marked as REQUIRED if they're necessary for a
minimally functional base system or they can be marked as RECOMMENDED
if they're not strictly necessary but are useful for most users.

A component can have an optional description which isn't used by the
build system but may be useful for a configuration UI.

Components specify the TARGETS which should be built when the component
is enabled. They can also specify other components which they depend on
(with DEPENDS).

This also adds the BUILD_EVERYTHING CMake variable which lets the user
build all optional components. For now this defaults to ON to make the
transition to the components-based build system easier.

The list of components is exported as an INI file in the build directory
(e.g. Build/i686/components.ini).

Fixes #8048.
2021-06-17 11:03:51 +02:00
Brian Gianforcaro f0fbaa00a4 Meta: Remove gdb pretty printer for AK::InlineLinkedList 2021-06-16 10:40:01 +02:00
Ali Mohammad Pur 1414c7b049 LibJS: Add a basic pass manager and add some basic passes
This commit adds a bunch of passes, the most interesting of which is a
pass that merges blocks together, and a pass that places blocks that
flow into each other next to each other, and a very simply pass that
removes duplicate basic blocks.
Note that this does not remove the jump at the end of each block in that
pass to avoid scope creep in the passes.
2021-06-15 22:06:33 +04:30
networkException 472721b774 Everywhere: Use new discord invite url :^)
Replaces all instances of the previous discord invite link
with a shiny new vanity url.
2021-06-14 22:41:37 +01:00
Apoorv Mishra f32ab73acc
Meta: Fix QEMU version check in run.sh
The QEMU version check in `Meta/run.sh` fails on macOS because the BSD
version of `grep` does not support the `-P` option. Using `sed` instead.
2021-06-13 12:05:48 +01:00
Jesse Buhagiar 06f1edb516 USB: Further Implement USB Structures
These are the actual structures that allow USB to work (i.e the ones
actually defined in the specification). This should provide us enough
of a baseline implementation that we can build on to support
different types of USB device.
2021-06-12 18:17:25 +04:30
x-yl ac712b07f9 Meta: Fuzz the LibIMAP Parser 2021-06-11 23:58:28 +04:30
Gunnar Beutner 87b1da4441 Revert "Meta: Use Intel 82574 instead of Intel 82540 in the run script"
This reverts commit 84b2dc0fb8.
2021-06-11 11:32:19 +02:00
Idan Horowitz a898e01d4d Kernel: Add driver for RTL8168 & RTL8111 NICs
These are pretty common on older LGA1366 & LGA1150 motherboards.

NOTE: Since the registers datasheets for all versions of the chip
besides versions 1 - 3  are still under NDAs i had to collect
several "magical vendor constants" from the *BSD driver and the
linux driver that i was not able to name verbosely, and as such
these are labeled with the comment "vendor magic values".
2021-06-10 21:54:51 +02:00
Liav A 84b2dc0fb8 Meta: Use Intel 82574 instead of Intel 82540 in the run script 2021-06-09 22:44:09 +04:30
Liav A c6480a0426 Kernel/Net: Support Intel 82574 adapter
We call it E1000E, because the layout for these cards is somewhat not
the same like E1000 supported cards.

Also, this card supports advanced features that are not supported on
8254x cards.
2021-06-09 22:44:09 +04:30
Apoorv Mishra 5d57384bc4 Meta: Check installed QEMU version
`ninja install` fails with a clueless error message if the installed
QEMU version is less than 5.0.
2021-06-09 18:53:32 +02:00
Andreas Kling 675b0aee24 Websites: Some updates for the serenityos.org front page
- Add link to the Discord server
- Remove reference to Freenode IRC channel since it's no longer used
- Add sponsorship links for Linus :^)
2021-06-08 10:56:52 +02:00
Andreas Kling 7cbe4daa7c LibJS: Move bytecode debug spam behind JS_BYTECODE_DEBUG :^) 2021-06-07 18:11:59 +02:00
FalseHonesty 403bb07443 LibVideo: Scaffold LibVideo and implement simplistic Matroska parser
This commit initializes the LibVideo library and implements parsing
basic Matroska container files. Currently, it will only parse audio
and video tracks.
2021-06-06 17:47:00 +02:00
Ali Mohammad Pur 51c2c69357 AK+Everywhere: Disallow constructing Functions from incompatible types
Previously, AK::Function would accept _any_ callable type, and try to
call it when called, first with the given set of arguments, then with
zero arguments, and if all of those failed, it would simply not call the
function and **return a value-constructed Out type**.
This lead to many, many, many hard to debug situations when someone
forgot a `const` in their lambda argument types, and many cases of
people taking zero arguments in their lambdas to ignore them.
This commit reworks the Function interface to not include any such
surprising behaviour, if your function instance is not callable with
the declared argument set of the Function, it can simply not be
assigned to that Function instance, end of story.
2021-06-06 00:27:30 +04:30
Ali Mohammad Pur d7ba15371b Meta: Don't make wasm tests pass when they cannot read a module
Instead, just let them be treated as failing their respective test.
2021-06-04 16:07:42 +04:30
NonStandardModel c4c577b2bf Meta: Sort debug macros alphabetically 2021-06-03 18:44:45 +01:00
Ali Mohammad Pur 6b5d1eedcb Meta: Make the wasm test generator cast numbers to i32 when needed
Otherwise the sign would be out of whack
2021-06-02 16:09:16 +04:30
Ali Mohammad Pur 7fb458b7c9 Meta: Generate failing tests for unsupported assertions in wasm tests
Let's not ignore a test just because our test generator doesn't
understand it, assume the worst and generate a failing test case
instead.
2021-06-02 16:09:16 +04:30
Linus Groh 21a62fe836 Meta: Remove duplicated ensure_toolchain from serenity.sh 2021-06-02 00:34:41 +01:00
Jelle Raaijmakers 468bb54677 Meta: Make serenity.sh invoke cmake when build.ninja is missing 2021-06-01 11:33:56 +01:00
Max Wipfli 0d0ed4962f AK: Add a new, spec-compliant URLParser
This adds a new URL parser, which aims to be compliant with the URL
specification (https://url.spec.whatwg.org/). It also contains a
rudimentary data URL parser.
2021-06-01 09:28:05 +02:00
Nick Miller 10ba6f254c Kernel: Rename instances of IO port 0xe9 to BOCHS_DEBUG_PORT 2021-05-31 19:06:13 +01:00
Luke 3bc2527ce7 Lagom/Fuzzers: Add SQL parser fuzzer 2021-05-31 17:07:52 +04:30
Brian Gianforcaro 26cb64573c CMake: Hide KMALLOC_VERIFY_NO_SPINLOCK_HELD so folks don't find it
Since I introduced this functionality there has been a steady stream of
people building with `ALL_THE_DEBUG_MACROS` and trying to boot the
system, and immediately hitting this assert. I have no idea why people
try to build with all the debugging enabled, but I'm tired of seeing the
bug reports about asserts we know are going to happen at this point.

So I'm hiding this value under the new ENABLE_ALL_DEBUG_FACILITIES flag
instead. This is only set by CI, and hopefully no-one will try to build
with this thing (It's documented as not recommended).

Fixes: #7527
2021-05-31 11:30:47 +01:00
Gunnar Beutner 5f18cf75c5 AK: Replace ByteBuffer::grow with resize()/ensure_capacity()
Previously ByteBuffer::grow() behaved like Vector<T>::resize().
However the function name was somewhat ambiguous - and so this patch
updates ByteBuffer to behave more like Vector<T> by replacing grow()
with resize() and adding an ensure_capacity() method.

This also lets the user change the buffer's capacity without affecting
the size which was not previously possible.

Additionally this patch makes the capacity() method public (again).
2021-05-31 14:49:00 +04:30
Andreas Kling 33f2eeea4a pls: Drastically simplify this program
Since this program is setuid-root, it should be as simple as possible.

To that end, remove `/etc/plsusers` and use filesystem permissions to
achieve the same thing. `/bin/pls` is now only executable by `root` or
members of the `wheel` group.

Also remove all the logic that went to great lengths to `unveil()` a
minimal set of filesystem paths that may be used for the command.
The complexity-to-benefit ratio did not seem justified, and I think
we're better off keeping this simple.

Finally, remove pledge promises the moment they are no longer needed.
2021-05-30 23:09:37 +02:00
Edwin Hoksberg e68780e1ad WebServer: Put dbgln's behind WEBSERVER_DEBUG
These dbgln's caused excessive load in the WebServer process,
accounting for ~67% of the processing time when serving a webpage
with a bunch of resources like serenityos.org/happy/2nd/.
2021-05-30 17:41:56 +01:00
Ben Wiederhake 774107f37c Fuzz+LibGfx: When fuzzing GIFLoader, try to load all frames 2021-05-30 14:42:34 +01:00
Jesse Buhagiar d44e2c9ad9 Userland: Check sudoers file perms and owner in pls
As per comment found in #6319 by @bcoles, `pls` should check the
permissions and owner of the sudoers file to ensure that it hasn't
been compromised.
2021-05-29 22:33:12 +04:30
Jesse Buhagiar 82b48d867d Userland: Implement pls, a sudo clone 2021-05-29 22:33:12 +04:30
Andrew Kaster 3ece67d62d Meta/CI: Remove IRC notifications
With the increased volume of PRs being opened and merged lately,
multiple people have complained that the IRC is absolutely flooded with
SerenityBot posts. Remove the IRC notifications from the CI scripts, and
the Meta script that handles parsing the github actions context into
an IRC message.
2021-05-29 19:35:49 +02:00
Liav A c1a4dfeffb Kernel/Graphics: Remove unnecessary derived FramebufferDevice classes
It seems like overly-specific classes were written for no good reason.
Instead of making each adapter to have its own unique FramebufferDevice
class, let's generalize everything to keep implementation more
consistent.
2021-05-27 22:39:13 +02:00
Ali Mohammad Pur 0e4431af33 Meta: Run the Wasm spec tests in CI
Since LibWasm is still not capable of passing all of the spec tests,
ignore failing tests, only fail the build if some segfault/abort/etc
occurs.
2021-05-27 17:28:41 +04:30
Ali Mohammad Pur b2bd5132c4 Meta: Correctly parse numeric literals in wasm tests
This was previously parsing them as hex numbers, causing tests to fail.
With this fix, 88% of the generated tests are passing :^)
2021-05-27 17:28:41 +04:30
Max Wipfli a272c04c8a
Base: Make desktop shortcuts owned by anon (#7495)
This fixes #7492.
2021-05-27 08:52:46 +02:00
Gunnar Beutner a808fff2ec Revert "Revert "Kernel: Fix PCI layout of i440fx QEMU machine""
This reverts commit 72c097530f.

With that patch applied audio doesn't work anymore.

Fixes #7445.
2021-05-25 09:38:25 +02:00
Itamar b9021f8631 Meta: Exclude LibCpp&LanguageServer tests from check-newlines-at-eof.py 2021-05-22 15:52:11 +02:00
Liav A 72c097530f Revert "Kernel: Fix PCI layout of i440fx QEMU machine"
This reverts commit 5018b3b4b7.

Let's help our future selves by making sure we don't introduce a bug
because of duplicating a network interface name or related bug to this
topic. Therefore, we can have multiple e1000 devices in the system now.
2021-05-22 11:19:50 +01:00
Ali Mohammad Pur b808815e57 Meta: Display DistinctNumeric as its alias name in GDB if possible
All DistinctNumerics are given an identifying tag, if the tag is
generated by the macro, print the alias instead of DistinctNumeric.
2021-05-22 13:21:00 +04:30
Ali Mohammad Pur 3d0786f96b Meta: Add GDB pretty printer for AK::Variant 2021-05-22 13:21:00 +04:30
Ali Mohammad Pur 37651a28e1 Meta: Pretty-print the types in serenity_gdb.py
DistinctNumeric<T, ...> and some other types are very long, but the
template arguments provide no particular value, so just don't show them
2021-05-22 13:21:00 +04:30
Gunnar Beutner c3efae85f2 Games: Add Hearts 2021-05-21 23:38:18 +02:00
Liav A 5018b3b4b7 Kernel: Fix PCI layout of i440fx QEMU machine
Some folks on discord said adding another e1000 network adapter made it
so we don't have networking on the system anymore.
To fix this, we will use other unsupported PCI device instead.
2021-05-21 21:20:10 +02:00
Liav A f27e75ac0c Meta: Make i440fx QEMU machine PCI hierarchy a bit more complex
Let's help our future selves by ensuring we have proper support for
secondary PCI buses always.
2021-05-21 17:58:53 +01:00
Brian Gianforcaro bd1bdbe91b Meta: Add GDB pretty printer for AK::SinglyLinkedList 2021-05-21 15:23:01 +02:00
Brian Gianforcaro 0fbc5893bf Meta: Add GDB pretty printer for AK::InlineLinkedList
This allows a developer to easily dump a InlineLinkedList in the
debugger without having to manually running the list.
I needed this for a recent bug investigation in the Kernel.
2021-05-21 15:23:01 +02:00
Andrew Kaster a5889b9aad Shell: Hide job times behind SHELL_JOB_DEBUG flag 2021-05-21 12:05:34 +04:30
Ali Mohammad Pur 24b2a6c93a LibWasm+Meta: Implement instantiation/execution primitives in test-wasm
This also optionally generates a test suite from the WebAssembly
testsuite, which can be enabled via passing `INCLUDE_WASM_SPEC_TESTS`
to cmake, which will generate test-wasm-compatible tests and the
required fixtures.
The generated directories are excluded from git since there's no point
in committing them.
2021-05-21 00:15:23 +01:00
Ali Mohammad Pur b3c13c3e8a LibWasm+Meta: Add test-wasm and optionally test the conformance tests
This only tests "can it be parsed", but the goal of this commit is to
provide a test framework that can be built upon :)
The conformance tests are downloaded, compiled* and installed only if
the INCLUDE_WASM_SPEC_TESTS cmake option is enabled.
(*) Since we do not yet have a wast parser, the compilation is delegated
to an external tool from binaryen, `wasm-as`, which is required for the
test suite download/install to succeed.
This *does* run the tests in CI, but it currently does not include the
spec conformance tests.
2021-05-21 00:15:23 +01:00
Ali Mohammad Pur ba2fce14d3 Meta: Add a Wasm parser fuzzer 2021-05-21 00:15:23 +01:00
Andreas Kling 59fec42a25 StateMachineGenerator: Put output into the CMake build directory
Don't pollute the source directory with generated code.
2021-05-20 18:10:59 +02:00
Ali Mohammad Pur c6b12841ee Meta: Make generate_state_machine() generate a proper target
And use GENERATED_SOURCES (or add_dependencies) to make LibVT depend on
that target.
Fixes a FIXME.
2021-05-20 12:11:27 +01:00
Itamar 832e9c6e02 LibCpp: Add regression tests for the parser
For each .cpp file in the test suite data, there is a .ast file that
represents the "known good" baseline of the parser result.

Each .cpp file goes through the parser, and the result of
invoking `ASTNode::dump()` on the root node is compared to the
baseline to find regressions.

We also check that there were no parser errors when parsing the .cpp
files.
2021-05-19 23:19:07 +02:00
Itamar eeb98335d5 CppLanguageServer: Put cpp test files in /home/anon/cpp-tests/
This is similar to the LibJS test data that resides in
/home/anon/js-tests.
It's more convenient than storing the test programs as raw strings
in the code.
2021-05-19 23:19:07 +02:00
Ali Mohammad Pur f137c1bfaa LibJS+LibTest: Move out the test-js test runner into LibTest 2021-05-18 18:48:15 +01:00
stelar7 24c5b0e81c LibGfx: Add support for DDS images 2021-05-18 08:45:53 +01:00
Ali Mohammad Pur dfb2178519 Meta: Build LibWasm and the wasm utility as part of Lagom 2021-05-17 23:25:30 +02:00
Ali Mohammad Pur 056be42c0b LibWasm: Start implementing a naive bytecode interpreter
As the parser now flattens out the instructions and inserts synthetic
nesting/structured instructions where needed, we can treat the whole
thing as a simple parsed bytecode stream.
This currently knows how to execute the following instructions:
- unreachable
- nop
- local.get
- local.set
- {i,f}{32,64}.const
- block
- loop
- if/else
- branch / branch_if
- i32_add
- i32_and/or/xor
- i32_ne

This also extends the 'wasm' utility to optionally execute the first
function in the module with optionally user-supplied arguments.
2021-05-17 23:25:30 +02:00
Andreas Kling a15c7b7944 Build: Stop using precompiled headers (PCH)
This had very bad interactions with ccache, often leading to rebuilds
with 100% cache misses, etc. Ali says it wasn't that big of a speedup
in the end anyway, so let's not bother with it.

We can always bring it back in the future if it seems like a good idea.
2021-05-17 19:30:12 +02:00
Siddharth Kapoor dbd9d13857
Meta: Run 'du' with '--apparent-size', except on macOS
Fixes #7172.
2021-05-16 22:50:46 +01:00
Liav A 2e565f1b8a Meta: Update grub configuration to adopt the new textual boot mode 2021-05-16 19:58:33 +02:00
Liav A 20743e8aed Kernel/Graphics + SystemServer: Support text mode properly
As we removed the support of VBE modesetting that was done by GRUB early
on boot, we need to determine if we can modeset the resolution with our
drivers, and if not, we should enable text mode and ensure that
SystemServer knows about it too.

Also, SystemServer should first check if there's a framebuffer device
node, which is an indication that text mode was not even if it was
requested. Then, if it doesn't find it, it should check what boot_mode
argument the user specified (in case it's self-test). This way if we
try to use bochs-display device (which is not VGA compatible) and
request a text mode, it will not honor the request and will continue
with graphical mode.

Also try to print critical messages with mininum memory allocations
possible.

In LibVT, We make the implementation flexible for kernel-specific
methods that are implemented in ConsoleImpl class.
2021-05-16 19:58:33 +02:00
Liav A cc92538d49 Kernel/Graphics: Add basic support for Intel native accelerator
We simply modeset the resolution after determining the preferred
resolution after getting the EDID from the attached display.
2021-05-16 19:58:33 +02:00
Liav A 8515a1c49d Meta: Boot the Q35 machine without VGA support
Use the bochs-display device instead :)
2021-05-16 19:58:33 +02:00
Gunnar Beutner f0fa51773a AK+Userland: Fix some compiler warnings and make variables const-ref
This fixes a few compiler warnings and makes some variables const-ref
in preparation for the next commit which changes how ByteBuffer works.
2021-05-16 17:49:42 +02:00
Timothy Flynn ce030ca584 AK+Meta: Add a debug option for Solitaire 2021-05-16 16:37:51 +02:00
Daniel Bertalan be519022c3 LibVT: Implement new ANSI escape sequence parser
This commit replaces the former, hand-written parser with a new one that
can be generated automatically according to a state change diagram.

The new `EscapeSequenceParser` class provides a more ergonomic interface
to dealing with escape sequences. This interface has been inspired by
Alacritty's [vte library](https://github.com/alacritty/vte/).

I tried to avoid changing the application logic inside the `Terminal`
class. While this code has not been thoroughly tested, I can't find
regressions in the basic command line utilities or `vttest`.

`Terminal` now displays nicer debug messages when it encounters an
unknown escape sequence. Defensive programming and bounds checks have
been added where we access parameters, and as a result, we can now
endure 4-5 seconds of `cat /dev/urandom`. :D

We generate EscapeSequenceStateMachine.h when building the in-kernel
LibVT, and we assume that the file is already in place when the userland
library is being built. This will probably cause problems later on, but
I can't find a way to do it nicely.
2021-05-16 11:50:56 +02:00
Idan Horowitz 3f08e957d4 Meta: Add a check for periods on the end of titles to commit linter 2021-05-16 01:25:24 +01:00
Linus Groh 9459f3728c Meta: Check that copyright headers are followed by a blank line 2021-05-15 00:28:30 +01:00
Linus Groh 5ee9aab7e1 Meta: Bump BIOS/MBR boot partition size of grub disk image to 1MiB
As of ~April 2021 the Meta/build-image-grub.sh script no longer works
for me (on Fedora 34) and fails with the following error:

    /usr/sbin/grub2-install: warning: ../grub-core/partmap/msdos.c:403:
    your core.img is unusually large. It won't fit in the embedding
    area.

    /usr/sbin/grub2-install: warning: Embedding is not possible. GRUB
    can only be installed in this setup by using blocklists. However,
    blocklists are UNRELIABLE and their use is discouraged..

    /usr/sbin/grub2-install: error: will not proceed with blocklists.

Changing the size of the boot partition from 32 kiB to 1 MiB (2048
sectors) fixes the issue. This is also described in the following Ubuntu
grub2 bug (as well as 40 duplicates!) from 2012, which suggests the same
fix: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1059827

The Arch Linux wiki also uses 1 MiB in their BIOS/MBR examples for
parted: https://wiki.archlinux.org/title/Parted

I'm not sure why this suddenly stopped working, however I was able to
boot with an image created with this change applied.
2021-05-15 00:57:35 +02:00
Andreas Kling d039542c7c AK: Remove unused STRINGIMPL_DEBUG instrumentation 2021-05-14 17:17:32 +02:00
Brian Gianforcaro 9c38475608 Kernel: Add the ability to verify we don't kmalloc under spinlock.
Ideally we would never allocate under a spinlock, as it has many
performance and potentially functionality (deadlock) pitfalls.

We violate that rule in many places today, but we need a tool to track
them all down and fix them. This change introduces a new macro option
named `KMALLOC_VERIFY_NO_SPINLOCK_HELD` which can catch these
situations at runtime via an assert.
2021-05-14 13:28:21 +02:00
Andrew Kaster d81f52e529 Lagom: Enable sanitizer builds with gcc
Previously the CMake options for -fsanitize=address, thread and
undefined were gated behind clang, which was unecessary. Only
-fsanitize=fuzzer is clang-only.
2021-05-14 08:34:00 +01:00
Brian Gianforcaro 57385a1c29 CMake: Make missing medium icon a FATAL_ERROR
Now that all of the medium icons pass this check, we can make it
FATAL_ERROR to stop any new violations from being checked in.
2021-05-13 23:45:50 +02:00