lkml.org 
[lkml]   [2020]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v12 10/18] x86/fsgsbase/64: Enable FSGSBASE instructions in helper functions
Date
David Laight <David.Laight@ACULAB.COM> writes:
> From: Sasha Levin
>> >> + native_swapgs();
>> >> + gsbase = rdgsbase();
>> >> + native_swapgs();
>
> Does local_irq_save() even do anything useful here.
> You need to actually execute CLI, not just set a
> flag that indicates interrupts shouldn't happen.
> (Which is what I think local_irq_save() might do.)

local_irq_save()
raw_local_irq_save()
arch_local_irq_save()
arch_local_irq_disable()
native_irq_disable()
asm("CLI")

> You also (probably) need to disable NMIs.

The NMI entry can deal with that obviously.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-05-19 16:49    [W:0.119 / U:1.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site