lkml.org 
[lkml]   [2017]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Part2 PATCH v7 35/38] KVM: SVM: Pin guest memory when SEV is active
From
Date


On 11/06/2017 08:43 AM, Borislav Petkov wrote:
...

>> +
>> + region->uaddr = range->addr;
>> + region->size = range->size;
>> + list_add_tail(&region->list, &sev->regions_list);
>> + return ret;
>
> Nothing's protecting that list from concurrent modifications of adding
> and removal of regions.
>

Ah good catch. I will fix this in next rev. Similar to the mem_enc_op(),
we need to acquire the kvm->lock when adding or removing the regions.

-Brijesh

\
 
 \ /
  Last update: 2017-11-06 17:55    [W:1.112 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site