]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
s390/unwind: fix mixing regs and sp
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 2 Oct 2019 11:29:57 +0000 (13:29 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:47:18 +0000 (18:47 +0100)
commit3319474d09bf0b99a339e81d3cbb8e08cf022af2
tree30d0a6655909de2249a9398bb513d618460eee8b
parent41a3cac33730a0980ed7e39f187f5d0d54712847
s390/unwind: fix mixing regs and sp

BugLink: https://bugs.launchpad.net/bugs/1851550
commit a1d863ac3e1085e1fea9caafd87252d08731de2e upstream.

unwind_for_each_frame stops after the first frame if regs->gprs[15] <=
sp.

The reason is that in case regs are specified, the first frame should be
regs->psw.addr and the second frame should be sp->gprs[8]. However,
currently the second frame is regs->gprs[15], which confuses
outside_of_stack().

Fix by introducing a flag to distinguish this special case from
unwinding the interrupt handler, for which the current behavior is
appropriate.

Fixes: 78c98f907413 ("s390/unwind: introduce stack unwind API")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: stable@vger.kernel.org # v5.2+
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/s390/include/asm/unwind.h
arch/s390/kernel/unwind_bc.c