Home
last modified time | relevance | path

Searched hist:b74e409ea1b18128b877a50883d92a12eba83c33 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/arch/s390/kernel/
H A Dentry.Sdiff b74e409ea1b18128b877a50883d92a12eba83c33 Thu Apr 08 17:13:18 CDT 2021 Vasily Gorbik <gor@linux.ibm.com> s390/entry: avoid setting up backchain in ext|io handlers

Currently when interrupt arrives to cpu while in kernel context
INT_HANDLER macro (used for ext_int_handler and io_int_handler)
allocates new stack frame and pt_regs on the kernel stack and
sets up the backchain to jump over the pt_regs to the frame which has
been interrupted. This is not ideal to two reasons:

1. This hides the fact that kernel stack contains interrupt frame in it
and hence breaks arch_stack_walk_reliable(), which needs to know that to
guarantee "reliability" and checks that there are no pt_regs on the way.

2. It breaks the backchain unwinder logic, which assumes that the next
stack frame after an interrupt frame is reliable, while it is not.
In some cases (when r14 contains garbage) this leads to early unwinding
termination with an error, instead of marking frame as unreliable
and continuing.

To address that, only set backchain to 0.

Fixes: 56e62a737028 ("s390: convert to generic entry")
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>