Bug 198435 - KASAN: print frame description for stack bugs
Summary: KASAN: print frame description for stack bugs
Status: RESOLVED CODE_FIX
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Sanitizers (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Dmitry Vyukov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-10 14:21 UTC by Dmitry Vyukov
Modified: 2019-06-07 09:56 UTC (History)
2 users (show)

See Also:
Kernel Version: ALL
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Dmitry Vyukov 2018-01-10 14:21:25 UTC
We currently don't print info about stack frame as asan does. We should.
Here is a quick prototype ftr:
https://groups.google.com/d/msg/kasan-dev/iDb5bhcMBT0/55QzwWaHAwAJ

We probably need to put this code into print_address_description().
For current task is it relatively simple, we can use task_stack_page() to get current stack range and it won't change under us.
For other tasks, first we need to figure out a way to find the corresponding task (which may not be possible due to deadlocks), and then try_get_task_stack(). But still stack can change under us, so info won't be reliable.

FTR, interface documentation is in AsanThread::GetStackFrameAccessByAddr and ParseFrameDescription asan function.
Comment 1 Marco Elver 2019-05-27 13:00:39 UTC
Patch implementing this has been added to mm-tree:
https://lkml.org/lkml/2019/5/22/224

Note You need to log in before you can comment on or make changes to this bug.