Arm + KASAN + syzbot

Dmitry Vyukov dvyukov at google.com
Tue Jan 19 06:05:01 EST 2021


On Tue, Jan 19, 2021 at 11:53 AM Dmitry Vyukov <dvyukov at google.com> wrote:
>
> On Tue, Jan 19, 2021 at 11:28 AM Linus Walleij <linus.walleij at linaro.org> wrote:
> >
> > On Tue, Jan 19, 2021 at 11:23 AM Dmitry Vyukov <dvyukov at google.com> wrote:
> > > On Tue, Jan 19, 2021 at 11:17 AM Linus Walleij <linus.walleij at linaro.org> wrote:
> > > > > > You could also try other QEMU machine (I don't know many of them, some
> > > > > > time ago I was using exynos defconfig on smdkc210, but without KASAN).
> > > > >
> > > > > vexpress-a15 seems to be the most widely used and more maintained. It
> > > > > works without KASAN. Is there a reason to switch to something else?
> > > >
> > > > Vexpress A15 is as good as any.
> > > >
> > > > It can however be compiled in two different ways depending on whether
> > > > you use LPAE or not, and the defconfig does not use LPAE.
> > > > By setting CONFIG_ARM_LPAE you more or less activate a totally
> > > > different MMU on the same machine, and those are the two
> > > > MMUs used by ARM32 systems, so I would test these two.
> > > >
> > > > The other interesting Qemu target that is and was used a lot is
> > > > Versatile, versatile_defconfig. This is an older ARMv5 (ARM926EJ-S)
> > > > CPU core with less memory, but the MMU should be behaving the same
> > > > as vanilla Vexpress.
> > >
> > > That's interesting. If we have more than 1 instance in future we could
> > > vary different aspects between them to get more combined coverage.
> > > E.g. one could use ARM_LPAE=y while another ARM_LPAE=n.
> > >
> > > But let's start with 1 instance running first :)
> >
> > Hm I noticed that I was running in LPAE mode by default on Vexpress
> > so I try non-LPAE now. Let's see what happens...
>
> Good point. I've tried to enable CONFIG_ARM_LPAE=y in my config with
> KASAN, and it did not help. No output after 8 minutes.

But I also spied this in your makefile:

config-earlydebug: config-base
$(CURDIR)/scripts/config --file $(config_file) \
--enable DEBUG_LL \
--enable EARLY_PRINTK \
--enable DEBUG_VEXPRESS_UART0_RS1 \

With these configs, qemu prints something more useful:

pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x000008e0, r2=0x00000000
Available machine support:
ID (hex) NAME
ffffffff Generic DT based system
ffffffff Samsung Exynos (Flattened Device Tree)
ffffffff Hisilicon Hi3620 (Flattened Device Tree)
ffffffff ARM-Versatile Express
Please check your kernel config and/or bootloader.


What does this mean? And is this affected by KASAN?... I do specify
the ARM-Versatile Express machine...

Can it be too large kernel size which is not supported/properly
diagnosed by qemu/kernel?



More information about the linux-arm-kernel mailing list