[Crash-utility] [PATCH v2 1/3] xen: fix stacksize

Juergen Gross jgross at suse.com
Wed Mar 15 11:18:48 UTC 2023


The size of the percpu stack area of Xen on x86_64 is 8 pages, not 2.
This is the case since Xen commit 0b630aa340ec in 2007.

While not really critical in its current usage, it should be corrected
nevertheless.

Signed-off-by: Juergen Gross <jgross at suse.com>
---
V2:
- add Xen commit id to commit message (lijiang)
- remove make induced change of Makefile
---
 x86_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86_64.c b/x86_64.c
index 8e3eb89..5019c69 100644
--- a/x86_64.c
+++ b/x86_64.c
@@ -8113,7 +8113,7 @@ x86_64_init_hyper(int when)
                 machdep->pageshift = ffs(machdep->pagesize) - 1;
                 machdep->pageoffset = machdep->pagesize - 1;
                 machdep->pagemask = ~((ulonglong)machdep->pageoffset);
-		machdep->stacksize = machdep->pagesize * 2;
+		machdep->stacksize = machdep->pagesize * 8;
                 if ((machdep->pgd = (char *)malloc(PAGESIZE())) == NULL)
                         error(FATAL, "cannot malloc pgd space.");
 		if ((machdep->pud = (char *)malloc(PAGESIZE())) == NULL)
-- 
2.35.3



More information about the Crash-utility mailing list