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: <7e2767c2-d772-a485-ce8c-ed5d4da06b3f@redhat.com>
Date:   Thu, 10 Feb 2022 10:53:21 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        dmatlack@...gle.com, vkuznets@...hat.com
Subject: Re: [PATCH 03/23] KVM: MMU: remove valid from extended role

On 2/9/22 23:54, Sean Christopherson wrote:
> Nope, it's not guaranteed to be non-zero:
> 
> static int role_regs_to_root_level(struct kvm_mmu_role_regs *regs)
> {
> 	if (!____is_cr0_pg(regs))
> 		return 0; <=============================================
> 	else if (____is_efer_lma(regs))
> 		return ____is_cr4_la57(regs) ? PT64_ROOT_5LEVEL :
> 					       PT64_ROOT_4LEVEL;
> 	else if (____is_cr4_pae(regs))
> 		return PT32E_ROOT_LEVEL;
> 	else
> 		return PT32_ROOT_LEVEL;
> }
> 

Yes, see my reply to David.  At the end of the series the assumption is 
correct:

- level is always nonzero in mmu_role

- one of level or direct (which is !CR0.PG) is always nonzero in cpu_role

So the patch can be kept but it has to be moved much later.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ