Commit f240652b authored by Dave Hansen's avatar Dave Hansen Committed by Thomas Gleixner

x86/mpx: Remove MPX APIs

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

The first step is to remove the userspace-visible ABIs so that applications
will stop using it.  The most visible one are the enable/disable prctl()s.
Remove them first.

This is the most minimal and least invasive change needed to ensure that
apps stop using MPX with new kernels.
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190705175321.DB42F0AD@viggo.jf.intel.com
parent e28df79a
...@@ -181,7 +181,7 @@ struct prctl_mm_map { ...@@ -181,7 +181,7 @@ struct prctl_mm_map {
#define PR_GET_THP_DISABLE 42 #define PR_GET_THP_DISABLE 42
/* /*
* Tell the kernel to start/stop helping userspace manage bounds tables. * No longer implemented, but left here to ensure the numbers stay reserved:
*/ */
#define PR_MPX_ENABLE_MANAGEMENT 43 #define PR_MPX_ENABLE_MANAGEMENT 43
#define PR_MPX_DISABLE_MANAGEMENT 44 #define PR_MPX_DISABLE_MANAGEMENT 44
......
...@@ -103,12 +103,6 @@ ...@@ -103,12 +103,6 @@
#ifndef SET_TSC_CTL #ifndef SET_TSC_CTL
# define SET_TSC_CTL(a) (-EINVAL) # define SET_TSC_CTL(a) (-EINVAL)
#endif #endif
#ifndef MPX_ENABLE_MANAGEMENT
# define MPX_ENABLE_MANAGEMENT() (-EINVAL)
#endif
#ifndef MPX_DISABLE_MANAGEMENT
# define MPX_DISABLE_MANAGEMENT() (-EINVAL)
#endif
#ifndef GET_FP_MODE #ifndef GET_FP_MODE
# define GET_FP_MODE(a) (-EINVAL) # define GET_FP_MODE(a) (-EINVAL)
#endif #endif
...@@ -2456,15 +2450,9 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, ...@@ -2456,15 +2450,9 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
up_write(&me->mm->mmap_sem); up_write(&me->mm->mmap_sem);
break; break;
case PR_MPX_ENABLE_MANAGEMENT: case PR_MPX_ENABLE_MANAGEMENT:
if (arg2 || arg3 || arg4 || arg5)
return -EINVAL;
error = MPX_ENABLE_MANAGEMENT();
break;
case PR_MPX_DISABLE_MANAGEMENT: case PR_MPX_DISABLE_MANAGEMENT:
if (arg2 || arg3 || arg4 || arg5) /* No longer implemented: */
return -EINVAL; return -EINVAL;
error = MPX_DISABLE_MANAGEMENT();
break;
case PR_SET_FP_MODE: case PR_SET_FP_MODE:
error = SET_FP_MODE(me, arg2); error = SET_FP_MODE(me, arg2);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment