]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kasan: avoid false positives during stack unwind
authorVasily Gorbik <gor@linux.ibm.com>
Thu, 20 Jun 2019 08:18:31 +0000 (10:18 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 2 Jul 2019 14:00:27 +0000 (16:00 +0200)
commitd5f68614a55c1890cf965262734cfa9d1dd8556e
treef7d92a954c4f78f3b44b4fffd36e4cdf003ebc5b
parent0bc1ed67e1a1c0d43872b8c6f9dbf4097d0f6c60
s390/kasan: avoid false positives during stack unwind

Avoid kasan false positive when current task is interrupted in-between
stack frame allocation and backchain write instructions leaving new stack
frame backchain invalid. In particular if backchain is 0 the unwinder
tries to read pt_regs from the stack and might hit kasan poisoned bytes,
leading to kasan "stack-out-of-bounds" report.

Disable kasan instrumentation of unwinder stack reads, since this
limitation couldn't be handled otherwise with current backchain unwinder
implementation.

Fixes: ef2ec76e0480 ("s390/unwind: introduce stack unwind API")
Reported-by: Julian Wiedmann <jwi@linux.ibm.com>
Tested-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/unwind_bc.c