Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "HAGIO KAZUHITO(萩尾 一仁)" <k-hagio-ab@nec.com>
To: Xianting Tian <xianting.tian@linux.alibaba.com>,
	Baoquan He <bhe@redhat.com>, lijiang <lijiang@redhat.com>
Cc: "paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
	"palmer@dabbelt.com" <palmer@dabbelt.com>,
	"aou@eecs.berkeley.edu" <aou@eecs.berkeley.edu>,
	"anup@brainfault.org" <anup@brainfault.org>,
	"heiko@sntech.de" <heiko@sntech.de>,
	"guoren@kernel.org" <guoren@kernel.org>,
	"mick@ics.forth.gr" <mick@ics.forth.gr>,
	"alexandre.ghiti@canonical.com" <alexandre.ghiti@canonical.com>,
	"vgoyal@redhat.com" <vgoyal@redhat.com>,
	"dyoung@redhat.com" <dyoung@redhat.com>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"Conor.Dooley@microchip.com" <Conor.Dooley@microchip.com>,
	"bagasdotme@gmail.com" <bagasdotme@gmail.com>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"crash-utility@redhat.com" <crash-utility@redhat.com>,
	"heinrich.schuchardt@canonical.com"
	<heinrich.schuchardt@canonical.com>,
	"hschauhan@nulltrace.org" <hschauhan@nulltrace.org>,
	"yixun.lan@gmail.com" <yixun.lan@gmail.com>
Subject: Re: [PATCH V3 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
Date: Thu, 20 Oct 2022 01:35:54 +0000	[thread overview]
Message-ID: <52023285-172a-97cc-bad4-4ab4e709885c@nec.com> (raw)
In-Reply-To: <811bdf09-be38-ce2a-a1d3-ada9f7c85b97@linux.alibaba.com>

On 2022/10/19 12:17, Xianting Tian wrote:

>>>>>>> +    if (IS_ENABLED(CONFIG_64BIT)) {
>>>>>>> +#ifdef CONFIG_KASAN
>>>>>>> +        vmcoreinfo_append_str("NUMBER(KASAN_SHADOW_START)=0x%lx\n", KASAN_SHADOW_START);
>>>>>>> +        vmcoreinfo_append_str("NUMBER(KASAN_SHADOW_END)=0x%lx\n", KASAN_SHADOW_END);
>>>>>>> +#endif
>>>>>>> +        vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
>>>>>>> +        vmcoreinfo_append_str("NUMBER(ADDRESS_SPACE_END)=0x%lx\n", ADDRESS_SPACE_END);
>>>>>> Seems this is the firsr ARCH where kasan and kernel link/bpf space are
>>>>>> added to dump and analyze. Just curious, have you got code change to
>>>>>> make use of them to do dumping and analyze?
>>>>> KASAN_SHADOW_START is not used, KERNEL_LINK_ADDR is used in the crash patch set:
>>>>> https://patchwork.kernel.org/project/linux-riscv/cover/20220813031753.3097720-1-xianting.tian@linux.alibaba.com/
>>>> Oh, I would say please no. Sometime we got tons of objection when adding an
>>>> necessary one, we definitely should not add one for possible future
>>>> use.
>>>>
>>>> For this kind of newly added one, we need get ack from
>>>> makedumpfile/crash utility maintainer so that we know they are necessary
>>>> to have. At least they don't oppose.
>>> Hi Kazu, Li Jiang
>>>
>>> Could you help comment whether we need KASAN_SHADOW_START and KERNEL_LINK_ADDR area export for vmcore from crash point of view?
>>>
>>> In my crash patch set, I don't use KASAN_SHADOW_START,
>>> And only get the value of KERNEL_LINK_ADDR, not realy use it.
>>> https://patchwork.kernel.org/project/linux-riscv/cover/20220813031753.3097720-1-xianting.tian@linux.alibaba.com/
>> In your crash patch set, KERNEL_LINK_ADDR is used in VTOP() and looks
>> necessary to me.
>>
>> The others (KASAN_SHADOW_START, KASAN_SHADOW_END and ADDRESS_SPACE_END)
>> are not currently used.  It may be better to add them when they are
>> really used.
> 
> I am very sorry, I missed it , KERNEL_LINK_ADDR is used indeed.
> 
> KASAN_SHADOW_START is not used, so I don't need to send crash patch set> again. only need to remove KASAN_SHADOW_END in kernel patch set.

I see that your v4 kernel patch set does not have ADDRESS_SPACE_END,
so it seems there would be need to change this part and related ones
at crash side.

         if ((string = pc->read_vmcoreinfo("NUMBER(ADDRESS_SPACE_END)"))) {
                 ms->address_space_end = htol(string, QUIET, NULL);
                 free(string);
         } else
                 goto error;
...
error:
         error(FATAL, "cannot get vm layout\n");

Thanks,
Kazu
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2022-10-20  1:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18  8:17 [PATCH V3 0/2] Support VMCOREINFO export for RISCV64 Xianting Tian
2022-10-18  8:17 ` [PATCH V3 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support Xianting Tian
2022-10-18  9:10   ` Baoquan He
2022-10-18  9:25     ` Xianting Tian
2022-10-18 10:03       ` Baoquan He
2022-10-19  1:50         ` Xianting Tian
2022-10-19  2:50           ` HAGIO KAZUHITO(萩尾 一仁)
2022-10-19  3:17             ` Xianting Tian
2022-10-20  1:35               ` HAGIO KAZUHITO(萩尾 一仁) [this message]
2022-10-20  1:52                 ` Xianting Tian
2022-10-18  8:17 ` [PATCH V3 2/2] Documentation: kdump: describe VMCOREINFO export for RISCV64 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=52023285-172a-97cc-bad4-4ab4e709885c@nec.com \
    --to=k-hagio-ab@nec.com \
    --cc=Conor.Dooley@microchip.com \
    --cc=alexandre.ghiti@canonical.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=bagasdotme@gmail.com \
    --cc=bhe@redhat.com \
    --cc=corbet@lwn.net \
    --cc=crash-utility@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=guoren@kernel.org \
    --cc=heiko@sntech.de \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=hschauhan@nulltrace.org \
    --cc=kexec@lists.infradead.org \
    --cc=lijiang@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mick@ics.forth.gr \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=vgoyal@redhat.com \
    --cc=xianting.tian@linux.alibaba.com \
    --cc=yixun.lan@gmail.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