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-devel

Re: [Xen-devel] [PATCH] gdbserver-xen: fix corefile access

To: Horms <horms@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] gdbserver-xen: fix corefile access
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 2 Mar 2006 10:45:02 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 02 Mar 2006 10:45:19 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <du6abq$cce$1@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <du6abq$cce$1@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 2 Mar 2006, at 08:28, Horms wrote:

This patch fixes corefile access by ensuring that the open fd
to the corefile (current_domid) is passed to the underlying
xc_routines as neccessary. Currently the prevailing pid is passed,
which works fine when attaching to a running domain, but fails
for the corefile case.

This is too gross.

The correct fix is to update the xc_ptrace_core() interface to match the xc_ptrace() interface. Kip Macy made the latter SMP aware, but didn't fix up the former.

It should be easy to do -- note how xc_ptrace() takes a domid on PTRACE_ATTACH, and vcpuid at all other times. xc_ptrace_core() should take a fd on PTRACE_ATTACH, and vcpuid at all other times. Since we don't dump SMP core files right now, vcpuid should either be ignored for the time being, or fail the call if vcpuid!=0.

 -- Keir


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