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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130125132816.30db55e9.yoshikawa_takuya_b1@lab.ntt.co.jp>
Date:	Fri, 25 Jan 2013 13:28:16 +0900
From:	Takuya Yoshikawa <yoshikawa_takuya_b1@....ntt.co.jp>
To:	Takuya Yoshikawa <yoshikawa_takuya_b1@....ntt.co.jp>
Cc:	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>,
	Alex Williamson <alex.williamson@...hat.com>, gleb@...hat.com,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] kvm: IOMMU read-only mapping support

On Fri, 25 Jan 2013 12:59:12 +0900
Takuya Yoshikawa <yoshikawa_takuya_b1@....ntt.co.jp> wrote:

> > The commit c972f3b1 changed the write-protect behaviour - it does
> > wirte-protection only when dirty flag is set.
> > [ I did not see this commit when we discussed the problem before. ]
> 
> I'll look at the commit later, after the lunch break.

I've done!

So we need to do:

	if (npages && (GET_DIRTY || RDONLY))
		write protect

About sync_page, I'm not sure what is the best fix.

	Takuya

> 
> > Further more, i notice that write-protect is not enough, when do sync
> > shadow page:
> > 
> > FNAME(sync_page):
> > 
> > 		host_writable = sp->spt[i] & SPTE_HOST_WRITEABLE;
> > 
> > 		set_spte(vcpu, &sp->spt[i], pte_access,
> > 			 PT_PAGE_TABLE_LEVEL, gfn,
> > 			 spte_to_pfn(sp->spt[i]), true, false,
> > 			 host_writable);
> > 
> > It sets spte based on the old value that means the readonly flag check
> > is missed. We need to call kvm_arch_flush_shadow_all under this case.
> 
> So the change needed will be in arch/x86.
> 	in arch_commit_* one.
> 
> Right?
> 
> Note: I'm not touching arch_* memory slot APIs now because ARM KVM
> is coming now.  So no problem, the flags will be passed as before.
> 
> 	Takuya


-- 
Takuya Yoshikawa <yoshikawa_takuya_b1@....ntt.co.jp>
--
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