On Tue, Feb 7, 2023 at 6:08 PM lijiang <lijiang@xxxxxxxxxx> wrote:
more important thing is how we determine the irq_eframe_link.
The following patch can work on upstream kernel vmcore and RHEL9 vmcore.Maybe we can check the symbols asm_common_interrupt and asm_call_on_stack as below:diff --git a/x86_64.c b/x86_64.c
index 7a5d6f050c89..62036f71f632 100644
--- a/x86_64.c
+++ b/x86_64.c
@@ -3938,6 +3938,11 @@ in_exception_stack:
if (irq_eframe) {
bt->flags |= BT_EXCEPTION_FRAME;
i = (irq_eframe - bt->stackbase)/sizeof(ulong);
+ if (symbol_exists("asm_common_interrupt")) {
+ i -= 1;
+ up = (ulong *)(&bt->stackbuf[i*sizeof(ulong)]);
+ bt->instptr = *up;
+ }
x86_64_print_stack_entry(bt, ofp, level, i, bt->instptr);
bt->flags &= ~(ulonglong)BT_EXCEPTION_FRAME;
cs = x86_64_exception_frame(EFRAME_PRINT|EFRAME_CS, 0,
@@ -6521,6 +6526,16 @@ x86_64_irq_eframe_link_init(void)
else
return;
+ if (symbol_exists("asm_common_interrupt") && !symbol_exists("asm_call_on_stack")) {
+ machdep->machspec->irq_eframe_link =-32;
+ return;
+ }
+
+ if (symbol_exists("asm_common_interrupt") && symbol_exists("asm_call_on_stack")) {
+ machdep->machspec->irq_eframe_link =-56;
+ return;
+ }
+
if (THIS_KERNEL_VERSION < LINUX(2,6,9))
return;
Do you have any other comments about the above changes? Or still looking for a better solution, any thoughts? Kazu.
Thanks.
Lianbo
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility Contribution Guidelines: https://github.com/crash-utility/crash/wiki