Re: [PATCH 10/24] x86/mm/kaiser: Map the entry stack variables

2017-11-27 Thread Peter Zijlstra
On Mon, Nov 27, 2017 at 06:32:11PM +0100, Thomas Gleixner wrote: > On Mon, 27 Nov 2017, Peter Zijlstra wrote: > > > On Mon, Nov 27, 2017 at 11:49:09AM +0100, Ingo Molnar wrote: > > > diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c > > > index 157f81816915..631e229ab428 100

Re: [PATCH 10/24] x86/mm/kaiser: Map the entry stack variables

2017-11-27 Thread Thomas Gleixner
On Mon, 27 Nov 2017, Peter Zijlstra wrote: > On Mon, Nov 27, 2017 at 11:49:09AM +0100, Ingo Molnar wrote: > > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > > index 7b348cc33e2d..f4f4ab8525bd 100644 > > --- a/arch/x86/kernel/cpu/common.c > > +++ b/arch/x86/kernel/cpu/co

Re: [PATCH 10/24] x86/mm/kaiser: Map the entry stack variables

2017-11-27 Thread Thomas Gleixner
On Mon, 27 Nov 2017, Peter Zijlstra wrote: > On Mon, Nov 27, 2017 at 11:49:09AM +0100, Ingo Molnar wrote: > > diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c > > index 157f81816915..631e229ab428 100644 > > --- a/arch/x86/kernel/process_64.c > > +++ b/arch/x86/kernel/proces

Re: [PATCH 10/24] x86/mm/kaiser: Map the entry stack variables

2017-11-27 Thread Peter Zijlstra
On Mon, Nov 27, 2017 at 11:49:09AM +0100, Ingo Molnar wrote: > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > index 7b348cc33e2d..f4f4ab8525bd 100644 > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -1515,7 +1515,7 @@ EXPORT_PER_CPU_SYMBOL(_

Re: [PATCH 10/24] x86/mm/kaiser: Map the entry stack variables

2017-11-27 Thread Peter Zijlstra
On Mon, Nov 27, 2017 at 11:49:09AM +0100, Ingo Molnar wrote: > diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c > index 157f81816915..631e229ab428 100644 > --- a/arch/x86/kernel/process_64.c > +++ b/arch/x86/kernel/process_64.c > @@ -59,7 +59,7 @@ > #include > #endif >

[PATCH 10/24] x86/mm/kaiser: Map the entry stack variables

2017-11-27 Thread Ingo Molnar
From: Dave Hansen There are times where the kernel is entered but there is not a safe stack, like at SYSCALL entry. To obtain a safe stack, the per-CPU variables 'rsp_scratch' and 'cpu_current_top_of_stack' are used to save the old %rsp value and to find where the kernel stack should start. You