When executing "crash vmlinux /proc/kcore", the following error occurred:
crash: cannot translate the ELF header of /proc/kcore
Cause of the problem: The code in the patch was merged into the wrong location.
Signed-of-by: Duan Chenghao <duanchenghao@kylinos.cn>
Correct the change of the value of TIF_SIGPENDING macro between
different kernel versions.
TIF_SIGPENDING changes with the kernel version as follows:
ARM 2 -> 0 at v2.6.23
MIPS 2 -> 1 at v2.6.23
MIPS64 2 -> 1 at v2.6.23
PPC 2 -> 1 at v2.6.23
IA64 1 -> 0 at v2.6.23
PPC64 2 -> 1 at v2.6.23
S390 2 -> 1 at v3.16
S390X 2 -> 1 at v3.16
Kernel commit bcf9033e5449bdcaa9bed46467a7141a8049dadb
("sched: move CPU field back into thread_info if THREAD_INFO_IN_TASK=y")
moved the member cpu of task_struct back into thread_info.
Without the patch, crash fails with the following error message
during session initialization:
crash: invalid structure member offset: task_struct_cpu
FILE: task.c LINE: 2904 FUNCTION: add_context()
And delete use_system_readline_v3.patch. Use readline provided by
internal gdb instead of system readline. System readline do not
match crash, and will cause a Segmentation fault when parse corefile.
Signed-off-by: Bin Wang <wangbin224@huawei.com>
If CONFIG_KASAN is open, CONFIG_VMAP_STACK will be closed. And
the sdei_stack_normal_ptr will be undefined. When crash init the
stack, sdei_stacks will not init. We should not access the sdei_stacks
later, so check null pointer before access it.
Signed-off-by: wangbin <wangbin224@huawei.com>