From: Philippe Gerum <[email protected]> Dovetail invokes arch_inband_task_init() for each emerging thread in the system, so that we may initialize our extended state with default settings. Make sure to intercept this hook in order to start from a fresh and clean state.
Signed-off-by: Philippe Gerum <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> --- kernel/cobalt/dovetail/kevents.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/cobalt/dovetail/kevents.c b/kernel/cobalt/dovetail/kevents.c index a402d5569..df5408ccc 100644 --- a/kernel/cobalt/dovetail/kevents.c +++ b/kernel/cobalt/dovetail/kevents.c @@ -86,6 +86,14 @@ static void unregister_debugged_thread(struct xnthread *thread) resume_debugged_process(process); } +void arch_inband_task_init(struct task_struct *tsk) +{ + struct cobalt_threadinfo *p = dovetail_task_state(tsk); + + p->thread = NULL; + p->process = NULL; +} + void handle_oob_trap_entry(unsigned int trapnr, struct pt_regs *regs) { struct xnthread *thread; -- 2.26.2
