From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Linus Walleij <linus.walleij@linaro.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
syzkaller <syzkaller@googlegroups.com>,
kasan-dev <kasan-dev@googlegroups.com>,
Hailong Liu <liu.hailong6@zte.com.cn>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: Arm + KASAN + syzbot
Date: Tue, 19 Jan 2021 11:43:41 +0000 [thread overview]
Message-ID: <20210119114341.GI1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <CACT4Y+b64a75ceu0vbT1Cyb+6trccwE+CD+rJkYYDi8teffdVw@mail.gmail.com>
On Tue, Jan 19, 2021 at 12:17:37PM +0100, Dmitry Vyukov wrote:
> On Tue, Jan 19, 2021 at 12:13 PM Russell King - ARM Linux admin
> <linux@armlinux.org.uk> wrote:
> >
> > On Tue, Jan 19, 2021 at 12:05:01PM +0100, Dmitry Vyukov wrote:
> > > 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?
> >
> > It means that your kernel only supports DT platforms, but there was
> > no DT passed to the kernel (r2 is the pointer to DT). Consequently
> > the kernel has no idea what hardware it is running on.
> >
> > I don't use qemu very much, so I can't suggest anything.
>
> I do pass DT and it boots fine w/o KASAN, so it seems to be poor
> diagnostics of something else.
It is the best we can do at that time. Consider yourself lucky that you
can even get _that_ message since the kernel has no clue what hardware
is available, and there is no standardised hardware.
All that the kernel knows at this point is that (1) the machine ID in
r1 does not match anything the kernel knows about (which are all DT
platforms), and r2 is NULL, meaning no DT was passed to the
decompressed kernel.
There is no further information that the kernel knows. I suppose we
could hexdump random bits of memory space through the serial port or
whatever, but that would be very random.
I'm not sure what else you think the kernel could do at this point.
> It seems to be due to kernel size. I enabled CONFIG_KASAN_OUTLINE=y
> and CONFIG_CC_OPTIMIZE_FOR_SIZE=y and now it boots...
So, likely the DT was obliterated. How are you passing the DT? If
you are passing it via qemu, then qemu's placement of DT is too close
to the kernel.
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 0 at kernel/printk/printk.c:2790
> register_console+0x2f4/0x3c4 kernel/printk/printk.c:2790
> console 'earlycon0' already registered
Two "earlycons" or whatever the early console kernel parameter is?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-01-19 11:45 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 16:31 Arm + KASAN + syzbot Dmitry Vyukov
2021-01-19 8:36 ` Krzysztof Kozlowski
2021-01-19 8:46 ` Linus Walleij
2021-01-19 10:04 ` Dmitry Vyukov
2021-01-19 10:17 ` Linus Walleij
2021-01-19 10:23 ` Dmitry Vyukov
2021-01-19 10:28 ` Linus Walleij
2021-01-19 10:53 ` Dmitry Vyukov
2021-01-19 11:05 ` Dmitry Vyukov
2021-01-19 11:13 ` Russell King - ARM Linux admin
2021-01-19 11:17 ` Dmitry Vyukov
2021-01-19 11:43 ` Russell King - ARM Linux admin [this message]
2021-01-19 12:05 ` Dmitry Vyukov
2021-01-19 12:36 ` Russell King - ARM Linux admin
2021-01-19 18:57 ` Dmitry Vyukov
2021-01-19 19:48 ` Russell King - ARM Linux admin
2021-01-21 13:14 ` Russell King - ARM Linux admin
2021-01-21 13:49 ` Dmitry Vyukov
2021-01-21 14:04 ` Arnd Bergmann
2021-01-21 13:59 ` Dmitry Vyukov
2021-01-21 14:52 ` Linus Walleij
2021-01-26 21:24 ` Dmitry Vyukov
2021-01-27 8:24 ` Linus Walleij
2021-01-27 9:39 ` Dmitry Vyukov
2021-01-27 9:57 ` Linus Walleij
2021-01-27 10:12 ` Dmitry Vyukov
2021-01-27 10:19 ` Russell King - ARM Linux admin
2021-03-11 10:54 ` Dmitry Vyukov
2021-03-11 13:42 ` Russell King - ARM Linux admin
2021-03-11 18:05 ` Dmitry Vyukov
2021-03-11 13:55 ` Linus Walleij
2021-03-11 14:09 ` Russell King - ARM Linux admin
2021-03-11 14:37 ` Linus Walleij
2021-03-11 14:55 ` Arnd Bergmann
2021-03-11 18:08 ` Dmitry Vyukov
2021-03-15 14:01 ` Linus Walleij
2021-03-15 19:03 ` Russell King - ARM Linux admin
2021-01-19 13:22 ` Linus Walleij
2021-01-19 8:41 ` Linus Walleij
2021-01-19 8:43 ` Linus Walleij
2021-01-19 10:18 ` Dmitry Vyukov
2021-01-19 10:27 ` Linus Walleij
2021-01-19 10:36 ` Dmitry Vyukov
2021-01-19 10:03 ` Mark Rutland
2021-01-19 10:34 ` Dmitry Vyukov
2021-01-19 10:55 ` Russell King - ARM Linux admin
2021-01-19 13:00 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210119114341.GI1551@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=arnd@arndb.de \
--cc=dvyukov@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=krzk@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=liu.hailong6@zte.com.cn \
--cc=syzkaller@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).