xen/19051-cross-bit-coredumping.patch

25 lines
1008 B
Diff

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1232106411 0
# Node ID 71e0b8adeb1f71d0055fabba0e97a4bdbf594c72
# Parent 40d9d9ff435afee74431102e4e1ac6c7542649bd
ptrace_core: Handle FV cross-bitness.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Index: xen-3.3.1-testing/tools/libxc/xc_ptrace_core.c
===================================================================
--- xen-3.3.1-testing.orig/tools/libxc/xc_ptrace_core.c
+++ xen-3.3.1-testing/tools/libxc/xc_ptrace_core.c
@@ -540,7 +540,9 @@ xc_waitdomain_core_elf(
XEN_ELFNOTE_DUMPCORE_XEN_VERSION,
(void**)&xen_version) < 0)
goto out;
- if (xen_version->xen_version.pagesize != PAGE_SIZE)
+ /* shifted case covers 32 bit FV guest core file created on 64 bit Dom0 */
+ if (xen_version->xen_version.pagesize != PAGE_SIZE &&
+ (xen_version->xen_version.pagesize >> 32) != PAGE_SIZE)
goto out;
/* .note.Xen: format_version */