diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-06-16 13:57:18 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-06-16 13:57:18 +0100 |
commit | cc0de53a903cd8399e6dce3c663545510c0c527a (patch) | |
tree | 505a728dbca91428adb0fb88438dfc4115012dfb /xen/include/asm-x86/x86_64 | |
parent | 360f174b3da63282f239c4c6f2a3a07d2a0751d6 (diff) | |
download | xen-cc0de53a903cd8399e6dce3c663545510c0c527a.tar.gz xen-cc0de53a903cd8399e6dce3c663545510c0c527a.tar.bz2 xen-cc0de53a903cd8399e6dce3c663545510c0c527a.zip |
x86: improve output resulting from sending '0' over serial
While the original logic already implied that the kernel part of the
guest's address space is identical on all vCPU-s (i.e. for all guest
processes), it didn't fully leverage the potential here: As long as
the top page table currently active is owned by the subject domain
(currently only Dom0), the stack dump can be done without extra
effort.
For x86-64, additionally add page table traversal so that the stack
can be dumped in all cases (unless it's invalid or user space).
I left the 32-bit variant of do_page_walk() unimplemented for the
moment as I couldn't convince myself using map_domain_page() there is
a good idea, and didn't want to introduce new fixmap entries either.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/include/asm-x86/x86_64')
-rw-r--r-- | xen/include/asm-x86/x86_64/uaccess.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xen/include/asm-x86/x86_64/uaccess.h b/xen/include/asm-x86/x86_64/uaccess.h index 2080be86b1..4433fd0b69 100644 --- a/xen/include/asm-x86/x86_64/uaccess.h +++ b/xen/include/asm-x86/x86_64/uaccess.h @@ -27,11 +27,14 @@ DECLARE_PER_CPU(char, compat_arg_xlat[COMPAT_ARG_XLAT_SIZE]); #define array_access_ok(addr, count, size) \ (access_ok(addr, (count)*(size))) -#define __compat_addr_ok(addr) \ - ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(current->domain)) +#define __compat_addr_ok(d, addr) \ + ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(d)) + +#define __compat_access_ok(d, addr, size) \ + __compat_addr_ok(d, (unsigned long)(addr) + ((size) ? (size) - 1 : 0)) #define compat_access_ok(addr, size) \ - __compat_addr_ok((unsigned long)(addr) + ((size) ? (size) - 1 : 0)) + __compat_access_ok(current->domain, addr, size) #define compat_array_access_ok(addr,count,size) \ (likely((count) < (~0U / (size))) && \ |