]> git.baikalelectronics.ru Git - kernel.git/commit
xtensa: fix KASAN report for show_stack
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 17 Mar 2023 06:00:21 +0000 (23:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:54 +0000 (12:10 +0200)
commitc255e545ef323da49f0a34c437c3f4ed8552eb5e
tree4a6d87b19f1a0888048c94594237107944da23ec
parentf3d42f2abf1681b575e7bc4953b7bb3825de53e2
xtensa: fix KASAN report for show_stack

commit 1d3b7a788ca7435156809a6bd5b20c95b2370d45 upstream.

show_stack dumps raw stack contents which may trigger an unnecessary
KASAN report. Fix it by copying stack contents to a temporary buffer
with __memcpy and then printing that buffer instead of passing stack
pointer directly to the print_hex_dump.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/xtensa/kernel/traps.c