[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen: Disable REP MOVSD optimization if introspection is active


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Mon, 27 Oct 2014 13:09:39 +0200
  • Cc: keir@xxxxxxx, jbeulich@xxxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Mon, 27 Oct 2014 11:09:37 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=USaXOubhvslIMvh8YhKciwxVVQD45EZWaslmLtl730+3f5GPJ0NGfSfF20yIHhT2qYCsjiuVT5LAvga3M452g3Eyv8nUt73Dh5MOcF99uG05WGnLwx6TrN3F1ZVem3Z1o/bs/EK4Dqfj74eO8s6Jgl2qQF/2Y5hKba9z/oiipkXjiOF7jof6F5juqIEFXzg9oMXP5xYG6zUgqokTbgq1l282VMjchChbbTFL5Y7cA6HmHJC+ZZY7/xTCyhbjxxm5Sc6QuEU8bfYoRQD9ZckKRjKiMsEKbd2IrcD1BJYNjKkwwci8od7yj+IaQBSau4PtuQLvK91lrlRVRYDNE/3uzw==; h=Received:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 10/27/2014 12:50 PM, Andrew Cooper wrote:
> On 27/10/14 10:37, Razvan Cojocaru wrote:
>> REP MOVSD emulation is optimized to write several pages at once
>> if possible. While this is a very good thing in general, it
>> can interfere with a memory introspection application's ability
>> to detect suspect behaviour, since it supresses potentially
>> telling future page faults. This patch disables the optimization,
>> gated on introspection being active for the domain.
> 
> An individual rep_movs() call should only optimise to within the current
> page, then break back out to the emulator when passing the page boundary.
> 
> How does this suppress pagefaults?

You're right, sorry for the confusion. Indeed, although we do need (and
have tested) the patch, its description is misleading (and wrong, as
you've rigtly noticed).

Rep_movs() does indeed optimise within the current page, however the
introspection application looks at the EPT mem_event parameters in order
to decide what to do, and the problem is that for the optimized cases
only one mem_event is being sent (for the first MOV) with the initial
gpa and gla. Then no more events are being sent for the rest of the
operation in that page, which is confusing for a client application
expecting to be called for each actual write to a protected page.

If you feel that the patch is acceptable, I'll correct the description
when submitting V2.


Thanks,
Razvan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.