lkml.org 
[lkml]   [2015]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/3] x86/ldt: Make modify_ldt synchronous
From
On Tue, Jul 21, 2015 at 10:12 PM, Andy Lutomirski <luto@amacapital.net> wrote:
> On Tue, Jul 21, 2015 at 7:01 PM, Brian Gerst <brgerst@gmail.com> wrote:
>> On Tue, Jul 21, 2015 at 3:59 PM, Andy Lutomirski <luto@kernel.org> wrote:
>>> modify_ldt has questionable locking and does not synchronize
>>> threads. Improve it: redesign the locking and synchronize all
>>> threads' LDTs using an IPI on all modifications.
>>
>> What does this fix? I can see sending an IPI if the LDT is
>> reallocated, but on every update seems unnecessary.
>>
>
> It prevents nastiness in which you're in user mode with an impossible
> CS or SS, resulting in potentially interesting artifacts in
> interrupts, NMIs, etc.

By impossible, do you mean a partially updated descriptor when the
interrupt occurs? Would making sure that the descriptor is atomically
updated (using set_64bit()) fix that?

--
Brian Gerst


\
 
 \ /
  Last update: 2015-07-22 05:01    [W:0.252 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site