Commit Graph

25204 Commits

Author SHA1 Message Date
Ali Mohammad Pur
c4437e19bd LibDebug+Everywhere: Make DebugInfo not own the ELF image
This is required to avoid copying the image where otherwise a reference
would be enough.
2021-08-06 01:14:03 +02:00
Ali Mohammad Pur
521217735b UserspaceEmulator: Optionally generate a Profiler-compatible profile
`ue --profile --profile-file ~/some-file.profile id` can now generate a
full profile (instruction-by-instruction, if needed), at the cost of not
being able to see past the syscall boundary (a.la. callgrind).
This makes it significantly easier to profile seemingly fast userspace
things, like Loader.so :^)
2021-08-06 01:14:03 +02:00
Ali Mohammad Pur
3829bf115c AK: Make StringBuilder::join() use appendff() instead of append()
`append()` is almost never going to select the overload that is desired.
e.g. it will append chars when you pass it a Vector<size_t>, which is
definitely not the right overload :)
2021-08-06 01:14:03 +02:00
Jamie Mansfield
705e91d332 Spider: Use YesNo dialog for user confirmation when closing
Cancel was superflous, and provided no difference to No.
2021-08-06 01:12:32 +02:00
Jamie Mansfield
c3c1a9ca1d Solitaire: Get user confirmation to close when there is a active game 2021-08-06 01:12:32 +02:00
Andreas Kling
779316d468 Userland: Use Core::Process::spawn() instead of posix_spawn() in places
This replaces a bunch of very basic uses of posix_spawn() with the new
Core::Process::spawn().
2021-08-06 01:06:42 +02:00
Andreas Kling
6e65b36973 LibCore: Add Core::Process::spawn()
This is a simple wrapper around posix_spawn() that will help us simplify
a bunch of very verbose posix_spawn() invocations.

This first version only supports the simplest case: executing an
executable without passing arguments or doing anything fancy. More
features can be added to cover more cases. :^)
2021-08-06 01:04:11 +02:00
Andreas Kling
ad3ae7e0e8 Kernel: Fix handful of remaining "return -EFOO" mistakes
Now that all KResult and KResultOr are used consistently throughout the
kernel, it's no longer necessary to return negative error codes.
However, we were still doing that in some places, so let's fix all those
(bugs) by removing the minuses. :^)
2021-08-06 00:37:47 +02:00
Andreas Kling
3377cc74df Kernel: Use try_copy_kstring_from_user() in sys$mount() 2021-08-06 00:37:47 +02:00
Andreas Kling
33adc3a42d Kernel: Store coredump metadata properties as KStrings
This patch also replaces the HashMap previously used to store coredump
properties with a plain AK::Array.
2021-08-06 00:37:47 +02:00
Andreas Kling
95669fa861 Kernel: Use try_copy_kstring_from_user() in sys$link() 2021-08-06 00:37:47 +02:00
Andreas Kling
5b13af0edd Kernel: Use try_copy_kstring_from_user() in Socket::setsockopt() 2021-08-06 00:37:47 +02:00
Andreas Kling
b96ad76cba Kernel: Use try_copy_kstring_from_user() in IPv4Socket::ioctl() 2021-08-06 00:37:47 +02:00
Andreas Kling
584fa525eb Kernel: Don't make a separate allocation for thread FPU state
We were allocating thread FPU state separately in order to ensure a
16-byte alignment. There should be no need to do that.

This patch makes it a regular value member of Thread instead, dodging
one heap allocation during thread creation.
2021-08-06 00:37:47 +02:00
Andreas Kling
d5d8fba579 Kernel: Store Thread name as a KString 2021-08-06 00:37:47 +02:00
Andreas Kling
07599b48de Kernel: Make a helper in the Intel graphics driver return StringView 2021-08-06 00:37:47 +02:00
Andreas Kling
066d3281b5 Kernel: Make AsyncDeviceRequest::name() return StringView 2021-08-06 00:37:47 +02:00
Andreas Kling
beeed90a3f Kernel: Remove unused PCI::Access::access_type() 2021-08-06 00:37:47 +02:00
Andreas Kling
f3f0b80b83 Kernel: Make IRQController::model() return StringView 2021-08-06 00:37:47 +02:00
Andreas Kling
f572d96539 Kernel: Make HardwareTimer::model() return StringView 2021-08-06 00:37:47 +02:00
Andreas Kling
32a150f2b4 Kernel: Make Thread::state_string() return StringView 2021-08-06 00:37:47 +02:00
Andreas Kling
af46f2214c Kernel: Make a bunch of "char const* to_string()" return StringView 2021-08-06 00:37:47 +02:00
Andreas Kling
f35108fc31 Kernel: Simplify PageDirectory allocation failure
This patch gets rid of the "valid" bit in PageDirectory since it was
only used to communicate an allocation failure during construction.

We now do all the work in the static factory functions instead of in the
constructor, which allows us to simply return nullptr instead of an
"invalid" PageDirectory.
2021-08-06 00:37:47 +02:00
Andreas Kling
27100126c0 Kernel: Fix logic typo in AnonymousVMObject::handle_cow_fault()
Introduced in dd58d0f650
2021-08-06 00:37:47 +02:00
Linus Groh
b7b23d05d5 LibJS: Implement Temporal.ZonedDateTime.prototype.getISOFields() 2021-08-05 23:15:27 +01:00
Linus Groh
82ab5da4db LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainDateTime() 2021-08-05 23:15:27 +01:00
Linus Groh
6ce631b023 LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainTime() 2021-08-05 23:15:27 +01:00
Linus Groh
b4ea4e86a7 LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainDate() 2021-08-05 23:15:27 +01:00
Linus Groh
96a0c201d5 LibJS: Implement Temporal.ZonedDateTime.prototype.toInstant() 2021-08-05 23:15:27 +01:00
Linus Groh
20300bd7c4 LibJS: Implement Temporal.ZonedDateTime.prototype.valueOf() 2021-08-05 23:15:27 +01:00
Idan Horowitz
3e909c0c49 Kernel: Remove double-counting of allocated pages in AnonymousVMObject
When constructing an AnonymousVMObject with the AllocateNow allocation
strategy we accidentally allocated the committed pages directly through
MemoryManager instead of taking them from our m_unused_physical_pages
CommittedPhysicalPageSet, which meant they were counted as allocated in
MemoryManager, but were still counted as unallocated in the PageSet,
who would then try to uncommit them on destruction, resulting in a
failed assertion.

To help prevent similar issues in the future a Badge<T> was added to
MM::allocate_committed_user_physical_page to prevent allocation of
commited pages not via a CommittedPhysicalPageSet.
2021-08-05 20:26:47 +02:00
K-Adam
e8d10fb429 LibWeb: Ignore svg elements outside of <svg> when building layout tree
An svg layout element without a `SVGSVGElement` ancestor caused a failed
assertion before, because the svg context does not exist when `paint()`
is called
2021-08-05 20:17:08 +02:00
K-Adam
758d816b23 LibWeb: Clear SVG context after SVGSVGBox children are painted 2021-08-05 20:17:08 +02:00
K-Adam
eb1578e7c8 LibWeb: Call before/after children_paint on parent in StackingContext
When it is called inside `box.for_each_child`, then it may not be called
for the root element. By missing `SVGSVGBox::before_children_paint`
the svg context is not created
2021-08-05 20:17:08 +02:00
Mandar Kulkarni
566702ffa2 Meta: Fix wrong path for AK Tests in check-ak-test-files.sh 2021-08-05 19:58:55 +02:00
Linus Groh
6c345c8107 LibJS: Implement Temporal.ZonedDateTime.prototype.offset 2021-08-05 19:19:40 +02:00
Linus Groh
f937e9b966 LibJS: Implement Temporal.ZonedDateTime.prototype.offsetNanoseconds 2021-08-05 19:19:40 +02:00
Linus Groh
dd36593c72 LibJS: Implement Temporal.ZonedDateTime.prototype.inLeapYear 2021-08-05 19:19:40 +02:00
Linus Groh
5a7db1b5f4 LibJS: Implement Temporal.ZonedDateTime.prototype.monthsInYear 2021-08-05 19:19:40 +02:00
Linus Groh
204ba01416 LibJS: Implement Temporal.ZonedDateTime.prototype.daysInYear 2021-08-05 19:19:40 +02:00
Linus Groh
6007fc4804 LibJS: Implement Temporal.ZonedDateTime.prototype.daysInMonth 2021-08-05 19:19:40 +02:00
Linus Groh
d89d55a7a3 LibJS: Implement Temporal.ZonedDateTime.prototype.daysInWeek 2021-08-05 19:19:40 +02:00
Linus Groh
540fdbcf5b LibJS: Implement Temporal.ZonedDateTime.prototype.weekOfYear 2021-08-05 19:19:40 +02:00
Linus Groh
d20a4fe43e LibJS: Implement Temporal.ZonedDateTime.prototype.dayOfYear 2021-08-05 19:19:40 +02:00
Linus Groh
39e67a5823 LibJS: Implement Temporal.ZonedDateTime.prototype.dayOfWeek 2021-08-05 19:19:40 +02:00
Linus Groh
f86bbb7a71 LibJS: Implement Temporal.ZonedDateTime.prototype.epochNanoseconds 2021-08-05 19:19:40 +02:00
Linus Groh
62294d62c5 LibJS: Implement Temporal.ZonedDateTime.prototype.epochMicroseconds 2021-08-05 19:19:40 +02:00
Linus Groh
a9162b7e98 LibJS: Implement Temporal.ZonedDateTime.prototype.epochMilliseconds 2021-08-05 19:19:40 +02:00
Linus Groh
47135af987 LibJS: Implement Temporal.ZonedDateTime.prototype.epochSeconds 2021-08-05 19:19:40 +02:00
Linus Groh
a1082412ef LibJS: Implement Temporal.ZonedDateTime.prototype.nanosecond 2021-08-05 19:19:40 +02:00