[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52023285-172a-97cc-bad4-4ab4e709885c@nec.com>
Date: Thu, 20 Oct 2022 01:35:54 +0000
From: HAGIO KAZUHITO(萩尾 一仁)
<k-hagio-ab@....com>
To: Xianting Tian <xianting.tian@...ux.alibaba.com>,
Baoquan He <bhe@...hat.com>, lijiang <lijiang@...hat.com>
CC: "paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
"palmer@...belt.com" <palmer@...belt.com>,
"aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
"anup@...infault.org" <anup@...infault.org>,
"heiko@...ech.de" <heiko@...ech.de>,
"guoren@...nel.org" <guoren@...nel.org>,
"mick@....forth.gr" <mick@....forth.gr>,
"alexandre.ghiti@...onical.com" <alexandre.ghiti@...onical.com>,
"vgoyal@...hat.com" <vgoyal@...hat.com>,
"dyoung@...hat.com" <dyoung@...hat.com>,
"corbet@....net" <corbet@....net>,
"Conor.Dooley@...rochip.com" <Conor.Dooley@...rochip.com>,
"bagasdotme@...il.com" <bagasdotme@...il.com>,
"kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"crash-utility@...hat.com" <crash-utility@...hat.com>,
"heinrich.schuchardt@...onical.com"
<heinrich.schuchardt@...onical.com>,
"hschauhan@...ltrace.org" <hschauhan@...ltrace.org>,
"yixun.lan@...il.com" <yixun.lan@...il.com>
Subject: Re: [PATCH V3 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
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
Powered by blists - more mailing lists