Re: [PATCH] x86/process: Silence KASAN warnings in get_wchan()

From: Andrey Ryabinin
Date: Mon Oct 05 2015 - 07:46:33 EST




On 10/05/2015 02:39 PM, Dmitry Vyukov wrote:
>>
>> But that's all pretty disgusting really.
>>
>> Cannot we do better, such as annotating the function and then KASAN sorting out
>> its false positives, or something like that?
>
>
> We also plug __attribute__((no_sanitize_address)) on the function.
>

It's absolutely unusable:( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
If we add it here, it won't built because of: '__always_inline __read_once_size()'

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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/