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

Peter Zijlstra
2017-11-27T17:29:34Z

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(__preempt_count);
> * the top of the kernel stack. Use an extra percpu variable to track the
> * top of the kernel stack directly.
> */
> -DEFINE_PER_CPU(unsigned long, cpu_current_top_of_stack) =
> +DEFINE_PER_CPU_USER_MAPPED(unsigned long, cpu_current_top_of_stack) =
> (unsigned long)&init_thread_union + THREAD_SIZE;
> EXPORT_PER_CPU_SYMBOL(cpu_current_top_of_stack);

I can't find where we would access this one without already having
switched to kernel CR3.

A kernel with this entire patch reverted seems to boot for me.