Re: [PATCH] powerpc: fix personality handling in ppc64_personality()

2012-08-01 Thread Andreas Schwab
Jiri Kosina writes: > if (personality(current->personality) == PER_LINUX32 > - && personality == PER_LINUX) > - personality = PER_LINUX32; > + && personality(personality) == PER_LINUX) > + personality &= ~PER_LINUX | PER_LINUX32; That doesn't work.

[PATCH] powerpc: fix personality handling in ppc64_personality()

2012-08-01 Thread Jiri Kosina
Directly comparing current->personality against PER_LINUX32 doesn't work in cases when any of the personality flags stored in the top three bytes are used. Directly forcefully setting personality to PER_LINUX32 or PER_LINUX discards any flags stored in the top three bytes Use personality() macr