On 2022/10/19 12:17, Xianting Tian wrote:
I see that your v4 kernel patch set does not have ADDRESS_SPACE_END,I am very sorry, I missed it , KERNEL_LINK_ADDR is used indeed.In your crash patch set, KERNEL_LINK_ADDR is used in VTOP() and looksHi Kazu, Li JiangOh, I would say please no. Sometime we got tons of objection when adding anKASAN_SHADOW_START is not used, KERNEL_LINK_ADDR is used in the crash patch set:+ if (IS_ENABLED(CONFIG_64BIT)) {Seems this is the firsr ARCH where kasan and kernel link/bpf space are
+#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);
added to dump and analyze. Just curious, have you got code change to
make use of them to do dumping and analyze?
https://patchwork.kernel.org/project/linux-riscv/cover/20220813031753.3097720-1-xianting.tian@xxxxxxxxxxxxxxxxx/
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.
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@xxxxxxxxxxxxxxxxx/
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.
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.
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