lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1413450350-20672-1-git-send-email-jarkko.sakkinen@linux.intel.com>
Date:	Thu, 16 Oct 2014 11:05:50 +0200
From:	Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>
Cc:	x86@...nel.org, linux-kernel@...r.kernel.org,
	Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Subject: [PATCH] arch/x86/realmode: make trampoline code conditional for x86-32

Trampoline code is only needed for SMP and in x86-64 for wakeup
code. Make it conditional in order to minimize the kernel size.
Added a new hidden config option CONFIG_X86_TRAMPOLINE as
suggested by H. Peter Anvin.

The justification for this patch is tinyfication effort run by
Josh Triplett. In embedded world a 32-bit processor without SMP
is not uncommon phenomenon.

I think the trampoline code could be completely ripped off if
ACPI_SLEEP and INTEL_TXT are not enabled but did not want to
include that yet into this patch.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
---
 arch/x86/Kconfig              |  4 ++++
 arch/x86/realmode/rm/Makefile | 10 +++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f2327e8..9603ca3 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2488,6 +2488,10 @@ config PMC_ATOM
 	def_bool y
         depends on PCI
 
+config X86_TRAMPOLINE
+	def_bool y
+	depends on X86_64 || SMP
+
 source "net/Kconfig"
 
 source "drivers/Kconfig"
diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile
index 7c0d7be..299e450 100644
--- a/arch/x86/realmode/rm/Makefile
+++ b/arch/x86/realmode/rm/Makefile
@@ -19,11 +19,11 @@ wakeup-objs	+= video-vga.o
 wakeup-objs	+= video-vesa.o
 wakeup-objs	+= video-bios.o
 
-realmode-y			+= header.o
-realmode-y			+= trampoline_$(BITS).o
-realmode-y			+= stack.o
-realmode-y			+= reboot.o
-realmode-$(CONFIG_ACPI_SLEEP)	+= $(wakeup-objs)
+realmode-y				+= header.o
+realmode-$(CONFIG_X86_TRAMPOLINE)	+= trampoline_$(BITS).o
+realmode-y				+= stack.o
+realmode-y				+= reboot.o
+realmode-$(CONFIG_ACPI_SLEEP)		+= $(wakeup-objs)
 
 targets	+= $(realmode-y)
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ