xtensa: return correct pt_regs even when in double exception

Double exception handler may (and by default does) run in a nested (2nd
level) stack frame, but task_pt_regs always returns the topmost stack frame.
When a signal is raised from the double exception for a ptraced
application the register values that ptracing application sees may be
incorrect.

Expand struct thread_info by adding a new field, double_frame, that points
to a double exception stack frame. task_pt_regs returns double_frame
when it is non-NULL, or the topmost stack frame otherwise.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
xtensa: deliver signal raised in double exception handler

This fixes infinite loop caused by an exception in a fast exception
handler, e.g. on userspace access to unaligned address in unmapped memory
region, or spill_registers syscall when user stack pointer is corrupted.

In such situations the handler of the nested exception sends a signal that
is either handled by the task or that kills the task avoiding infinite
retry of the faulty operation.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
xtensa: restart fast_unaligned handler on double exception

Add fast_unaligned_fixup that restores user registers, runs double
exception handler in the topmost stack frame and restarts fast_unaligned
afterwards. This makes sure that when a double exception handler raises
a signal, task registers visible through ptrace are correct in the signal
handler.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
WIP: broken: xtensa: restart fast_unaligned from the fault point

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>