kcsan: Add support for reporting observed value changes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | kcsan: Simplify value change detectionkernel/ | +16 | 0 replies | |
| 2/9 | kcsan: Distinguish kcsan_report() callskernel/ kernel/ kernel/ | +33 | 0 replies | |
| 3/9 | kcsan: Refactor passing watchpoint/other_infokernel/ | +4 | 0 replies | |
| 4/9 | kcsan: Fold panic() call into print_report()kernel/ | +8 | 0 replies | |
| 5/9 | kcsan: Refactor access_info initializationkernel/ | +25 | 0 replies | |
| 6/9 | kcsan: Remove reporting indirectionkernel/ | +49 | 0 replies | |
| 7/9 | kcsan: Remove kcsan_report_typekernel/ kernel/ | +20 | 0 replies | |
| 8/9 | kcsan: Report observed value changeskernel/ kernel/ kernel/ | +33 | 0 replies | |
| 9/9 | kcsan: Document "value changed" lineDocumentation/ | +35 | 0 replies |
Reviews trailers per patch
None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Mark Rutland |
|---|---|
| Series | A-b |
| 1/9 | |
| 2/9 | |
| 3/9 | |
| 4/9 | |
| 5/9 | |
| 6/9 | |
| 7/9 | |
| 8/9 | |
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/9] kcsan: Add support for reporting observed value changes
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(-)
Signature · 1 line
2.31.1.295.g9ea45b61b8-goog