]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kasan: avoid report in get_wchan
authorVasily Gorbik <gor@linux.ibm.com>
Tue, 13 Aug 2019 17:23:51 +0000 (19:23 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 21 Aug 2019 10:58:53 +0000 (12:58 +0200)
commit8db667c36c85e35728cf19bfecb0243ed96dd345
tree5bdb4f2c07e83410c0cdd0b299aed23e489fb3b3
parent266a35589fd29446137678c11a0c9b0dc0b6919e
s390/kasan: avoid report in get_wchan

Reading other running task's stack can be a dangerous endeavor. Kasan
stack memory access instrumentation includes special prologue and epilogue
to mark/remove red zones in shadow memory between stack variables. For
that reason there is always a race between a task reading value in other
task's stack and that other task returning from a function and entering
another one generating different red zones pattern.

To avoid kasan reports simply perform uninstrumented memory reads.

Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/process.c