[PATCH] x86_64: fix "bt" command on 5.12-rc1 and later kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix "bt" command on Linux 5.12-rc1 and later kernels that contains
kernel commit 951c2a51ae75 ("x86/irq/64: Adjust the per CPU irq stack
pointer by 8").  Without the patch, the "bt" command and some options
that read irq stack fails with the error message "bt: read of stack
at <address> failed".

Signed-off-by: Kazuhito Hagio <k-hagio-ab@xxxxxxx>
---
 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.18.4


--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux