Commit graph

16672 commits

Author SHA1 Message Date
Linus Groh
02520f16e3 Ports: Move packages.db from Ports/ to Build/
When removing and recreating the Build directory, it's quite annoying
having to edit/remove Ports/packages.db as the installer won't install
previously installed port dependencies again if they're still listed.
This problem is easily solved by just considering packages.db a
build-specific file.
2021-02-01 19:40:34 +01:00
Liav A
878d353c3d Documentation: Add a manual page about the new MemoryDevice file 2021-02-01 17:13:23 +01:00
Liav A
6e8f86b44b Ports: Upgrade dmidecode to version 3.3 2021-02-01 17:13:23 +01:00
Liav A
65c27bfe52 Kernel: Set file size for smbios_entry_point and DMI blobs in ProcFS
This is needed to support dmidecode version 3.3, so it can read the 2
blobs in ProcFS.
2021-02-01 17:13:23 +01:00
Liav A
338c6eec65 Ports: Add dmidecode to the available ports list 2021-02-01 17:13:23 +01:00
Liav A
a1e20aa04f Kernel: Fix enum of sysconf values to be in the correct order
This prevented from dmidecode to get the right PAGE_SIZE when using the
sysconf syscall.

I found this bug, when I tried to figure why dmidecode fails to mmap
/dev/mem when I passed --no-procfs, and the conclusion is that it tried
to mmap unaligned physical address 0xf5ae0 (SMBIOS data), and that was
caused by a wrong value returned after using the sysconf syscall to get
the plaform page size, therefore, allowing to send an unaligned address
to the mmap syscall.
2021-02-01 17:13:23 +01:00
Liav A
a9d1ddb1a5 Ports: Add a port of dmidecode 2021-02-01 17:13:23 +01:00
Liav A
c6fe1de30e LibC: Expose various option variables for later usage
These variables are used by the dmidecode utility to parse the
commandline arguments that were specified by the user.
2021-02-01 17:13:23 +01:00
Liav A
5ab1864497 Kernel: Introduce the MemoryDevice
This is a character device that is being used by the dmidecode utility.
We only allow to map the BIOS ROM area to userspace with this device.
2021-02-01 17:13:23 +01:00
Liav A
df59b80e23 Kernel: Expose SMBIOS blobs in ProcFS 2021-02-01 17:13:23 +01:00
Ben Wiederhake
e4e74c48ea Kernel: Provide torture tool for invalid memory checks 2021-02-01 17:07:56 +01:00
Ben Wiederhake
92cee5bdf5 Kernel: Demonstrate crash for invalid pointers 2021-02-01 17:07:56 +01:00
Brendan Coles
bda572ef48 Tests: Add Tests/LibGfx/image-decoder tests 2021-02-01 13:40:15 +01:00
Andreas Kling
1ce03f4f34 LibIPC: Stop sending client ID to clients
The client ID is not useful to normal clients anymore, so stop telling
everyone what their ID is.
2021-02-01 11:32:00 +01:00
Andreas Kling
a5bbe3280d LibGUI+WindowServer: Don't use a WM IPC to initiate own window resize
The WM_* IPC messages are intended for "outsider" window management,
not for a client's own windows. Make a separate StartWindowResize
message for this.

This was the only reason that every IPC client had to know its server
side client ID.
2021-02-01 11:23:54 +01:00
Linus Groh
c41d340983 LibJS: Use VM::names for Object::invoke() function names 2021-02-01 10:34:45 +01:00
Ben Wiederhake
52fff644d5 Documentation: Keymaps are nice, document them!
fixup! Meta+Documentation: Fix sync-local.sh support, document keymaps
2021-02-01 09:54:32 +01:00
Ben Wiederhake
cbee0c26e1 Kernel+keymap+KeyboardMapper: New pledge for getkeymap 2021-02-01 09:54:32 +01:00
Ben Wiederhake
272df54a3e Kernel+LibKeyboard: Define the default keymap only in one place
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-01 09:54:32 +01:00
Ben Wiederhake
2617279579 keymap: Unveil path, if one is given 2021-02-01 09:54:32 +01:00
Ben Wiederhake
0e3408d4d6 LibKeyboard: Don't assert on failure 2021-02-01 09:54:32 +01:00
Ben Wiederhake
d9e7e13fb2 KeyboardMapper: Without arguments, load current keymap 2021-02-01 09:54:32 +01:00
Ben Wiederhake
dd4e670f72 LibKeyboard+keymap: Support querying the keymap via commandline 2021-02-01 09:54:32 +01:00
Ben Wiederhake
a2c21a55e1 Kernel+LibKeyboard: Enable querying the current keymap 2021-02-01 09:54:32 +01:00
Ben Wiederhake
d47ed35801 Meta: Add script that checks consistency of keymaps 2021-02-01 09:54:32 +01:00
Ben Wiederhake
9f60ce4801 Base: Replace tabs+spaces in keymaps by only spaces 2021-02-01 09:54:32 +01:00
Ben Wiederhake
b6dddd27b4 Base: Cover entire German keyboard
I'm strongly basing this on what I'm used to (xkb-data's "de(basic)"),
but without dead keys (since we don't support them).
2021-02-01 09:54:32 +01:00
Ben Wiederhake
2f92c8cad5 Base: Replace unnecessary escapes by actual codepoints
I used this arcane incantation by @emanuele6:

    < <(grep -hoP -e '\\u[A-Za-z0-9]{4}' ./*.json) grep -i -ve '\\u001b' \
    | sort -u \
    | while read -r; do
        sed -i "s,\\$REPLY,$(eval "echo $'$REPLY'"),g" ./*.json
    done

Plus some manual editing to re-align everything. Thanks! :)
2021-02-01 09:54:32 +01:00
Ben Wiederhake
fa642eb7d0 Base: Fix wrong offset for Numpad and later keys
This seems to be the last remaining fallout of
8733da652e.
2021-02-01 09:54:32 +01:00
Ben Wiederhake
aa3d915260 LibTextCodec: Avoid duplicate definition of standard encodings 2021-02-01 09:54:32 +01:00
Ben Wiederhake
03b11af00f KeyboardMapper: Export keymap not as a byte, but as unicode
What a silly mixup. Loading and saving no longer loses any data! :^)
2021-02-01 09:54:32 +01:00
Ben Wiederhake
4deb0f8343 KeyboardMapper: Remove duplicate 'save' button
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-01 09:54:32 +01:00
Ben Wiederhake
6c04629ff8 KeyboardMapper: Make all of the GUI visible 2021-02-01 09:54:32 +01:00
Mart G
9068398f6b AK: Make single pivot quick_sort guarantee a max stack depth of log(n)
- The change to quick_sort requires SimpleIterator to support
  assignment.
- Rename quick_sort to single_pivot_quick_sort to make it easier
  to choose a specific implementation (not based on signature).
- Ensure single_pivot_quick_sort does not copy the pivots
- Expand sorts_without_copy test case to cover both single and dual
  pivot implementations.
2021-02-01 09:52:36 +01:00
Matteo Sozzi
40da077f6c HackStudio: added new directory action
Added the possibility to create a new directory in the current project.
2021-02-01 09:52:13 +01:00
Jean-Baptiste Boric
b48d8d1d6d Userland: Rename PCI slot to PCI device terminology 2021-01-31 19:06:40 +01:00
Jean-Baptiste Boric
06d76a4717 Kernel: Fix PCI bridge enumeration
The enumeration code is already enumerating all buses, recursively
enumerating bridges (which are buses) makes devices on bridges being
enumerated multiple times. Also, the PCI code was incorrectly mixing up
terminology; let's settle down on bus, device and function because ever
since PCIe came along "slots" isn't really a thing anymore.
2021-01-31 19:06:40 +01:00
Thomas Mangin
34508c0b01 LibX86: sanity check for Instruction read size
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-31 19:06:24 +01:00
AnotherTest
3b9ead985c LibLine: Only print ascii characters in caret form
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-31 19:06:02 +01:00
Linus Groh
521a38d9c5 LibWeb: Use URL::to_string_encoded() for the crash error page URL's href
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
'&amp;', for example.
2021-01-31 19:05:55 +01:00
Linus Groh
e0066ff2d7 AK: Add URL::to_string_encoded()
The result of to_string() passed to urlencode(), with some characters
excluded - basically like JavaScript's encodeURI().
2021-01-31 19:05:55 +01:00
Linus Groh
50e3b122c7 AK: Add optional parameter for excluding chars to urlencode() 2021-01-31 19:05:55 +01:00
Andreas Kling
1320b9351e Revert "Kernel: Don't clone kernel mappings for bottom 2 MiB VM into processes"
This reverts commit da7b21dc06.

This broke SMP boot, oops! :^)
2021-01-31 19:00:53 +01:00
Andreas Kling
da7b21dc06 Kernel: Don't clone kernel mappings for bottom 2 MiB VM into processes
I can't think of anything that needs these mappings anymore, so let's
get rid of them.
2021-01-31 15:20:18 +01:00
Andreas Kling
fc4eae87f8 LibC: Don't honor LIBC_* malloc debugging flags in AT_SECURE context
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-31 14:37:21 +01:00
Andreas Kling
9984201634 Kernel: Use KResult a bit more in the IPv4 networking code 2021-01-31 12:13:16 +01:00
Ben Wiederhake
b00799b9ce Kernel: Make /proc/self/ work again
I have no idea when it broke.

Inspired by https://www.thanassis.space/bashheimer.html
2021-01-31 12:03:14 +01:00
Andreas Kling
e313323317 LibELF: Split the DynamicLoader's loading mechanism into two steps
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-31 11:46:00 +01:00
Andreas Kling
36525c0572 LibELF: Assert on multiple calls to DynamicLoader::load_from_image()
It would be a mistake to recreate the cached DynamicObject.
2021-01-31 11:32:16 +01:00
Andreas Kling
2b862e4569 LibELF: Don't validate ELF twice in DynamicLoader
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-31 11:29:23 +01:00