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-3.4-testing] Fix gdbserver-xen support on older ker

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] Fix gdbserver-xen support on older kernels.
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Mar 2010 05:45:36 -0700
Delivery-date: Tue, 30 Mar 2010 05:45:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1269952592 -3600
# Node ID 17cb4b7a78e900000dc4ae4558392550d6963409
# Parent  b0aef7160eebaea9686cffd49d10823a345f0242
Fix gdbserver-xen support on older kernels.

The xc_ptrace API relies on errno for passing success/failure
indication back to callers.  However, mapping operations that fall
back on legacy APIs may leave errno set to a non-zero result even
thought the operation is successful.  This patch resets errno after
successful map operations so that xc_ptrace doesn't inadvertently
return a failure.

Signed-off-by: Justin Gibbs <gibbs@xxxxxxxxxxx>
xen-unstable changeset:   21063:0a91254533dc
xen-unstable date:        Thu Mar 25 07:41:55 2010 +0000
---
 tools/libxc/xc_ptrace.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -r b0aef7160eeb -r 17cb4b7a78e9 tools/libxc/xc_ptrace.c
--- a/tools/libxc/xc_ptrace.c   Tue Mar 30 13:36:04 2010 +0100
+++ b/tools/libxc/xc_ptrace.c   Tue Mar 30 13:36:32 2010 +0100
@@ -174,6 +174,13 @@ map_domain_va(
     if (map == NULL)
         return NULL;
 
+    /*
+     * Due to the use of API fallback code in libxc, errno may
+     * be clobberred during successful operations.  Since the caller
+     * of xc_ptrace is depending on errno for return status, clear
+     * errno here.
+     */
+    errno = 0;
     return map + (va & ~PAGE_MASK);
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] Fix gdbserver-xen support on older kernels., Xen patchbot-3.4-testing <=