lkml.org 
[lkml]   [2018]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] x86/mm: introduce __PAGE_KERNEL_GLOBAL
From
Date
On 02/16/2018 10:25 AM, Nadav Amit wrote:
>> --- a/arch/x86/mm/pageattr.c~kpti-no-global-for-kernel-mappings 2018-02-13 15:17:56.148210060 -0800
>> +++ b/arch/x86/mm/pageattr.c 2018-02-13 15:17:56.153210060 -0800
>> @@ -593,7 +593,8 @@ try_preserve_large_page(pte_t *kpte, uns
>> * different bit positions in the two formats.
>> */
>> req_prot = pgprot_4k_2_large(req_prot);
>> - req_prot = pgprot_set_on_present(req_prot, _PAGE_GLOBAL | _PAGE_PSE);
>> + req_prot = pgprot_set_on_present(req_prot,
>> + __PAGE_KERNEL_GLOBAL | _PAGE_PSE);
>> req_prot = canon_pgprot(req_prot);
> From these chunks, it seems to me as req_prot will not have the global bit
> on when “nopti” parameter is provided. What am I missing?

BTW, this code is broken. It's trying to unconditionally set
_PAGE_GLOBAL whenever set do change_page_attr() and friends. It gets
fixed up by canon_pgprot(), but it's wrong to do in the first place.
I've got a better fix for this coming.

\
 
 \ /
  Last update: 2018-02-17 00:20    [W:0.083 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site