Arm + KASAN + syzbot

Russell King - ARM Linux admin linux at armlinux.org.uk
Tue Jan 19 14:48:27 EST 2021


On Tue, Jan 19, 2021 at 07:57:16PM +0100, Dmitry Vyukov wrote:
> Using "-kernel arch/arm/boot/zImage -dtb
> arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dtb" fully works.

Good.

> Using just "-kernel arch/arm/boot/zImage" does not work, not output
> from qemu whatsoever (expected).

Yep.

> But using just "-kernel arch/arm/boot/zImage.dtb" gives an interesting
> effect. Kernel starts booting, I see console output up to late init
> stages, but then it can't find the root device.
> So appended dtb works... but only in half. Is names of block devices
> something that's controlled by dtb?

My knowledge about this is limited to qemu being used for KVM.

Firstly, there is are no block devices except for MTD, USB, or CF
based block devices in the Versatile Express hardware. So, the DTB
contains no block devices.

In your first case above, it is likely that QEMU modifies the passed
DTB to add PCIe devices to describe a virtio block device.

In this case, because QEMU has no visibility of the appended DTB, it
can't modify it, so the kernel only knows about devices found on the
real hardware. Hence, any of the "special" virtio devices that QEMU
use likely won't be found.

I'm not sure how QEMU adds those (you're probably in a better position
than I to boot using your first method, grab a copy of the DTB that
the booted kernel used from /sys/firmware/fdt, and use dtc to turn it
back into a dts and see what the changes are.

I suspect you'll find that there's a new PCIe controller been added
by QEMU, behind which will be a load of virtio devices for things like
network and the "vda" block device.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list