lkml.org 
[lkml]   [2015]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/process: Silence KASAN warnings in get_wchan()
> But, I think I have the solution.
> We could have some blacklist - list of function names which we should be ignored.
> In kasan_report() we could resolve return address to function name and compare it with name in list.
> If name in list -> ignore report.

I think annotating statements is cleaner than functions, even if it
is more code. Much better documentation

But if you really want to annotate on the function level:

It's better to annotate the function directly than some hidden away list.
This way there is some indication that there are races in there, which is
generally useful documentation.

__racy_function or similar.

Also central lists are generally annoying as they cause patch conflicts.

If disabling with an attribute doesn't work, you could put it into a special section
with __attribute__((section ...)) and check the start/end symbol before reporting.
That's how kprobes solves similar issues. It also has the advantage
that it stops inlining.

-Andi


\
 
 \ /
  Last update: 2015-10-05 19:01    [W:0.089 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site