53 lines
1.8 KiB
Diff
53 lines
1.8 KiB
Diff
From 145cc6a75f24dfce2e644b620b3afb6de04cadfd Mon Sep 17 00:00:00 2001
|
|
From: Tao Liu <ltao@redhat.com>
|
|
Date: Wed, 9 Jul 2025 17:41:12 +1200
|
|
Subject: [PATCH 1/5] x86_64: filter unwanted warning message for "bt -T" cmd
|
|
|
|
After patch "x86_64: Add gdb multi-stack unwind support" applied, a
|
|
warning message is observed for "bt -T" cmd:
|
|
|
|
crash> bt -T
|
|
bt: seek error: kernel virtual address: fffffffffffffffb type: "gdb_readmem_callback"
|
|
[ffffbaebc60d6fa8] srso_return_thunk at ffffffff82246fa5
|
|
...
|
|
|
|
The root cause is, "bt -T" will set BT_TEXT_SYMBOLS_ALL for bt->flags,
|
|
and eip is set to be 0 in kernel.c:back_trace(). Later in
|
|
x86_64_low_budget_back_trace_cmd(), eip - 5, or 0xfffffffffffffffb is
|
|
used for address disassembly by gdb "x/1i 0x%lx". This address is invalid so
|
|
the warning message is output.
|
|
|
|
In fact, multi-stack unwind isn't designed for "bt -T" and eip = 0 case.
|
|
To avoid the warning message, let's simply bypass the "bt -T" case for
|
|
x86_64. Other archs(arm64/ppc64) aren't affected by the issue because
|
|
the gdb "x/1i 0x%lx" are not applied on those archs.
|
|
|
|
After apply the patch:
|
|
|
|
crash> bt -T
|
|
[ffffbaebc60d6fa8] srso_return_thunk at ffffffff82246fa5
|
|
...
|
|
|
|
Signed-off-by: Tao Liu <ltao@redhat.com>
|
|
---
|
|
x86_64.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/x86_64.c b/x86_64.c
|
|
index cfefe3f..d7da536 100644
|
|
--- a/x86_64.c
|
|
+++ b/x86_64.c
|
|
@@ -3636,7 +3636,8 @@ x86_64_low_budget_back_trace_cmd(struct bt_info *bt_in)
|
|
level++;
|
|
}
|
|
|
|
- if (is_task_active(bt->task) && bt->flags & BT_DUMPFILE_SEARCH) {
|
|
+ if (is_task_active(bt->task) && bt->flags & BT_DUMPFILE_SEARCH &&
|
|
+ !(bt->flags & BT_TEXT_SYMBOLS_ALL)) {
|
|
if (!extra_stacks_regs[extra_stacks_idx]) {
|
|
extra_stacks_regs[extra_stacks_idx] =
|
|
(struct user_regs_bitmap_struct *)
|
|
--
|
|
2.47.0
|
|
|