Commit Graph

20341 Commits

Author SHA1 Message Date
Itamar
f9b8e9c01c CppLanguageServer: Autocomplete namespaces 2021-05-15 23:28:50 +02:00
Itamar
f89f4af0b3 CppLanguageServer: Don't suggest inaccessible declarations
Previously, declarations that are not available in the global
namespace, such as member functions of a class, would also appear in
the autocomplete suggestions list.

To fix this, we now only recurse into scopes of namespaces and classes
when fetching declarations if we want to retrieve all the available
declarations in the document (For the use of Locator & ClassView).
2021-05-15 23:28:50 +02:00
Alexander Richards
ab8aa591f9
Documentation: Add my machine to hardware compatibility list (#7152) 2021-05-15 22:55:23 +02:00
Luke
4b61062785 Documentation: Add a working notebook to Hardware Compatibility List
This notebook started working with the recent AHCI fixes.
2021-05-15 22:53:06 +02:00
Idan Horowitz
227b1d4133 Documentation: Add a tested motherboard to Hardware Compatibility list
This motherboard and cpu combo now boots correctly into graphical mode
as a result of the recent fixes for AHCI and HPET.
2021-05-15 20:44:29 +01:00
Andreas Kling
4d429ba9ea Kernel: Unbreak profiling all processes
Regressed in 8a4cc735b9.
We stopped generating "process created" when enabling profiling,
which led to Profiler getting confused about the missing events.
2021-05-15 21:25:54 +02:00
Andreas Kling
19a696e397 ImageViewer: Use GUI::CommonActions for zoom related actions 2021-05-15 20:36:41 +02:00
Andreas Kling
c6b44e215a PixelPaint: Use GUI::CommonActions for zoom related actions 2021-05-15 20:36:41 +02:00
Andreas Kling
55dead60b5 LibGUI: Add CommonActions helpers for "zoom in/out" and "reset zoom" 2021-05-15 20:36:41 +02:00
Luke
57277d8a5c Kernel/AHCI: Fix "received" => "recovered" typo in communication error
The error is actually "Recovered communications error" instead of
"Received communications error".
2021-05-15 19:45:44 +02:00
Luke
174fdddc2b Kernel/AHCI: Get BOH and NVMP from extended capabilities
It was accidentally getting it from the regular capabilities.
2021-05-15 19:45:44 +02:00
Alexander Richards
88a997871e
AHCIController: Fix off-by-one mistake (#7144)
Fixes off-by-one caused by reading the register directly
without adding a 1 to it, because AHCI reports 1 less port than
the actual number of ports supported.
2021-05-15 19:45:23 +02:00
Linus Groh
0fb96e6cbf GameOfLife: Spell about action app name as "Game Of Life" 2021-05-15 17:55:49 +01:00
Linus Groh
9f9f54a9ad GameOfLife: Add separator before quit menu action 2021-05-15 17:55:27 +01:00
Linus Groh
310ec73550 GameOfLife: Add alt shortcuts to menus 2021-05-15 17:54:50 +01:00
Linus Groh
2225e18749 GameOfLife: Rename primary menu to just "Game" 2021-05-15 17:52:58 +01:00
Andres Crucitti
d99991e39c Games: Add GameOfLife
This patch introduces a new game based on Conway's Game of Life.
2021-05-15 17:44:21 +01:00
Sahan Fernando
e4f61c6f28 Kernel: Fix return values of BXVGADevice::read/write 2021-05-15 17:43:45 +01:00
euclidianAce
bbb21194a5
TextEditor: Clear leftover whitespace when inserting newlines
Previously when entering a newline, previous indentation would be left,
leaving a line consisting only of whitespace. This fixes that.
2021-05-15 17:38:53 +01:00
Andreas Kling
0994d0a33e LibGUI: Delay setting column width in AutocompleteBox
HeaderView doesn't allow you to set a column width until you've given
it a model with some columns.
2021-05-15 18:35:06 +02:00
Andreas Kling
ae7c5411a6 PixelPaint+Base: Tool icon refresh :^)
Redraw and shrink all tool icons to 16x16 instead of the off-beat size
(26x26) they had previously.
2021-05-15 18:35:06 +02:00
Liav A
8a4cc735b9 Kernel: Don't use the profile timer if we don't have a timer to assign 2021-05-15 18:08:41 +02:00
Daniel Bertalan
a5801e9919
FontEditor: Add missing unix pledge
Without this change, FontEditor would crash due to LibDesktop opening an
IPC connection.

Fixes #7137.
2021-05-15 16:07:05 +01:00
Gunnar Beutner
f89e8fb71a AK+LibC: Implement malloc_good_size() and use it for Vector/HashTable
This implements the macOS API malloc_good_size() which returns the
true allocation size for a given requested allocation size. This
allows us to make use of all the available memory in a malloc chunk.

For example, for a malloc request of 35 bytes our malloc would
internally use a chunk of size 64, however the remaining 29 bytes
would be unused.

Knowing the true allocation size allows us to request more usable
memory that would otherwise be wasted and make that available for
Vector, HashTable and potentially other callers in the future.
2021-05-15 16:30:14 +02:00
Gunnar Beutner
4ab9d8736b Kernel: Make perf_event() work for global profiles
Previously calls to perf_event() would end up in a process-specific
perfcore file even though global profiling was enabled. This changes
the behavior for perf_event() so that these events are stored into
the global profile instead.
2021-05-15 16:28:18 +02:00
Gunnar Beutner
704bfe54b6 LibWeb: Fix incorrect variable names when parsing CSS 2021-05-15 16:27:52 +02:00
Ömer Kurttekin
e0a68d4b6e
HackStudio: Pledge "fattr"
HackStudio's pledges recently tightened due to changes in
Core::EventLoop. However, it still needs the fattr pledge to be able to
create a new project and set its permissions.
2021-05-15 13:00:23 +01:00
Andreas Kling
ed81eb610d Base: Use http://serenityos.org/ for the default browser bookmark
We are currently unable to load the HTTPS version of the site due to
missing cipher suite support.
2021-05-15 12:55:31 +02:00
brapru
5a03531417 Utilities: Implement a netstat command
This implementation of netstat presents an overview of existing network
sockets. It directly reads the exposed sockets from /proc/net/. Current
support is limited to information regarding TCP and UDP connections.
Future improvements could include presenting information regarding
local sockets.
2021-05-15 11:27:20 +01:00
Brendan Coles
0629b4e170 Tests: Add LibELF tests 2021-05-15 11:02:04 +01:00
Andreas Kling
07850ccf51 LibGfx: Fix incorrect origin for checkerboard pattern fills
The checkerboard pattern used in transparency backgrounds was sometimes
misaligned with the grid. This happened because it was incorrectly
anchoring the pattern to the clipped rect instead of the global
grid of the underlying paint target.
2021-05-15 11:21:55 +02:00
nooga
da4928feea Ports: Add port for Brogue (BrogueCE) 2021-05-15 10:13:43 +01:00
Andreas Kling
08c55b7606 LibDebug: Avoid unnecessary String allocation in append_to_line_info()
This code path is very hot, and since we're seeing a lot of the same
strings repeatedly (and they're heading into a FlyString for storage)
let's construct those using FlyString(StringView) to avoid temporary
String objects.
2021-05-15 11:01:05 +02:00
Andreas Kling
a4099fc756 AK: Try to avoid String allocation in FlyString(StringView)
If we're constructing a FlyString from a StringView, and we already
have a matching StringImpl in the table, use HashTable::find() to
locate the existing string without creating a temporary String.
2021-05-15 11:01:05 +02:00
Luke
0f35dfc694 Kernel/AHCI: Don't check for PCC during initialization
On my machine, it only sets PRC and not PCC.

Confirmed to happen on:
- 8086:9ca2 (Intel Corporation Wildcat Point-LP SATA Controller
[AHCI Mode] (rev 03))
2021-05-15 10:14:16 +02:00
Luke
84fc498b9f Kernel/AHCI: Don't enable interrupts in the AHCIPort constructor
On my bare metal machine, enabling it as this point causes it to
instantly send an interrupt, and we're too early in the process
to be able to handle AHCI interrupts. The interrupts were being
enabled in the initialize function anyway.

Confirmed to happen on:
- 8086:9ca2 (Intel Corporation Wildcat Point-LP SATA Controller
[AHCI Mode] (rev 03))
- 8086:3b22 (Intel Corporation 5 Series/3400 Series Chipset
6 port SATA AHCI Controller (rev 06))
2021-05-15 10:14:16 +02:00
Brian Gianforcaro
f255993349 Kernel: Log unexpected TCP packet flags in NetworkTask handle_tcp()
Occasionally we'll see messages in the serial console like:

    handle_tcp: unexpected flags in FinWait1 state

In these cases it would be nice to know what flags we are receiving that
we aren't expecting.
2021-05-15 09:46:50 +02:00
Brian Gianforcaro
d76dedb381 Kernel: Fix UHCIController singleton startup null-deref race condition.
The following KUBSAN crash on startup was reported on discord:

```
UHCI: Started
KUBSAN: reference binding to null pointer of type struct UHCIController
KUBSAN: at ../../Kernel/Devices/USB/UHCIController.cpp, line 67
```

After inspecting the code, it became clear that there's a window of time
where the kernel task which monitors the UHCI port can startup and start
executing before the UHCIController constructor completes. This leaves
the singleton pointing to nullptr, thus in the duration of this race
window the "UHCI port proc" thread will go an and de-reference the null
pointer when trying to read for status changes on the UHCI root ports.

Reported-by: @stelar7
Reported-by: @bcoles

Fixes: #6154
2021-05-15 09:46:41 +02:00
Tim Schumacher
3ba3d2ddfd Ports: Add libiconv dependency to gettext
libiconv is explicitly linked later and required by gettext as well.

Add it to the dependencies to make builds in a clean environment work.
2021-05-15 09:01:55 +02:00
Brian Gianforcaro
a324d4d6a3 Kernel: Make AnonymousVMObject physical page APIs OOM safe
AnonymousVMObject::create_with_physical_page(s) can't be NonnullRefPtr
as it allocates internally. Fixing the API then surfaced an issue in
ScatterGatherList, where the code was attempting to create an
AnonymousVMObject in the constructor which will not be observable
during OOM.

Fix all of these issues and start propagating errors at the callers
of the AnonymousVMObject and ScatterGatherList APis.
2021-05-15 09:01:32 +02:00
Brian Gianforcaro
d45db06826 Kernel: Make AnonymousVMObject::clone/create APIs OOM safe 2021-05-15 09:01:32 +02:00
Brian Gianforcaro
ede1483e48 Kernel: Make Process creation APIs OOM safe
This change looks more involved than it actually is. This simply
reshuffles the previous Process constructor and splits out the
parts which can fail (resource allocation) into separate methods
which can be called from a factory method. The factory is then
used everywhere instead of the constructor.
2021-05-15 09:01:32 +02:00
Brian Gianforcaro
77868abe6a Kernel: Make PTYMultiplexer::open API OOM safe 2021-05-15 09:01:32 +02:00
Brian Gianforcaro
f3f5a225b9 Kernel: Fix lock state corruption in AHCIPORT::start_request
This code was unlocking the lock directly, but the Locker is still
attached, causing the lock to be unlocked an extra time, hence
corrupting the internal lock state.

This is extra confusing though, as complete_current_request() runs
without a lock which also looks like a bug. But that's a task for
another day.
2021-05-15 09:01:13 +02:00
Brian Gianforcaro
f982ef0ef0 Kernel: Halt CPU on deadly UBSAN instead of calling PANIC
The separate backtrace that the PANIC emits isn't useful and just adds
more data to visually filter from the output when debugging an issue.
Instead of calling PANIC, just emit the message with dbgln() and
manually halt the system.
2021-05-15 09:00:29 +02:00
Brian Gianforcaro
db78331741 Kernel: Don't crash in page_fault_handler if current_thread is null
If we are attempting to emit debugging information about an unhandleable
page fault, don't crash trying to kill threads or dump processes if the
current_thread isn't set in TLS. Attempt to keep proceeding in order to
dump as much useful information as possible.

Related: #6948
2021-05-15 09:00:29 +02:00
Daniel Bertalan
00498e0405
Documentation: Document CMake build options
Closes #7107.
2021-05-15 00:55:36 +01:00
Jelle Raaijmakers
5864aab87a LibGfx/Vector*: Implement Formatters 2021-05-15 00:41:30 +01:00
Linus Groh
9459f3728c Meta: Check that copyright headers are followed by a blank line 2021-05-15 00:28:30 +01:00
Linus Groh
d8a3609aa9 Everywhere: Add a blank line after copyright header where missing 2021-05-15 00:27:09 +01:00