summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-15Kernel: Shrink default userspace stack size from 4 MiB to 1 MiBAndreas Kling
This knocks 70 MiB off our idle footprint, (from 350 MiB to 280 MiB.)
2022-08-15LibCore: Add Directory::chown() API and use it in Core::AccountAndreas Kling
Since we already have the directory open, let's have an API to fchown() the underlying file descriptor instead of forcing clients to do another path lookup.
2022-08-15LoginServer+LibCore: Only create user temp directory from LoginServerAndreas Kling
Other programs use Core::Account::login(), notably su(1), which stopped working due to a missing "cpath" pledge promise. This patch moves the /tmp/user/ creation logic to a separate function that LoginServer can call.
2022-08-15LibGUI: Programatically draw table header sorting arrowsTimothy Flynn
These arrows were previously drawn using the code points U+2B06 and U+2B07. The .png files for these emoji were removed in commit bfe99eb and added to the Katica Regular 10 font in commit cf62d08. The emoji were not added to the bold Katica variants that are used by the table header view. The effect is that a "?" replacement character was rendered. Instead of rendering the emoji, we can draw the arrows programatically, like we do in other GUI components (e.g. the scrollbar).
2022-08-15LibJS: Use NaN boxing to decrease the memory size of Valuesdavidot
Using the fact that there are 2^52-2 NaN representations we can "NaN-box" all the Values possible. This means that Value no longer has an explicit "Type" but that information is now stored in the bits of a double. This is done by "tagging" the top two bytes of the double. For a full explanation see the large comment with asserts at the top of Value. We can also use the exact representation of the tags to make checking properties like nullish, or is_cell quicker. But the largest gains are in the fact that the size of a Value is now halved. The SunSpider and other benchmarks have been ran to confirm that there are no regressions in performance compared to the previous implementation. The tests never performed worse and in some cases performed better. But the biggest differences can be seen in memory usage when large arrays are allocated. A simple test which allocates a 1000 arrays of size 100000 has roughly half the memory usage. There is also space in the representations for future expansions such as tuples and records. To ensure that Values on the stack and registers are not lost during garbage collection we also have to add a check to the Heap to check for any of the cell tags and extracting the canonical form of the pointer if it matches.
2022-08-15LibJS: Specialize Optional<Completion>davidot
Since Completion has an enum for state we have plenty of space to add an extra type which indicates on empty completion. Since Optional<Completion> is used in every ThrowCompletionOr<...> this saves quite some stack space as most function in LibJS return types like that. This saves 8 bytes for every Optional<Completion>.
2022-08-15LibJS: Specialize Optional<Value>davidot
Values can be "empty" which only has a valid meaning for array holes. We can however use this state the represent the empty state of an Optional<Value> which is used in a lot of placed, because of Completion having one. This saves 8 bytes for every Optional<Value>.
2022-08-15AK: Allow bit_cast to be used in constant evaluated contextdavidot
2022-08-15LibJS: Add extreme value tests for cos and sindavidot
These sometimes produce different NaN patterns which can mess up the value encoding.
2022-08-15TextEditor: Display widget when needle not found in replace allhuttongrabiel
When the given needle is not found, replace displays a widget that says the needle is not found, but replace all does not. This change adds that widget to replace all.
2022-08-15Meta: Remove TZDB duplicationEmily Trau
2022-08-15Base: Add more emojis U+1F344,45,47-4Cdjwisdom
πŸ„ - U+1F344 MUSHROOM πŸ… - U+1F345 TOMATO πŸ‡ - U+1F347 GRAPES 🍈 - U+1F348 MELON πŸ‰ - U+1F349 WATERMELON 🍊 - U+1F34A TANGERINE πŸ‹ - U+1F34B LEMON 🍌 - U+1F34C BANANA Coverage: https://emoji.serenityos.net
2022-08-15Kernel: Remove regions from the region tree after failing to map themIdan Horowitz
At the point at which we try to map the Region it was already added to the Process region tree, so we have to make sure to remove it before freeing it in the mapping failure path, otherwise the tree will contain a dangling pointer to the free'd instance.
2022-08-15Kernel: Leak a ref() on the new Process ASAP in sys$fork()Andreas Kling
This fixes an issue where failing the fork due to OOM or other error, we'd end up destroying the Process too early. By the time we got to WaitBlockerSet::finalize(), it was long gone.
2022-08-15Kernel: Don't release file-pages if volatile memory purge did itJorropo
2022-08-14Kernel: Dump list of processes and their memory usage when OOMingAndreas Kling
2022-08-14Kernel: Release some clean file-backed memory when starved for pagesAndreas Kling
Until now, our only backup plan when running out of physical pages was to try and purge volatile memory. If that didn't work out, we just hung userspace out to dry with an ENOMEM. This patch improves the situation by also considering clean, file-backed pages (that we could page back in from disk). This could be better in many ways, but it already allows us to boot to WindowServer with 256 MiB of RAM. :^)
2022-08-14Kernel: Update outdated "user physical pages" terminologyAndreas Kling
These are now just "physical pages".
2022-08-14Terminal: Update window size increments on terminal font changeAndreas Kling
This fixes an issue where the window resize overlay would display inaccurate "columns x rows" after a font change. This happened because we kept using size increments derived from the original font.
2022-08-14Terminal: Rename menu item from "Settings" to "Terminal Settings"Andreas Kling
2022-08-14Browser: Rename menu item from "Settings" to "Browser Settings"Andreas Kling
2022-08-14SystemMonitor: Add some margin around widgets in the process inspectorAndreas Kling
2022-08-14SystemMonitor: Make process name appear in the process inspector againAndreas Kling
This regressed with the UI layout system changes.
2022-08-14LibWeb: Remove unused member LineBuilder::m_layout_modeAndreas Kling
2022-08-14LibGUI: Initially disable the "Apply" button in SettingsWindowAndreas Kling
We'll enable it if/when the user modifies something.
2022-08-14Base: Launch SQLServer at session start-upLucas CHOLLET
2022-08-14Base: Launch LanguageServers at session start-upLucas CHOLLET
2022-08-14Base: Launch AudioServer at session start-upLucas CHOLLET
2022-08-14Base: Launch InspectorServer at session start-upLucas CHOLLET
2022-08-14Base: Launch NotificationServer at session start-upLucas CHOLLET
2022-08-14Base: Launch ImageDecoder at session start-upLucas CHOLLET
2022-08-14Base: Launch FileSystemAccessServer at session start-upLucas CHOLLET
2022-08-14Base: Launch WebSocket at session start-upLucas CHOLLET
2022-08-14Base: Launch WebContent at session start-upLucas CHOLLET
2022-08-14Base: Launch Request at session start-upLucas CHOLLET
2022-08-14Base: Launch ConfigServer at session start-upLucas CHOLLET
2022-08-14Everywhere: Replace hardcoded anon's uid in unveil path with `%uid`Lucas CHOLLET
2022-08-14LibCore: Make LocalServer aware of %uid in pathLucas CHOLLET
2022-08-14LibCore: Make `Core::System::unveil` aware of %uid in pathLucas CHOLLET
This brings support for user-dependent paths in `unveil`.
2022-08-14LibCore+LibIPC: Recognise %uid in pathLucas CHOLLET
This patch allows to insert "%uid" in `IPC_CLIENT_CONNECTION` declaration and in SystemServer's ini files. This pattern is replaced then replaced by the UID of the owner of the service. It opens a path for seamlessly managed, per-user portal.
2022-08-14LibCore+LaunchServer: Move portal directory to `/tmp/user/%uid`Lucas CHOLLET
The `/tmp/user` directory is owned by root, this solution prevents malicious users to interfere with other users' portals. This commit also moves `launch`'s portal in the user directory.
2022-08-14SystemServer: Create accounts with `Account::Read::PasswdOnly`Lucas CHOLLET
This prevents non-root instances of SystemServer to try to open `/etc/shadow`.
2022-08-14SystemServer: Change user only when neededLucas CHOLLET
2022-08-14SystemServer: Unlink before binding a new socketLucas CHOLLET
Prevent "Address already in use" issues when restarting a service.
2022-08-14Base: Add about ~200 ads and trackers to the default content filter listLuke Wilde
2022-08-14Ports: Update to the latest radare2-5.7.6pancake
2022-08-14PixelPaint: Add Median filterkleines FilmrΓΆllchen
The median filter replaces a pixel with the median of all pixels (usually grey value is used) in a square neighborhood. This is a standard image processing filter used for denoising, as despite its simplicity it can e.g. retain edges quite well. The first implementation is quite inefficient mostly to environmental constraints. Due to how images are passed to the processing function, two unnecessary copies happen. And because there's no fast sorting algorithm for small arrays (insertion sort) yet, quick sort needs to be used which is quite slow on this scale.
2022-08-14Ports: Add port aria2 version 1.36.0EWouters
2022-08-14FontEditor: Mark pasted glyphs as modifiedSam Atkins
Co-authored-by: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com>
2022-08-14FontEditor: Add an option to show or hide modification highlightsSam Atkins