summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2019-08-05 09:07:19 -0400
committerVasily Gorbik <gor@linux.ibm.com>2019-08-06 07:58:35 -0400
commitfd0c7435d7bfd46161ef43b185f55d759022238c (patch)
tree8dde6bcd8efc34f712a621f1d7435a66663b854e
parent218ddd5acfeae9e19a2fa97c284bf3c2e9de8ebd (diff)
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: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r--arch/s390/kernel/dumpstack.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/s390/kernel/dumpstack.c b/arch/s390/kernel/dumpstack.c
index ac06c3949ab3..34bdc60c0b11 100644
--- a/arch/s390/kernel/dumpstack.c
+++ b/arch/s390/kernel/dumpstack.c
@@ -114,12 +114,8 @@ recursion_check:
114 * If it comes up a second time then there's something wrong going on: 114 * If it comes up a second time then there's something wrong going on:
115 * just break out and report an unknown stack type. 115 * just break out and report an unknown stack type.
116 */ 116 */
117 if (*visit_mask & (1UL << info->type)) { 117 if (*visit_mask & (1UL << info->type))
118 printk_deferred_once(KERN_WARNING
119 "WARNING: stack recursion on stack type %d\n",
120 info->type);
121 goto unknown; 118 goto unknown;
122 }
123 *visit_mask |= 1UL << info->type; 119 *visit_mask |= 1UL << info->type;
124 return 0; 120 return 0;
125unknown: 121unknown: