WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN] Fix XENVER_capabilities hypercall.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Fix XENVER_capabilities hypercall.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Jan 2007 07:05:35 -0800
Delivery-date: Wed, 31 Jan 2007 07:50:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Date 1170238286 0
# Node ID 7d3bb465e938575dfa54f362b87337d3ee012f4b
# Parent  61262143a4b07687b47a444a46e5538a9744fd0f
[XEN] Fix XENVER_capabilities hypercall.

Passing an array to a function turns it into a pointer which confuses
safe_strcat.

Also fix 54->64 typo in ia64 tree.

Thanks to Alex Williamson for pointing out the problem.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/xensetup.c |   18 +++++++++---------
 xen/arch/powerpc/setup.c     |    4 ++--
 xen/arch/x86/setup.c         |   24 ++++++++++++------------
 xen/common/kernel.c          |    4 ++--
 4 files changed, 25 insertions(+), 25 deletions(-)

diff -r 61262143a4b0 -r 7d3bb465e938 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Tue Jan 30 18:30:18 2007 +0000
+++ b/xen/arch/ia64/xen/xensetup.c      Wed Jan 31 10:11:26 2007 +0000
@@ -545,21 +545,21 @@ printk("num_online_cpus=%d, max_cpus=%d\
     startup_cpu_idle_loop();
 }
 
-void arch_get_xen_caps(xen_capabilities_info_t info)
+void arch_get_xen_caps(xen_capabilities_info_t *info)
 {
     int major = xen_major_version();
     int minor = xen_minor_version();
     char s[32];
 
-    info[0] = '\0';
-
-    snprintf(s, sizeof(s), "xen-%d.%d-ia54 ", major, minor);
-    safe_strcat(info, s);
+    (*info)[0] = '\0';
+
+    snprintf(s, sizeof(s), "xen-%d.%d-ia64 ", major, minor);
+    safe_strcat(*info, s);
 
     if (vmx_enabled)
     {
         snprintf(s, sizeof(s), "hvm-%d.%d-ia64 ", major, minor);
-        safe_strcat(info, s);
-    }
-}
-
+        safe_strcat(*info, s);
+    }
+}
+
diff -r 61262143a4b0 -r 7d3bb465e938 xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Tue Jan 30 18:30:18 2007 +0000
+++ b/xen/arch/powerpc/setup.c  Wed Jan 31 10:11:26 2007 +0000
@@ -444,8 +444,8 @@ void __init __start_xen_ppc(
 
 }
 
-extern void arch_get_xen_caps(xen_capabilities_info_t info);
-void arch_get_xen_caps(xen_capabilities_info_t info)
+extern void arch_get_xen_caps(xen_capabilities_info_t *info);
+void arch_get_xen_caps(xen_capabilities_info_t *info)
 {
 }
 
diff -r 61262143a4b0 -r 7d3bb465e938 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Tue Jan 30 18:30:18 2007 +0000
+++ b/xen/arch/x86/setup.c      Wed Jan 31 10:11:26 2007 +0000
@@ -800,52 +800,52 @@ void __init __start_xen(multiboot_info_t
     startup_cpu_idle_loop();
 }
 
-void arch_get_xen_caps(xen_capabilities_info_t info)
+void arch_get_xen_caps(xen_capabilities_info_t *info)
 {
     int major = xen_major_version();
     int minor = xen_minor_version();
     char s[32];
 
-    info[0] = '\0';
+    (*info)[0] = '\0';
 
 #if defined(CONFIG_X86_32) && !defined(CONFIG_X86_PAE)
 
     snprintf(s, sizeof(s), "xen-%d.%d-x86_32 ", major, minor);
-    safe_strcat(info, s);
+    safe_strcat(*info, s);
     if ( hvm_enabled )
     {
         snprintf(s, sizeof(s), "hvm-%d.%d-x86_32 ", major, minor);
-        safe_strcat(info, s);
+        safe_strcat(*info, s);
     }
 
 #elif defined(CONFIG_X86_32) && defined(CONFIG_X86_PAE)
 
     snprintf(s, sizeof(s), "xen-%d.%d-x86_32p ", major, minor);
-    safe_strcat(info, s);
+    safe_strcat(*info, s);
     if ( hvm_enabled )
     {
         snprintf(s, sizeof(s), "hvm-%d.%d-x86_32 ", major, minor);
-        safe_strcat(info, s);
+        safe_strcat(*info, s);
         snprintf(s, sizeof(s), "hvm-%d.%d-x86_32p ", major, minor);
-        safe_strcat(info, s);
+        safe_strcat(*info, s);
     }
 
 #elif defined(CONFIG_X86_64)
 
     snprintf(s, sizeof(s), "xen-%d.%d-x86_64 ", major, minor);
-    safe_strcat(info, s);
+    safe_strcat(*info, s);
 #ifdef CONFIG_COMPAT
     snprintf(s, sizeof(s), "xen-%d.%d-x86_32p ", major, minor);
-    safe_strcat(info, s);
+    safe_strcat(*info, s);
 #endif
     if ( hvm_enabled )
     {
         snprintf(s, sizeof(s), "hvm-%d.%d-x86_32 ", major, minor);
-        safe_strcat(info, s);
+        safe_strcat(*info, s);
         snprintf(s, sizeof(s), "hvm-%d.%d-x86_32p ", major, minor);
-        safe_strcat(info, s);
+        safe_strcat(*info, s);
         snprintf(s, sizeof(s), "hvm-%d.%d-x86_64 ", major, minor);
-        safe_strcat(info, s);
+        safe_strcat(*info, s);
     }
 
 #endif
diff -r 61262143a4b0 -r 7d3bb465e938 xen/common/kernel.c
--- a/xen/common/kernel.c       Tue Jan 30 18:30:18 2007 +0000
+++ b/xen/common/kernel.c       Wed Jan 31 10:11:26 2007 +0000
@@ -162,10 +162,10 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL
     case XENVER_capabilities:
     {
         xen_capabilities_info_t info;
-        extern void arch_get_xen_caps(xen_capabilities_info_t info);
+        extern void arch_get_xen_caps(xen_capabilities_info_t *info);
 
         memset(info, 0, sizeof(info));
-        arch_get_xen_caps(info);
+        arch_get_xen_caps(&info);
 
         if ( copy_to_guest(arg, (char *)info, sizeof(info)) )
             return -EFAULT;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] Fix XENVER_capabilities hypercall., Xen patchbot-unstable <=