kcsan: Call scoped accesses reordered in reports
The scoping of an access simply denotes the scope in which it may be reordered. However, in reports, it'll be less confusing to say the access is "reordered". This is more accurate when the race occurred. Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
48c9e28e1e
commit
3cc21a5312
|
@ -213,9 +213,9 @@ static bool report_matches(const struct expect_report *r)
|
|||
const bool is_atomic = (ty & KCSAN_ACCESS_ATOMIC);
|
||||
const bool is_scoped = (ty & KCSAN_ACCESS_SCOPED);
|
||||
const char *const access_type_aux =
|
||||
(is_atomic && is_scoped) ? " (marked, scoped)"
|
||||
(is_atomic && is_scoped) ? " (marked, reordered)"
|
||||
: (is_atomic ? " (marked)"
|
||||
: (is_scoped ? " (scoped)" : ""));
|
||||
: (is_scoped ? " (reordered)" : ""));
|
||||
|
||||
if (i == 1) {
|
||||
/* Access 2 */
|
||||
|
|
|
@ -215,9 +215,9 @@ static const char *get_access_type(int type)
|
|||
if (type & KCSAN_ACCESS_ASSERT) {
|
||||
if (type & KCSAN_ACCESS_SCOPED) {
|
||||
if (type & KCSAN_ACCESS_WRITE)
|
||||
return "assert no accesses (scoped)";
|
||||
return "assert no accesses (reordered)";
|
||||
else
|
||||
return "assert no writes (scoped)";
|
||||
return "assert no writes (reordered)";
|
||||
} else {
|
||||
if (type & KCSAN_ACCESS_WRITE)
|
||||
return "assert no accesses";
|
||||
|
@ -240,17 +240,17 @@ static const char *get_access_type(int type)
|
|||
case KCSAN_ACCESS_COMPOUND | KCSAN_ACCESS_WRITE | KCSAN_ACCESS_ATOMIC:
|
||||
return "read-write (marked)";
|
||||
case KCSAN_ACCESS_SCOPED:
|
||||
return "read (scoped)";
|
||||
return "read (reordered)";
|
||||
case KCSAN_ACCESS_SCOPED | KCSAN_ACCESS_ATOMIC:
|
||||
return "read (marked, scoped)";
|
||||
return "read (marked, reordered)";
|
||||
case KCSAN_ACCESS_SCOPED | KCSAN_ACCESS_WRITE:
|
||||
return "write (scoped)";
|
||||
return "write (reordered)";
|
||||
case KCSAN_ACCESS_SCOPED | KCSAN_ACCESS_WRITE | KCSAN_ACCESS_ATOMIC:
|
||||
return "write (marked, scoped)";
|
||||
return "write (marked, reordered)";
|
||||
case KCSAN_ACCESS_SCOPED | KCSAN_ACCESS_COMPOUND | KCSAN_ACCESS_WRITE:
|
||||
return "read-write (scoped)";
|
||||
return "read-write (reordered)";
|
||||
case KCSAN_ACCESS_SCOPED | KCSAN_ACCESS_COMPOUND | KCSAN_ACCESS_WRITE | KCSAN_ACCESS_ATOMIC:
|
||||
return "read-write (marked, scoped)";
|
||||
return "read-write (marked, reordered)";
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue