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: <20121211071938.GB11016@redhat.com>
Date:	Tue, 11 Dec 2012 09:19:38 +0200
From:	Gleb Natapov <gleb@...hat.com>
To:	Jesse Larrew <jlarrew@...ux.vnet.ibm.com>
Cc:	KVM list <kvm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kvm/vmx: fix the return value of handle_vmcall()

On Mon, Dec 10, 2012 at 03:28:13PM -0600, Jesse Larrew wrote:
> 
> The return value of kvm_emulate_hypercall() is intended to inform callers
> whether or not we need to exit to userspace. However, handle_vmcall()
> currently ignores the return value.
> 
No, it it not. KVM does not handle vmcalls in userspace.

> This patch simply propogates the return value from kvm_emulate_hypercall()
> to callers so that it can be acted upon appropriately.
> 
> Signed-off-by: Jesse Larrew <jlarrew@...ux.vnet.ibm.com>
> ---
>  arch/x86/kvm/vmx.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index f858159..8b37f5f 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -4682,8 +4682,7 @@ static int handle_halt(struct kvm_vcpu *vcpu)
>  static int handle_vmcall(struct kvm_vcpu *vcpu)
>  {
>  	skip_emulated_instruction(vcpu);
> -	kvm_emulate_hypercall(vcpu);
> -	return 1;
> +	return kvm_emulate_hypercall(vcpu);
>  }
>  
>  static int handle_invd(struct kvm_vcpu *vcpu)
> -- 
> 1.7.11.7
> 
> Jesse Larrew
> Software Engineer, KVM Team
> IBM Linux Technology Center
> Phone: (512) 973-2052 (T/L: 363-2052)
> jlarrew@...ux.vnet.ibm.com
> 
> --
> 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/

--
			Gleb.
--
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