Re: [PATCH v3 2/3] x86: Use static_cpu_has in uaccess region to avoid instrumentation

From: Andrey Ryabinin
Date: Thu Jun 13 2019 - 11:36:43 EST




On 5/31/19 6:08 PM, Marco Elver wrote:
> This patch is a pre-requisite for enabling KASAN bitops instrumentation;
> using static_cpu_has instead of boot_cpu_has avoids instrumentation of
> test_bit inside the uaccess region. With instrumentation, the KASAN
> check would otherwise be flagged by objtool.
>
> For consistency, kernel/signal.c was changed to mirror this change,
> however, is never instrumented with KASAN (currently unsupported under
> x86 32bit).
>
> Signed-off-by: Marco Elver <elver@xxxxxxxxxx>
> Suggested-by: H. Peter Anvin <hpa@xxxxxxxxx>

Reviewed-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>