From: "tip-bot for H. Peter Anvin" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
richard@nod.at, tglx@linutronix.de
Subject: [tip:x86/espfix] x86, espfix: Make espfix64 a Kconfig option, fix UML
Date: Sun, 4 May 2014 10:07:25 -0700 [thread overview]
Message-ID: <tip-197725de65477bc8509b41388157c1a2283542bb@git.kernel.org> (raw)
In-Reply-To: <1398816946-3351-1-git-send-email-hpa@linux.intel.com>
Commit-ID: 197725de65477bc8509b41388157c1a2283542bb
Gitweb: http://git.kernel.org/tip/197725de65477bc8509b41388157c1a2283542bb
Author: H. Peter Anvin <hpa@zytor.com>
AuthorDate: Sun, 4 May 2014 10:00:49 -0700
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Sun, 4 May 2014 10:00:49 -0700
x86, espfix: Make espfix64 a Kconfig option, fix UML
Make espfix64 a hidden Kconfig option. This fixes the x86-64 UML
build which had broken due to the non-existence of init_espfix_bsp()
in UML: since UML uses its own Kconfig, this option does not appear in
the UML build.
This also makes it possible to make support for 16-bit segments a
configuration option, for the people who want to minimize the size of
the kernel.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Richard Weinberger <richard@nod.at>
Link: http://lkml.kernel.org/r/1398816946-3351-1-git-send-email-hpa@linux.intel.com
---
arch/x86/Kconfig | 4 ++++
arch/x86/kernel/Makefile | 2 +-
arch/x86/kernel/smpboot.c | 2 +-
init/main.c | 2 +-
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 25d2c6f..9a952a5 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -914,6 +914,10 @@ config VM86
XFree86 to initialize some video cards via BIOS. Disabling this
option saves about 6k.
+config X86_ESPFIX64
+ def_bool y
+ depends on X86_64
+
config TOSHIBA
tristate "Toshiba Laptop support"
depends on X86_32
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 1cc3789..491ef3e 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -29,7 +29,7 @@ obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o
obj-y += syscall_$(BITS).o vsyscall_gtod.o
obj-$(CONFIG_X86_64) += vsyscall_64.o
obj-$(CONFIG_X86_64) += vsyscall_emu_64.o
-obj-$(CONFIG_X86_64) += espfix_64.o
+obj-$(CONFIG_X86_ESPFIX64) += espfix_64.o
obj-$(CONFIG_SYSFS) += ksysfs.o
obj-y += bootflag.o e820.o
obj-y += pci-dma.o quirks.o topology.o kdebugfs.o
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 61a5350..5d93ac1 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -246,7 +246,7 @@ static void notrace start_secondary(void *unused)
/*
* Enable the espfix hack for this CPU
*/
-#ifdef CONFIG_X86_64
+#ifdef CONFIG_X86_ESPFIX64
init_espfix_ap();
#endif
diff --git a/init/main.c b/init/main.c
index 70fc00e..58c132d 100644
--- a/init/main.c
+++ b/init/main.c
@@ -617,7 +617,7 @@ asmlinkage void __init start_kernel(void)
if (efi_enabled(EFI_RUNTIME_SERVICES))
efi_enter_virtual_mode();
#endif
-#ifdef CONFIG_X86_64
+#ifdef CONFIG_X86_ESPFIX64
/* Should be run before the first non-init thread is created */
init_espfix_bsp();
#endif
next prev parent reply other threads:[~2014-05-04 17:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 0:15 [PATCH] x86-64, espfix: Don't leak bits 31:16 of %esp returning to 16-bit stack H. Peter Anvin
2014-04-30 0:57 ` Linus Torvalds
2014-04-30 10:38 ` Borislav Petkov
2014-04-30 16:18 ` H. Peter Anvin
2014-04-30 16:33 ` H. Peter Anvin
2014-04-30 17:16 ` Borislav Petkov
2014-04-30 17:25 ` H. Peter Anvin
2014-04-30 21:18 ` [tip:x86/espfix] x86-64, espfix: Don't leak bits 31: 16 " tip-bot for H. Peter Anvin
2014-04-30 21:19 ` [tip:x86/espfix] x86-32, espfix: Remove filter for espfix32 due to race tip-bot for H. Peter Anvin
2014-05-04 17:07 ` tip-bot for H. Peter Anvin [this message]
2014-05-04 19:03 ` [tip:x86/espfix] x86, espfix: Make it possible do disable 16-bit support tip-bot for H. Peter Anvin
2014-05-04 19:30 ` [tip:x86/espfix] x86, espfix: Make it possible to " tip-bot for H. Peter Anvin
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=tip-197725de65477bc8509b41388157c1a2283542bb@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=richard@nod.at \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.