lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5455D903.3080801@gmail.com>
Date:	Sun, 02 Nov 2014 15:10:59 +0800
From:	Wanpeng Li <kernellwp@...il.com>
To:	Paolo Bonzini <pbonzini@...hat.com>,
	"Chen, Tiejun" <tiejun.chen@...el.com>,
	Wanpeng Li <wanpeng.li@...ux.intel.com>
CC:	Gleb Natapov <gleb@...nel.org>,
	Alexei Starovoitov <alexei.starovoitov@...il.com>,
	Takashi Iwai <tiwai@...e.de>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: fix access memslots w/o hold srcu read lock

Hi Paolo,
On 14/11/2 下午2:50, Paolo Bonzini wrote:
>
> On 01/11/2014 03:49, Wanpeng Li wrote:
>> This is also not enough. I see the warning in the below path during the
>> test:
>>
>> kvm_arch_vcpu_ioctl_run
>> -> kvm_apic_accept_events
>> -> kvm_vcpu_reset
> Hmm, better bypass the problem altogether:
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index a0f78dbaabee..3e556c68351b 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -4579,7 +4579,7 @@ static void vmx_vcpu_reset(struct kvm_vcpu *vcpu)
>   		vmcs_write32(TPR_THRESHOLD, 0);
>   	}
>   
> -	kvm_vcpu_reload_apic_access_page(vcpu);
> +	kvm_make_request(KVM_REQ_APIC_PAGE_RELOAD, vcpu);
>   
>   	if (vmx_vm_has_apicv(vcpu->kvm))
>   		memset(&vmx->pi_desc, 0, sizeof(struct pi_desc));
>

Great idea and it works. Just send out version 4 of the patch. ;-)

Regards,
Wanpeng Li

> (untested)
>
> Paolo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ