Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-27 Thread Peter Zijlstra
On Sat, Nov 25, 2017 at 09:26:38AM -0800, Andy Lutomirski wrote: > On Sat, Nov 25, 2017 at 9:10 AM, Borislav Petkov wrote: > > On Sat, Nov 25, 2017 at 06:03:36PM +0100, Thomas Gleixner wrote: > >> > Maybe I should rename cpu_tss to cpu_tss_rw in that patch. > >> > >> For clarity

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-27 Thread Peter Zijlstra
On Sat, Nov 25, 2017 at 09:26:38AM -0800, Andy Lutomirski wrote: > On Sat, Nov 25, 2017 at 9:10 AM, Borislav Petkov wrote: > > On Sat, Nov 25, 2017 at 06:03:36PM +0100, Thomas Gleixner wrote: > >> > Maybe I should rename cpu_tss to cpu_tss_rw in that patch. > >> > >> For clarity that would be

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Andy Lutomirski
On Sat, Nov 25, 2017 at 9:10 AM, Borislav Petkov wrote: > On Sat, Nov 25, 2017 at 06:03:36PM +0100, Thomas Gleixner wrote: >> > Maybe I should rename cpu_tss to cpu_tss_rw in that patch. >> >> For clarity that would be nice. > > + a comment stating the alias mapping. It took tglx

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Andy Lutomirski
On Sat, Nov 25, 2017 at 9:10 AM, Borislav Petkov wrote: > On Sat, Nov 25, 2017 at 06:03:36PM +0100, Thomas Gleixner wrote: >> > Maybe I should rename cpu_tss to cpu_tss_rw in that patch. >> >> For clarity that would be nice. > > + a comment stating the alias mapping. It took tglx and me a while

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Borislav Petkov
On Sat, Nov 25, 2017 at 06:03:36PM +0100, Thomas Gleixner wrote: > > Maybe I should rename cpu_tss to cpu_tss_rw in that patch. > > For clarity that would be nice. + a comment stating the alias mapping. It took tglx and me a while on IRC to figure it out. :-) Thx. -- Regards/Gruss, Boris.

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Borislav Petkov
On Sat, Nov 25, 2017 at 06:03:36PM +0100, Thomas Gleixner wrote: > > Maybe I should rename cpu_tss to cpu_tss_rw in that patch. > > For clarity that would be nice. + a comment stating the alias mapping. It took tglx and me a while on IRC to figure it out. :-) Thx. -- Regards/Gruss, Boris.

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Thomas Gleixner
On Sat, 25 Nov 2017, Andy Lutomirski wrote: > > On Nov 25, 2017, at 9:50 AM, Thomas Gleixner wrote: > > > > On Sat, 25 Nov 2017, Borislav Petkov wrote: > >>> - > >>> +wrmsr(MSR_IA32_SYSENTER_ESP, (unsigned long)(cpu_SYSENTER_stack(cpu) > >>> + 1), 0); > >>>

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Thomas Gleixner
On Sat, 25 Nov 2017, Andy Lutomirski wrote: > > On Nov 25, 2017, at 9:50 AM, Thomas Gleixner wrote: > > > > On Sat, 25 Nov 2017, Borislav Petkov wrote: > >>> - > >>> +wrmsr(MSR_IA32_SYSENTER_ESP, (unsigned long)(cpu_SYSENTER_stack(cpu) > >>> + 1), 0); > >>>wrmsr(MSR_IA32_SYSENTER_EIP,

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Andy Lutomirski
> On Nov 25, 2017, at 9:50 AM, Thomas Gleixner wrote: > > On Sat, 25 Nov 2017, Borislav Petkov wrote: >>> - >>> +wrmsr(MSR_IA32_SYSENTER_ESP, (unsigned long)(cpu_SYSENTER_stack(cpu) + >>> 1), 0); >>>wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long)entry_SYSENTER_32, 0);

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Andy Lutomirski
> On Nov 25, 2017, at 9:50 AM, Thomas Gleixner wrote: > > On Sat, 25 Nov 2017, Borislav Petkov wrote: >>> - >>> +wrmsr(MSR_IA32_SYSENTER_ESP, (unsigned long)(cpu_SYSENTER_stack(cpu) + >>> 1), 0); >>>wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long)entry_SYSENTER_32, 0); >> >> Right, so we

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Thomas Gleixner
On Sat, 25 Nov 2017, Borislav Petkov wrote: > > - > > + wrmsr(MSR_IA32_SYSENTER_ESP, (unsigned long)(cpu_SYSENTER_stack(cpu) + > > 1), 0); > > wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long)entry_SYSENTER_32, 0); > > Right, so we have now two TSS thingies, AFAICT: > > tss =

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Thomas Gleixner
On Sat, 25 Nov 2017, Borislav Petkov wrote: > > - > > + wrmsr(MSR_IA32_SYSENTER_ESP, (unsigned long)(cpu_SYSENTER_stack(cpu) + > > 1), 0); > > wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long)entry_SYSENTER_32, 0); > > Right, so we have now two TSS thingies, AFAICT: > > tss =

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Borislav Petkov
On Fri, Nov 24, 2017 at 06:23:48PM +0100, Ingo Molnar wrote: > From: Andy Lutomirski > > The existing code was a mess, mainly because C arrays are nasty. > Turn SYSENTER_stack into a struct, add a helper to find it, and do > all the obvious cleanups this enables. > >

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-25 Thread Borislav Petkov
On Fri, Nov 24, 2017 at 06:23:48PM +0100, Ingo Molnar wrote: > From: Andy Lutomirski > > The existing code was a mess, mainly because C arrays are nasty. > Turn SYSENTER_stack into a struct, add a helper to find it, and do > all the obvious cleanups this enables. > > Signed-off-by: Andy

[PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-24 Thread Ingo Molnar
From: Andy Lutomirski The existing code was a mess, mainly because C arrays are nasty. Turn SYSENTER_stack into a struct, add a helper to find it, and do all the obvious cleanups this enables. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner

[PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-24 Thread Ingo Molnar
From: Andy Lutomirski The existing code was a mess, mainly because C arrays are nasty. Turn SYSENTER_stack into a struct, add a helper to find it, and do all the obvious cleanups this enables. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brian Gerst

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-24 Thread Thomas Gleixner
On Fri, 24 Nov 2017, Ingo Molnar wrote: > From: Andy Lutomirski > > The existing code was a mess, mainly because C arrays are nasty. > Turn SYSENTER_stack into a struct, add a helper to find it, and do > all the obvious cleanups this enables. Nice. > Signed-off-by: Andy

Re: [PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-24 Thread Thomas Gleixner
On Fri, 24 Nov 2017, Ingo Molnar wrote: > From: Andy Lutomirski > > The existing code was a mess, mainly because C arrays are nasty. > Turn SYSENTER_stack into a struct, add a helper to find it, and do > all the obvious cleanups this enables. Nice. > Signed-off-by: Andy Lutomirski

[PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-24 Thread Ingo Molnar
From: Andy Lutomirski The existing code was a mess, mainly because C arrays are nasty. Turn SYSENTER_stack into a struct, add a helper to find it, and do all the obvious cleanups this enables. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov

[PATCH 20/43] x86/entry: Clean up SYSENTER_stack code

2017-11-24 Thread Ingo Molnar
From: Andy Lutomirski The existing code was a mess, mainly because C arrays are nasty. Turn SYSENTER_stack into a struct, add a helper to find it, and do all the obvious cleanups this enables. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave