Skip to content

Commit ccaaaf6

Browse files
committed
Merge tag 'mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/daveh/x86-mpx
Pull x86 MPX removal from Dave Hansen: "MPX requires recompiling applications, which requires compiler support. Unfortunately, GCC 9.1 is expected to be be released without support for MPX. This means that there was only a relatively small window where folks could have ever used MPX. It failed to gain wide adoption in the industry, and Linux was the only mainstream OS to ever support it widely. Support for the feature may also disappear on future processors. This set completes the process that we started during the 5.4 merge window when the MPX prctl()s were removed. XSAVE support is left in place, which allows MPX-using KVM guests to continue to function" * tag 'mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/daveh/x86-mpx: x86/mpx: remove MPX from arch/x86 mm: remove arch_bprm_mm_init() hook x86/mpx: remove bounds exception code x86/mpx: remove build infrastructure x86/alternatives: add missing insn.h include
2 parents 35c222f + 45fc24e commit ccaaaf6

24 files changed

Lines changed: 2 additions & 1697 deletions

File tree

‎Documentation/x86/intel_mpx.rst‎

Lines changed: 0 additions & 252 deletions
This file was deleted.

‎arch/powerpc/include/asm/mmu_context.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,6 @@ static inline void arch_unmap(struct mm_struct *mm,
238238
mm->context.vdso_base = 0;
239239
}
240240

241-
static inline void arch_bprm_mm_init(struct mm_struct *mm,
242-
struct vm_area_struct *vma)
243-
{
244-
}
245-
246241
#ifdef CONFIG_PPC_MEM_KEYS
247242
bool arch_vma_access_permitted(struct vm_area_struct *vma, bool write,
248243
bool execute, bool foreign);

‎arch/um/include/asm/mmu_context.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ static inline void arch_unmap(struct mm_struct *mm,
2525
unsigned long start, unsigned long end)
2626
{
2727
}
28-
static inline void arch_bprm_mm_init(struct mm_struct *mm,
29-
struct vm_area_struct *vma)
30-
{
31-
}
32-
3328
static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
3429
bool write, bool execute, bool foreign)
3530
{

‎arch/unicore32/include/asm/mmu_context.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ static inline void arch_unmap(struct mm_struct *mm,
8989
{
9090
}
9191

92-
static inline void arch_bprm_mm_init(struct mm_struct *mm,
93-
struct vm_area_struct *vma)
94-
{
95-
}
96-
9792
static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
9893
bool write, bool execute, bool foreign)
9994
{

‎arch/x86/Kconfig‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,34 +1888,6 @@ config X86_UMIP
18881888
specific cases in protected and virtual-8086 modes. Emulated
18891889
results are dummy.
18901890

1891-
config X86_INTEL_MPX
1892-
prompt "Intel MPX (Memory Protection Extensions)"
1893-
def_bool n
1894-
# Note: only available in 64-bit mode due to VMA flags shortage
1895-
depends on CPU_SUP_INTEL && X86_64
1896-
select ARCH_USES_HIGH_VMA_FLAGS
1897-
---help---
1898-
MPX provides hardware features that can be used in
1899-
conjunction with compiler-instrumented code to check
1900-
memory references. It is designed to detect buffer
1901-
overflow or underflow bugs.
1902-
1903-
This option enables running applications which are
1904-
instrumented or otherwise use MPX. It does not use MPX
1905-
itself inside the kernel or to protect the kernel
1906-
against bad memory references.
1907-
1908-
Enabling this option will make the kernel larger:
1909-
~8k of kernel text and 36 bytes of data on a 64-bit
1910-
defconfig. It adds a long to the 'mm_struct' which
1911-
will increase the kernel memory overhead of each
1912-
process and adds some branches to paths used during
1913-
exec() and munmap().
1914-
1915-
For details, see Documentation/x86/intel_mpx.rst
1916-
1917-
If unsure, say N.
1918-
19191891
config X86_INTEL_MEMORY_PROTECTION_KEYS
19201892
prompt "Intel Memory Protection Keys"
19211893
def_bool y

‎arch/x86/include/asm/bugs.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66

77
extern void check_bugs(void);
88

9-
#if defined(CONFIG_CPU_SUP_INTEL)
10-
void check_mpx_erratum(struct cpuinfo_x86 *c);
11-
#else
12-
static inline void check_mpx_erratum(struct cpuinfo_x86 *c) {}
13-
#endif
14-
159
#if defined(CONFIG_CPU_SUP_INTEL) && defined(CONFIG_X86_32)
1610
int ppro_with_ram_bug(void);
1711
#else

‎arch/x86/include/asm/disabled-features.h‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
* cpu_feature_enabled().
1111
*/
1212

13-
#ifdef CONFIG_X86_INTEL_MPX
14-
# define DISABLE_MPX 0
15-
#else
16-
# define DISABLE_MPX (1<<(X86_FEATURE_MPX & 31))
17-
#endif
18-
1913
#ifdef CONFIG_X86_SMAP
2014
# define DISABLE_SMAP 0
2115
#else
@@ -74,7 +68,7 @@
7468
#define DISABLED_MASK6 0
7569
#define DISABLED_MASK7 (DISABLE_PTI)
7670
#define DISABLED_MASK8 0
77-
#define DISABLED_MASK9 (DISABLE_MPX|DISABLE_SMAP)
71+
#define DISABLED_MASK9 (DISABLE_SMAP)
7872
#define DISABLED_MASK10 0
7973
#define DISABLED_MASK11 0
8074
#define DISABLED_MASK12 0

‎arch/x86/include/asm/mmu.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ typedef struct {
5050
u16 pkey_allocation_map;
5151
s16 execute_only_pkey;
5252
#endif
53-
#ifdef CONFIG_X86_INTEL_MPX
54-
/* address of the bounds directory */
55-
void __user *bd_addr;
56-
#endif
5753
} mm_context_t;
5854

5955
#define INIT_MM_CONTEXT(mm) \

0 commit comments

Comments
 (0)