summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-28Kernel: Propagate overflow errors from Memory::page_round_upGuilherme Goncalves
Fixes #11402.
2021-12-28pls: Stop on first non option when parsing argumentsIdan Horowitz
This allows using pls on a program with arguments more ergonomically, e.g. `pls -- echo "hello friends"` can now simply be done as: `pls echo "hello friends"`.
2021-12-28Kernel: Remove old comment about kmalloc() being Q&D :^)Andreas Kling
We've finally gotten kmalloc to a point where it feels decent enough to drop this comment. There's still a lot of room for improvement, and we'll continue working on it.
2021-12-28Kernel: VERIFY that addresses passed to kfree_sized() look validAndreas Kling
Let's do some simple pointer arithmetic to verify that the address being freed is at least within one of the two valid kmalloc VM ranges.
2021-12-28Kernel: Rename kmalloc_pool_heap => initial_kmalloc_memoryAndreas Kling
2021-12-28Kernel: Remove the kmalloc_eternal heap :^)Andreas Kling
This was a premature optimization from the early days of SerenityOS. The eternal heap was a simple bump pointer allocator over a static byte array. My original idea was to avoid heap fragmentation and improve data locality, but both ideas were rooted in cargo culting, not data. We would reserve 4 MiB at boot and only ended up using ~256 KiB, wasting the rest. This patch replaces all kmalloc_eternal() usage by regular kmalloc().
2021-12-28Kernel: Lock socket mutex across {get,set}sockopt() and SO_ERROR updatesAndreas Kling
Since a socket can be accessed by multiple threads concurrently, we need to protect shared data behind the socket mutex. There's very likely more places where we need to fix this, the purpose of this patch is to fix a VERIFY() failure in getsockopt() seen on CI.
2021-12-28UserspaceEmulator: Exclude special ranges from RangeAllocatorDaniel Bertalan
If we do not mark these ranges as reserved, RangeAllocator might later give us addresses that overlap these, which then causes an assertion failure in the SoftMMU. This behavior led to recurring CI failures, and sometimes made programs as simple as `/bin/true` fail. Fixes "Crash 1" reported in #9104
2021-12-28LibVT: Handle window resize after history overflowryanb-dev
Addresses an issue in which a window resize event after history overflow would cause the Terminal to crash due to a failed assertion. The problematic assertion was removed and the logic updated to support inserting lines even when the start of the history is at an offset (due to an overflow). Resolves #10987
2021-12-28ThemeEditor: Implement a way to simulate color blindness in previewTheGrizzlyDev
Implement a mechanism that allows us to alter colors so that they mimic those a colorblind person would see. From the color we can then alter the colors for the whole preview so we can simulate everything in the theme including icons/decorations. This filter is also available as a Filter in LibGfx so it can be reused in multiple other places. The color simulation algorithm is based on this one https://github.com/MaPePeR/jsColorblindSimulator publicly available.
2021-12-28LibJS: Also throw exception when returning throw completion from awaitLinus Groh
...for now - the reason being that the AST breaks 'completion bubbling' and returns a plain Value, and code at the call site relies on the VM having an exception set when converting the plain value back into a completion. Fixes #11301.
2021-12-28Kernel: Fix race condition in TmpFSInode::notify_watchers()Andreas Kling
We were doing this dance in notify_watchers(): set_metadata_dirty(true); set_metadata_dirty(false); This was done in order to force out inode watcher events immediately. Unfortunately, this was racy, as if SyncTask got scheduled at the wrong moment, it would try to flush metadata for a clean inode. This then got trapped by the VERIFY() statement in Inode::sync_all(): VERIFY(inode.is_metadata_dirty()); This patch fixes the issue by replacing notify_watchers() with lazy metadata notifications like all other filesystems.
2021-12-28Meta: Add SSE3, SMAP and SMEP to our bochsrcAndreas Kling
- SSE3 makes LibM's trunc() not SIGILL (due to FISTTP). - SMAP and SMEP allow us to exercise more kernel security mechanisms.
2021-12-28HackStudio: Highlight AF files as INIMaciej
2021-12-28TextEditor: Highlight AF files as INIMaciej
2021-12-28Ports: Update stress-ng port to 0.13.09Brian Gianforcaro
This change updates the port to the latest version, as part of that work I basically reported the application, as we have added a lot of LibC functionality which we were missing before. I've also updated the port to mark stressor's we don't support as nops, instead of trying to avoid compiling them at all. This will make the port much easier to maintain in the future.
2021-12-28Kernel: Add _SC_MAPPED_FILES sysconf APIBrian Gianforcaro
This is mandated by POSIX, it's fine that we don't actually implement it, just as long as it's present during compilation. :^)
2021-12-28LibC: Add in6addr_loopback and IN6ADDR_LOOPBACK_INIT constantBrian Gianforcaro
Much like the existing in6addr_any global and the IN6ADDR_ANY_INIT macro, our LibC is also expected to export the in6addr_loopback global and the IN6ADDR_LOOPBACK_INIT constant. These were found by the stress-ng port.
2021-12-28LibC: Add rindex() and index() APIsBrian Gianforcaro
These POSIX APIs are defined as mapping directly to `strrchr` and `strchr` respectively. These are needed for the latest version of the stress-ng port, and also give us better POSIX compliance.
2021-12-28LibC: Add alphasort() implementationBrian Gianforcaro
This is a POSIX API required for the latest stress-ng port.
2021-12-28LibC: Add POSIX spec comments for dirent APIsBrian Gianforcaro
2021-12-28Kernel: Remove the KString::try_create(String::formatted(...)) patternDaniel Bertalan
We can now directly create formatted KStrings with KString::formatted. :^)
2021-12-28Taskbar: Add context menu to remove quicklaunch itemsfaxe1008
This change adds a context menu for each app button to remove items from the quicklaunch section of the Taskbar.
2021-12-28Taskbar: Add dropping of AppFiles to QuickLaunchfaxe1008
This change adds the capability to drop AppFiles to the quick launch section of the Taskbar. All logic was moved to a new QuickLaunchWidget.
2021-12-28Kernel/Net: Move Realtek network adapters code to a separate directoryLiav A
2021-12-28Kernel/Net: Move NE2000 network adapter code to a separate directoryLiav A
2021-12-28Kernel: Run clang-format on E1000NetworkAdapter.cppLiav A
2021-12-28Kernel/Net: Move Intel network adapters code to a separate directoryLiav A
2021-12-28Kernel: Use type alias for Kmalloc SubHeap and SlabBlock list typesBrian Gianforcaro
We've moved to this pattern for the majority of usages of IntrusiveList in the Kernel, might as well be consistent. :^)
2021-12-28Meta: Add Sam Atkins's GitHub Sponsors to funding options :^)Andreas Kling
2021-12-28Meta: Link to Linus's YouTube channel from our README :^)Andreas Kling
Replace parts of the README written by myself in the first person with a section linking to our YouTube channels.
2021-12-27Base: Adjust 1F374 in font Katica Regular 10Lady Gegga
https://www.unicode.org/charts/PDF/U1F300.pdf
2021-12-27Base: Add Misc. Symbols and Pictographs to font Katica Regular 10Lady Gegga
1F302, 1F308, 1F30A, 1F320, 1F322, 1F327, 1F328, 1F329, 1F32A, 1F331, 1F333, 1F334, 1F335, 1F337, 1F344, 1F373, 1F378, 1F394, 1F39C, 1F52B 1F39D, 1F3CF, 1F3D1, 1F3D2, 1F3D3, 1F3ED, 1F3F0, 1F3F1, 1F3F2, 1F3F3, 1F3F4, 1F3F9, 1F40B, 1F40C, 1F40D, 1F441, 1F443, 1F454, 1F459, 1F460, 1F464, 1F465, 1F47E, 1F494, 1F495, 1F497, 1F4A1, 1F4A2, 1F4AC, 1F4BB, 1F4BC, 1F4BD, 1F4BF, 1F4BC, 1F4C0, 1F4C3, 1F4C4, 1F4C5, 1F4C6, 1F4CD, 1F4CE, 1F4CF, 1F4D0, 1F4E8, 1F4E9, 1F4EF, 1F4F1, 1F4F2, 1F4F7, 1F512, 1F513, 1F527, 1F528 https://www.unicode.org/charts/PDF/U1F300.pdf
2021-12-27Base: Add Greek Extended characters to font Katica Regular 10Lady Gegga
1F78-1F7B, 1F10, 1FC6, 1F11 https://www.unicode.org/charts/PDF/U1F00.pdf
2021-12-27Base: Add Latin Extended Additional chars to font Katica Regular 10Lady Gegga
1EB8, 1EB9, 1ECC, 1ECD, 1E0A-1E0F, 1EE4, 1EE5 https://www.unicode.org/charts/PDF/U1E00.pdf
2021-12-27Base: Add Cyrillic characters to font Katica Regular 10Lady Gegga
0456-0458, 04E6-04E9, 04AE, 04AF, 04A2, 04A3, 04D8, 04D9, 049A, 049B, 0492, 0493, 04BA, 04BB, 045E https://www.unicode.org/charts/PDF/U0400.pdf
2021-12-27Base: Add Greek and Coptic characters to font Katica Regular 10Lady Gegga
03CC, 03CD https://www.unicode.org/charts/PDF/U0370.pdf
2021-12-27Base: Add Spacing Modifier Letters to font Katica Regular 10Lady Gegga
02BB-02BD https://www.unicode.org/charts/PDF/U02B0.pdf
2021-12-27Base: Add Latin Extended-B characters to font Katica Regular 10Lady Gegga
018F, 01E2, 01E3, 0218-021B, 021E, 021F, 01E6, 01E7 https://www.unicode.org/charts/PDF/U0180.pdf
2021-12-28Help: Fix crash when trying to load libunicodedata.soRummskartoffel
2021-12-28FileManager: Add "Create Archive" actionJulian Offenhäuser
This option will appear when you select one or more files or directories. It will then ask the user to enter a name for the new archive (or use the current directories' name if left empty) and create it under that name in the currently opened directory. Note that only .zip files are currently supported.
2021-12-28LibCore: Fix race conditions in TestLibCoreStreamAndreas Kling
It was possible for the "local_socket_read" and "local_socket_write" tests to fail because we had exited the EventLoop before BackgroundAction got around to invoking the completion callback. The crash happened when trying to deferred_invoke() on the background thread, calling Core::EventLoop::current() after said EventLoop had returned from exec(). Fix this by not passing a completion callback, since we didn't need one in the first place.
2021-12-28Base: Add 32x32 Settings iconFrHun
Replace the scaled up 16px Settings icon with a new 32px version.
2021-12-28Ports: Make lua buildable on x86_64Javier Alvarez
Our lua Makefile patch contained hardcoded binaries from the i686 toolchain. Use the CC, AR, and RANLIB variables from .port_include.sh instead to make it architecture independent.
2021-12-27Documentation: Recommend using Xcode's command line tools on macOSConor Byrne
2021-12-27HackStudio: Ask to create a non-existent directory when making a projectConor Byrne
Previously, if the parent directory didn't exist when making a project, it would say that the creation directory was 'invalid' which isn't necessarily true. This patch prompts the user to ask if they would like to create the parent directory when creating a project, instead of treating it as an 'invalid' directory.
2021-12-27LibWeb: Use start_of_input_stream_twin() for is_valid_escape_sequence()Sam Atkins
This means we can get rid of the hacks where we were peeking a code point instead of getting the next one so that we could peek_twin() later. Now, we follow the spec more closely. :^)
2021-12-27LibWeb: Pass correct values to would_start_an_identifier()Sam Atkins
Same as with would_start_a_number(), we were skipping a code point.
2021-12-27LibWeb: Pass correct values to would_start_a_number()Sam Atkins
This fixes the crash that Luke found using Domato: ```css . foo { mso-border-alt: solid .-1pt; } ``` The spec distinguishes between "If the next 3 code points would start..." and "If the input stream starts with..." but we were treating them the same way, skipping the first code point in the process.
2021-12-27LibWeb: Add CSS::Tokenizer::start_of_input_stream_[twin|triplet]()Sam Atkins
These correspond to "If the input stream starts with..." in the spec, which up until now we were not handling correctly, which led to some fun bugs. As noted, reconsuming the input code point in order to read its value is hacky, but works. Keeping track of the current code point in Tokenizer would be nicer, when I'm feeling brave enough to mess with it!