lkml.org 
[lkml]   [2010]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2010-02-16 19:47    [W:0.066 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site