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-next>] [day] [month] [year] [list]
Message-Id: <20240613125407.1126587-1-maobibo@loongson.cn>
Date: Thu, 13 Jun 2024 20:54:07 +0800
From: Bibo Mao <maobibo@...ngson.cn>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] KVM: Remove duplicated zero clear with dirty_bitmap buffer

Since dirty_bitmap pointer is allocated with function __vcalloc(),
there is __GFP_ZERO flag set in the implementation about this function
__vcalloc_noprof(). It is not necessary to clear dirty_bitmap buffer
with zero again.

Signed-off-by: Bibo Mao <maobibo@...ngson.cn>
---
 virt/kvm/kvm_main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 14841acb8b95..c7d4a041dcfa 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1669,9 +1669,6 @@ static int kvm_prepare_memory_region(struct kvm *kvm,
 			r = kvm_alloc_dirty_bitmap(new);
 			if (r)
 				return r;
-
-			if (kvm_dirty_log_manual_protect_and_init_set(kvm))
-				bitmap_set(new->dirty_bitmap, 0, new->npages);
 		}
 	}
 

base-commit: 83a7eefedc9b56fe7bfeff13b6c7356688ffa670
-- 
2.39.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ