lkml.org 
[lkml]   [2015]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3.19 3/3] x86, mpx: Change the MPX enable/disable API to arch_prctl
On 01/05/2015 03:04 PM, Andy Lutomirski wrote:
> Anyway, if it's actually a problem to change it, I have no real
> problem keeping it, but I think we *really* need to validate the rest
> of the arguments at the very least.

If we "validate" the arguments like you suggested, then a call like this:

prctl(PR_MPX_DISABLE_MANAGEMENT);

ends up returning -EINVAL:

> prctl(0x2b /* PR_??? */, 0x7fffffd3, 0x7f360955e9e0, 0x2c, 0x7f3609314840) = -1 EINVAL (Invalid argument)

A quick grep through ltp and some other source I have laying around does
*not* show folks adding 0's to these calls for "empty" arguments. Is
this really something we want to do?

prctl(PR_MPX_DISABLE_MANAGEMENT, 0, 0, 0, 0);


\
 
 \ /
  Last update: 2015-01-08 00:41    [W:0.109 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site