lkml.org 
[lkml]   [2017]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/entry/64: Fix native_load_gs_index() SWAPGS handling with IRQ state tracing enabled
From
Date


> On Nov 29, 2017, at 4:47 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>
>> On Wed, Nov 29, 2017 at 08:09:51AM +0100, Ingo Molnar wrote:
>> diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
>> index f81d50d7ceac..c0b52df8ee4f 100644
>> --- a/arch/x86/entry/entry_64.S
>> +++ b/arch/x86/entry/entry_64.S
>> @@ -945,16 +945,16 @@ idtentry simd_coprocessor_error do_simd_coprocessor_error has_error_code=0
>> */
>> ENTRY(native_load_gs_index)
>> FRAME_BEGIN
>> + SWAPGS /* switch from user GS to kernel GS */
>> pushfq
>> DISABLE_INTERRUPTS(CLBR_ANY & ~CLBR_RDI)
>> TRACE_IRQS_OFF
>> - SWAPGS
>
> I'm thinking those moves it too far back; we should at least have
> interrupts disabled when we do SWAPGS, no? Also, curse paravirt.
>

I'll look in a few hours.

But we definitely can't have irqs on when running with user gs.
\
 
 \ /
  Last update: 2017-11-29 15:34    [W:0.097 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site