[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d2086c39-3966-f694-6c89-8bc68cf99a03@amd.com>
Date:   Mon, 6 Nov 2017 10:55:05 -0600
From:   Brijesh Singh <brijesh.singh@....com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     brijesh.singh@....com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Joerg Roedel <joro@...tes.org>,
        Tom Lendacky <thomas.lendacky@....com>, x86@...nel.org
Subject: Re: [Part2 PATCH v7 35/38] KVM: SVM: Pin guest memory when SEV is
 active
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
Powered by blists - more mailing lists