lkml.org 
[lkml]   [2015]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/process: Silence KASAN warnings in get_wchan()
From
2015-10-07 19:27 GMT+03:00 Andi Kleen <ak@linux.intel.com>:
> On Wed, Oct 07, 2015 at 11:54:42AM +0300, Andrey Ryabinin wrote:
>> On 10/06/2015 09:11 PM, Andy Lutomirski wrote:
>> >
>> > But what's wrong with the GCC attribute mechanism? Surely GCC ought
>> > to be able to generate the code, at least in the simple cases, and the
>> > attribute already exists. The attribute and READ_ONCE_NOCHECK seem
>> > like the least messy in the C code.
>>
>> The problem with 'no_sanitize_address' attribute is incompatibility with inlining.
>> GCC can't inline function with that attribute into function without it.
>> And the contrary is also true - GCC can't inline function without attribute into function with such attribute.
>>
>> Failure to inline always_inline function leads to build failure.
>
> So just don't do that? Don't set the attribute on functions marked inline.
> Where do you see this anyways?

Besides that we can't set the attribute on functions that *call*
inline functions.
So we can't set it on get_wchan() because it calls __read_once_size().



>
> -Andi


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