Commit b8ed406e authored by Jan Kiszka's avatar Jan Kiszka
Browse files

cobalt/kevent: ipipe: Check for FPU events before debug events



At least on ARM, an illegal instruction event that could also mean
"breakpoint" can become an FPU event after analyzing it in
xnarch_handle_fpu_fault. Avoid registering the process as being stopped
for debugging first - this would be false alarm, and it would not be
unregistered any time soon.

This was exposed by the ptrace helper addition.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 58e69933
......@@ -38,18 +38,6 @@ static inline int handle_exception(struct ipipe_trap_data *d)
if (xnthread_test_state(thread, XNROOT))
return 0;
if (xnarch_fault_bp_p(d) && user_mode(d->regs)) {
spl_t s;
XENO_WARN_ON(CORE, xnthread_test_state(thread, XNRELAX));
xnlock_get_irqsave(&nklock, s);
xnthread_set_info(thread, XNCONTHI);
ipipe_enable_user_intret_notifier();
cobalt_stop_debugged_process(thread);
xnlock_put_irqrestore(&nklock, s);
xnsched_run();
}
if (xnarch_fault_fpu_p(d)) {
#ifdef CONFIG_XENO_ARCH_FPU
spl_t s;
......@@ -72,6 +60,18 @@ static inline int handle_exception(struct ipipe_trap_data *d)
#endif
}
if (xnarch_fault_bp_p(d) && user_mode(d->regs)) {
spl_t s;
XENO_WARN_ON(CORE, xnthread_test_state(thread, XNRELAX));
xnlock_get_irqsave(&nklock, s);
xnthread_set_info(thread, XNCONTHI);
ipipe_enable_user_intret_notifier();
cobalt_stop_debugged_process(thread);
xnlock_put_irqrestore(&nklock, s);
xnsched_run();
}
/*
* If we experienced a trap on behalf of a shadow thread
* running in primary mode, move it to the Linux domain,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment