33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
|
From 720279fc141100893ba6da6ab18e52776ecf7424 Mon Sep 17 00:00:00 2001
|
||
|
From: Kazuhito Hagio <k-hagio-ab@nec.com>
|
||
|
Date: Tue, 2 Mar 2021 13:38:18 +0900
|
||
|
Subject: [PATCH 3/6] x86_64: fix "bt" command on 5.12-rc1 and later kernels
|
||
|
|
||
|
Fix "bt" command on Linux 5.12-rc1 and later kernels that contain
|
||
|
commit 951c2a51ae75 ("x86/irq/64: Adjust the per CPU irq stack pointer
|
||
|
by 8"). Without the patch, the "bt" command and some of its options
|
||
|
that read irq stack fail with the error message "bt: read of stack at
|
||
|
<address> failed".
|
||
|
|
||
|
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
|
||
|
---
|
||
|
x86_64.c | 2 ++
|
||
|
1 file changed, 2 insertions(+)
|
||
|
|
||
|
diff --git a/x86_64.c b/x86_64.c
|
||
|
index 23a40a04bbc4..f5b2f7b5f040 100644
|
||
|
--- a/x86_64.c
|
||
|
+++ b/x86_64.c
|
||
|
@@ -1326,6 +1326,8 @@ x86_64_per_cpu_init(void)
|
||
|
KVADDR, &hardirq_stack_ptr, sizeof(void *),
|
||
|
"hardirq_stack_ptr (per_cpu)", QUIET|RETURN_ON_ERROR))
|
||
|
continue;
|
||
|
+ if (hardirq_stack_ptr != PAGEBASE(hardirq_stack_ptr))
|
||
|
+ hardirq_stack_ptr += 8;
|
||
|
ms->stkinfo.ibase[i] = hardirq_stack_ptr - ms->stkinfo.isize;
|
||
|
} else if (irq_sp)
|
||
|
ms->stkinfo.ibase[i] = irq_sp->value + kt->__per_cpu_offset[i];
|
||
|
--
|
||
|
2.29.2
|
||
|
|