RISC-V Linux kernel not booting up with KASAN enabled

Alexandre Ghiti alex at ghiti.fr
Thu Mar 2 11:49:55 PST 2023


On 3/2/23 17:25, Chathura Rajapaksha wrote:
> Hi Alex,
>
> Thank you very much, kernel booted up with the patches you mentioned.


Great, thanks for giving it a try!


> Bootup was pretty slow compared to before though (on a dev board).
> I guess that is kind of expected with KASAN enabled.


Only the page table creation changes, that's weird: I saw in your config 
you were using outline instrumentation, can you try to use the inline 
instrumentation (select KASAN_INLINE instead of KASAN_OUTLINE) and see 
if that's faster?


> Thanks again.
>
> Regards,
> Chath


Thanks for testing,

Alex


>
> On Thu, Mar 2, 2023 at 2:50 AM Alexandre Ghiti <alex at ghiti.fr> wrote:
>> Hi Chatura,
>>
>> On 3/2/23 04:13, Chathura Rajapaksha wrote:
>>> Hi All,
>>>
>>> I observed that RISC-V Linux hangs when I enable KASAN.
>>> Without KASAN it works fine with QEMU.
>>> I am using the commit ae3419fbac845b4d3f3a9fae4cc80c68d82cdf6e
>>>
>>> When KASAN is enabled, QEMU hangs after OpenSBI prints.
>>>
>>> I noticed a similar issue was reported before in
>>> https://lore.kernel.org/lkml/CACT4Y+ZmuOpyf_0vHTT4t3wkmJuW8Ezvcg7v6yDVd8YOViS=GA@mail.gmail.com/t/
>>> But I believe I have the patch mentioned in that thread.
>>
>> I proposed a series that will be included in 6.3 regarding KASAN issues
>> here: https://patchwork.kernel.org/project/linux-riscv/list/?series=718458
>>
>> Can you give it a try and tell me if it works better?
>>
>> Thanks,
>>
>> Alex
>>
>>
>>> My kernel config:
>>> https://drive.google.com/file/d/1j9nU7f9MxCc_i-UHUCTvo7o6nDrcUz0w/view?usp=sharing
>>>
>>> Best regards,
>>> Chath
>>>
>>> _______________________________________________
>>> linux-riscv mailing list
>>> linux-riscv at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/linux-riscv
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv



More information about the linux-riscv mailing list