hw: mark threads as dead in case of ipc violations

The IPC protcol violations are:

* Sending to an unknown thread (cap)
* Waiting for messages if a reply hasn't happened yet

This silents threads that otherwise repeatedly cause kernel messages
about the violation.

Ref genodelabs/genode#4704
This commit is contained in:
Stefan Kalkowski 2022-12-16 11:59:58 +01:00 committed by Christian Helmuth
parent fc690f1c47
commit fd3c70ec5b

View File

@ -488,7 +488,7 @@ void Thread::_call_await_request_msg()
} }
} else { } else {
Genode::raw("IPC await request: bad state"); Genode::raw("IPC await request: bad state");
user_arg_0(0); _become_inactive(DEAD);
} }
} }
@ -533,7 +533,7 @@ void Thread::_call_send_request_msg()
if (!dst) { if (!dst) {
Genode::raw(*this, ": cannot send to unknown recipient ", Genode::raw(*this, ": cannot send to unknown recipient ",
(unsigned)user_arg_1()); (unsigned)user_arg_1());
_become_inactive(AWAITS_IPC); _become_inactive(DEAD);
return; return;
} }
bool const help = Cpu_job::_helping_possible(*dst); bool const help = Cpu_job::_helping_possible(*dst);