[PATCH v2] arm64: Enable KCSAN

Marco Elver elver at google.com
Wed Dec 1 02:17:38 PST 2021


On Mon, 29 Nov 2021 at 15:46, Kefeng Wang <wangkefeng.wang at huawei.com> wrote:
> This patch enables KCSAN for arm64, with updates to build rules
> to not use KCSAN for several incompatible compilation units.
>
> Resent GCC version(at least GCC10) made outline-atomics as the
> default option(unlike Clang), which will cause linker errors
> for kernel/kcsan/core.o.
>
> Disables the out-of-line atomics by no-outline-atomics to fix
> the linker errors.
>
> Tested selftest and kcsan_test(built with GCC11 and Clang 13),
> and all passed.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang at huawei.com>

Acked-by: Marco Elver <elver at google.com> # kernel/kcsan

However, you need to wait for Mark to respond, because he'd know best
what might be missing.
This thread might give some clues:
https://groups.google.com/g/kasan-dev/c/4ySdJfedzso/m/e4CzdfWWBQAJ
(can't find LKML copy)

Thanks,
-- Marco



More information about the linux-arm-kernel mailing list