Age | Commit message (Collapse) | Author |
|
|
|
Meta: Update INSTALL.md and grub configs for new boot_mode option
|
|
Together, they replace the old text_debug option.
* boot_mode should be either "graphical" (the default) or "text". We could
potentially support other values here in the future.
* init specifies which userspace process the kernel should spawn to bootstrap
userspace. By default, this is SystemServer, but you can specify e.g.
init=/bin/Shell to run system diagnostics.
|
|
Unfortunately this drops the feature of preserving VGA buffer contents.
Resolves https://github.com/SerenityOS/serenity/issues/2399
|
|
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
|
|
You now have to pledge "sigaction" to change signal handlers/dispositions. This
is to prevent malicious code from messing with assertions (and segmentation
faults), which are normally expected to instantly terminate the process but can
do other things if you change signal disposition for them.
|
|
The is_error() check on the KResultOr returned when reading the link
target had a stray ! operator which causes link resolution to crash the
kernel with an assertion error.
|
|
implementation.
Allow file system implementation to return meaningful error codes to
callers of the FileDescription::read_entire_file(). This allows both
Process::sys$readlink() and Process::sys$module_load() to return more
detailed errors to the user.
|
|
|
|
|
|
|
|
In case WNOHANG was specified, we want to always set should_unblock to
true (which we do since commit 4402207b983b6ad4e317ef5affa4a78f10903a26), not
wait_finished -- the latter causes us to immediately return this child to our
caller, which is not what we want -- perhaps we should return another child
which has actually exited or stopped, or nobody at all.
To avoid confusion, also rename wait_finished to fits_the_spec.
This fixes service keepalive functionality in SystemServer.
|
|
|
|
|
|
|
|
|
|
Now that ssize_t is derived from size_t, we have to
|
|
|
|
|
|
|
|
This code needs a closer looking-into at some point. It doesn't seem
entirely safe to be casting u32's to pointers like it does.
|
|
|
|
Since it's often used to pass pointers, it should really be a FlatPtr.
|
|
Get rid of the ConfigurationTableEntryLength enum and just look at the
sizeof() for each entry type.
|
|
Since FlatPtr is register width agnostic. :^)
|
|
This is what Dr. POSIX says it should do.
|
|
Now that we can pass arbitrary integer types to the JSON serialization
code, we don't have to cast to u32 as much!
|
|
We no longer blindly use PAGE_SIZE here. :^)
|
|
Add a MappedROM::find_chunk_starting_with() helper since that's a very
common usage pattern in clients of this code.
Also convert MultiProcessorParser from a persistent singleton object
to a temporary object constructed via a failable factory function.
|
|
This patch adds a MappedROM abstraction to the Kernel VM subsystem.
It's basically the read-only byte buffer equivalent of a TypedMapping.
We use this in the ACPI and MP table parsers to scan for interesting
stuff in low memory instead of doing a bunch of address arithmetic.
|
|
Use map_typed<T> to map physically addressed structs into kernel VM.
This is so much easier than doing address arithmetic everywhere. :^)
|
|
For singly-indirect blocks, "callback" is just "add_block".
For doubly-indirect blocks, "callback" is the lambda function
iterating on singly-indirect blocks: so instead of adding itself to the
list, the doubly-indirect block will add all its childs, but they add
themselves again when they run the callback of singly-indirect blocks.
And nothing adds the doubly-indirect block itself :(
This leads to a double free of all child blocks of the doubly-indirect
block, which is the failed assert described in #1549.
Closes: #1549.
|
|
If RDRAND doesn't give us data, we want to try again, not jump to some
low address like 0x80 :^)
|
|
This reverts commit 6d0d8487201eb3cc8d63a1d066a0735a97cdc6e3.
|
|
This reverts commit bde7bc3472e0541583ed333efc42a3bde53881ad.
|
|
This reverts commit c1eb744ff0a82cf6c8e3470ac10e2f417c7d9de2.
|
|
Let's not be paying the function call overhead for these tiny ops.
Maybe there's an argument for having fewer gadgets in the kernel but
for now we're actually seeing stac() in profiles so let's put
that above theoretical security issues.
|
|
|
|
We're far more likely to be looking for a user region than otherwise, so
optimize for that case.
|
|
If these methods get inlined, the compiler is able to statically eliminate most
of the assertions. Alas, it doesn't realize this, and believes inlining them to
be too expensive. So give it a strong hint that it's not the case.
This *decreases* the kernel binary size.
|
|
Make sure that userspace is always referencing "system" headers in a way
that would build on target :). This means removing the explicit
include_directories of Libraries/LibC in favor of having it export its
headers as SYSTEM. Also remove a redundant include_directories of
Libraries in the 'serenity build' part of the build script. It's already
set at the top.
This causes issues for the Kernel, and for crt0.o. These special cases
are handled individually.
|
|
It has nothing we need anymore :^)
|
|
This was missing before, we were getting it for free from libstdc++
|
|
We would want it to work with only stdio pledged.
|
|
read_block() and write_block() now accept the count (how many bytes to read
or write) and offset (where in the block to start; defaults to 0). Using these
new APIs, we can avoid doing copies between intermediary buffers in a lot more
cases. Hopefully this improves performance or something.
|
|
|
|
|
|
This fixes a problem where we'd block if a process with no children
would call sys$waitid() with WNOHANG. This unbreaks bash :^)
|
|
|
|
|