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: <e570f7d2-03fc-1498-bd91-6fd7aabae766@redhat.com>
Date:   Wed, 26 Jan 2022 16:45:56 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, Maxim Levitsky <mlevitsk@...hat.com>
Subject: Re: [PATCH] KVM: selftests: Don't skip L2's VMCALL in SMM test for
 SVM guest

On 1/25/22 23:17, Sean Christopherson wrote:
> Don't skip the vmcall() in l2_guest_code() prior to re-entering L2, doing
> so will result in L2 running to completion, popping '0' off the stack for
> RET, jumping to address '0', and ultimately dying with a triple fault
> shutdown.
> 
> It's not at all obvious why the test re-enters L2 and re-executes VMCALL,
> but presumably it serves a purpose.  The VMX path doesn't skip vmcall(),
> and the test can't possibly have passed on SVM, so just do what VMX does.
> 
> Fixes: d951b2210c1a ("KVM: selftests: smm_test: Test SMM enter from L2")
> Cc: Maxim Levitsky <mlevitsk@...hat.com>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> ---
>   tools/testing/selftests/kvm/x86_64/smm_test.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kvm/x86_64/smm_test.c b/tools/testing/selftests/kvm/x86_64/smm_test.c
> index 2da8eb8e2d96..a626d40fdb48 100644
> --- a/tools/testing/selftests/kvm/x86_64/smm_test.c
> +++ b/tools/testing/selftests/kvm/x86_64/smm_test.c
> @@ -105,7 +105,6 @@ static void guest_code(void *arg)
>   
>   		if (cpu_has_svm()) {
>   			run_guest(svm->vmcb, svm->vmcb_gpa);
> -			svm->vmcb->save.rip += 3;
>   			run_guest(svm->vmcb, svm->vmcb_gpa);
>   		} else {
>   			vmlaunch();
> 
> base-commit: e2e83a73d7ce66f62c7830a85619542ef59c90e4

Queued, thanks.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ