summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-05LibGUI: Make Layout a Core::Object and add basic serializationAndreas Kling
This allows you to view layouts (as data) in Inspector.
2020-03-05Inspector: Stringify remote property valuesAndreas Kling
This prevents us from asserting if the remote sends us a property made up of an array or object.
2020-03-04Ports: Build ncurses with --with-tlib=tinfoAndreas Kling
This way it finds tgetent() from ncurses and things go back to working. I'm not sure how this broke, or when, but meh.
2020-03-04LibGUI: Ignore keyboard and mouse events in disabled widgetsAndreas Kling
2020-03-04LibGUI: Remove unused GUI::Widget::click_event()Andreas Kling
2020-03-04LibGUI: TextEditor should paint text with disabled color when disabledAndreas Kling
2020-03-04LibGUI: Don't use Core::Object::add() to instantiate dialogsAndreas Kling
Now that add() returns a WidgetType&, we can't rely on the parent of a GUI::Dialog to still keep it alive after exec() returns. This happens because exec() will call remove_from_parent() on itself before returning. And so we go back to the old idiom for creating a GUI::Dialog centered above a specific window. Just call GUI::Dialog::construct(), passing the "parent" window as the last parameter.
2020-03-04LibBareMetal: Don't try to print characters from a null pointerAndreas Kling
2020-03-04AK: LogStream should handle being passed a null const char*Andreas Kling
2020-03-04LibCore: Make Core::Object::add<ChildType> return a ChildType&Andreas Kling
Since the returned object is now owned by the callee object, we can simply vend a ChildType&. This allows us to use "." instead of "->" at the call site, which is quite nice. :^)
2020-03-04Userland: Add du programhowar6hill
2020-03-04LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clientsAndreas Kling
2020-03-04LibGUI: Use set_layout<LayoutType>() in lots of client codeAndreas Kling
2020-03-03LibGUI: Some more convenience functions for constructing widgetsAndreas Kling
This patch adds two new API's: - WidgetType& GUI::Window::set_main_widget<WidgetType>(); This creates a new main widget for a window, assigns it, and returns it to you as a WidgetType&. - LayoutType& GUI::Widget::set_layout<LayoutType>(); Same basic idea, creates a new layout, assigns it, and returns it to you as a LayoutType&.
2020-03-03LibGUI: Save some more state from AbstractButtonAndreas Kling
The more stuff we save in save_to() overrides, the more interesting it becomes inspecting GUI programs. :^)
2020-03-03Userland: Speed up the execution of the cut command.marprok
Avoid creating SingleIndexes in case of byte ranges. This, boosts the performance significantly in case a byte range is too big(e.g 666-123123). Also, claim copyright over this mess since I am the one responsible for it.
2020-03-03Kernel: Fix race in clock_nanosleepBen Wiederhake
This is a complete fix of clock_nanosleep, because the thread holds the process lock again when returning from sleep()/sleep_until(). Therefore, no further concurrent invalidation can occur.
2020-03-03Kernel: Demonstrate race condition in clock_nanosleepBen Wiederhake
This adds a test for the race condition in clock_nanosleep. The crux is that clock_nanosleep verifies that the output buffer is writable *before* sleeping, and writes to it *after* sleeping. In the meantime, a concurrent thread can make the output buffer unwritable, e.g. by deallocating it. This testcase is needlessly complex because pthread_kill is not implemented yet. I tried to keep it as simple as possible. Here is the relevant part of dmesg: [nanosleep-race-outbuf-munmap(22:22)]: Unblock nanosleep-race-outbuf-munmap(20:20) due to signal nanosleep-race-outbuf-munmap(20:20) Unrecoverable page fault, write to address 0x02130016 CRASH: Page Fault. Process: nanosleep-race-outbuf-munmap(20) [nanosleep-race-outbuf-munmap(20:20)]: 0xc01160ff memcpy +44 [nanosleep-race-outbuf-munmap(20:20)]: 0xc014de64 Kernel::Process::crash(int, unsigned int) +782 [nanosleep-race-outbuf-munmap(20:20)]: 0xc01191b5 illegal_instruction_handler +0 [nanosleep-race-outbuf-munmap(20:20)]: 0xc011965b page_fault_handler +649 [nanosleep-race-outbuf-munmap(20:20)]: 0xc0117233 page_fault_asm_entry +22 [nanosleep-race-outbuf-munmap(20:20)]: 0xc011616b copy_to_user +102 [nanosleep-race-outbuf-munmap(20:20)]: 0xc015911f Kernel::Process::sys(Kernel::Syscall::SC_clock_nanosleep_params const*) +457 [nanosleep-race-outbuf-munmap(20:20)]: 0xc015daad syscall_handler +1130 [nanosleep-race-outbuf-munmap(20:20)]: 0xc015d597 syscall_asm_entry +29 [nanosleep-race-outbuf-munmap(20:20)]: 0x08048437 main +146 [nanosleep-race-outbuf-munmap(20:20)]: 0x08048573 _start +94 Most importantly, note that it crashes *inside* Kernel::Process::sys. Instead, the correct behavior is to return -EFAULT.
2020-03-03LibGUI: Remove Button& parameter from Button::on_click hookAndreas Kling
There was but a single user of this parameter and it's a bit tedious to write it out every time, so let's get rid of it.
2020-03-03SystemMenu: Fix bad behavior in shutdown dialogAndreas Kling
The selected option was stored in a captured stack variable which was long gone by the time we looked at it, so this dialog didn't really behave the way you'd expect. Put it in a member instead. :^)
2020-03-03Base: Add anon user to the phys groupAndreas Kling
This allows anon to shut down and reboot the system. Fixes #775.
2020-03-03AK: Make quick_sort() a little more ergonomicAndreas Kling
Now it actually defaults to "a < b" comparison, instead of forcing you to provide a trivial less-than comparator. Also you can pass in any collection type that has .begin() and .end() and we'll sort it for you.
2020-03-02ProfileViewer: Add mode that shows percentages instead of sample countsAndreas Kling
Sometimes it's much nicer to work with percentages than raw sample counts when browsing through a profile. :^)
2020-03-02ProfileView: Show "self" sample counts in profilesAndreas Kling
The "self" sample count is the number of samples that had this specific frame as its innermost stack frame (leaf nodes in the profile tree.)
2020-03-02LibGUI: Fix broken TreeView rendering with more than two columnsAndreas Kling
The computation of the tree column x offset was not taking padding into account. This patch fixes that and collects the logic in a helper.
2020-03-02SystemMonitor: Unbreak the in-table progress bars showing disk usageAndreas Kling
2020-03-02ProfileViewer: Parse the JSON input directly to Profile::EventAndreas Kling
We were going from "new JSON format" => "old JSON format" => Event. This made loading longer profiles unnecessarily slow. It's still pretty slow, and we should... profile it! :^)
2020-03-02ProfileViewer: Rename Profile::Sample => Profile::EventAndreas Kling
2020-03-02CPU: Change debug messages to fit the latest changesLiav A
2020-03-02Kernel: Run clang-format on various filesLiav A
2020-03-02Kernel: Use klog() instead of kprintf()Liav A
Also, duplicate data in dbg() and klog() calls were removed. In addition, leakage of virtual address to kernel log is prevented. This is done by replacing kprintf() calls to dbg() calls with the leaked data instead. Also, other kprintf() calls were replaced with klog().
2020-03-02Kernel: Use IOAddress class in PATAChannel classLiav A
This change make the code a bit more readable. Also, kprintf() calls are replaced with klog() calls.
2020-03-02Kernel: Use IOAddress class in Network adapters' driversLiav A
Also, kprintf() calls were replaced with klog() calls.
2020-03-02LibBareMetal: Add IOAddress classLiav A
2020-03-02AK: Add support for Kernel Log StreamLiav A
2020-03-02LibBareMetal: Add support for kernel log streamLiav A
2020-03-02Meta: Adjust some copyright dates by Fei WuAndreas Kling
2020-03-02AK: Add missing copyright headers to StringUtils.{cpp,h}Andreas Kling
2020-03-02AK: Move to_int(), to_uint() implementations to StringUtils (#1338)howar6hill
Provide wrappers in String and StringView. Add some tests for the implementations.
2020-03-02Kernel: MemoryManager should create cacheable regions by defaultAndreas Kling
2020-03-02Kernel: Remove ability to create kernel-only regions at user addressesAndreas Kling
This was only used by the mechanism for mapping executables into each process's own address space. Now that we remap executables on demand when needed for symbolication, this can go away.
2020-03-02Kernel: Map executables at a kernel address during ELF loadAndreas Kling
This is both simpler and more robust than mapping them in the process address space.
2020-03-02Kernel: Load executables on demand when symbolicatingAndreas Kling
Previously we would map the entire executable of a program in its own address space (but make it unavailable to userspace code.) This patch removes that and changes the symbolication code to remap the executable on demand (and into the kernel's own address space instead of the process address space.) This opens up a couple of further simplifications that will follow.
2020-03-02AK: Move the wildcard-matching implementation to StringUtilshowar6hill
Provide wrappers in the String and StringView classes, and add some tests.
2020-03-02AK: Add enqueue_begin() for the CircularDeque class (#1320)howar6hill
Also add tests for CircularDeque.
2020-03-02AK: Remove superfluous explicit in Bitmap (#1337)howar6hill
2020-03-02CI: Update .travis.yml (#1334)Nicolas Van Bossuyt
According to the Travis build config validation, the `sudo` key does nothing and `os` should be specified.
2020-03-02Kernel: Make the "entire executable" region sharedAndreas Kling
This makes Region::clone() do the right thing with it on fork().
2020-03-01Kernel: Mark read-only PT_LOAD mappings as shared regionsAndreas Kling
This makes Region::clone() do the right thing for these now that we differentiate based on Region::is_shared().
2020-03-01Kernel: Use SharedInodeVMObject for executables after allAndreas Kling
I had the wrong idea about this. Thanks to Sergey for pointing it out! Here's what he says (reproduced for posterity): > Private mappings protect the underlying file from the changes made by > you, not the other way around. To quote POSIX, "If MAP_PRIVATE is > specified, modifications to the mapped data by the calling process > shall be visible only to the calling process and shall not change the > underlying object. It is unspecified whether modifications to the > underlying object done after the MAP_PRIVATE mapping is established > are visible through the MAP_PRIVATE mapping." In practice that means > that the pages that were already paged in don't get updated when the > underlying file changes, and the pages that weren't paged in yet will > load the latest data at that moment. > The only thing MAP_FILE | MAP_PRIVATE is really useful for is mapping > a library and performing relocations; it's definitely useless (and > actively harmful for the system memory usage) if you only read from > the file. This effectively reverts e2697c2dddd531c0ac7cad3fd6ca78e81d0d86da.