Commit graph

25724 commits

Author SHA1 Message Date
Luke
035aef9c09 Kernel/USB: Add endpoint directions and make endpoint constants public 2021-08-14 21:22:44 +02:00
Luke
3b4f71e4df Kernel/USB: Add all USB 2.0 bmRequestType fields 2021-08-14 21:22:44 +02:00
Luke
5578a5a32d Kernel/USB: Add header containing all the current USB classes 2021-08-14 21:22:44 +02:00
Brian Gianforcaro
72f348a6cf Meta: Disable printing frame args when debugging the kernel with gdb
The function arguments almost always optimized away, so you never get
much value out of showing these in the default back trace view, it just
adds a bunch of extra stuff that you need to visual wade through.
So lets disable showing them.
2021-08-14 21:18:05 +02:00
Gunnar Beutner
4b4fe29c39 Ports: Remove SHA256 checksum for the doom port 2021-08-14 20:28:55 +02:00
Gunnar Beutner
582d74b729 Ports: Bump vlang version to weekly.2021.31
The previous version failed to build.
2021-08-14 20:28:55 +02:00
Gunnar Beutner
909e19f753 Ports: Fix reinstalling the mysthous port
Reinstalling the port failed because some of its files were installed
with permissions that prevented overwriting the existing files with cp.
2021-08-14 20:28:55 +02:00
Gunnar Beutner
e7d7b43f99 Ports: Fix reinstalling the lure port
Reinstalling the port failed because some of its files were installed
with permissions that prevented overwriting the existing files with cp.
2021-08-14 20:28:55 +02:00
Andreas Kling
9b79867909 Toolchain: Make Kernel/API/ headers available during toolchain build 2021-08-14 20:25:56 +02:00
Nico Weber
1f71d7bf22 LibCore: Add --version flag to ArgsParser
`--version` always prints "git" for now.

The motivation is that the neofetch port calls `Shell --version` and
adds the output to its output. And if `Shell --version` prints a long
error message about it not knowing the flag, neofetch's output looks a
bit ugly. Per Discord discussion, just add the flag to ArgsParser
instead of only to Shell.
2021-08-14 22:46:34 +04:30
Nico Weber
7d4addc6d3 Ports: Add a space to end of shell name in neofetch
Matches what neofetch does for other shell names.
2021-08-14 22:46:34 +04:30
Andreas Kling
286a7ecd92 LibJS: Call base class visit_edges() in various Temporal objects
When overriding visit_edges() in a JS::Object subclass, we must make
sure to call the base class visit_edges(), or the object's Shape (and
any properties) will not get marked.
2021-08-14 20:12:22 +02:00
Andreas Kling
97c497f9fe Kernel: Move {Process,Thread,Session,ProcessGroup}ID to Kernel/Forward.h 2021-08-14 19:58:11 +02:00
Andreas Kling
dcb015fa7e Kernel: Move VFS-internal O_FOO definitions to VirtualFileSystem.h 2021-08-14 19:58:11 +02:00
Andreas Kling
b47c7a2c38 Kernel: Remove unused integer typedefs from UnixTypes.h 2021-08-14 19:58:11 +02:00
Andreas Kling
e1273a8ff7 Kernel+LibC: Share definitions for sys/statvfs.h 2021-08-14 19:58:11 +02:00
Andreas Kling
dfd78b75d8 Kernel+LibC: Share definitions for sched.h 2021-08-14 19:58:11 +02:00
Andreas Kling
c9a5d83ccc Kernel+LibC: Share definitions for sys/uio.h 2021-08-14 19:58:11 +02:00
Andreas Kling
37e98a55b7 Kernel+LibC: Share definitions for sys/ptrace.h 2021-08-14 19:58:11 +02:00
Andreas Kling
6dc688a08d Kernel: Remove some redundant typedefs from UnixTypes.h 2021-08-14 19:58:11 +02:00
Andreas Kling
6b6eca0631 Kernel+LibC: Share definitions for sys/time.h 2021-08-14 19:58:11 +02:00
Andreas Kling
35b52338bb Kernel+LibC: Share definitions for sys/times.h 2021-08-14 19:58:11 +02:00
Andreas Kling
808ce594db Kernel+LibC: Share definitions for stdio.h 2021-08-14 19:58:11 +02:00
Andreas Kling
9c2212a60a Kernel+LibC: Share definitions for unistd.h 2021-08-14 19:58:11 +02:00
Andreas Kling
d33b43276c Kernel+LibC: Share definitions for poll.h 2021-08-14 19:58:11 +02:00
Andreas Kling
d794ed1de7 Kernel+LibC: Share definitions for utsname.h 2021-08-14 19:58:11 +02:00
Andreas Kling
c65a735d71 Kernel+LibC: Share definitions for dirent.h 2021-08-14 19:58:11 +02:00
Andreas Kling
77c2c0f620 Kernel+LibC: Share definitions for serenity.h 2021-08-14 19:58:11 +02:00
Andreas Kling
6f78377864 Kernel+LibC: Share definitions for sys/wait.h 2021-08-14 19:58:11 +02:00
Andreas Kling
661bd992b0 Kernel+LibC: Share definitions for net/{if,if_arp,route}.h 2021-08-14 19:58:11 +02:00
Andreas Kling
ff50122dc5 Kernel+LibC: Share definitions for futex.h 2021-08-14 19:58:11 +02:00
Andreas Kling
6fd7212476 Kernel+LibC: Share definitions for signal.h 2021-08-14 19:58:11 +02:00
Andreas Kling
9dc1350177 Kernel+LibC: Share definitions for netinet/in.h 2021-08-14 19:58:11 +02:00
Andreas Kling
b92e6b02e5 Kernel+LibC: Share definitions for sys/socket.h and sys/un.h 2021-08-14 19:58:11 +02:00
Andreas Kling
d277cdfd4c Kernel+LibC: Share definitions for termios.h 2021-08-14 19:58:11 +02:00
Andreas Kling
a8d1c2dde9 Kernel+LibC: Share definitions for sys/mman.h 2021-08-14 19:58:11 +02:00
Andreas Kling
0a78056453 Kernel+LibC: Share definitions for time.h and sys/stat.h 2021-08-14 19:58:11 +02:00
Andreas Kling
740140a661 Kernel+LibC: Share definitions in fcntl.h and sys/types.h
This patch begins the work of sharing types and macros between Kernel
and LibC instead of duplicating them via the kludge in UnixTypes.h.

The basic idea is that the Kernel vends various POSIX headers via
Kernel/API/POSIX/ and LibC simply #include's them to get the macros.
2021-08-14 19:58:11 +02:00
Nico Weber
5c3440c5db Mandelbrot: Add a View menu with zoom actions 2021-08-14 19:50:44 +02:00
Nico Weber
19068945de Mandelbrot: Extract reset() method 2021-08-14 19:50:44 +02:00
Nico Weber
ad7bfe017f Mandelbrot: Extract zoom() method 2021-08-14 19:50:44 +02:00
Daniel Bertalan
fbdf17ae68 LibC: Don't flatten malloc and free
This is no longer needed as per the previous commit, UserspaceEmulator's
malloc tracer now correctly handles functions called from within
`malloc` and `free`. This might also have a benefit on performance
because forcibly inlining all function calls pessimizes cache locality.
2021-08-14 18:42:14 +02:00
Daniel Bertalan
87ef2718bc UserspaceEmulator+LibC: Use sys$emuctl() to disable auditing in malloc
It was fragile to use the address of the body of the memory management
functions to disable memory auditing within them. Functions called from
these did not get exempted from the audits, so in some cases
UserspaceEmulator reported bogus heap buffer overflows.

Memory auditing did not work at all on Clang because when querying the
addresses, their offset was taken relative to the base of `.text` which
is not the first segment in the `R/RX/RW(RELRO)/RW(non-RELRO)` layout
produced by LLD.

Similarly to when setting metadata about the allocations, we now use the
`emuctl` system call to selectively suppress auditing when we reach
these functions. This ensures that functions called from `malloc` are
affected too, and no issues occur because of the inconsistency between
Clang and GCC memory layouts.
2021-08-14 18:42:14 +02:00
Daniel Bertalan
0a36cea9dc Tests: Re-enable UserspaceEmulator tests on the Clang build
Now that problems that made UE crash have been fixed, this test should
now pass.
2021-08-14 18:42:14 +02:00
Daniel Bertalan
09cef25e92 UserspaceEmulator: Make call rm32 work with address on the stack
Previously, we pushed the old `eip` on the stack before reading the new
address, which made us jump to the wrong place if the destination was
relative to the `esp`.
2021-08-14 18:42:14 +02:00
Daniel Bertalan
bfe5509a28 UserspaceEmulator: Prefix MmapRegions' name with '(UE)'
When printing a backtrace, each library's base address is found by
walking through all memory regions in the coredump, and selecting the
address of the first region whose name begins with the library's soname.
This is done to support the Clang toolchain, where .text is not at
offset 0.

However, because the libraries loaded by the emulated process used the
same names, we could not distinguish those with the ones used by
UserspaceEmulator, so the backtrace ended up being garbage.

Using the libraries mapped by UE would not be a sufficient, as the
running application could ask for other libraries too, and doing away
with setting names would make debugging issues within UE code more
difficult.
2021-08-14 18:42:14 +02:00
Liav A
0847ad9ca0 Kernel/PCI: Assign a PCI address in the SysFS PCI device directories
This is a bug that went unnoticed for a long time, so the exposed values
in SysFS PCI device directories were incorrect because the assigned PCI
address was simply the host bridge always.

Also, the bus typing should really be two hexadecimal digits and not 4
digits.
2021-08-14 17:47:42 +02:00
Karol Kosek
e8fad5614e DisplaySettings: Pass the parent window to the FilePicker
Prior this change, closing the Display Settings application
didn't close the File Picker.
2021-08-14 15:20:21 +02:00
Karol Kosek
e2ad59ce06 DisplaySettings: Remove the trailing dot from tooltip and window title 2021-08-14 15:20:21 +02:00
Karol Kosek
4d477824e0 DisplaySettings: Open the wallpaper file picker in the wallpaper path
This small change can indirectly tell you where wallpapers are saved.
2021-08-14 15:20:21 +02:00