Show a brief message if KCSAN is strict or non-strict, and if non-strict also say that CONFIG_KCSAN_STRICT=y can be used to see all data races. This is to hint to users of KCSAN who blindly use the default config that their configuration might miss data races of interest.
Unified · Split
| @@ -656,6 +656,15 @@ void __init kcsan_init(void) · 655 unmodified lines | ||
| 656 | 656 | pr_info("enabled early\n"); |
| 657 | 657 | WRITE_ONCE(kcsan_enabled, true); |
| 658 | 658 | } |
| 659 | + | |
| 660 | + if (IS_ENABLED(CONFIG_KCSAN_REPORT_VALUE_CHANGE_ONLY) || | |
| 661 | + IS_ENABLED(CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC) || | |
| 662 | + IS_ENABLED(CONFIG_KCSAN_PERMISSIVE) || | |
| 663 | + IS_ENABLED(CONFIG_KCSAN_IGNORE_ATOMICS)) { | |
| 664 | + pr_warn("non-strict mode configured - use CONFIG_KCSAN_STRICT=y to see all data races\n"); | |
| 665 | + } else { | |
| 666 | + pr_info("strict mode configured\n"); | |
| 667 | + } | |
| 659 | 668 | } |
| 660 | 669 | |
| 661 | 670 | /* === Exported interface =================================================== */ |