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]
Date:	Fri, 22 Aug 2014 10:24:06 +0100
From:	"Jan Beulich" <JBeulich@...e.com>
To:	"Toshi Kani" <toshi.kani@...com>, "Juergen Gross" <JGross@...e.com>
Cc:	<stefan.bader@...onical.com>, <x86@...nel.org>,
	<ville.syrjala@...ux.intel.com>, <xen-devel@...ts.xensource.com>,
	<linux-kernel@...r.kernel.org>, <hpa@...or.com>
Subject: Re: [Xen-devel] [PATCH RFC 1/3] x86: Make page cache mode a
 real type

>>> On 21.08.14 at 11:30, <JGross@...e.com> wrote:
> On 08/20/2014 09:26 PM, Toshi Kani wrote:
>> On Tue, 2014-08-19 at 15:25 +0200, jgross@...e.com wrote:
>>> --- a/arch/x86/mm/init.c
>>> +++ b/arch/x86/mm/init.c
>>> @@ -27,6 +27,35 @@
>>>
>>>   #include "mm_internal.h"
>>>
>>> +/*
>>> + * Tables translating between page_cache_type_t and pte encoding.
>>> + * Minimal supported modes are defined statically, modified if more supported
>>> + * cache modes are available.
>>> + * Index into __cachemode2pte_tbl is the cachemode.
>>> + * Index into __pte2cachemode_tbl are the caching attribute bits of the pte
>>> + * (_PAGE_PWT, _PAGE_PCD, _PAGE_PAT) at index bit positions 0, 1, 2.
>>> + */
>>> +uint16_t __cachemode2pte_tbl[_PAGE_CACHE_MODE_NUM] = {
>>> +	[_PAGE_CACHE_MODE_WB]		= 0,
>>> +	[_PAGE_CACHE_MODE_WC]		= _PAGE_PWT,
>>> +	[_PAGE_CACHE_MODE_UC_MINUS]	= _PAGE_PCD,
>>> +	[_PAGE_CACHE_MODE_UC]		= _PAGE_PCD | _PAGE_PWT,
>>> +	[_PAGE_CACHE_MODE_WT]		= _PAGE_PWT,
>>> +	[_PAGE_CACHE_MODE_WP]		= _PAGE_PWT,
>>> +};
>>
>> I think WT and WP should be set to _PAGE_PCD (UC_MINUS) for safe.
> 
> Oh, you are right.

Actually I suppose the original comment was about WC and WP;
defaulting WT to _PAGE_PWT seems quite correct to me.

Jan

--
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