Skip to content

KCSAN updates for v5.10

Paul E. McKenney linux-arch lkml 1 version In review

Get series with b4
b4 am 20200831181715.GA1530@paulmck-ThinkPad-P72

Versions newest first

  1. v1 Latest19 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19kcsan: Add support for atomic builtinskernel/kcsan/core.c+110 -00 replies
2/19objtool: Add atomic builtin TSAN instrumentation to uaccess whitelisttools/objtool/check.c+50 -00 replies
3/19kcsan: Add atomic builtin test casekernel/kcsan/kcsan-test.c+63 -00 replies
4/19kcsan: Support compounded read-write instrumentationinclude/linux/kcsan-checks.h kernel/kcsan/core.c kernel/kcsan/report.c +1 more+53 -210 replies
5/19objtool, kcsan: Add __tsan_read_write to uaccess whitelisttools/objtool/check.c+5 -00 replies
6/19kcsan: Skew delay to be longer for certain access typeskernel/kcsan/core.c+7 -30 replies
7/19kcsan: Add missing CONFIG_KCSAN_IGNORE_ATOMICS checkskernel/kcsan/core.c+22 -80 replies
8/19kcsan: Test support for compound instrumentationkernel/kcsan/kcsan-test.c lib/Kconfig.kcsan+56 -140 replies
9/19instrumented.h: Introduce read-write instrumentation hooksinclude/linux/instrumented.h+30 -00 replies
10/19asm-generic/bitops: Use instrument_read_write() where appropriateinclude/asm-generic/bitops/instrumented-atomic.h include/asm-generic/bitops/instrumented-lock.h include/asm-generic/bitops/instrumented-non-atomic.h+7 -70 replies
11/19locking/atomics: Use read-write instrumentation for atomic RMWsinclude/asm-generic/atomic-instrumented.h scripts/atomic/gen-atomic-instrumented.sh+180 -1710 replies
12/19kcsan: Simplify debugfs counter to name mappingkernel/kcsan/debugfs.c+13 -200 replies
13/19kcsan: Simplify constant string handlingkernel/kcsan/debugfs.c kernel/kcsan/report.c+6 -60 replies
14/19kcsan: Remove debugfs test commandkernel/kcsan/debugfs.c+0 -660 replies
15/19kcsan: Show message if enabled earlykernel/kcsan/core.c+6 -20 replies
16/19kcsan: Use pr_fmt for consistencykernel/kcsan/debugfs.c kernel/kcsan/selftest.c+10 -60 replies
17/19kcsan: Optimize debugfs stats counterskernel/kcsan/core.c kernel/kcsan/debugfs.c kernel/kcsan/kcsan.h +1 more+23 -340 replies
18/19bitops, kcsan: Partially revert instrumentation for non-atomic bitopsinclude/asm-generic/bitops/instrumented-non-atomic.h+27 -33 replies
19/19kcsan: Use tracing-safe version of prandomkernel/kcsan/core.c+29 -60 replies

Reviews trailers per patch

9 of 19 patches have a Reviewed-by or Acked-by.

PatchPeter Zijlstra (Intel)Boqun Feng
1/19
2/19
3/19
4/19A-b
5/19A-b
6/19A-b
7/19A-b
8/19A-b
9/19A-b
10/19A-b
11/19A-b
12/19
13/19
14/19
15/19
16/19
17/19
18/19R-b
19/19

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH kcsan 0/19] KCSAN updates for v5.10

Hello!

This series provides KCSAN updates:

1. Add support for atomic builtins.

2. Add atomic builtin TSAN instrumentation to uaccess whitelist.

3. Add atomic builtin test case.

4. Support compounded read-write instrumentation.

5. objtool, kcsan: Add __tsan_read_write to uaccess whitelist.

6. Skew delay to be longer for certain access types.

7. Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks.

8. Test support for compound instrumentation.

9. instrumented.h: Introduce read-write instrumentation hooks.

10. asm-generic/bitops: Use instrument_read_write() where appropriate.

11. locking/atomics: Use read-write instrumentation for atomic RMWs.

12. Simplify debugfs counter to name mapping.

13. Simplify constant string handling.

14. Remove debugfs test command.

15. Show message if enabled early.

16. Use pr_fmt for consistency.

17. Optimize debugfs stats counters.

18. bitops, kcsan: Partially revert instrumentation for non-atomic bitops.

19. Use tracing-safe version of prandom.

Thanx, Paul

------------------------------------------------------------------------

 include/asm-generic/atomic-instrumented.h            |  330 +++++++++----------
 include/asm-generic/bitops/instrumented-atomic.h     |    6 
 include/asm-generic/bitops/instrumented-lock.h       |    2 
 include/asm-generic/bitops/instrumented-non-atomic.h |   36 +-
 include/linux/instrumented.h                         |   30 +
 include/linux/kcsan-checks.h                         |   45 +-
 kernel/kcsan/core.c                                  |  238 +++++++++++--
 kernel/kcsan/debugfs.c                               |  136 +------
 kernel/kcsan/kcsan-test.c                            |  128 ++++++-
 kernel/kcsan/kcsan.h                                 |   12 
 kernel/kcsan/report.c                                |   10 
 kernel/kcsan/selftest.c                              |    8 
 lib/Kconfig.kcsan                                    |    5 
 scripts/Makefile.kcsan                               |    2 
 scripts/atomic/gen-atomic-instrumented.sh            |   21 -
 tools/objtool/check.c                                |   55 +++
 16 files changed, 697 insertions(+), 367 deletions(-)