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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 11 Jun 2010 16:46:48 -0300
From:	Marcelo Tosatti <mtosatti@...hat.com>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	Avi Kivity <avi@...hat.com>, kvm@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] kvm,ept: pass error code to handler

On Fri, Jun 11, 2010 at 07:30:24PM +0800, Lai Jiangshan wrote:
> handle_ept_violation() does not pass error code to
> the handler tdp_page_fault().
> 
> It means tdp_page_fault() handles the page fault with ignoring
> the error code, It will not handle the page fault completely correctly,
> and may causes endless page fault.
> 
> {
> But because there is another bad code in the kvm, This endless page faulting
> never occur. The bad code: kvm always set pte writable.
> 
> negative * negative = positive, WTF!!
> 
> Next patch will fix this bad code.
> }
> 
> Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> ---
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index c7565ea..6362dcc 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -3470,7 +3470,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu)
>  
>  	gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS);
>  	trace_kvm_page_fault(gpa, exit_qualification);
> -	return kvm_mmu_page_fault(vcpu, gpa & PAGE_MASK, 0);
> +	return kvm_mmu_page_fault(vcpu, gpa & PAGE_MASK, exit_qualification);

exit_qualification & 0x2, because bit 1 (write fault) of exit
qualification is the only one that matches x86's pagefault error codes.
--
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