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] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTikZfElLWJvRX2S97FBN2ZVptxg9kYZ7utjHstC6@mail.gmail.com>
Date:	Wed, 16 Jun 2010 18:51:41 +0800
From:	huang ying <huang.ying.caritas@...il.com>
To:	Avi Kivity <avi@...hat.com>
Cc:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	KVM list <kvm@...r.kernel.org>,
	Andi Kleen <andi@...stfloor.org>,
	Huang Ying <ying.huang@...el.com>
Subject: Re: [PATCH 3/6] KVM: MMU: introduce gfn_to_page_atomic() and 
	gfn_to_pfn_atomic()

On Tue, Jun 15, 2010 at 7:22 PM, Avi Kivity <avi@...hat.com> wrote:
> btw, is_hwpoison_address() is racy.  While it looks up the address, some
> other task can unmap the page tables under us.
>
> Andi/Huang?
>
> One way of fixing it is get_user_pages_ptes_fast(), which also returns the
> pte, also atomically.  I want it for other reasons as well (respond to a
> read fault by gupping the page for read, but allowing write access if the
> pte indicates it is writeable).

Yes. is_hwpoison_address() is racy. But I think it is not absolutely
necessary to call is_hwpoison_address() in hva_to_pfn_atomic(), is it?

For is_hwpoison_address() in hva_to_pfn(), we can protect it with mmap_sem.

Best Regards,
Huang Ying
--
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