提交 fd0c7435 编写于 作者: V Vasily Gorbik

s390/unwind: remove stack recursion warning

Remove pointless stack recursion on stack type ... warning, which
only confuses people. There is no way to make backchain unwinder 100%
reliable. When a task is interrupted in-between stack frame allocation
and backchain write instructions new stack frame backchain pointer is
left uninitialized (there are also sometimes additional instruction
in-between stack frame allocation and backchain write instructions due
to gcc shrink-wrapping). In attempt to unwind such stack the unwinder
would still try to use that invalid backchain value and perform all kind
of sanity checks on it to make sure we are not pointed out of stack. In
some cases that invalid backchain value would be 0 and we would falsely
treat next stackframe as pt_regs and again gprs[15] in those pt_regs
might happen to point at some address within the task's stack.
Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
上级 218ddd5a
...@@ -114,12 +114,8 @@ int get_stack_info(unsigned long sp, struct task_struct *task, ...@@ -114,12 +114,8 @@ int get_stack_info(unsigned long sp, struct task_struct *task,
* If it comes up a second time then there's something wrong going on: * If it comes up a second time then there's something wrong going on:
* just break out and report an unknown stack type. * just break out and report an unknown stack type.
*/ */
if (*visit_mask & (1UL << info->type)) { if (*visit_mask & (1UL << info->type))
printk_deferred_once(KERN_WARNING
"WARNING: stack recursion on stack type %d\n",
info->type);
goto unknown; goto unknown;
}
*visit_mask |= 1UL << info->type; *visit_mask |= 1UL << info->type;
return 0; return 0;
unknown: unknown:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册