Commit Graph

20768 Commits

Author SHA1 Message Date
Idan Horowitz
c75ca4ea8f Kernel: Bit mask line control options in SerialDevice::set_line_control
The line control option bits (parity, stop bits, word length) were
masked and then combined incorrectly, resulting in them not being set
when requested.
2021-05-17 18:15:25 +02:00
Idan Horowitz
be57c424f3 Kernel: Swap baud rate divisor registers in SerialDevice::set_baud
These were accidentally the wrong way around (LSB part of the divisor
into the MSB register, MSB part of the divisor into the LSB register)
as can be seen in the specification (and in the comments themselves)
2021-05-17 18:15:25 +02:00
Idan Horowitz
0e5aba16ef Kernel: Use unsigned instead of signed types in SerialDevice
Addresses are unsigned by definition, and the conversion from signed
to unsigned and back in SerialDevice looked a bit dubious.
2021-05-17 18:15:25 +02:00
Idan Horowitz
3ad0a0d8c3 Kernel: Initialize the PCI Bus earlier in the boot sequence
We now initialize the PCI Bus as early as possible, to allow for
early boot (PCI based) serial logging.
2021-05-17 18:15:25 +02:00
Gunnar Beutner
843f861f97 LibELF: Fix an integer overflow in Image::find_sorted_symbol
The expression address - candidate.address can yield a value that
cannot safely be converted to an i32 which would result in
binary_search failing to find some symbols.
2021-05-17 14:58:13 +02:00
Timothy Flynn
44ceee1e14 Base: Fix 16x16 analog clock icon
This icon somehow got replaced with a Buggie image in
07341c3594.
2021-05-17 14:56:21 +02:00
Gunnar Beutner
51db8085f8 Demos: Add Mandelbrot demo
This adds a very rudimentary Mandelbrot viewer. It supports zooming
and pretty much nothing else. Not even color smoothing or super
sampling.
2021-05-17 13:35:39 +02:00
Andreas Kling
7e799529b9 WindowServer+LibGUI: Make menubar allocation asynchronous
Same as with menu allocation, move menubar ID management to the client
side, removing more IPC stalls during application startup.
2021-05-17 13:33:41 +02:00
Andreas Kling
baab0a5bef WindowServer+LibGUI: Make menu allocation asynchronous
This was only synchronous since WindowServer managed the ID allocation.
Doing this on the client side instead allows us to make create_menu()
an asynchronous IPC call, removing a bunch of IPC stalls during
application startup.
2021-05-17 13:33:41 +02:00
Gunnar Beutner
52054eb922 UE: Make sure we return the right values for get{peer,sock}name
These two functions didn't previously return error codes correctly and
would crash when an invalid address buffer was specified.
2021-05-17 13:32:19 +02:00
Gunnar Beutner
07341c3594 LibCore: Close accepted sockets on exec() and make them non-blocking
Previously accept() would copy the listener socket's cloexec and
non-blocking flag. With that fixed however TCPServer and LocalServer
now leak file descriptors into child processes and are blocking.
2021-05-17 13:32:19 +02:00
Gunnar Beutner
89956cb0d6 Kernel+Userspace: Implement the accept4() system call
Unlike accept() the new accept4() system call lets the caller specify
flags for the newly accepted socket file descriptor, such as
SOCK_CLOEXEC and SOCK_NONBLOCK.
2021-05-17 13:32:19 +02:00
Gunnar Beutner
529f605ac8 UE: Make sure the buffers for get{sock,peer}name() are large enough
Previously struct sockaddr was used which isn't guaranteed to be
large enough to hold the socket address get{sock,peer}name() returns.

Also, the addrlen argument was initialized incorrectly and should
instead use the address length specified by the caller.
2021-05-17 13:32:19 +02:00
Gunnar Beutner
fbfd0ed5ab LibCore: Open files with O_CLOEXEC by default
This changes Core::File::open() to specify O_CLOEXEC by default
so that we don't leak file descriptors into child processes. The
new behavior can be overriden by specifying OpenMode::KeepOnExec.
2021-05-17 13:32:19 +02:00
Andreas Kling
67ed580532 Chess: Make the main widget a GUI::Frame for a nicer look :^) 2021-05-17 12:02:38 +02:00
Andreas Kling
2083d1a3d6 WindowServer: Ignore window base size in aspect ratio enforcement
This makes windows with an aspect ratio behave more naturally if they
also have a base size (e.g from the main widget being a GUI::Frame.)
2021-05-17 12:01:17 +02:00
Daniel Bertalan
f0375e3efe Kernel+LibC: Support more termios settings in TTY
This commit adds support for the various ECHO* lflags and fixes some
POSIX conformance issues around newline handling. Also included are
error messages when setting not implemented settings.
2021-05-17 11:00:48 +02:00
Ali Mohammad Pur
b1b0db946e LibJS: Default-initialize the current_node pointer member in CallFrame
Some parts of the code depend on this being nullptr without actually
initializing it, leading to odd random crashes.
e.g. `VM::call_internal`.
2021-05-17 09:41:26 +02:00
Lenny Maiorani
adbf555e64 LibCrypto: Fix incorrectly constexpr variable
Problem:
- Clang ToT reports an error because `digest_size` cannot be evaluated
  at compile-time.

Solution:
- Change from using the member function to the `static` shadow of the
  NTTP.
2021-05-17 08:16:46 +02:00
Liav A
e6f333ae00 Kernel: Print failed attempt to shutdown the machine
Because we don't parse ACPI AML yet, If we are not able to shut down
the machine with "hacky" emulation methods - halt and print this state
to the users so they know they can shutdown the machine by themselves.
2021-05-17 00:30:40 +01:00
Liav A
02b73cb93d Kernel/Graphics: Be more consistent about arguments passing
This fixes a bug that was reported on this discord server by
@ElectrodeYT - due to the confusion of passing arguments in different
orders, we messed up and triggered a page fault due to faulty sizes.
2021-05-17 00:30:40 +01:00
Grant Yap
ca9101e5f0 Piano: Use the return key emoji in the key labels
The new way labels are stored unfortunately makes it *slightly* less
convenient to update the lists of white key and black key labels.
2021-05-17 00:16:49 +01:00
Grant Yap
186102dcc6 Emoji: Add a return key symbol 2021-05-17 00:16:49 +01:00
Ömer Kurttekin
cab821cd22
Ports: Update the packages.db directory in README
"packages.db" used to be directly in the "Build" directory but it has
been moved to "Build/i686/Root/usr/Ports/" in 6877a5b.
2021-05-16 22:52:51 +01:00
Siddharth Kapoor
dbd9d13857
Meta: Run 'du' with '--apparent-size', except on macOS
Fixes #7172.
2021-05-16 22:50:46 +01:00
Erik Biederstadt
2eb9dca782
GLTeapot: Add support for loading OBJ files containing extra information
If the OBJ loader encounters a file with vertex normals or texture
coordinates then it will no longer crash.
2021-05-16 22:48:23 +01:00
Luke
1258d06f74 LibWeb: Fix "adopt" => "adopt_ref" change in adoptNode exceptions
This was accidentally changed in
b91c49364d
2021-05-16 22:08:49 +01:00
Linus Groh
d7c0370c57 GameOfLife: Don't randomize cells on board resize
Loosing all game state for a simple resize of the board is quite
disappointing, so let's not do that. :^)
2021-05-16 23:00:21 +02:00
Linus Groh
7dea3d41cb GameOfLife: Use a frame as the board widget container
This adds a bit of depth and looks very nice :^)
2021-05-16 23:00:21 +02:00
Linus Groh
9151364e22 GameOfLife: Add vertical separator between interval and action buttons 2021-05-16 23:00:21 +02:00
Linus Groh
d859bde337 GameOfLife: Move "ms" interval label to GML
There's no reason not to!
2021-05-16 23:00:21 +02:00
Linus Groh
e7dc0bdba3 GameOfLife: Auto-size toolbar labels 2021-05-16 23:00:21 +02:00
Linus Groh
9a3f62adc7 GameOfLife: Remove some unused includes 2021-05-16 23:00:21 +02:00
Linus Groh
030360c787 GameOfLife: Add some margin to the toolbar layout
Ideally the inner widgets / vertical separators would have some as well,
but I'm not sure how right now. One step at a time. :^)
2021-05-16 23:00:21 +02:00
Linus Groh
f89eb0e4ce GameOfLife: Switch from single indexed vector to rows+columns
This is not only easier to comprehend code-wise and avoids some function
overloads, but also makes resizing the board while preserving game state
*a lot* easier. We now no longer have to allocate a new board on every
resize, we just grow/shrink the individual row vectors.
Also fixes a crash when clicking the board widget outside of the drawn
board area.
2021-05-16 23:00:21 +02:00
Linus Groh
00bfcef5be Base: Make 16x16 Play/Pause/Stop icons a bit smaller
These all looked out of place both when used on a regular button (e.g.
in the SoundPlayer application) and a toolbar action button (e.g. in the
GameOfLife application). This makes them a bit smaller (hand-drawn, not
scaled down).
2021-05-16 23:00:21 +02:00
Liav A
7995e115b8 Kernel/Graphics: Round size value when mapping real framebuffer 2021-05-16 21:59:10 +01:00
Liav A
7f3080c8f2 Kernel/Graphics: Assign console to be from VGACompatibleAdapter always
If we create a VGACompatibleAdapter object with a preset framebuffer,
Always assign the console so we can use it.

This is useful for modesetting done by a Multiboot loader, like GRUB.
2021-05-16 21:59:10 +01:00
Liav A
58d7eb36ad Kernel/Graphics: Fix a method to be more accurate about its name 2021-05-16 21:59:10 +01:00
Andrew Kaster
cfdd231a4d Documentation: Add Sanitizer section to RunningTests
Also, add link to RunningTests BuildInstructions, and clean up stale
commands in RunningTests to align to current build strategies.
2021-05-16 21:58:14 +01:00
Andrew Kaster
ac1d87b990 CI: Compile and run Lagom tests with ASAN and UBSAN
Make sure halt_on_error=1 is enabled so that UBSAN failures will crash
the test program and cause a failure.
2021-05-16 21:58:14 +01:00
Andrew Kaster
73adbb319c AK: Don't read past the end in BitmapView::count_in_range()
The current code is factored such that reads to the entirety of the last
byte should be dropped. This was relying on the fact that last would be
one past the end in that case. Instead of actually reading that byte
when it's completely out of bounds of the bitmask, just skip reads that
would be invalid. Add more tests to make sure that the behavior is
correct for byte aligned reads of byte aligned bitmaps.
2021-05-16 21:58:14 +01:00
Andrew Kaster
b9d65da5c8 LibCore: Use Vector instead of VLA in ArgsParser::parse()
If there happens to be zero positional arguments, this constructs a
0-length VLA, which is UB caught by UBSAN.
2021-05-16 21:58:14 +01:00
Andrew Kaster
11214bc94d AK: Don't call memcpy with null argument in ByteBuffer::copy()
This was happening in TestBase64.test_decode, while copying an empty
string.
2021-05-16 21:58:14 +01:00
Andreas Kling
00fa5dc53e Taskbar: Make shutdown dialog non-resizable and tweak button spacing 2021-05-16 21:23:31 +02:00
Andreas Kling
551e13b407 LibGUI: Put some more space between check boxes and their label text 2021-05-16 21:15:34 +02:00
Andreas Kling
3c831b146c LibGUI: Put some more space between radio buttons and their label text 2021-05-16 21:14:04 +02:00
Andreas Kling
f34a3b9521 Taskbar: Give the shutdown dialog a UI facelift :^) 2021-05-16 20:57:45 +02:00
Andreas Kling
ce47bbc965 Base: Tweak app-text-editor 32x32 icon (pencil color) 2021-05-16 20:27:17 +02:00
Liav A
8cbf3d88ff Kernel: Move ConsoleDevice initialization just after kmalloc init
This will ensure we will get all the kernel log on the second tty.
2021-05-16 19:58:33 +02:00