Re: Review of KPTI patchset

2017-12-31 Thread Thomas Gleixner
On Sun, 31 Dec 2017, Mathieu Desnoyers wrote: > > Granted, it's not obvious and ideally we convert those this_cpu_read/writes > > to __this_cpu_read/writes() to get the immediate fail reported on the first > > access. > > Indeed, if this function is expected to be called from non-preempt context,

Re: Review of KPTI patchset

2017-12-31 Thread Mathieu Desnoyers
- On Dec 30, 2017, at 5:02 PM, Thomas Gleixner t...@linutronix.de wrote: > On Sat, 30 Dec 2017, Mathieu Desnoyers wrote: >> - On Dec 30, 2017, at 2:58 PM, Thomas Gleixner t...@linutronix.de wrote: >> > /* >> > * Called on fork from arch_dup_mmap(). Just copy the current LDT state, >> > *

Re: Review of KPTI patchset

2017-12-30 Thread Thomas Gleixner
On Sat, 30 Dec 2017, Thomas Gleixner wrote: > On Sat, 30 Dec 2017, Mathieu Desnoyers wrote: > The only asymetry is in the error path of write_ldt() which can leak a half > allocated page table. But, that's a nasty one because if there is an > existing LDT mapped, then the pagetable cannot be freed.

Re: Review of KPTI patchset

2017-12-30 Thread Thomas Gleixner
On Sat, 30 Dec 2017, Mathieu Desnoyers wrote: > - On Dec 30, 2017, at 2:58 PM, Thomas Gleixner t...@linutronix.de wrote: > > /* > > * Called on fork from arch_dup_mmap(). Just copy the current LDT state, > > * the new task is not running, so nothing can be installed. > > */ > > int ldt_dup_c

Re: Review of KPTI patchset

2017-12-30 Thread Mathieu Desnoyers
- On Dec 30, 2017, at 2:58 PM, Thomas Gleixner t...@linutronix.de wrote: > On Sat, 30 Dec 2017, Mathieu Desnoyers wrote: > >> Hi Thomas, >> >> Here is some feedback on the KPTI patchset. Sorry for not replying to the >> patch, I was not CC'd on the original email, and don't have it in my inb

Re: Review of KPTI patchset

2017-12-30 Thread Thomas Gleixner
On Sat, 30 Dec 2017, Mathieu Desnoyers wrote: > Hi Thomas, > > Here is some feedback on the KPTI patchset. Sorry for not replying to the > patch, I was not CC'd on the original email, and don't have it in my inbox. I can bounce you 196 versions if you want. > I notice that fill_ldt() sets the d