1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:58:12 +00:00
serenity/Kernel/Graphics/VirtIOGPU
Brian Gianforcaro 54b9a4ec1e Kernel: Handle promise violations in the syscall handler
Previously we would crash the process immediately when a promise
violation was found during a syscall. This is error prone, as we
don't unwind the stack. This means that in certain cases we can
leak resources, like an OwnPtr / RefPtr tracked on the stack. Or
even leak a lock acquired in a ScopeLockLocker.

To remedy this situation we move the promise violation handling to
the syscall handler, right before we return to user space. This
allows the code to follow the normal unwind path, and grantees
there is no longer any cleanup that needs to occur.

The Process::require_promise() and Process::require_no_promises()
functions were modified to return ErrorOr<void> so we enforce that
the errors are always propagated by the caller.
2021-12-29 18:08:15 +01:00
..
Console.cpp Kernel + WindowServer: Re-define the interface to framebuffer devices 2021-10-27 07:57:44 +03:00
Console.h Kernel/Graphics: Merge VirtIO GraphicsAdapter and VirtIO GPU code 2021-10-27 07:57:44 +03:00
FramebufferDevice.cpp Kernel: Handle promise violations in the syscall handler 2021-12-29 18:08:15 +01:00
FramebufferDevice.h Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
GraphicsAdapter.cpp Kernel/Graphics: Re-order parameters in VirtIO GraphicsAdapter methods 2021-10-27 07:57:44 +03:00
GraphicsAdapter.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
Protocol.h Kernel/Graphics: Merge VirtIO GraphicsAdapter and VirtIO GPU code 2021-10-27 07:57:44 +03:00