Re: [Part2 PATCH v7 35/38] KVM: SVM: Pin guest memory when SEV is active
From: Brijesh Singh
Date: Mon Nov 06 2017 - 11:55:19 EST
On 11/06/2017 08:43 AM, Borislav Petkov wrote:
...
+
+ region->uaddr = range->addr;
+ region->size = range->size;
+ list_add_tail(®ion->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