Re: [PATCH v2] parisc: fix personality flag check in copy_thread()

2012-08-02 Thread Jiri Kosina
On Thu, 2 Aug 2012, James Bottomley wrote: > > In case of parsic, let's take a process with current->personality == > > PER_LINUX32 callling personality(PER_LINUX | UNAME26). The > > > > if (personality(current->personality) == PER_LINUX32 > > && personality == PER_LINUX) > >

Re: [PATCH v2] parisc: fix personality flag check in copy_thread()

2012-08-02 Thread James Bottomley
On Thu, 2012-08-02 at 13:45 +0200, Jiri Kosina wrote: > On Thu, 2 Aug 2012, James Bottomley wrote: > > > > Directly comparing task_struct->personality against PER_* is not fully > > > correct, as it doesn't take flags potentially stored in top three bytes > > > into account. > > > > > > Analogica

Re: [PATCH v2] parisc: fix personality flag check in copy_thread()

2012-08-02 Thread Jiri Kosina
On Thu, 2 Aug 2012, James Bottomley wrote: > > Directly comparing task_struct->personality against PER_* is not fully > > correct, as it doesn't take flags potentially stored in top three bytes > > into account. > > > > Analogically, directly forcefully setting personality to PER_LINUX32 or > > P

Re: [PATCH v2] parisc: fix personality flag check in copy_thread()

2012-08-02 Thread James Bottomley
On Thu, 2012-08-02 at 09:12 +0200, Jiri Kosina wrote: > Directly comparing task_struct->personality against PER_* is not fully > correct, as it doesn't take flags potentially stored in top three bytes > into account. > > Analogically, directly forcefully setting personality to PER_LINUX32 or > PER

[PATCH v2] parisc: fix personality flag check in copy_thread()

2012-08-02 Thread Jiri Kosina
Directly comparing task_struct->personality against PER_* is not fully correct, as it doesn't take flags potentially stored in top three bytes into account. Analogically, directly forcefully setting personality to PER_LINUX32 or PER_LINUX discards any flags stored in the top three bytes. Signed-o