[PATCH] D144057: [GVN] permit GVN of non-local loads for ASAN unless undef or alloca is produced

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 17:44:54 PDT 2023


pcc added a comment.

In D144057#4311029 <https://reviews.llvm.org/D144057#4311029>, @nickdesaulniers wrote:

> In D144057#4310957 <https://reviews.llvm.org/D144057#4310957>, @pcc wrote:
>
>>> In D144057#4180735 <https://reviews.llvm.org/D144057#4180735>, @melver wrote:
>>>
>>>> In D144057#4179643 <https://reviews.llvm.org/D144057#4179643>, @nickdesaulniers wrote:
>>>>
>>>>> In D144057#4166558 <https://reviews.llvm.org/D144057#4166558>, @melver wrote:
>>>>>
>>>>>> Do the KASAN tests in the kernel pass (need to use -next, mainline is currently broken)? Wondering how we can double check there are no new false positives nor false negatives.
>>>>>
>>>>> How do I run those?
>>>>
>>>> Just CONFIG_KASAN_KUNIT_TEST=y should do and then boot kernel.
>>>
>>> I've done so and the system boots.  Was there supposed to be anything printed to the console? I just enabled KASAN=y, KUNIT=y, KASAN_KUNIT_TEST=y.
>>
>> I think you also need to enable CONFIG_FTRACE=y or patch the kernel to have the config KASAN_KUNIT_TEST select TRACING. See https://lore.kernel.org/all/CAMn1gO7Ve4-d6vP4jvASQsTZ2maHsMF6gKHL3RXSuD9N3tAOfQ@mail.gmail.com/
>
> $ grep -rn -e FTRACE=y -e KASAN=y -e KUNIT=y -e KASAN_KUNIT .config
> 665:CONFIG_HAVE_KPROBES_ON_FTRACE=y
> 4942:CONFIG_HAVE_ARCH_KASAN=y
> 4947:CONFIG_KASAN=y
> 4954:CONFIG_KASAN_KUNIT_TEST=y
> 5050:CONFIG_HAVE_DYNAMIC_FTRACE=y
> 5069:CONFIG_FTRACE=y
> 5139:CONFIG_KUNIT=y
>
> (I did have that enabled) ;)

Huh, that should be enough to run the tests. You should be seeing a lot of console output spew at boot time ending in something like:

  [   11.399154] ok 1 kasan

(or `not ok 1 kasan` if any of the tests failed).  It works for me in the arm64 kernel, both master and next.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144057/new/

https://reviews.llvm.org/D144057



More information about the llvm-commits mailing list