lkml.org 
[lkml]   [2021]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject[PATCH 0/9] kcsan: Add support for reporting observed value changes
From
This series adds support for showing observed value changes in reports.
Several clean up and refactors of KCSAN reporting code are done as a
pre-requisite. An example of the new KCSAN reports:

==================================================================
BUG: KCSAN: data-race in test_kernel_read / test_kernel_write

write to 0xffffffffc009a628 of 8 bytes by task 487 on cpu 0:
test_kernel_write+0x1d/0x30
access_thread+0x89/0xd0
kthread+0x23e/0x260
ret_from_fork+0x22/0x30

read to 0xffffffffc009a628 of 8 bytes by task 488 on cpu 6:
test_kernel_read+0x10/0x20
access_thread+0x89/0xd0
kthread+0x23e/0x260
ret_from_fork+0x22/0x30

value changed: 0x00000000000009a6 -> 0x00000000000009b2

Reported by Kernel Concurrency Sanitizer on:
CPU: 6 PID: 488 Comm: access_thread Not tainted 5.12.0-rc2+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
==================================================================

On one hand this will help better understand "race of unknown origin"
(one stack trace only) reports, but also provides more information to
better understand normal data race reports like above where KCSAN also
detected a value change.

Changelog
---------

This series was originally prepared courtesy of Mark Rutland in
September 2020. Because KCSAN had a few minor changes since the original
draft of the series, it required a rebase and re-test. To not be
forgotten and get these changes in sooner than later, Mark kindly agreed
to me adopting the series and doing the rebase, a few minor tweaks, and
finally re-test.

Marco Elver (1):
kcsan: Document "value changed" line

Mark Rutland (8):
kcsan: Simplify value change detection
kcsan: Distinguish kcsan_report() calls
kcsan: Refactor passing watchpoint/other_info
kcsan: Fold panic() call into print_report()
kcsan: Refactor access_info initialization
kcsan: Remove reporting indirection
kcsan: Remove kcsan_report_type
kcsan: Report observed value changes

Documentation/dev-tools/kcsan.rst | 88 +++++++---------
kernel/kcsan/core.c | 53 ++++------
kernel/kcsan/kcsan.h | 39 ++++---
kernel/kcsan/report.c | 169 ++++++++++++++++--------------
4 files changed, 162 insertions(+), 187 deletions(-)

--
2.31.1.295.g9ea45b61b8-goog

\
 
 \ /
  Last update: 2021-04-14 13:30    [W:0.063 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site