History

kcsan: Print if strict or non-strict during init

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.

Marco Elver committed 5 years ago

Commit 9c827cd1 parent 49f72d51 file · +9 −0Browse files

Unified · Split

kernel/kcsan/core.c+9−0
@@ -656,6 +656,15 @@ void __init kcsan_init(void) · 655 unmodified lines
656656 pr_info("enabled early\n");
657657 WRITE_ONCE(kcsan_enabled, true);
658658 }
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+ }
659668 }
660669
661670 /* === Exported interface =================================================== */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t