lkml.org 
[lkml]   [2010]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] sys_personality: make sure (int)personality >= 0
On 05/27, H. Peter Anvin wrote:
>
> On 05/27/2010 08:36 AM, Oleg Nesterov wrote:
> >
> > Change sys_personality() to ensure personality can not look like a
> > negative int. This disallows the MSB, it is not used for PER_ flags.
> >
> I'm fine with this, even though it is indeed there to support extremely
> poorly written applications (error is specifially -1, not < 0).

Completely agreed. I never liked this patch, just tried to discuss this
"problem" and report either ACK or NACK back to bugzilla.

Now I dislike it even more. I am not going to resend it, but I added
the fat note to the patch-v2 I am sending.

> However, since we almost certainly have enough brokenness in here, and
> since there definitely don't seem to be a whole lot of demand for new
> personality bits, I'm more than happy to waste bit 31 at not having to
> deal with it, ever.
>
> However, it would be better if we returned -EINVAL on attempts to set
> *any* of the reserved bits, not just bit 31.

If only I knew what is the supposed behaviour of sys_personality ;)

Another reason to forget this patch but add the "right" check if needed.

Oleg.



\
 
 \ /
  Last update: 2010-05-28 21:09    [W:0.075 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site