Re: [PATCH -tip v4 3/3] kasan: test: Fix test for new meminstrinsic instrumentation

From: Alexander Potapenko
Date: Fri Feb 17 2023 - 04:11:41 EST


On Fri, Feb 17, 2023 at 12:45 AM Marco Elver <elver@xxxxxxxxxx> wrote:
>
> The tests for memset/memmove have been failing since they haven't been
> instrumented in 69d4c0d32186.
>
> Fix the test to recognize when memintrinsics aren't instrumented, and
> skip test cases accordingly. We also need to conditionally pass
> -fno-builtin to the test, otherwise the instrumentation pass won't
> recognize memintrinsics and end up not instrumenting them either.
>
> Fixes: 69d4c0d32186 ("entry, kasan, x86: Disallow overriding mem*() functions")
> Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>
> Signed-off-by: Marco Elver <elver@xxxxxxxxxx>
Tested-by: Alexander Potapenko <glider@xxxxxxxxxx>

Now the tests pass with Clang-17 and are correctly skipped with GCC-12.