lkml.org 
[lkml]   [2002]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: PATCH: Add sys/personality (Re: Personality)
On Tue, Jul 16, 2002 at 09:16:48PM +0200, Carsten Langgaard wrote:
> Thanks.
> Now that we are at it, what should personality return in case it's called with a
> value, which isn't defined in the personality.h file.
> Should it return -EINVAL ?
> I don't think, that is the case at the moment, I believe you can set personality
> to anything.
>

Like this?


H.J.
---
--- kernel/exec_domain.c.per Mon Jun 10 10:05:27 2002
+++ kernel/exec_domain.c Tue Jul 16 19:06:13 2002
@@ -223,7 +223,8 @@ sys_personality(u_long personality)

if (personality != 0xffffffff) {
set_personality(personality);
- if (current->personality != personality)
+ if (personality < current->exec_domain->pers_low
+ || personality > current->exec_domain->pers_high)
return -EINVAL;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.025 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site