From: <Conor.Dooley@microchip.com>
To: <xianting.tian@linux.alibaba.com>, <crash-utility@redhat.com>,
<mick@ics.forth.gr>, <heinrich.schuchardt@canonical.com>,
<guoren@kernel.org>, <k-hagio-ab@nec.com>
Cc: <linux-riscv@lists.infradead.org>, <hschauhan@nulltrace.org>,
<huanyi.xj@alibaba-inc.com>
Subject: Re: [PATCH 0/8] Support RISCV64 arch and common commands
Date: Sun, 17 Jul 2022 10:22:05 +0000 [thread overview]
Message-ID: <925abaec-755f-4009-c2ae-1a8aeb1ae101@microchip.com> (raw)
In-Reply-To: <20220717042929.370022-1-xianting.tian@linux.alibaba.com>
On 17/07/2022 05:29, Xianting Tian wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Hey Xianting,
I think it would be useful for non-kernel patches sent to this list,
if you specified what it was meant to apply to, for example adding
[Crash-utility] to the start of the subject line. The crash utility
list seems to apply this anyway on their side so it seems reasonable
to add `--subject-prefix="Crash-utility][PATCH" for the benefit of
others.
Thanks,
Conor.
>
> This series of patches make crash tool support RISCV64 arch and the common
> commands(*, bt, p, rd, mod, log, set, struct, task, dis and so on).
>
> To make the crash tool work normally for RISCV64 arch, we need a Linux kernel
> patch(under reviewing), which exports the kernel virtual memory layout, va_bits,
> phys_ram_base to vmcoreinfo, it can simplify the development of crash tool.
>
> THis Linux kernel patch:
> https://patchwork.kernel.org/project/linux-riscv/patch/20220714113300.367854-2-xianting.tian@linux.alibaba.com/
>
> This series of patches are tested on QEMU RISCV64 env and SoC platform of
> T-head Xuantie 910 CPU.
>
> ====================================
> Some test examples list as below
> ====================================
> ... ...
> KERNEL: vmlinux
> DUMPFILE: vmcore
> CPUS: 1
> DATE: Fri Jul 15 10:24:25 CST 2022
> UPTIME: 00:00:33
> LOAD AVERAGE: 0.05, 0.01, 0.00
> TASKS: 41
> NODENAME: buildroot
> RELEASE: 5.18.9
> VERSION: #30 SMP Fri Jul 15 09:47:03 CST 2022
> MACHINE: riscv64 (unknown Mhz)
> MEMORY: 1 GB
> PANIC: "Kernel panic - not syncing: sysrq triggered crash"
> PID: 113
> COMMAND: "sh"
> TASK: ff60000002269600 [THREAD_INFO: ff60000002269600]
> CPU: 0
> STATE: TASK_RUNNING (PANIC)
>
> carsh>
>
> crash> p mem_map
> mem_map = $1 = (struct page *) 0xff6000003effbf00
>
> crash> p /x *(struct page *) 0xff6000003effbf00
> $5 = {
> flags = 0x1000,
> {
> {
> {
> lru = {
> next = 0xff6000003effbf08,
> prev = 0xff6000003effbf08
> },
> {
> __filler = 0xff6000003effbf08,
> mlock_count = 0x3effbf08
> }
> },
> mapping = 0x0,
> index = 0x0,
> private = 0x0
> },
> ... ...
>
> crash> mod
> MODULE NAME BASE SIZE OBJECT FILE
> ffffffff0113e740 nvme_core ffffffff01133000 98304 (not loaded) [CONFIG_KALLSYMS]
> ffffffff011542c0 nvme ffffffff0114c000 61440 (not loaded) [CONFIG_KALLSYMS]
>
> crash> rd ffffffff0113e740 8
> ffffffff0113e740: 0000000000000000 ffffffff810874f8 .........t......
> ffffffff0113e750: ffffffff011542c8 726f635f656d766e .B......nvme_cor
> ffffffff0113e760: 0000000000000065 0000000000000000 e...............
> ffffffff0113e770: 0000000000000000 0000000000000000 ................
>
> crash> vtop ffffffff0113e740
> VIRTUAL PHYSICAL
> ffffffff0113e740 8254d740
>
> PGD: ffffffff810e9ff8 => 2ffff001
> P4D: 0000000000000000 => 000000002fffec01
> PUD: 00005605c2957470 => 0000000020949801
> PMD: 00007fff7f1750c0 => 0000000020947401
> PTE: 0 => 209534e7
> PAGE: 000000008254d000
>
> PTE PHYSICAL FLAGS
> 209534e7 8254d000 (PRESENT|READ|WRITE|GLOBAL|ACCESSED|DIRTY)
>
> PAGE PHYSICAL MAPPING INDEX CNT FLAGS
> ff6000003f0777d8 8254d000 0 0 1 0
>
> crash> bt
> PID: 113 TASK: ff6000000226c200 CPU: 0 COMMAND: "sh"
> #0 [ff20000010333b90] riscv_crash_save_regs at ffffffff800078f8
> #1 [ff20000010333cf0] panic at ffffffff806578c6
> #2 [ff20000010333d50] sysrq_reset_seq_param_set at ffffffff8038c03c
> #3 [ff20000010333da0] __handle_sysrq at ffffffff8038c604
> #4 [ff20000010333e00] write_sysrq_trigger at ffffffff8038cae4
> #5 [ff20000010333e20] proc_reg_write at ffffffff801b7ee8
> #6 [ff20000010333e40] vfs_write at ffffffff80152bb2
> #7 [ff20000010333e80] ksys_write at ffffffff80152eda
> #8 [ff20000010333ed0] sys_write at ffffffff80152f52
>
> Xianting Tian (8):
> Add RISCV64 framework code support
> RISCV64: Make crash tool enter command line and support some commands
> RISCV64: Add 'dis' command support
> RISCV64: Add 'irq' command support
> RISCV64: Add 'bt' command support
> RISCV64: Add 'help -r' command support
> RISCV64: Add 'mach' command support
> RISCV64: Add the implementation of symbol verify
>
> Makefile | 7 +-
> README | 2 +-
> configure.c | 39 +-
> defs.h | 248 +++++++-
> diskdump.c | 21 +-
> help.c | 2 +-
> lkcd_vmdump_v2_v3.h | 2 +-
> netdump.c | 22 +-
> ramdump.c | 2 +
> riscv64.c | 1414 +++++++++++++++++++++++++++++++++++++++++++
> symbols.c | 10 +
> 11 files changed, 1759 insertions(+), 10 deletions(-)
> create mode 100644 riscv64.c
>
> --
> 2.17.1
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-07-17 10:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 4:29 [PATCH 0/8] Support RISCV64 arch and common commands Xianting Tian
2022-07-17 4:29 ` [PATCH 1/8] Add RISCV64 framework code support Xianting Tian
2022-07-17 4:29 ` [PATCH 2/8] RISCV64: Make crash tool enter command line and support some commands Xianting Tian
2022-07-17 4:29 ` [PATCH 3/8] RISCV64: Add 'dis' command support Xianting Tian
2022-07-17 4:29 ` [PATCH 4/8] RISCV64: Add 'irq' " Xianting Tian
2022-07-17 4:29 ` [PATCH 5/8] RISCV64: Add 'bt' " Xianting Tian
2022-07-17 4:29 ` [PATCH 6/8] RISCV64: Add 'help -r' " Xianting Tian
2022-07-17 4:29 ` [PATCH 7/8] RISCV64: Add 'mach' " Xianting Tian
2022-07-17 4:29 ` [PATCH 8/8] RISCV64: Add the implementation of symbol verify Xianting Tian
2022-07-17 8:53 ` [PATCH 0/8] Support RISCV64 arch and common commands Guo Ren
2022-07-17 10:22 ` Conor.Dooley [this message]
2022-07-18 2:37 ` Xianting Tian
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=925abaec-755f-4009-c2ae-1a8aeb1ae101@microchip.com \
--to=conor.dooley@microchip.com \
--cc=crash-utility@redhat.com \
--cc=guoren@kernel.org \
--cc=heinrich.schuchardt@canonical.com \
--cc=hschauhan@nulltrace.org \
--cc=huanyi.xj@alibaba-inc.com \
--cc=k-hagio-ab@nec.com \
--cc=linux-riscv@lists.infradead.org \
--cc=mick@ics.forth.gr \
--cc=xianting.tian@linux.alibaba.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