]> git.baikalelectronics.ru Git - kernel.git/commit
x86, mpx: Strictly enforce empty prctl() args
authorDave Hansen <dave.hansen@linux.intel.com>
Thu, 8 Jan 2015 22:30:22 +0000 (14:30 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 22 Jan 2015 20:11:06 +0000 (21:11 +0100)
commitc8a445c3667e5b1cc307defa1a616b6e31c32474
treee7f3076eac567e6004a4fbed458b1ecebaa4c843
parent8b50476406c948015778630a98a47c8bdb4ecc5a
x86, mpx: Strictly enforce empty prctl() args

Description from Michael Kerrisk.  He suggested an identical patch
to one I had already coded up and tested.

commit cff345aa3a9e "x86, mpx: On-demand kernel allocation of bounds
tables" added two new prctl() operations, PR_MPX_ENABLE_MANAGEMENT and
PR_MPX_DISABLE_MANAGEMENT.  However, no checks were included to ensure
that unused arguments are zero, as is done in many existing prctl()s
and as should be done for all new prctl()s. This patch adds the
required checks.

Suggested-by: Andy Lutomirski <luto@amacapital.net>
Suggested-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Hansen <dave@sr71.net>
Link: http://lkml.kernel.org/r/20150108223022.7F56FD13@viggo.jf.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/sys.c