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: <a0554bb2f9412bdb95d980bc15c51bd590d3aadb.camel@redhat.com>
Date: Tue, 17 Dec 2024 19:02:47 -0500
From: Maxim Levitsky <mlevitsk@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
 <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org, Peter Xu
	 <peterx@...hat.com>
Subject: Re: [PATCH 15/20] KVM: sefltests: Verify value of dirty_log_test
 last page isn't bogus

On Fri, 2024-12-13 at 17:07 -0800, Sean Christopherson wrote:
> Add a sanity check that a completely garbage value wasn't written to
> the last dirty page in the ring, e.g. that it doesn't contain the *next*
> iteration's value.
> 
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> ---
>  tools/testing/selftests/kvm/dirty_log_test.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/kvm/dirty_log_test.c b/tools/testing/selftests/kvm/dirty_log_test.c
> index 3a4e411353d7..500257b712e3 100644
> --- a/tools/testing/selftests/kvm/dirty_log_test.c
> +++ b/tools/testing/selftests/kvm/dirty_log_test.c
> @@ -514,8 +514,9 @@ static void vm_dirty_log_verify(enum vm_guest_mode mode, unsigned long **bmap)
>  				 * last page's iteration), as the value to be
>  				 * written may be cached in a CPU register.
>  				 */
> -				if (page == dirty_ring_last_page ||
> -				    page == dirty_ring_prev_iteration_last_page)
> +				if ((page == dirty_ring_last_page ||
> +				     page == dirty_ring_prev_iteration_last_page) &&
> +				    val < iteration)
>  					continue;
>  			} else if (!val && iteration == 1 && bmap0_dirty) {
>  				/*
Reviewed-by: Maxim Levitsky <mlevitsk@...hat.com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ