x86/mpx: Clean up the code by not passing a task pointer around when unnecessary
authorDave Hansen <dave.hansen@linux.intel.com>
Sun, 7 Jun 2015 18:37:02 +0000 (11:37 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 9 Jun 2015 10:24:30 +0000 (12:24 +0200)
commit46a6e0cf1c6665a8e867d8f7798d7a3538633f03
tree85b142ed094594330ee5e170fc92463d432e9097
parenta84eeaa96b36a03188e1423349669c108d3a4bd7
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>
arch/x86/include/asm/mpx.h
arch/x86/include/asm/processor.h
arch/x86/kernel/traps.c
arch/x86/mm/mpx.c
kernel/sys.c