Skip to content

Commit

Permalink
objtool: Add check_kcov_mode() to the uaccess safelist
Browse files Browse the repository at this point in the history
check_kcov_mode() is called by write_comp_data() and
__sanitizer_cov_trace_pc(), which are already on the uaccess safe list.
It's notrace and doesn't call out to anything else, so add it to the
list too.

This fixes the following warnings:

  kernel/kcov.o: warning: objtool: __sanitizer_cov_trace_pc()+0x15: call to check_kcov_mode() with UACCESS enabled
  kernel/kcov.o: warning: objtool: write_comp_data()+0x1b: call to check_kcov_mode() with UACCESS enabled

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
  • Loading branch information
Josh Poimboeuf committed May 20, 2020
1 parent 9d907f1 commit ae033f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/objtool/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ static const char *uaccess_safe_builtin[] = {
"__asan_report_store16_noabort",
/* KCOV */
"write_comp_data",
"check_kcov_mode",
"__sanitizer_cov_trace_pc",
"__sanitizer_cov_trace_const_cmp1",
"__sanitizer_cov_trace_const_cmp2",
Expand Down

0 comments on commit ae033f0

Please sign in to comment.