Merge git://git.kvack.org/~bcrl/aio-next
[pandora-kernel.git] / kernel / sys.c
index 1eaa2f0..a8c9f5a 100644 (file)
 #ifndef SET_TSC_CTL
 # define SET_TSC_CTL(a)                (-EINVAL)
 #endif
+#ifndef MPX_ENABLE_MANAGEMENT
+# define MPX_ENABLE_MANAGEMENT(a)      (-EINVAL)
+#endif
+#ifndef MPX_DISABLE_MANAGEMENT
+# define MPX_DISABLE_MANAGEMENT(a)     (-EINVAL)
+#endif
 
 /*
  * this is where the system-wide overflow UID and GID are defined, for
@@ -2203,6 +2209,12 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
                        me->mm->def_flags &= ~VM_NOHUGEPAGE;
                up_write(&me->mm->mmap_sem);
                break;
+       case PR_MPX_ENABLE_MANAGEMENT:
+               error = MPX_ENABLE_MANAGEMENT(me);
+               break;
+       case PR_MPX_DISABLE_MANAGEMENT:
+               error = MPX_DISABLE_MANAGEMENT(me);
+               break;
        default:
                error = -EINVAL;
                break;