summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-02-01Kernel+LibKeyboard: Define the default keymap only in one placeBen Wiederhake
Because it was 'static const' and also shared with userland programs, the default keymap was defined in multiple places. This commit should save several kilobytes! :^)
2021-02-01keymap: Unveil path, if one is givenBen Wiederhake
2021-02-01LibKeyboard: Don't assert on failureBen Wiederhake
2021-02-01KeyboardMapper: Without arguments, load current keymapBen Wiederhake
2021-02-01LibKeyboard+keymap: Support querying the keymap via commandlineBen Wiederhake
2021-02-01Kernel+LibKeyboard: Enable querying the current keymapBen Wiederhake
2021-02-01LibTextCodec: Avoid duplicate definition of standard encodingsBen Wiederhake
2021-02-01KeyboardMapper: Export keymap not as a byte, but as unicodeBen Wiederhake
What a silly mixup. Loading and saving no longer loses any data! :^)
2021-02-01KeyboardMapper: Remove duplicate 'save' buttonBen Wiederhake
There already is a standard action in the menu, and Ctrl-S also works. No need to have an extra button for that.
2021-02-01KeyboardMapper: Make all of the GUI visibleBen Wiederhake
2021-02-01HackStudio: added new directory actionMatteo Sozzi
Added the possibility to create a new directory in the current project.
2021-01-31Userland: Rename PCI slot to PCI device terminologyJean-Baptiste Boric
2021-01-31LibX86: sanity check for Instruction read sizeThomas Mangin
During "Emulator hacking: Let's make the userspace emulator go faster!", the switch implented in read() was inlined (toward the end of the video). This patch restore the assert check for any read other than 8, 16 or 32 bits was lost during the code conversion.
2021-01-31LibLine: Only print ascii characters in caret formAnotherTest
ctype's `iscntrl` truncates its input, making some codepoints appear as control characters. Avoid this by checking whether the character is in ascii to begin with.
2021-01-31LibWeb: Use URL::to_string_encoded() for the crash error page URL's hrefLinus Groh
Just wrapping to_string() in urlencode() will break the link as too many characters are encoded. Also wrap in escape_html_entities() as well - most relevant chars are already URL-encoded, but this will change '&' to '&', for example.
2021-01-31LibC: Don't honor LIBC_* malloc debugging flags in AT_SECURE contextAndreas Kling
Just ignore all these environment flags if the AT_SECURE flag is set in the program's auxiliary vector. This prevents a user from tricking set-uid programs into dumping debug information via environment flags.
2021-01-31LibELF: Split the DynamicLoader's loading mechanism into two stepsAndreas Kling
load_from_image() becomes map() and link(). This allows us to map an object before mapping its dependencies. This solves an issue where fixed-position executables (like GCC) would clash with the ASLR placement of their own shared libraries.
2021-01-31LibELF: Assert on multiple calls to DynamicLoader::load_from_image()Andreas Kling
It would be a mistake to recreate the cached DynamicObject.
2021-01-31LibELF: Don't validate ELF twice in DynamicLoaderAndreas Kling
Validation was happening in two steps, some in the constructor, and then some later on, in load_from_image(). This made no sense so just move all the validation to the constructor.
2021-01-31LibELF: Call mmap() before constructing the DynamicLoader objectAndreas Kling
Refactor DynamicLoader construction with a try_create() helper so that we can call mmap() before making a loader. This way the loader doesn't need to have an "mmap failed" state. This patch also takes care of determining the ELF file size in try_create() instead of expecting callers to provide it.
2021-01-31LibC: Fix bad error check after open() in dlopen()Andreas Kling
2021-01-31LibIPC: Stop exchanging client/server PIDs in greeting handshakeAndreas Kling
The PIDs were used for sharing shbufs between processes, but now that we have migrated to file descriptor passing, we no longer need to know the PID of the other side.
2021-01-31Inspector: Exit if inspected process has not pledged acceptBrendan Coles
2021-01-31Browser+LibWeb+WebContent: Make the "Debug" menu work in multi-processAndreas Kling
This patch adds an IPC call for debugging requests. It's stringly typed and very simple, and allows us to easily implement all the features in the Browser's Debug menu.
2021-01-30WebContent: Set the main thread name based on the current page hostAndreas Kling
We now show up as "WebContent: www.serenityos.org" in System Monitor, which is just super neat. :^)
2021-01-30Browser: Turn on multi-process mode by default :^)Andreas Kling
Frick it, let's just enable this by default and give ourselves a reason to improve things! Some things are broken, and there's a bit of flicker when resizing, but we can do this. This drastically improves our web browsing security model by isolating each tab into its own WebContent process that runs as an unprivileged user with a tight pledge+unveil sandbox. To get a single-process browser, you can start it with -s.
2021-01-30LibWeb: Don't try to create GUI::TextBox inside multi-process web viewsAndreas Kling
This is a workaround until we can implement a proper <input type=text> in terms of LibWeb primitives. This makes google.com not crash in multi-process mode (but there is no search box.)
2021-01-30HackStudio: removed toggle_indexMatteo Sozzi
Removed `m_project_tree_view->toggle_index()` when adding new file to project.
2021-01-30WindowManager: Restore a window's geometry when untiling itetaIneLp
Specifically, when untiling it using the Super-{Left,Right} shortcuts Fixes #5182
2021-01-30Kernel: Add FIBMAP ioctl to Ext2FileSystemPeter Elliott
FIBMAP is a linux ioctl that gives the location on disk of a specific block of a file
2021-01-30LibWeb: URL-encode/escape variables used in OOPWV's crash error pageLinus Groh
This fixes arbitrary HTML injections via the URL on OOPWV's crash error page - probably not a security issue, but annoying nonetheless.
2021-01-30LibWeb: Handle WebContent process crashes gracefully :^)Andreas Kling
The OOPWV will now detect WebContent process crashes/disconnections and simply create a new WebContent process in its place. We also generate a little error page with a link to the crashing URL so you can reload and try again. This a huge step forward for OOPWV since it now has a feature that IPWV can never replicate. :^)
2021-01-30LibProtocol: Bump download stream buffer to PAGE_SIZEAnotherTest
I think this should scale based on the network speed (or download rate?), but for the time being, 4K seems to be good-enough.
2021-01-30pro: Use a rolling average for the download rate calculationAnotherTest
This makes it jump around less, and give a decent-ish representation of download speed.
2021-01-30WebServer: Stream the downloaded filesAnotherTest
...instead of reading them into memory first. This makes it possible to download large files from WebServer.
2021-01-30Inspector: Allow browsing inspection data in UI after process exitsBrendan Coles
2021-01-30HackStudio: do not toggle_index in open_projectMatteo Sozzi
When opening a new project `m_prject_tree_view->toggle_index()` is not needed because `m_project_tree_view->set_model()` already updates the indexes.
2021-01-30LibGUI: Handle Window::hide() during Application teardown betterAndreas Kling
If a window is being torn down during app shutdown, the global application pointer may be nulled out already. So let's handle that case gracefully in Window::hide().
2021-01-30LibELF: Add a bunch of overflow checks in ELF validationAndreas Kling
2021-01-30Everywhere: Add missing parent window to about dialogsLinus Groh
Partially addresses #5177.
2021-01-30HexEditor: Fix about dialog iconLinus Groh
2021-01-30SystemMonitor: Handle PCIDB::Database::open() failure gracefullyLinus Groh
No need to dereference the nullptr, let's just show raw IDs instead.
2021-01-30LibWeb: Add Frame::ViewportClient and use it for Layout::ImageBoxAndreas Kling
Image boxes want to know whether they are inside the visible viewport. This is used to pause/resume animations, and to update the purgeable memory volatility state. Previously we would traverse the entire layout tree on every resize, calling a helper on each ImageBox. Make those boxes register with the frame they are interested in instead, saving us all that traversal. This also makes it easier for other parts of the code to learn about viewport changes in the future. :^)
2021-01-30LookupServer: Unbreak reverse DNS lookupsAndreas Kling
We were ignoring everything but A records in DNS responses. This broke reverse lookups which obviously want the PTR records. Fix this by filtering on the requested record type instead of always A.
2021-01-30LookupServer: Be a little more robust in case accept() failsAndreas Kling
2021-01-30LookupServer: Don't create Core::Object on the stackAndreas Kling
2021-01-30LibC: Protect the atexit() handler list when not writing to itAndreas Kling
Remap the list of atexit handlers as read-only while we're not actively writing to it. This prevents an attacker from using a memory write primitive to gain code execution via the atexit list. This is based on a technique used in OpenBSD. :^)
2021-01-30LibC: Convert remaining String::format() to formatted()/number()Andreas Kling
2021-01-30LibELF: Avoid quadratic memory usage weaknessBen Wiederhake
Section names are referred to by offset and length. We do not check (and probably should not check) whether these names overlap in any way. This opened the door to many sections (in this example: about 2700) forcing ELF::Image::m_sections to contain endless copies of the same huge string (in this case: 882K). Fix this by loading only the first PAGE_SIZE bytes of each name. Since section names are only relevant for relocations and debug information and most section names are hard-coded (and far below 4096 bytes) anyway, this should be no restriction at all for 'normal' executables. Found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29187
2021-01-30LibGfx: Fix dynamic bitmasks in BMPsBen Wiederhake
I overlooked a corner case where we might call the built-in ctz() on zero. Furthermore, the calculation of the shift was wrong and the results were often unusable. Both issue were caused by a forgotten 36daeee34ff04f64c933e94a9cdffe9080061fb0. This time I made sure to look at bmpsuite_files first, and now they look good. Found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28985