Re: SET_PERSONALITY and TASK_SIZE

From: Benjamin Herrenschmidt
Date: Wed Jan 21 2009 - 22:28:59 EST



> However we should use the PER_MASK if we want to check for PER_LINUX32,
> since there are more bits in the personality flags. In case any of the
> 'extra' bits is set we may incorrectly set personality to PER_LINUX even
> when we want PER_LINUX32.
>
> Looks like more architectures should do something like:
>
> if (personality(current->personality) != PER_LINUX32)

If you do gitk mm/memory.c, and look at the first 2 or 3 commits from
Hugh near the botto,, I -think- they may explain why you no longer see
the use of TASK_SIZE in there, ie, we may have fixed that in 2.6.12...

So from that point of view, it's quite possible that we no longer need
to defer the personality switch, which would allow to simplify things
quite a bit on ppc64, unless there is some -other- reason here...

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/