From: Daniel Stodden Subject: Re: do_iret bug in xen Date: Tue, 27 Nov 2007 20:16:48 +0100 Message-ID: <1196191008.4632.6.camel@thinkpad.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ashish Bijlani Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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.=20 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 --=20 Daniel Stodden LRR - Lehrstuhl f=C3=BCr Rechnertechnik und Rechnerorganisation Institut f=C3=BCr Informatik der TU M=C3=BCnchen D-85748 Garc= hing http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B