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

Re: [Xen-devel] [PATCH] vm_event: make sure the domain is paused in key domctls


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Thu, 28 Jan 2016 16:52:50 +0200
  • Cc: tamas@xxxxxxxxxxxxx, keir@xxxxxxx, jbeulich@xxxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Thu, 28 Jan 2016 14:52:40 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=S+GzqZbo2mo8e39JsR9IDXjOVIa1JQRO8UDLY8jtTx/t2G46Ea0b258NsdlnCZetRMd/y49v1EZdGdE6joUEEhEmLrdGyTkhwhExJVLWbKMdepQRwSAJMWToTZgclyk98ka/GqMZJe6paWXiauFstZW5/WgdL46SahHBJoOyeTNgEUh5DqMMllfcKbtzmNy9ORJvKZD2In7qci9JOUjD1NUo2gi03B2QfjmAC33e7l9N6RX4UrfDzREqU/FrdcKHyBJ9X47y3ZKHbfRD+5DirmrLTvpSvdu+itGr68it4XiBnaaC+k+dX4LIXKRxksGrUhuYMX2tj32M2BWO3pxD/A==; h=Received:Received:Received:Received:Received:Subject:To:References:Cc:From:Message-ID:Date:User-Agent:MIME-Version: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 01/28/2016 04:10 PM, Andrew Cooper wrote:
> On 28/01/16 13:52, Razvan Cojocaru wrote:
>> This patch pauses the domain for all writes through the 'ad'
>> pointer in monitor_domctl(), defers a domain_unpause() call until
>> after the CRs are updated for the MONITOR_EVENT_WRITE_CTRLREG
>> case, and makes sure that the domain is paused for both vm_event
>> enable and disable cases in vm_event_domctl().
>> Thanks go to Andrew Cooper for his review and suggestions.
>>
>> Signed-off-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
> 
> Would you mind annotating each of the checks for d != current->domain
> with /* no domain_pause(). */, which is our normal practice.

Nice, doing that allowed me to find and modify this code:

1137 #ifdef CONFIG_HAS_MEM_ACCESS
1138     case XEN_DOMCTL_set_access_required:
1139         if ( unlikely(current->domain == d) ) /* no domain_pause() */
1140             ret = -EPERM;
1141         else
1142         {
1143             domain_pause(d);
1144             p2m_get_hostp2m(d)->access_required =
1145                 op->u.access_required.access_required;
1146             domain_unpause(d);
1147         }
1148         break;
1149 #endif

(there was no domain_pause(d) / domain_unpause(d)) before.


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®.