[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1002161041130.4141@localhost.localdomain>
Date: Tue, 16 Feb 2010 10:43:33 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Oleg Nesterov <oleg@...hat.com>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Andi Kleen <andi@...stfloor.org>,
"H. Peter Anvin" <hpa@...or.com>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] x86: set_personality_ia32() abuses TS_COMPAT
On Tue, 16 Feb 2010, Oleg Nesterov wrote:
>
> and, following this logic, shouldn't set_personality_64bit() clear
> TS_COMPAT ?
Yes, I think it should. If we come from a 32-bit environment, and execute
a 64-bit binary, I think the execve() environment of the new 64-bit binary
should be _exactly_ the same as if it was executed from a 64-bit one.
Of course, it's entirely possible that TS_COMPAT simply doesn't matter at
all in either context, but I do think that we should strive for "the
binary does exactly the same regardless of whether it was started from
a 32-bit or a 64-bit binary".
And the best way to guarantee that is to make sure that we really do set
the environment to the same thing. So yes, set_personality_64bit() should
clear all the 32-bit compat bits.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists