From: Andy Lutomirski <luto@amacapital.net>
To: x86@kernel.org, linux-kernel@vger.kernel.org,
=Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>, Oleg Nesterov <oleg@redhat.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
Andy Lutomirski <luto@amacapital.net>
Subject: [PATCH v2 0/6] Baby steps toward cleaning up KERNEL_STACK_OFFSET
Date: Thu, 5 Mar 2015 19:19:01 -0800 [thread overview]
Message-ID: <cover.1425611534.git.luto@amacapital.net> (raw)
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.
Changes from v1:
- Fix missing export.
- Fix lguest code.
- Add more init_tss naming cleanups (Ingo's suggestion).
- Changelog improvements (Ingo).
- Improve the check in ist_begin_non_atomic (Denys).
Andy Lutomirski (6):
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
x86: Rename init_tss to cpu_tss
x86: Remove INIT_TSS and fold the definitions into cpu_tss
x86, asm: Rename INIT_TSS_IST to TSS_IST
arch/x86/ia32/ia32entry.S | 3 +--
arch/x86/include/asm/processor.h | 27 ++++++---------------------
arch/x86/include/asm/thread_info.h | 3 +--
arch/x86/kernel/asm-offsets_64.c | 1 +
arch/x86/kernel/cpu/common.c | 6 +++---
arch/x86/kernel/entry_64.S | 6 +++---
arch/x86/kernel/ioport.c | 2 +-
arch/x86/kernel/process.c | 23 +++++++++++++++++++++--
arch/x86/kernel/process_32.c | 2 +-
arch/x86/kernel/process_64.c | 2 +-
arch/x86/kernel/traps.c | 4 ++--
arch/x86/kernel/vm86_32.c | 4 ++--
arch/x86/lguest/boot.c | 1 +
arch/x86/power/cpu.c | 2 +-
arch/x86/xen/enlighten.c | 1 +
15 files changed, 46 insertions(+), 41 deletions(-)
--
2.1.0
next reply other threads:[~2015-03-06 3:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 3:19 Andy Lutomirski [this message]
2015-03-06 3:19 ` [PATCH v2 1/6] x86: Add this_cpu_sp0() to read sp0 for the current cpu Andy Lutomirski
2015-03-06 8:37 ` [tip:x86/asm] x86/asm/entry: " tip-bot for Andy Lutomirski
2015-03-06 3:19 ` [PATCH v2 2/6] x86: Switch all C consumers of kernel_stack to this_cpu_sp0 Andy Lutomirski
2015-03-06 8:38 ` [tip:x86/asm] x86/asm/entry: Switch all C consumers of kernel_stack to this_cpu_sp0() tip-bot for Andy Lutomirski
2015-03-06 3:19 ` [PATCH v2 3/6] x86, asm: Change the 32-bit sysenter code to use sp0 Andy Lutomirski
2015-03-06 8:38 ` [tip:x86/asm] x86/asm/entry/64/compat: " tip-bot for Andy Lutomirski
2015-03-06 3:19 ` [PATCH v2 4/6] x86: Rename init_tss to cpu_tss Andy Lutomirski
2015-03-06 8:38 ` [tip:x86/asm] x86/asm/entry: Rename 'init_tss' to 'cpu_tss' tip-bot for Andy Lutomirski
2015-03-06 3:19 ` [PATCH v2 5/6] x86: Remove INIT_TSS and fold the definitions into cpu_tss Andy Lutomirski
2015-03-06 8:39 ` [tip:x86/asm] x86/asm/entry: Remove INIT_TSS and fold the definitions into 'cpu_tss' tip-bot for Andy Lutomirski
2015-03-06 3:19 ` [PATCH v2 6/6] x86, asm: Rename INIT_TSS_IST to TSS_IST Andy Lutomirski
2015-03-06 7:30 ` Ingo Molnar
2015-03-06 8:39 ` [tip:x86/asm] x86/asm/entry: Rename 'INIT_TSS_IST' to ' CPU_TSS_IST' tip-bot for Andy Lutomirski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1425611534.git.luto@amacapital.net \
--to=luto@amacapital.net \
--cc=bp@alien8.de \
--cc=dvlasenk@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox