summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-11LibC: Make sure assert() expands to *something* in non-DEBUG buildsAndreas Kling
Sometimes people write strange things like "assert(x), something();" and this will not work if "assert(x)" expands to "". So make it expand to ((void)0) instead.
2020-08-11Kernel: Forward declare struct stat in the syscall API headerAndreas Kling
2020-08-11LibC: Move stat(), lstat() and fstat() to <sys/stat.h>Andreas Kling
Dr. POSIX says that's where they belong.
2020-08-11mv: Accept (but ignore) -fAndreas Kling
Many scripts seem to use "mv -f", so let's support that.
2020-08-11rm: Implement a basic -f modeAndreas Kling
2020-08-11LibELF: Remove unused cruft in ELF::LoaderAndreas Kling
2020-08-11Crypto: Make AES call malloc much less oftenNico Weber
ByteBuffer::slice_view() allocates a new ByteBuffer object, which as a RefPtr and everything. Nowadays it should probably return a Bytes / Span<u8>, but AES was only using slice_view() to extract the pointer again. So just add ady a range check at the top, and do pointer arithmetic to do the same thing faster. Reduces time to run `disasm /bin/id` by a bit under 40%, from ~8.3s to ~5s (min-of-3 runs).
2020-08-11TextEditor: Show pageview URLs in statusbar on hoverLinus Groh
2020-08-11TextEditor: Open links from Web::PageView using Desktop::LauncherLinus Groh
So far, clicking on a link from the Markdown/HTML preview Web::PageView did nothing - now we pass that link to Desktop::Launcher, which will then open it in Browser, FileManager, another TextEditor instance etc.
2020-08-11Kernel: Always return from Thread::wait_onTom
We need to always return from Thread::wait_on, even when a thread is being killed. This is necessary so that the kernel call stack can clean up and release references held by it. Then, right before transitioning back to user mode, we check if the thread is supposed to die, and at that point change the thread state to Dying to prevent further scheduling of this thread. This addresses some possible resource leaks similar to #3073
2020-08-11Meta: Fix typo in NotesOnWSL.md (#3086)Andrew Mbugua
2020-08-11LibELF: Set ELF::Loader::m_symbol_count in constructorAndreas Kling
Setting it in load() excludes users of ELF::Loader that don't actually call load() but only use the Loader for symbolication purposes. Perhaps the factoring here is not ideal.
2020-08-10Help: Spruce up the UI with some tasteful layout marginsAndreas Kling
2020-08-10LibGfx: Correct copyright years for {Classic,}WindowTheme.{cpp,h}Andreas Kling
2020-08-10Userland: Add a simple dirname(1) utilityAndreas Kling
2020-08-10WindowServer: Limit maximizing windows to top window in modal stackTom
When maximizing a window that is blocked by a modal window, only maximize the top window in the stack. However, if the stack is minimized, restore all of them in addition. Fixes #3074
2020-08-10Shell: Fix fd leak with pipesNico Weber
Fixes the problem reported in #3073. While trying to write a test for this, I thought I'd use Shell -c 'for i in $(seq 100) { echo $i }' | head -n 1 but that makes the cpu spin at 100% and doesn't terminate even with this fix here. But at least piping disasm into head now works.
2020-08-10Shell: Cancel a running for loop upon receiving any non-SIGINT signalAnotherTest
And keep the old behaviour of needing two interruptions on SIGINT.
2020-08-10FileManager: Make the desktop process show as "FileManager (Desktop)"Andreas Kling
2020-08-10Kernel: Include the 128 byte slab allocator in for_each_allocatorTom
2020-08-10Kernel: Invoke heap constructors separately early onTom
By having a separate list of constructors for the kernel heap code, we can properly use constructors without re-running them after the heap was already initialized. This solves some problems where values were wiped out because they were overwritten by running their constructors later in the initialization process.
2020-08-10LibCore: remove redundant UDPSocket constructorMuhammad Zahalqa
The comment claims it is for use from UDPServer::accept Which is not a real function.
2020-08-10LibCore: update m_bound on socket bindMuhammad Zahalqa
2020-08-10Lagom+LibELF: Add an ELF fuzzer, and tweak the code to survive a few minutes ↵Nico Weber
of fuzzing (#3071) If a buffer smaller than Elf32_Ehdr was passed to Image, header() would do an out-of-bounds read. Make parse() check for that. Make most Image methods assert that the image is_valid(). For that to work, set m_valid early in Image::parse() instead of only at its end. Also reorder a few things so that the fuzzer doesn't hit (valid) assertions, which were harmless from a security PoV but which still allowed userspace to crash the kernel with an invalid ELF file. Make dbgprintf()s configurable at run time so that the fuzzer doesn't produce lots of logspam.
2020-08-10LibWeb: Move tree iteration helpers from Node/LayoutNode to TreeNodeAndreas Kling
Since these are generally useful in our trees, let's just keep them in TreeNode instead of duplicating the helpers in subclasses.
2020-08-10AK: Add test case for duplicate JsonObject keysLinus Groh
2020-08-10AK: Don't keep equal JsonObject keys in the order vector twiceLinus Groh
Fixes #3069.
2020-08-10WindowServer: Use to_theme_window_type() a bit moreAndreas Kling
2020-08-10WindowServer+LibGfx: Move window frame rect calculation to WindowThemeAndreas Kling
2020-08-10Kernel: Use Userspace<T> for the exit_thread syscallBrian Gianforcaro
Userspace<void*> is a bit strange here, as it would appear to the user that we intend to de-refrence the pointer in kernel mode. However I think it does a good join of illustrating that we are treating the void* as a value type, instead of a pointer type.
2020-08-10Kernel: Use Userspace<T> for the join_thread syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the chroot syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the module_unload syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the module_load syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the getrandom syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the shbuf_get syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the get_thread_name syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the set_thread_name syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the connect syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the accept syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the bind syscall, and implementationBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the chmod syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the umount syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the unlink syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the sigpending syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the sigprocmask syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the fstat syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the uname syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the sethostname syscallBrian Gianforcaro
2020-08-10Kernel: Use Userspace<T> for the gethostname syscallBrian Gianforcaro