mirror of
https://github.com/crash-utility/crash
synced 2025-03-02 12:30:31 +00:00
Fix for the changes made to the kernel module structure introduced by
this kernel commit for Linux 4.5 and later kernels: commit 7523e4dc5057e157212b4741abd6256e03404cf1 module: use a structure to encapsulate layout. Without the patch, the crash session fails during initialization with the error message: "crash: invalid structure member offset: module_init_text_size". (sebott@linux.vnet.ibm.com)
This commit is contained in:
parent
63f7707d2b
commit
6f1f78e334
49
kernel.c
49
kernel.c
@ -3291,16 +3291,45 @@ module_init(void)
|
||||
MEMBER_OFFSET_INIT(module_gpl_syms, "module", "gpl_syms");
|
||||
MEMBER_OFFSET_INIT(module_num_gpl_syms, "module",
|
||||
"num_gpl_syms");
|
||||
MEMBER_OFFSET_INIT(module_module_core, "module",
|
||||
"module_core");
|
||||
MEMBER_OFFSET_INIT(module_core_size, "module",
|
||||
"core_size");
|
||||
MEMBER_OFFSET_INIT(module_core_text_size, "module",
|
||||
"core_text_size");
|
||||
MEMBER_OFFSET_INIT(module_module_init, "module", "module_init");
|
||||
MEMBER_OFFSET_INIT(module_init_size, "module", "init_size");
|
||||
MEMBER_OFFSET_INIT(module_init_text_size, "module",
|
||||
"init_text_size");
|
||||
|
||||
if (MEMBER_EXISTS("module", "module_core")) {
|
||||
MEMBER_OFFSET_INIT(module_core_size, "module",
|
||||
"core_size");
|
||||
MEMBER_OFFSET_INIT(module_init_size, "module",
|
||||
"init_size");
|
||||
|
||||
MEMBER_OFFSET_INIT(module_core_text_size, "module",
|
||||
"core_text_size");
|
||||
MEMBER_OFFSET_INIT(module_init_text_size, "module",
|
||||
"init_text_size");
|
||||
|
||||
MEMBER_OFFSET_INIT(module_module_core, "module",
|
||||
"module_core");
|
||||
MEMBER_OFFSET_INIT(module_module_init, "module",
|
||||
"module_init");
|
||||
} else {
|
||||
ASSIGN_OFFSET(module_core_size) =
|
||||
MEMBER_OFFSET("module", "core_layout") +
|
||||
MEMBER_OFFSET("module_layout", "size");
|
||||
ASSIGN_OFFSET(module_init_size) =
|
||||
MEMBER_OFFSET("module", "init_layout") +
|
||||
MEMBER_OFFSET("module_layout", "size");
|
||||
|
||||
ASSIGN_OFFSET(module_core_text_size) =
|
||||
MEMBER_OFFSET("module", "core_layout") +
|
||||
MEMBER_OFFSET("module_layout", "text_size");
|
||||
ASSIGN_OFFSET(module_init_text_size) =
|
||||
MEMBER_OFFSET("module", "init_layout") +
|
||||
MEMBER_OFFSET("module_layout", "text_size");
|
||||
|
||||
ASSIGN_OFFSET(module_module_core) =
|
||||
MEMBER_OFFSET("module", "core_layout") +
|
||||
MEMBER_OFFSET("module_layout", "base");
|
||||
ASSIGN_OFFSET(module_module_init) =
|
||||
MEMBER_OFFSET("module", "init_layout") +
|
||||
MEMBER_OFFSET("module_layout", "base");
|
||||
}
|
||||
|
||||
MEMBER_OFFSET_INIT(module_percpu, "module", "percpu");
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user