lkml.org 
[lkml]   [2023]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH RFC v7 40/64] KVM: SVM: Add KVM_SEV_SNP_LAUNCH_FINISH command
From
On 1/11/2023 7:27 AM, Sabin Rapan wrote:
>
>
> On 14.12.2022 21:40, Michael Roth wrote:
>> +static int snp_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp)
>> +{
>> + struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
>> + struct sev_data_snp_launch_update data = {};
>> + int i, ret;
>> +
>> + data.gctx_paddr = __psp_pa(sev->snp_context);
>> + data.page_type = SNP_PAGE_TYPE_VMSA;
>> +
>> + for (i = 0; i < kvm->created_vcpus; i++) {
>
> Should be replaced with kvm_for_each_vcpu() as it was done for
> sev_launch_update_vmsa() in c36b16d29f3a ("KVM: SVM: Use online_vcpus,
> not created_vcpus, to iterate over vCPUs").
> Prevents accessing uninitialized data in struct vcpu_svm.

Yes, fixed this one.

Thanks,
Ashish

\
 
 \ /
  Last update: 2023-03-26 23:37    [W:0.623 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site