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: <f76f9689-4712-94a0-e620-d16c5c1b6b75@redhat.com>
Date:   Thu, 9 Mar 2017 16:16:37 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Liang Li <liang.z.li@...el.com>, kvm@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        kirill.shutemov@...ux.intel.com, dave.hansen@...ux.intel.com,
        guangrong.xiao@...ux.intel.com, rkrcmar@...hat.com
Subject: Re: [PATCH RFC 4/4] VMX: Expose the LA57 feature to VM



On 29/12/2016 10:26, Liang Li wrote:
> -		if (is_noncanonical_address(la))
> +		if (is_noncanonical_address(la, virt_addr_bits(ctxt)))

Using virt_addr_bits and get_virt_addr_bits is quite a mouthful.  What
about using instead a pair of functions like these:

bool is_noncanonical_address(struct kvm_vcpu *vcpu, u64 addr)
{
	return addr == get_canonical(addr, get_virt_addr_bits(vcpu));
}

bool emulate_is_noncanonical_address(struct x86_emulate_ctxt *ctxt,
				     u64 addr)
{
	return addr == get_canonical(addr, virt_addr_bits(ctxt));
}


Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ