Skip to content

Commit eefe682

Browse files
juntongdengJonathan Corbet
authored andcommitted
kasan: Add documentation for CONFIG_KASAN_EXTRA_INFO
This patch adds CONFIG_KASAN_EXTRA_INFO introduction information to KASAN documentation. Signed-off-by: Juntong Deng <[email protected]> Reviewed-by: Andrey Konovalov <[email protected]> Link: https://lore.kernel.org/r/AM6PR03MB5848C52B871DA67455F0B2F2994D2@AM6PR03MB5848.eurprd03.prod.outlook.com Signed-off-by: Jonathan Corbet <[email protected]>
1 parent d4f42b7 commit eefe682

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Documentation/dev-tools/kasan.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,27 @@ traces point to places in code that interacted with the object but that are not
277277
directly present in the bad access stack trace. Currently, this includes
278278
call_rcu() and workqueue queuing.
279279

280+
CONFIG_KASAN_EXTRA_INFO
281+
~~~~~~~~~~~~~~~~~~~~~~~
282+
283+
Enabling CONFIG_KASAN_EXTRA_INFO allows KASAN to record and report more
284+
information. The extra information currently supported is the CPU number and
285+
timestamp at allocation and free. More information can help find the cause of
286+
the bug and correlate the error with other system events, at the cost of using
287+
extra memory to record more information (more cost details in the help text of
288+
CONFIG_KASAN_EXTRA_INFO).
289+
290+
Here is the report with CONFIG_KASAN_EXTRA_INFO enabled (only the
291+
different parts are shown)::
292+
293+
==================================================================
294+
...
295+
Allocated by task 134 on cpu 5 at 229.133855s:
296+
...
297+
Freed by task 136 on cpu 3 at 230.199335s:
298+
...
299+
==================================================================
300+
280301
Implementation details
281302
----------------------
282303

0 commit comments

Comments
 (0)