Commit Graph

17630 Commits

Author SHA1 Message Date
Andreas Kling
3985468e83 Kernel: Convert klog() => AK::Format in PurgeablePageRanges 2021-03-12 11:38:43 +01:00
Andreas Kling
72cccfddbf Kernel: Convert klog() => AK::Format in APICTimer 2021-03-12 11:30:33 +01:00
Andreas Kling
bc925f57bb Kernel: Convert klog() => AK::Format in ACPI::Parser 2021-03-12 11:27:59 +01:00
Andreas Kling
0c35c664e6 UserspaceEmulator: Convert a weird klog(!) to dbgln() 2021-03-12 11:23:26 +01:00
Andreas Kling
b8ad3d7ccf Kernel: Convert klog() => AK::Format in RTL8139NetworkAdapter 2021-03-12 11:21:34 +01:00
Andreas Kling
6a3224d040 Kernel: Remove debug spam in DevFS 2021-03-12 11:12:50 +01:00
Brendan Coles
ec1fdef818 UserspaceEmulator: SoftCPU: Add support for several x86 FPU instructions
F2XM1
FYL2X
FYL2XP1
FDECSTP
FINCSTP
FSCALE
2021-03-12 09:59:45 +01:00
thankyouverycool
35897651af WidgetGallery: Convert layout to GML and add new Icons gallery 2021-03-12 09:59:03 +01:00
thankyouverycool
0fc81d23f4 LibGUI: Add variable padding and center bitmaps in TableViews
This lets us make nicer looking bitmap tables and fixes a content
rect issue in TreeView. Also makes key column highlighting optional
2021-03-12 09:59:03 +01:00
thankyouverycool
142ca4b818 WindowServer+LibGfx: Enumerate Disallow cursor 2021-03-12 09:59:03 +01:00
thankyouverycool
bc26d1093f LibGUI: Clear inactive selections in DisplayOnly TextEditors 2021-03-12 09:59:03 +01:00
thankyouverycool
bf432f8a3a LibGUI: Add opacity to ImageWidget 2021-03-12 09:59:03 +01:00
thankyouverycool
0e63141a19 LibGUI: Set override cursor to none when widget is disabled 2021-03-12 09:59:03 +01:00
thankyouverycool
cf866cc75a LibGUI: Register more GML properties and widgets
Register "placeholder" for TextEditor and ComboBox; "models_only"
for ComboBox; Vertical/HorizontalSeparator for SeparatorWidget
2021-03-12 09:59:03 +01:00
thankyouverycool
5806630cf4 LibGfx+LibGUI: Add support for vertical ProgressBars 2021-03-12 09:59:03 +01:00
thankyouverycool
bd34cdbbb3 LibGUI: Ignore scroll length multiplier in SpinBoxes & Sliders
Prevents discrete values from being skipped when using the mouse
wheel on SpinBoxes and proportional Sliders. Wheel delta can be
accelerated by holding Ctrl.
2021-03-12 09:59:03 +01:00
Linus Groh
f318ab6bed Ports: Replace hardcoded Build/ paths with SERENITY_BUILD_DIR
Fixes #5710.
2021-03-11 21:01:29 +01:00
Linus Groh
f45e16a6a2 Toolchain: Update build paths in CMakeToolchain.txt 2021-03-11 21:01:29 +01:00
Linus Groh
d0427b610c Documentation: Update build path in BuildInstructions.md
Build/ is now /Build/i686/. No need to mention other targets just yet.
2021-03-11 21:01:29 +01:00
Linus Groh
07f25ca6be Documentation: Clean up BuildInstructions.md a bit
- Fix headings
- Consistent & more accurate code block language specifiers
- Add some newlines where appropriate
- Remove the strange "run ninja but actually you don't have to run ninja
  as ninja install takes care of that" part
- Don't repeat specific build commands in "Ports" section
- Reword "Keymap" section to more generic "Customize disk image"
2021-03-11 21:01:29 +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
6e2a29d038 WindowServer: Don't open system menu on super key press while dragging 2021-03-11 19:00:24 +01:00
Andreas Kling
38f11cc1ba Everywhere: Rename "logo" key to "super" key
This seems to be the most common way to refer to this key, so let's
call it what people actually call it.
2021-03-11 18:55:16 +01:00
Andreas Kling
822d7da6cc Base: Make the default prompt a different color for root 2021-03-11 18:55:16 +01:00
Vyacheslav Pukhanov
4b99dbe644 FileManager: Accept TreeView drop event 2021-03-11 18:54:52 +01:00
Andreas Kling
cd745baa86 Meta: Add KMALLOC_DEBUG to all_the_debug_macros 2021-03-11 15:38:35 +01:00
Andreas Kling
b1e0e2ad4a Kernel: Suppress logging during kmalloc heap expansion
The system is extremely sensitive to heap allocations during heap
expansion. This was causing frequent OOM panics under various loads.

Work around the issue for now by putting the logging behind
KMALLOC_DEBUG. Ideally dmesgln() & friends would not reqiure any
heap allocations, but we're not there right now.

Fixes #5724.
2021-03-11 15:28:42 +01:00
AnotherTest
eb1ca965c7 LibLine: Cleanup the suggestions before inserting a new code point
Otherwise `reposition_cursor()` will move the cursor one character too
far to the right, and since we don't redraw the entire buffer when
the character is inserted at the end, the mistake won't be immediately
fixed by a complete redraw.
Fixes #5722
2021-03-11 14:47:56 +01:00
Andreas Kling
9853a9bc8a Kernel: Always protect process data immediately after construction 2021-03-11 14:46:48 +01:00
Andreas Kling
49a0f40ff0 Kernel: Inherit the dumpable flag on sys$fork()
This regressed at some point recently. All children were non-dumpable
until manually opting into it.
2021-03-11 14:35:37 +01:00
Andreas Kling
1608ef37d8 Kernel: Move process termination status/signal into protected data 2021-03-11 14:24:08 +01:00
Andreas Kling
4916b5c130 Kernel: Move process thread lists into protected data 2021-03-11 14:21:49 +01:00
Andreas Kling
1b2ea12062 AK: Add basic const iteration to IntrusiveList 2021-03-11 14:21:49 +01:00
Andreas Kling
b7b7a48c66 Kernel: Move process signal trampoline address into protected data 2021-03-11 14:21:49 +01:00
Andreas Kling
08e0e2eb41 Kernel: Move process umask into protected data :^) 2021-03-11 14:21:49 +01:00
Andreas Kling
90c0f9664e Kernel: Don't keep protected Process data in a separate allocation
The previous architecture had a huge flaw: the pointer to the protected
data was itself unprotected, allowing you to overwrite it at any time.

This patch reorganizes the protected data so it's part of the Process
class itself. (Actually, it's a new ProcessBase helper class.)

We use the first 4 KB of Process objects themselves as the new storage
location for protected data. Then we make Process objects page-aligned
using MAKE_ALIGNED_ALLOCATED.

This allows us to easily turn on/off write-protection for everything in
the ProcessBase portion of Process. :^)

Thanks to @bugaevc for pointing out the flaw! This is still not perfect
but it's an improvement.
2021-03-11 14:21:49 +01:00
Andreas Kling
4fcc637e29 Kernel: Add MAKE_ALIGNED_ALLOCATED helper macro
This macro inserts operator new/delete into a class, allowing you
to very easily specify a specific heap alignment.
2021-03-11 14:21:49 +01:00
Andreas Kling
96fb3d4a11 Kernel: Add MemoryManager::set_page_writable_direct()
This helper function goes directly to the page tables and makes a
virtual address writable or non-writable.
2021-03-11 14:21:49 +01:00
Andreas Kling
40f2abf7c3 Kernel: Allow kmalloc_aligned() alignment up to 4096
This allows us to get kmalloc() memory aligned to the VM page size.
2021-03-11 14:21:49 +01:00
Andreas Kling
a7b6282086 Kernel: Silence debug spam about chown and symlink during boot 2021-03-11 14:21:49 +01:00
Ben Wiederhake
c436c3e13d Toolchain: Remove unnecessary file from commit
This file is never read by gcc, and the filename looks like it was never meant to be added.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
f38a6b18b5 crash: Fix more typos in check logic
These caused no test to run for '-f' and mmap to fail, respectively.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
798dea7a49 crash: Fix typo in check logic
The remainder of the code assumes that the mmap was successful,
so the 'unexpected error' case is that we see MAP_FAILED.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
bceb98e2df Userland: Remove superfluous headers
Userland has no reason to access 'kmalloc'.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
2cd0793578 xargs: Fix boring memory leak
It's only 1K (BUFSIZ), and it's immediately before xargs finishes anyway.
However, I ran into it and know how to fix it, so let's clean this up.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
292871c4bc UserspaceEmulator: Handle MAP_FIXED with invalid addresses better
Old behavior: Crash due to VERIFY, unless we're completely and entirely out of
memory (m_available_ranges being empty), in which case it would return -ENOMEM.

New behavior: Return ENOMEM (and don't crash). In the case of nullptr,
also emit a helpful diagnostic.

Note that MAP_FIXED with nullptr is technically okay, but tends to be a sign
that something went wrong.

Also, this should improve mmap performance marginally, as it pulls the check out
of a loop that does not modify any parts of the check.

UE is now self-hosting! Fixes #5709.

However, this still needs some love: "ue UserspaceEmulator true" spits out tons
of error messages, probably false-positives, and takes about 229 seconds to run.
Then again, true-in-ue-in-ue-in-Qemu is three levels of emulation, so no wonder
it takes a long time! :D
2021-03-11 08:54:54 +01:00
Ben Wiederhake
22d9bd0c45 UserspaceEmulator: Do not pass MAP_FIXED to Kernel
Since there is usually no correlation between guest memory-layout and UE memory-layout,
this option does not make any sense. Especially since we provide nullptr.
2021-03-11 08:54:54 +01:00
Ben Wiederhake
d5925f33aa UserspaceEmulator: Implement set_process_name syscall 2021-03-11 08:54:54 +01:00
Ben Wiederhake
ec8e3edd05 UserspaceEmulator: Split large file into logical pieces 2021-03-11 08:54:54 +01:00
Luke
4477a0d6fd LibWeb: Remove FIXME in is_javascript_mime_type_essence_match
This was misleading. The spec just wants us to check a string matches
a string in the JavaScript MIME type essence list. It doesn't want us
to parse the string as a MIME type to then use its essence for the
check.

Renames "mime_type" to "string" to make this less misleading.
2021-03-11 08:30:02 +01:00