mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC 0/3] Baby steps toward cleaning up KERNEL_STACK_OFFSET
@ 2015-02-26 23:52 Andy Lutomirski
  2015-02-27  0:07 ` [RFC 1/3] x86: Add this_cpu_sp0() to read sp0 for the current cpu Andy Lutomirski
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Andy Lutomirski @ 2015-02-26 23:52 UTC (permalink / raw)
  To: Denys Vlasenko, linux-kernel; +Cc: x86, Borislav Petkov, Andy Lutomirski

Denys is right that KERNEL_STACK_OFFSET is a mess.  Let's start fixing
it.

This removes all C code that *reads* kernel_stack.  It also fixes the
KERNEL_STACK_OFFSET abomination in ia32_sysenter_target.

It does not fix the KERNEL_STACK_OFFSET abomination in GET_THREAD_INFO
and THREAD_INFO.  I think that should be its own patch.

It also doesn't change the two syscall targets.  To fix them, we should
make a decision.  Either we should make KERNEL_STACK_OFFSET have the
correct nonzero value to save an instruction or we should get rid of
kernel_stack entirely.

Andy Lutomirski (3):
  x86: Add this_cpu_sp0() to read sp0 for the current cpu
  x86: Switch all C consumers of kernel_stack to this_cpu_sp0
  x86, asm: Change the 32-bit sysenter code to use sp0

 arch/x86/ia32/ia32entry.S          | 3 +--
 arch/x86/include/asm/processor.h   | 5 +++++
 arch/x86/include/asm/thread_info.h | 3 +--
 arch/x86/kernel/asm-offsets_64.c   | 1 +
 arch/x86/kernel/traps.c            | 2 +-
 arch/x86/lguest/boot.c             | 1 +
 arch/x86/xen/enlighten.c           | 1 +
 7 files changed, 11 insertions(+), 5 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-03-04 22:20 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 23:52 [RFC 0/3] Baby steps toward cleaning up KERNEL_STACK_OFFSET Andy Lutomirski
2015-02-27  0:07 ` [RFC 1/3] x86: Add this_cpu_sp0() to read sp0 for the current cpu Andy Lutomirski
2015-03-04  8:02   ` Ingo Molnar
2015-03-04 18:51     ` Andy Lutomirski
2015-03-04 20:39       ` Ingo Molnar
2015-03-04 20:41         ` Andy Lutomirski
2015-03-04 21:05           ` Borislav Petkov
2015-03-04 22:12           ` Ingo Molnar
2015-03-04 22:20             ` Andy Lutomirski
2015-02-27  0:07 ` [RFC 2/3] x86: Switch all C consumers of kernel_stack to this_cpu_sp0 Andy Lutomirski
2015-02-27 16:13   ` Denys Vlasenko
2015-02-27 19:56     ` Andy Lutomirski
2015-02-27 21:11       ` Denys Vlasenko
2015-02-27 22:39         ` Andy Lutomirski
2015-02-27 16:52   ` Denys Vlasenko
2015-02-27 20:02     ` Andy Lutomirski
2015-02-27  0:07 ` [RFC 3/3] x86, asm: Change the 32-bit sysenter code to use sp0 Andy Lutomirski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome