lkml.org 
[lkml]   [2018]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled
Date
Dave Hansen <dave.hansen@linux.intel.com> wrote:

>> diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
>> index c67ef3fb4f35..979c7ec6baab 100644
>> --- a/arch/x86/mm/tlb.c
>> +++ b/arch/x86/mm/tlb.c
>> @@ -74,7 +74,8 @@ static void choose_new_asid(struct mm_struct *next, u64 next_tlb_gen,
>> return;
>> }
>>
>> - if (this_cpu_read(cpu_tlbstate.invalidate_other))
>> + if (this_cpu_read(cpu_tlbstate.invalidate_other) &&
>> + !mm_pti_disable(next))
>> clear_asid_other();
>
> This isn't obviously correct. Don't we still need to invalidate other
> user asids?

I forgot to regard this question: When you reenable PTI (after switching back
to 64-bit process), you flush the global pages, so no kernel mappings for the
32-bit process are left.

As for kernel mappings of 64-bit processes, you will flush them later, when
you switch back to 64-bit process (the indication is left set).

\
 
 \ /
  Last update: 2018-02-15 18:48    [W:0.117 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site