Re: [PATCH v2] arm64: Enable KCSAN

Marco Elver
2021-12-01T10:19:34Z

On Mon, 29 Nov 2021 at 15:46, Kefeng Wang <wangkefeng.wang@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@huawei.com>

Acked-by: Marco Elver <elver@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