Messages in this thread | | | Date | Tue, 16 Feb 2010 10:43:33 -0800 (PST) | From | Linus Torvalds <> | 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
| |