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] do_iret bug in xen

To: "Daniel Stodden" <stodden@xxxxxxxxxx>
Subject: Re: [Xen-devel] do_iret bug in xen
From: "Ashish Bijlani" <ashish.bijlani@xxxxxxxxx>
Date: Tue, 27 Nov 2007 14:28:20 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 27 Nov 2007 11:29:01 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=bNMwxdCgD3n6XoKtdh5i6pu0VghSHfkXmwPYyv57hXw=; b=NcF9EXMBOw5kLA/r4deuGMxIPTebI0qVnfxiPQfKDFSIvsp8q2mRzmgg1sSptA4quJR07+pJyDDJKyOVUos2+4/uUemUHsqUvqSJHHgaZKzIwBGnMJMPeQmTOrYiFvJ088QlDxRNs/uSNLjuIDQIx5we9ABM6pztdxkWoaDo3GU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=tbcbH2EvF7zvvM7C57rV4hGA/4RypuZNuD+ysoAihpbHg9ICfRJoxYSSq75MbFBSrmiiFocc0dbHwLmkXwmO30zzYdpiajdzVcz7Z8OpVlpJpWbQwBu+ApRiq04oGyEMS3RKkjfzVh+My/dZu+F16FwH5l1E0qqBZCCtEKkQ7w0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1196191008.4632.6.camel@xxxxxxxxxxxxxxxxxxxx>
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: <ec55b17e0711271059y5e7f346qfa31de54b7165ef6@xxxxxxxxxxxxxx> <1196191008.4632.6.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
since "sti" is on, an interrupt can occur which can cause the control to enter "__runq_tickle", which then invokes "cpumask_raise_softirq(mask, SCHEDULE_SOFTIRQ)" to send IPI to a processor causing the control to enter "__enter_scheduler" which changes the current.

On Nov 27, 2007 2:16 PM, Daniel Stodden <stodden@xxxxxxxxxx> wrote:

On Tue, 2007-11-27 at 13:59 -0500, Ashish Bijlani wrote:
> "do_iret" (slow iret via hyercall) can introduce a race condition as
> "current" can change during the execution of the function. all
> hypercalls run with "sti" on, so an interrupt on a processor causing
> the control to enter in "__enter_scheduler" after reading current can
> change the current process on that processor.

follow the code e.g. surounding ret_from_intr. __enter_scheduler is a
softirq handler. it will only be run upon return to guest context, not
when returning to an interrupted hypervisor. xen is not preemptible.

regards,
daniel

--
Daniel Stodden
LRR     -      Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:stodden@xxxxxxxxxx
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>