Re: [PATCH v3 02/11] x86/ldt: Simplify LDT switching logic

2017-06-21 Thread Borislav Petkov
On Tue, Jun 20, 2017 at 10:22:08PM -0700, Andy Lutomirski wrote: > Originally, Linux reloaded the LDT whenever the prev mm or the next > mm had an LDT. It was changed in 0bbed3beb4f2 ("[PATCH] > Thread-Local Storage (TLS) support") (from the historical tree) like > this: > > - /* load

Re: [PATCH v3 02/11] x86/ldt: Simplify LDT switching logic

2017-06-21 Thread Thomas Gleixner
On Tue, 20 Jun 2017, Andy Lutomirski wrote: > When we redo lazy mode to stop flush IPIs without switching to > init_mm, though, the current logic would become incorrect: it will > be possible to have real_prev == next but nonetheless have a stale > LDT descriptor. > > Simplify the code to update L

[PATCH v3 02/11] x86/ldt: Simplify LDT switching logic

2017-06-20 Thread Andy Lutomirski
Originally, Linux reloaded the LDT whenever the prev mm or the next mm had an LDT. It was changed in 0bbed3beb4f2 ("[PATCH] Thread-Local Storage (TLS) support") (from the historical tree) like this: - /* load_LDT, if either the previous or next thread -* has a non-de