mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	peterz@infradead.org, luto@kernel.org, x86@kernel.org,
	torvalds@linux-foundation.org, akpm@linux-foundation.org
Subject: [PATCH 2/5] x86/mpx: remove build infrastructure
Date: Thu, 23 Jan 2020 11:05:00 -0800	[thread overview]
Message-ID: <20200123190500.9119F8F4@viggo.jf.intel.com> (raw)
In-Reply-To: <20200123190456.8E05ADE6@viggo.jf.intel.com>


From: Dave Hansen <dave.hansen@linux.intel.com>

MPX is being removed from the kernel due to a lack of support
in the toolchain going forward (gcc).

Remove the Kconfig option and the Makefile line.  This makes
arch/x86/mm/mpx.c and anything under an #ifdef for
X86_INTEL_MPX dead code.

Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: x86@kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
---

 b/arch/x86/Kconfig     |   28 ----------------------------
 b/arch/x86/mm/Makefile |    1 -
 2 files changed, 29 deletions(-)

diff -puN arch/x86/Kconfig~mpx-remove-build arch/x86/Kconfig
--- a/arch/x86/Kconfig~mpx-remove-build	2020-01-23 10:41:04.863942440 -0800
+++ b/arch/x86/Kconfig	2020-01-23 10:41:04.869942440 -0800
@@ -1896,34 +1896,6 @@ config X86_INTEL_UMIP
 	  specific cases in protected and virtual-8086 modes. Emulated
 	  results are dummy.
 
-config X86_INTEL_MPX
-	prompt "Intel MPX (Memory Protection Extensions)"
-	def_bool n
-	# Note: only available in 64-bit mode due to VMA flags shortage
-	depends on CPU_SUP_INTEL && X86_64
-	select ARCH_USES_HIGH_VMA_FLAGS
-	---help---
-	  MPX provides hardware features that can be used in
-	  conjunction with compiler-instrumented code to check
-	  memory references.  It is designed to detect buffer
-	  overflow or underflow bugs.
-
-	  This option enables running applications which are
-	  instrumented or otherwise use MPX.  It does not use MPX
-	  itself inside the kernel or to protect the kernel
-	  against bad memory references.
-
-	  Enabling this option will make the kernel larger:
-	  ~8k of kernel text and 36 bytes of data on a 64-bit
-	  defconfig.  It adds a long to the 'mm_struct' which
-	  will increase the kernel memory overhead of each
-	  process and adds some branches to paths used during
-	  exec() and munmap().
-
-	  For details, see Documentation/x86/intel_mpx.rst
-
-	  If unsure, say N.
-
 config X86_INTEL_MEMORY_PROTECTION_KEYS
 	prompt "Intel Memory Protection Keys"
 	def_bool y
diff -puN arch/x86/mm/Makefile~mpx-remove-build arch/x86/mm/Makefile
--- a/arch/x86/mm/Makefile~mpx-remove-build	2020-01-23 10:41:04.865942440 -0800
+++ b/arch/x86/mm/Makefile	2020-01-23 10:41:04.870942440 -0800
@@ -45,7 +45,6 @@ obj-$(CONFIG_AMD_NUMA)		+= amdtopology.o
 obj-$(CONFIG_ACPI_NUMA)		+= srat.o
 obj-$(CONFIG_NUMA_EMU)		+= numa_emulation.o
 
-obj-$(CONFIG_X86_INTEL_MPX)			+= mpx.o
 obj-$(CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS)	+= pkeys.o
 obj-$(CONFIG_RANDOMIZE_MEMORY)			+= kaslr.o
 obj-$(CONFIG_PAGE_TABLE_ISOLATION)		+= pti.o
_

  parent reply	other threads:[~2020-01-23 19:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 19:04 [PATCH 0/5] x86: finish the MPX removal process Dave Hansen
2020-01-23 19:04 ` [PATCH 1/5] x86/alternatives: add missing insn.h include Dave Hansen
2020-01-23 19:05 ` Dave Hansen [this message]
2020-01-23 19:05 ` [PATCH 3/5] x86/mpx: remove bounds exception code Dave Hansen
2020-01-23 19:05 ` [PATCH 4/5] mm: remove arch_bprm_mm_init() hook Dave Hansen
2020-01-23 19:05 ` [PATCH 5/5] x86/mpx: remove MPX from arch/x86 Dave Hansen
2020-01-23 19:26 ` [PATCH 0/5] x86: finish the MPX removal process Linus Torvalds
2020-01-23 20:26   ` Borislav Petkov
2020-01-23 21:23     ` Dave Hansen
2020-01-24  0:01       ` Linus Torvalds

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=20200123190500.9119F8F4@viggo.jf.intel.com \
    --to=dave.hansen@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.org \
    --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

all inboxes | Powered by JetHome®