Re: [PATCH v2] powerpc: fix personality handling inppc64_personality()

From: Jiri Kosina
Date: Thu Sep 06 2012 - 04:46:26 EST


On Thu, 6 Sep 2012, Benjamin Herrenschmidt wrote:

> > actually commit 7256a5d2da56 seems to contain the correct PER_LINUX
> > handling, so seems like you picked the right one :)
> >
>
> Odd, they looked different around the use of PER_MASK when I looked but

The original patch had

personality &= ~PER_LINUX | PER_LINUX32;

Which is bogus, exactly because ~PER_LINUX is -1.

I then used

personality = (personality & ~PER_MASK) | PER_LINUX32;

which is correct and perhaps a little bit more descriptive, and that is
what you have merged, so all is fine.

> I was tired & jet lagged, so I might have just had a brain fail...

Probably just missed that the first patch used PER_LINUX and the second
one PER_MASK, or whatever.

Anyway, thanks.

--
Jiri Kosina
SUSE Labs
--
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/