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

From: Paul E. McKenney
Date: Mon Aug 31 2020 - 14:17:19 EST


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(-)