ladybird/Kernel/Net
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
..
Intel Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
NE2000 Kernel/Net: Move NE2000 network adapter code to a separate directory 2021-12-28 00:56:47 -08:00
Realtek Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
ARP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EthernetFrameHeader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EtherType.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ICMP.h Kernel: Switch static_asserts of a type size to AK::AssertSize 2021-09-05 20:08:57 +02:00
IPv4.h Kernel: Remove unused String.h includes 2021-12-11 13:15:26 -08:00
IPv4Socket.cpp Kernel: Handle promise violations in the syscall handler 2021-12-29 18:08:15 +01:00
IPv4Socket.h Kernel: Return the correct result for FIONREAD on datagram sockets 2021-12-16 22:21:35 +03:30
IPv4SocketTuple.h Kernel: Make IPv4SocketTuple operator== by reference 2021-09-16 17:17:13 +02:00
LocalSocket.cpp Kernel: Lock socket mutex across {get,set}sockopt() and SO_ERROR updates 2021-12-28 18:52:38 +01:00
LocalSocket.h Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
LoopbackAdapter.cpp Kernel: Convert network adapter names to Kernel::KString 2021-10-01 17:22:17 +00:00
LoopbackAdapter.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
NetworkAdapter.cpp Kernel+LibC: Add support for the IPv4 TOS field via the IP_TOS sockopt 2021-10-28 11:24:36 +02:00
NetworkAdapter.h Kernel+LibC: Add support for the IPv4 TOS field via the IP_TOS sockopt 2021-10-28 11:24:36 +02:00
NetworkingManagement.cpp Kernel: Remove the KString::try_create(String::formatted(...)) pattern 2021-12-28 01:55:22 -08:00
NetworkingManagement.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
NetworkTask.cpp Kernel: Mark kernel smart-pointer classes as [[nodiscard]] 2021-12-05 15:31:03 +01:00
NetworkTask.h Kernel: Avoid deadlock when trying to send packets from the NetworkTask 2021-04-30 23:11:56 +02:00
Routing.cpp Kernel: Add support for the MSG_DONTROUTE sys$sendmsg flag 2021-12-05 12:53:29 +01:00
Routing.h Kernel: Add support for the MSG_DONTROUTE sys$sendmsg flag 2021-12-05 12:53:29 +01:00
Socket.cpp Kernel: Lock socket mutex across {get,set}sockopt() and SO_ERROR updates 2021-12-28 18:52:38 +01:00
Socket.h Kernel: Lock socket mutex across {get,set}sockopt() and SO_ERROR updates 2021-12-28 18:52:38 +01:00
TCP.h Kernel: Switch static_asserts of a type size to AK::AssertSize 2021-09-05 20:08:57 +02:00
TCPSocket.cpp Kernel: Return the correct result for FIONREAD on datagram sockets 2021-12-16 22:21:35 +03:30
TCPSocket.h Kernel: Return the correct result for FIONREAD on datagram sockets 2021-12-16 22:21:35 +03:30
UDP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
UDPSocket.cpp Kernel: Remove unnecessary SocketHandle<T> class 2021-12-25 11:23:57 +01:00
UDPSocket.h Kernel: Remove unnecessary SocketHandle<T> class 2021-12-25 11:23:57 +01:00