linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmerdabbelt@google.com>
To: dvyukov@google.com
Cc: schwab@linux-m68k.org, Paul Walmsley <paul.walmsley@sifive.com>,
	aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org, nylon7@andestech.com,
	Bjorn Topel <bjorn.topel@gmail.com>,
	tklauser@distanz.ch, syzkaller@googlegroups.com
Subject: Re: riscv+KASAN does not boot
Date: Wed, 13 Jan 2021 20:57:51 -0800 (PST)	[thread overview]
Message-ID: <mhng-02b88d43-ede8-48f9-82f1-c84201acb7a8@palmerdabbelt-glaptop> (raw)
In-Reply-To: <CACT4Y+bDqMiC+ou5ghb=XB3Oyjw3p-GTDvNw4NkkQqQthw1yuQ@mail.gmail.com>

On Fri, 25 Dec 2020 09:13:23 PST (-0800), dvyukov@google.com wrote:
> On Fri, Dec 25, 2020 at 5:58 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>>
>> On Dez 25 2020, Dmitry Vyukov wrote:
>>
>> > qemu-system-riscv64 \
>> > -machine virt -bios default -smp 1 -m 2G \
>> > -device virtio-blk-device,drive=hd0 \
>> > -drive file=buildroot-riscv64.ext4,if=none,format=raw,id=hd0 \
>> > -kernel arch/riscv/boot/Image \
>> > -nographic \
>> > -device virtio-rng-device,rng=rng0 -object
>> > rng-random,filename=/dev/urandom,id=rng0 \
>> > -netdev user,id=net0,host=10.0.2.10,hostfwd=tcp::10022-:22 -device
>> > virtio-net-device,netdev=net0 \
>> > -append "root=/dev/vda earlyprintk=serial console=ttyS0 oops=panic
>> > panic_on_warn=1 panic=86400"
>>
>> Do you get more output with earlycon=sbi?
>
> Hi Andreas,
>
> For defconfig+kvm_guest.config+ scripts/config -e KASAN -e
> KASAN_INLINE it actually gave me more output:
>
>
> OpenSBI v0.7
>    ____                    _____ ____ _____
>   / __ \                  / ____|  _ \_   _|
>  | |  | |_ __   ___ _ __ | (___ | |_) || |
>  | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
>  | |__| | |_) |  __/ | | |____) | |_) || |_
>   \____/| .__/ \___|_| |_|_____/|____/_____|
>         | |
>         |_|
>
> Platform Name          : QEMU Virt Machine
> Platform HART Features : RV64ACDFIMSU
> Current Hart           : 0
> Firmware Base          : 0x80000000
> Firmware Size          : 132 KB
> Runtime SBI Version    : 0.2
>
> MIDELEG : 0x0000000000000222
> MEDELEG : 0x000000000000b109
> PMP0    : 0x0000000080000000-0x000000008003ffff (A)
> PMP1    : 0x0000000000000000-0xffffffffffffffff (A,R,W,X)
> [    0.000000] Linux version 5.10.0-01370-g71c5f03154ac
> (dvyukov@dvyukov-desk.muc.corp.google.com) (riscv64-linux-gnu-gcc
> (Debian 10.2.0-9) 10.2.0, GNU ld (GNU Binutils for Debian) 2.35.1) #17
> SMP Fri Dec 25 18:10:12 CET 2020
> [    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
> [    0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
> [    0.000000] printk: bootconsole [sbi0] enabled
> [    0.000000] efi: UEFI not found.
> [    0.000000] Zone ranges:
> [    0.000000]   DMA32    [mem 0x0000000080200000-0x00000000ffffffff]
> [    0.000000]   Normal   empty
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x0000000080200000-0x00000000ffffffff]
> [    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]
> [    0.000000] SBI specification v0.2 detected
> [    0.000000] SBI implementation ID=0x1 Version=0x7
> [    0.000000] SBI v0.2 TIME extension detected
> [    0.000000] SBI v0.2 IPI extension detected
> [    0.000000] SBI v0.2 RFENCE extension detected
> [    0.000000] software IO TLB: mapped [mem
> 0x00000000fa3f9000-0x00000000fe3f9000] (64MB)
> [    0.000000] Unable to handle kernel paging request at virtual
> address dfffffc810040000
> [    0.000000] Oops [#1]
> [    0.000000] Modules linked in:
> [    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted
> 5.10.0-01370-g71c5f03154ac #17
> [    0.000000] epc: ffffffe00042e3e4 ra : ffffffe000c0462c sp : ffffffe001603ea0
> [    0.000000]  gp : ffffffe0016e3c60 tp : ffffffe00160cd40 t0 :
> dfffffc810040000
> [    0.000000]  t1 : ffffffe000e0a838 t2 : 0000000000000000 s0 :
> ffffffe001603f50
> [    0.000000]  s1 : ffffffe0016e50a8 a0 : dfffffc810040000 a1 :
> 0000000000000000
> [    0.000000]  a2 : 000000000ffc0000 a3 : dfffffc820000000 a4 :
> 0000000000000000
> [    0.000000]  a5 : 000000003e8c6001 a6 : ffffffe000e0a820 a7 :
> 0000000000000900
> [    0.000000]  s2 : dfffffc820000000 s3 : dfffffc800000000 s4 :
> 0000000000000001
> [    0.000000]  s5 : ffffffe0016e5108 s6 : fffffffffffff000 s7 :
> dfffffc810040000
> [    0.000000]  s8 : 0000000000000080 s9 : ffffffffffffffff s10:
> ffffffe07a119000
> [    0.000000]  s11: 000000000000ffc0 t3 : ffffffe0016eb908 t4 :
> 0000000000000001
> [    0.000000]  t5 : ffffffc4001c150a t6 : ffffffe001603be8
> [    0.000000] status: 0000000000000100 badaddr: dfffffc810040000
> cause: 000000000000000f
> [    0.000000] random: get_random_bytes called from
> oops_exit+0x30/0x58 with crng_init=0
> [    0.000000] ---[ end trace 0000000000000000 ]---
> [    0.000000] Kernel panic - not syncing: Fatal exception
> [    0.000000] ---[ end Kernel panic - not syncing: Fatal exception ]---
>
>
> But I first tried with a the kernel image I had in the dir, I think it
> was this config (no KASAN):
> https://gist.githubusercontent.com/dvyukov/b2b62beccf80493781ab03b41430e616/raw/62e673cff08a8a41656d2871b8a37f74b00f509f/gistfile1.txt
>
> and earlycon=sbi did not change anything (no output after OpenSBI).
> So potentially there are 2 different problems.

Thanks for reporting this.  Looks like I'd forgotten to add a kasan config to
my tests.  There's one in there now, and it's passing as of the fix that Nylon
posted.

  reply	other threads:[~2021-01-14  4:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-25 14:55 riscv+KASAN does not boot Dmitry Vyukov
2020-12-25 16:58 ` Andreas Schwab
2020-12-25 17:13   ` Dmitry Vyukov
2021-01-14  4:57     ` Palmer Dabbelt [this message]
2021-01-14  9:23       ` Dmitry Vyukov
2021-01-14 10:24         ` Dmitry Vyukov
2021-01-14 11:24           ` Dmitry Vyukov
2021-01-18 14:53           ` Tobias Klauser
2021-01-18 15:05             ` Dmitry Vyukov
2021-01-18 15:43               ` Dmitry Vyukov
2021-01-29  7:45                 ` Alex Ghiti
     [not found]                   ` <CACT4Y+adSjve7bXRPh5UybCQx6ubOUu5RbwuT620wdcxHzVYJg@mail.gmail.com>
2021-02-16 11:17                     ` Dmitry Vyukov
2021-02-16 11:25                       ` Dmitry Vyukov
2021-02-16 13:45                         ` Dmitry Vyukov
2021-02-16 20:42                         ` Alex Ghiti
2021-02-17  4:42                           ` Dmitry Vyukov
2021-02-17 16:36                             ` Alex Ghiti
2021-02-17 17:34                               ` Dmitry Vyukov
2021-02-18  7:54                                 ` Alex Ghiti
2021-02-18 11:36                                   ` Dmitry Vyukov
2021-02-19 17:01                                     ` Alex Ghiti
2021-02-19 18:53                                       ` Dmitry Vyukov
2021-02-19 22:26                                         ` Palmer Dabbelt
2021-03-09 17:11                                           ` Dmitry Vyukov
2021-03-09 19:49                                             ` Alex Ghiti
2021-03-10 17:25                                               ` Dmitry Vyukov
2021-02-16 17:35                       ` Tobias Klauser

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=mhng-02b88d43-ede8-48f9-82f1-c84201acb7a8@palmerdabbelt-glaptop \
    --to=palmerdabbelt@google.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bjorn.topel@gmail.com \
    --cc=dvyukov@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=nylon7@andestech.com \
    --cc=paul.walmsley@sifive.com \
    --cc=schwab@linux-m68k.org \
    --cc=syzkaller@googlegroups.com \
    --cc=tklauser@distanz.ch \
    /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).