From: Tim Deegan <tim@xen.org>
To: Kouya Shimura <kouya@jp.fujitsu.com>
Cc: Robert Phillips <robert.phillips@citrix.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH] x86/hap: fix race condition between ENABLE_LOGDIRTY and track_dirty_vram hypercall
Date: Thu, 29 Nov 2012 15:40:41 +0000 [thread overview]
Message-ID: <20121129154041.GD80627@ocelot.phlegethon.org> (raw)
In-Reply-To: <50B7087D.20407@jp.fujitsu.com>
At 16:02 +0900 on 29 Nov (1354204941), Kouya Shimura wrote:
> I'm not sure why paging_lock() is used partially in hap_XXX_vram_tracking
> functions. Thus, this patch introduces a new lock.
> It would be better to use paging_lock() instead of the new lock
> since shadow paging mode (not HAP mode) uses paging_lock to avoid
> this race condition.
I think you're right - it would be better to use the paging_lock.
Cc'ing Robert Phillips, who's got a big patch outstanding that touches
the locking in this code. I think the right thing to do is make sure
his patch fixes the issue and the backport just the locking parts of it
to older trees.
Robert, in your patch you do wrap this all in the paging_lock, but then
unlock to call various enable and disable routines. Is there a version
of this reace condition there, where some other CPU might call
LOG_DIRTY_ENABLE while you've temporarily dropped the lock?
Cheers,
Tim.
next prev parent reply other threads:[~2012-11-29 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 7:02 [PATCH] x86/hap: fix race condition between ENABLE_LOGDIRTY and track_dirty_vram hypercall Kouya Shimura
2012-11-29 15:40 ` Tim Deegan [this message]
2012-12-03 17:59 ` Robert Phillips
2012-12-06 9:32 ` Tim Deegan
2012-12-06 10:36 ` Robert Phillips
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121129154041.GD80627@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=kouya@jp.fujitsu.com \
--cc=robert.phillips@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).