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] [day] [month] [year] [list]
Message-ID: <20140820073209.GA11700@kernel>
Date:	Wed, 20 Aug 2014 15:32:09 +0800
From:	Wanpeng Li <wanpeng.li@...ux.intel.com>
To:	Paolo Bonzini <pbonzini@...hat.com>
Cc:	Marcelo Tosatti <mtosatti@...hat.com>,
	Gleb Natapov <gleb@...nel.org>,
	Zhang Yang <yang.z.zhang@...el.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] KVM: vmx: fix ept reserved bits for 1-GByte page

On Wed, Aug 20, 2014 at 08:51:38AM +0200, Paolo Bonzini wrote:
>Il 20/08/2014 05:17, Wanpeng Li ha scritto:
>> +	else if (spte & (1ULL << 7))
>
>You have to check level == 1 specifically here, or add...
>
>> +		/*
>> +		 * 1GB/2MB page, bits 29:12 or 20:12 reserved respectively,
>> +		 * level == 1 if the hypervisor is using the ignored bit 7.
>> +		 */
>> +		mask |= (PAGE_SIZE << ((level - 1) * 9)) - PAGE_SIZE;
>> +	else
>
>... "if (level > 1)" here.
>
>Otherwise, you're marking bits 6:3 as reserved for 4K pages.  This
>should cause a WARN, because KVM puts 0110 in those bits:
>
>                ret = (MTRR_TYPE_WRBACK << VMX_EPT_MT_EPTE_SHIFT)
>                        | VMX_EPT_IPAT_BIT;
>
>(in vmx_get_mt_mask: writeback memory, ignore PAT memory type from the
>guest's page tables)
>

Got it.

Regards,
Wanpeng Li 

>How are you testing this patch?
>
>Paolo
>
>> +		/* bits 6:3 reserved */
>> +		mask |= 0x78;
--
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