Skip to content

Commit

Permalink
objtool, kcsan: Add volatile read/write instrumentation to whitelist
Browse files Browse the repository at this point in the history
[ Upstream commit 63646fc ]

Adds KCSAN's volatile instrumentation to objtool's uaccess whitelist.

Recent kernel change have shown that this was missing from the uaccess
whitelist (since the first upstreamed version of KCSAN):

  mm/gup.o: warning: objtool: fault_in_readable+0x101: call to __tsan_volatile_write1() with UACCESS enabled

Fixes: 75d75b7 ("kcsan: Support distinguishing volatile accesses")
Signed-off-by: Marco Elver <elver@google.com>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
melver authored and gregkh committed Dec 31, 2022
1 parent 51fe2dc commit 9f271a8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/objtool/check.c
Expand Up @@ -846,6 +846,16 @@ static const char *uaccess_safe_builtin[] = {
"__tsan_read_write4",
"__tsan_read_write8",
"__tsan_read_write16",
"__tsan_volatile_read1",
"__tsan_volatile_read2",
"__tsan_volatile_read4",
"__tsan_volatile_read8",
"__tsan_volatile_read16",
"__tsan_volatile_write1",
"__tsan_volatile_write2",
"__tsan_volatile_write4",
"__tsan_volatile_write8",
"__tsan_volatile_write16",
"__tsan_atomic8_load",
"__tsan_atomic16_load",
"__tsan_atomic32_load",
Expand Down

0 comments on commit 9f271a8

Please sign in to comment.