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: <4B460664.1090006@redhat.com>
Date:	Thu, 07 Jan 2010 18:05:56 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Roel Kluin <roel.kluin@...il.com>
CC:	Marcelo Tosatti <mtosatti@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kvm: don't treat NULL parent_pte as multimapped in mmu_parent_walk()

On 01/07/2010 05:56 PM, Roel Kluin wrote:
> If a kvm_mmu_page is not multimapped but parent_pte is NULL
> don't treat it as multimapped and dereference it.
>
> Signed-off-by: Roel Kluin<roel.kluin@...il.com>
> ---
> This wasn't tested and maybe I misunderstood so please review.
>
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> index 4c3e5b2..eb17287 100644
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -1031,10 +1031,12 @@ static void mmu_parent_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
>   	struct kvm_mmu_page *parent_sp;
>   	int i;
>
> -	if (!sp->multimapped&&  sp->parent_pte) {
> -		parent_sp = page_header(__pa(sp->parent_pte));
> -		fn(vcpu, parent_sp);
> -		mmu_parent_walk(vcpu, parent_sp, fn);
> +	if (!sp->multimapped) {
> +		if (sp->parent_pte) {
> +			parent_sp = page_header(__pa(sp->parent_pte));
> +			fn(vcpu, parent_sp);
> +			mmu_parent_walk(vcpu, parent_sp, fn);
> +		}
>   		return;
>   	}
>   	hlist_for_each_entry(pte_chain, node,&sp->parent_ptes, link)
>
>    

If sp->parent_pte is NULL then the list walk terminates immediately.

-- 
error compiling committee.c: too many arguments to function

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