[PATCH] D144057: [GVN] permit GVN of non-local loads for ASAN unless undef or alloca is produced
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 11:30:38 PDT 2023
nickdesaulniers added a comment.
In D144057#4311285 <https://reviews.llvm.org/D144057#4311285>, @pcc wrote:
> 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.
Sorry, I may have been booting the wrong kernel image. With D144057 <https://reviews.llvm.org/D144057> applied and the above kconfigs on x86_64, I see:
[ 5.923941] # kasan: pass:44 fail:0 skip:14 total:58
[ 5.926411] # Totals: pass:44 fail:0 skip:14 total:58
[ 5.927858] ok 1 kasan
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