ARM: enable dumping stacks for CONFIG_SMP
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ARM: stacktrace: enable dumping stacks for SMP && FRAME_POINTERarch/ | +15 | 0 replies | |
| 2/2 | ARM: unwind: enable dumping stacks for SMP && ARM_UNWINDarch/ arch/ | +27 | 3 replies | |
| 2/2 | ARM: unwind: enable dumping stacks for SMP && ARM_UNWIND | +0 | 3 replies | |
| 2/2 | ARM: unwind: enable dumping stacks for SMP && ARM_UNWIND | +0 | 1 reply | |
| 2/2 | ARM: unwind: enable dumping stacks for SMP && ARM_UNWIND | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] ARM: enable dumping stacks for CONFIG_SMP
This topic has come up before, see
http://comments.gmane.org/gmane.linux.ports.arm.kernel/102458
for the previous discussion.
SMP is now the norm for new ARM systems, and the limitation that CONFIG_STACKTRACE doesn't work for tasks besides 'current' causes problems. The particular case I'm dealing with is automated debugging information collected from /proc/<pid>/stack when userspace detects a process is not responding.
Dumping stacktraces is currently disabled due to the worry that the task may be running on another CPU and that the unwinder may be unstable when presented with a stack that is being modified. I have attempted to harden the frame pointer based unwinder and the unwind table based unwinder against invalid stacks. I separated the two into individual patches, as I expect the patch to the table unwinder to be more controversial than the frame pointer unwinder.
Even without the hardening, unwinding a stack for a running process is not completely untested. When CONFIG_ARM_UNWIND is enabled, sysrq-t calls unwind_backtrace for all tasks including running ones. In addition, any callers to unwind_frame with preemption enabled, including proc_pid_stack, could see a modified stack even on a UP system (pointed out by Rabin Vincent the last time this topic came up).
arch/arm/kernel/stacktrace.c | 24 +++++++++++++----------- arch/arm/kernel/unwind.c | 31 +++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 15 deletions(-)