aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorDave Hansen <dave.hansen@linux.intel.com>2015-06-07 14:37:02 -0400
committerIngo Molnar <mingo@kernel.org>2015-06-09 06:24:30 -0400
commit46a6e0cf1c6665a8e867d8f7798d7a3538633f03 (patch)
tree85b142ed094594330ee5e170fc92463d432e9097 /kernel/sys.c
parenta84eeaa96b36a03188e1423349669c108d3a4bd7 (diff)
x86/mpx: Clean up the code by not passing a task pointer around when unnecessary
The MPX code can only work on the current task. You can not, for instance, enable MPX management in another process or thread. You can also not handle a fault for another process or thread. Despite this, we pass a task_struct around prolifically. This patch removes all of the task struct passing for code paths where the code can not deal with another task (which turns out to be all of them). This has no functional changes. It's just a cleanup. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Dave Hansen <dave@sr71.net> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: bp@alien8.de Link: http://lkml.kernel.org/r/20150607183702.6A81DA2C@viggo.jf.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index a4e372b798a5..8571296b7ddb 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -92,10 +92,10 @@
92# define SET_TSC_CTL(a) (-EINVAL) 92# define SET_TSC_CTL(a) (-EINVAL)
93#endif 93#endif
94#ifndef MPX_ENABLE_MANAGEMENT 94#ifndef MPX_ENABLE_MANAGEMENT
95# define MPX_ENABLE_MANAGEMENT(a) (-EINVAL) 95# define MPX_ENABLE_MANAGEMENT() (-EINVAL)
96#endif 96#endif
97#ifndef MPX_DISABLE_MANAGEMENT 97#ifndef MPX_DISABLE_MANAGEMENT
98# define MPX_DISABLE_MANAGEMENT(a) (-EINVAL) 98# define MPX_DISABLE_MANAGEMENT() (-EINVAL)
99#endif 99#endif
100#ifndef GET_FP_MODE 100#ifndef GET_FP_MODE
101# define GET_FP_MODE(a) (-EINVAL) 101# define GET_FP_MODE(a) (-EINVAL)
@@ -2230,12 +2230,12 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
2230 case PR_MPX_ENABLE_MANAGEMENT: 2230 case PR_MPX_ENABLE_MANAGEMENT:
2231 if (arg2 || arg3 || arg4 || arg5) 2231 if (arg2 || arg3 || arg4 || arg5)
2232 return -EINVAL; 2232 return -EINVAL;
2233 error = MPX_ENABLE_MANAGEMENT(me); 2233 error = MPX_ENABLE_MANAGEMENT();
2234 break; 2234 break;
2235 case PR_MPX_DISABLE_MANAGEMENT: 2235 case PR_MPX_DISABLE_MANAGEMENT:
2236 if (arg2 || arg3 || arg4 || arg5) 2236 if (arg2 || arg3 || arg4 || arg5)
2237 return -EINVAL; 2237 return -EINVAL;
2238 error = MPX_DISABLE_MANAGEMENT(me); 2238 error = MPX_DISABLE_MANAGEMENT();
2239 break; 2239 break;
2240 case PR_SET_FP_MODE: 2240 case PR_SET_FP_MODE:
2241 error = SET_FP_MODE(me, arg2); 2241 error = SET_FP_MODE(me, arg2);