summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-02Kernel: Ignore TLB flush requests for user addresses of other processesTom
If a TLB flush request is broadcast to other processors and the addresses to flush are user mode addresses, we can ignore such a request on the target processor if the page directory currently in use doesn't match the addresses to be flushed. We still need to broadcast to all processors in that case because the other processors may switch to that same page directory at any time.
2021-01-02Kernel: If a VMObject is shared, broadcast page remappingsTom
If we remap pages (e.g. lazy allocation) inside a VMObject that is shared among more than one region, broadcast it to any other region that may be mapping the same page.
2021-01-02Revert "Kernel: Allocate shared memory regions immediately"Tom
This reverts commit fe6b3f99d1f544715098182ce5bed71d67f266cf.
2021-01-02Spreadsheet: Drop all references to example windows when closing themAnotherTest
Fixes #4716.
2021-01-02Spreadsheet: Avoid OOB access and use-after-move in selectionAnotherTest
2021-01-02Help: Add a "Home" action to the toolbar :^)Andreas Kling
2021-01-02Help: Rename manual section 1 to "User programs"Andreas Kling
Since we're putting man pages for GUI apps into this category as well, let's call it something other than "Command-line programs" :^)
2021-01-02Kernel: Allocate shared memory regions immediatelyAndreas Kling
Lazily committed shared memory was not working in situations where one process would write to the memory and another would only read from it. Since the reading process would never cause a write fault in the shared region, we'd never notice that the writing process had added real physical pages to the VMObject. This happened because the lazily committed pages were marked "present" in the page table. This patch solves the issue by always allocating shared memory up front and not trying to be clever about it.
2021-01-02Kernel: Pass "shared" flag to Region constructorAndreas Kling
Before this change, we would sometimes map a region into the address space with !is_shared(), and then moments later call set_shared(true). I found this very confusing while debugging, so this patch makes us pass the initial shared flag to the Region constructor, ensuring that it's in the correct state by the time we first map the region.
2021-01-02LibWeb: Use Gfx::Bitmap::create_shareable() in OOPWVAndreas Kling
We were jumping through some pretty wasteful hoops in the resize event handler of OOPWV by first creating a bitmap and then immediately creating a new (shareable) clone of that bitmap. Now we go straight to the shareable bitmap instead.
2021-01-02LibGfx: Add Gfx::Bitmap::create_shareable(format, size)Andreas Kling
This helper allocates a shbuf and returns it wrapped in a Bitmap.
2021-01-02LibC: Randomize the stack check cookie value on initializationBrian Gianforcaro
Previously we had a static stack check cookie value for LibC. Now we randomize the cookie value on LibC initialization, this should help make the stack check more difficult to attack (still possible just a bigger pain). This should also help to catch more bugs.
2021-01-02Kernel: Fix bad VMObject iteration in sys$purge()Andreas Kling
We were fooling ourselves into thinking all VMObjects are anonymous and then tried to call purge() on them as if they were.
2021-01-02Kernel: Enable -fstack-protector-strong (again)Brian Gianforcaro
Insert stack canaries to find stack corruptions in the kernel. It looks like this was enabled in the past (842716a) but appears to have been lost during the CMake conversion. The `-fstack-protector-strong` variant was chosen because it catches more issues than `-fstack-protector`, but doesn't have substantial performance impact like `-fstack-protector-all`.
2021-01-02Kernel: Release scheduler_lock in ptrace once we know tracee is stoppedItamar
This fixes a kernel crash that occured when calling ptrace with PT_PEEK on non paged-in memory. The crash occurred because we were holding the scheduler lock while trying to read from the disk's block device, which we do not allow. Fixes #4740
2021-01-02Base: Add Terminal man page documentationBrendan Coles
2021-01-02LibGUI: CommonActions: Add make_help_action common actionBrendan Coles
2021-01-02Playground: Enable automatic autocomplete in the editorAnotherTest
This makes it a bit more useful, as the user doesn't have to explicitly ask for completion, it just provides completions, and tries really hard to avoid suggesting things where they're not expected, for instance: (cursor positions denoted as pipes) ``` @G | {| foo: bar | foo | } ``` The user does not expect any suggestions in any of those cursor positions, so provide no suggestions for such cases. This prevents the automatic autocomplete getting in the way of the user, esp. when they try to press return fully expecting to go to a new line.
2021-01-02LibGUI: Add an optional "automatic" autocomplete feature to TextEditorAnotherTest
This aims to be a "smart" autocomplete that tries to present the user with useful suggestions without being in the way (too much). Here is its current configuration: - Show suggestions 800ms after something is inserted in the editor - if something else is inserted in that period, reset it back to 800ms to allow the user to type uninterrupted - cancel any shown autocomplete (and the timer) on external changes (paste, cut, etc)
2021-01-02Kernel: Allocate profiling memory upfrontTom
We need to allocate all pages for the profiler right away so that we don't trigger page faults in the timer interrupt handler to allocate them. Fixes #4734
2021-01-02Build + LibC: Enable -fstack-protector-strong in user spaceBrian Gianforcaro
Modify the user mode runtime to insert stack canaries to find stack corruptions. The `-fstack-protector-strong` variant was chosen because it catches more issues than vanilla `-fstack-protector`, but doesn't have substantial performance impact like `-fstack-protector-all`. Details: -fstack-protector enables stack protection for vulnerable functions that contain: * A character array larger than 8 bytes. * An 8-bit integer array larger than 8 bytes. * A call to alloca() with either a variable size or a constant size bigger than 8 bytes. -fstack-protector-strong enables stack protection for vulnerable functions that contain: * An array of any size and type. * A call to alloca(). * A local variable that has its address taken. Example of it catching corrupting in the `stack-smash` test: ``` courage ~ $ ./user/Tests/LibC/stack-smash [+] Starting the stack smash ... Error: Stack protector failure, stack smashing detected! Shell: Job 1 (/usr/Tests/LibC/stack-smash) Aborted ```
2021-01-02LibWeb: When collapsing margins, consider border box heightsAndreas Kling
Empty boxes should be fully collapsed, but a box with border and/or padding is not empty. This fixes an issue where <hr> elements were getting weirdly collapsed since they have zero content height (but some border height.)
2021-01-02LibWeb: Fix unnecessary wrapping of block boxes in anonymous blocksAndreas Kling
Outside of tables, we don't need to wrap block-level boxes in anymous blocks. Only inline-level boxes need this treatment.
2021-01-02Calculator: Add app-calculator.png 32x32 iconBrendan Coles
2021-01-02Help: Add a simple index pageAndreas Kling
Let's show something a bit more welcoming than empty white when the user launches the Help application. :^)
2021-01-02LibMarkdown: Parse horizontal rulesAndreas Kling
A horizontal rule is generated by a line with three or more of these characters: '*', '-', '_'.
2021-01-02Help: Rename "Tree" tab to "Browse"Andreas Kling
2021-01-02LibGUI: Allow widget sibling navigation with arrow keysAndreas Kling
There's no spatial navigation here, Left/Up moves to the previous sibling in the tab order, while Right/Down moves to the next. The arrow keys keep focus within the same parent widget, unlike the tab key which cycles through all focusable widgets in the window. This makes GUI::MessageBox feel a bit nicer since you can now arrow between the Yes/No/Cancel buttons. :^)
2021-01-02Playground: Use pledge()Linus Groh
2021-01-02Playground: Add "Help" menu with "About" actionLinus Groh
An application with menubar that's missing an about dialog feels incomplete! :^)
2021-01-02Lagom/Fuzzers: Add TTF fuzzerLuke
2021-01-02LibTTF: Add option to load font from a byte bufferLuke
2021-01-02Kernel+LibELF: Use hex instead of decimal for stack offsets in back traces ↵Brian Gianforcaro
(#4728) Hex is the de facto format for representing memory addresses, make backtraces conform to that convention.
2021-01-02CMake: Warn when a serenity app is missing small or medium iconsBrian Gianforcaro
2021-01-02AK: Use size_t in methods of Utf8View.asynts
2021-01-02AK: Remove redundant compare() functions.asynts
2021-01-02Piggyback: AK: Add formatter for std::nullptr_t.asynts
2021-01-02LibGUI: Tweak MessageBox layout slightlyAndreas Kling
2021-01-02Kernel: Make Region::amount_shared() and amount_resident() lazy-awareAndreas Kling
Don't count the lazy-committed page towards shared/resident amounts.
2021-01-02LibGUI: Correct selection width when using fonts with glyph spacingAndreas Kling
We were not adding the glyph spacing after the last character in the selection, causing it to be slightly too small in some cases.
2021-01-02LibGUI: Fix cursor height in single-line text boxesAndreas Kling
We should use the TextEditor::line_height() for the cursor height, same as we do in multi-line mode.
2021-01-02FileManager: Make properties windows non-modalAndreas Kling
Fixes #46488
2021-01-02LibGUI: Add Window::on_close hookAndreas Kling
This will be invoked when the window is closed, which is helpful if you want to remove the window from some kind of owner after it's closed.
2021-01-02Kernel: Fix dirty page map bitmapTom
We also need to check against the new lazy allocation page when generating the dirty page bitmap.
2021-01-01Kernel: Fix memory corruption when rolling back regions in execveTom
We need to free the regions before reverting the paging scope to the original one when rolling back changes due to an error. This fixes silent memory corruption.
2021-01-01Kernel: Pass new region owner to Region::cloneTom
2021-01-01Kernel: Restore thread count if thread cannot be fully createdTom
2021-01-01Kernel: More gracefully handle out-of-memory when creating PageDirectoryTom
2021-01-01Kernel: Improve some low-memory situations with ext2Tom
2021-01-01Meta: Bump default RAM size to 512MBTom
Now that we commit memory, we need a lot more physical memory. Physical memory requirements can be reduced again once we have memory swapping, which allows the swap area/file to be counted against memory that can be committed.