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]
Date:	Wed, 20 Jun 2012 21:56:53 +0900
From:	Takuya Yoshikawa <takuya.yoshikawa@...il.com>
To:	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
Cc:	Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>,
	Avi Kivity <avi@...hat.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH v7 02/10] KVM: MMU: abstract spte write-protect

On Wed, 20 Jun 2012 17:11:06 +0800
Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com> wrote:

> Strange! Why do you think it is wrong? It is just debug code.

kvm_mmu_slot_remove_write_access() does not use rmap but the debug code says:
	rmap_printk("rmap_write_protect: spte %p %llx\n", sptep, *sptep);

> > If you think it is not a problem, please explain why you think so in
> > the changelog.
> 
> 
> It is a from the first place and it is used to debug and not compiled at all.

It was not in kvm_mmu_slot_remove_write_access() before, no?

This patch says that the write protection code becomes commonly usable
function, but it still has rmap_write_protect specific debug code in it;
using it in kvm_mmu_slot_remove_write_access(), which is not at all related
to rmap_write_protect, is strange.

As you say, this is just debug code and does not have any practical problem.
But randomly putting debug code is not a good thing.

Thanks,
	Takuya
--
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