kcsan: Support reporting scoped read-write access type
Support generating the string representation of scoped read-write accesses for completeness. They will become required in planned changes. Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
6c65eb7568
commit
d627c537c2
|
@ -210,10 +210,12 @@ static bool report_matches(const struct expect_report *r)
|
|||
"read-write" :
|
||||
"write") :
|
||||
"read");
|
||||
const bool is_atomic = (ty & KCSAN_ACCESS_ATOMIC);
|
||||
const bool is_scoped = (ty & KCSAN_ACCESS_SCOPED);
|
||||
const char *const access_type_aux =
|
||||
(ty & KCSAN_ACCESS_ATOMIC) ?
|
||||
" (marked)" :
|
||||
((ty & KCSAN_ACCESS_SCOPED) ? " (scoped)" : "");
|
||||
(is_atomic && is_scoped) ? " (marked, scoped)"
|
||||
: (is_atomic ? " (marked)"
|
||||
: (is_scoped ? " (scoped)" : ""));
|
||||
|
||||
if (i == 1) {
|
||||
/* Access 2 */
|
||||
|
|
|
@ -247,6 +247,10 @@ static const char *get_access_type(int type)
|
|||
return "write (scoped)";
|
||||
case KCSAN_ACCESS_SCOPED | KCSAN_ACCESS_WRITE | KCSAN_ACCESS_ATOMIC:
|
||||
return "write (marked, scoped)";
|
||||
case KCSAN_ACCESS_SCOPED | KCSAN_ACCESS_COMPOUND | KCSAN_ACCESS_WRITE:
|
||||
return "read-write (scoped)";
|
||||
case KCSAN_ACCESS_SCOPED | KCSAN_ACCESS_COMPOUND | KCSAN_ACCESS_WRITE | KCSAN_ACCESS_ATOMIC:
|
||||
return "read-write (marked, scoped)";
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue