lkml.org 
[lkml]   [2010]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86: get rid of the insane TIF_ABI_PENDING bit
On 02/15/2010 08:17 AM, Oleg Nesterov wrote:
>
>> +void set_personality_ia32(void)
>> +{
>> + /* inherit personality from parent */
>> +
>> + /* Make sure to be in 32bit mode */
>> + set_thread_flag(TIF_IA32);
>> +
>> + /* Prepare the first "return" to user space */
>> + current_thread_info()->status |= TS_COMPAT;
>
> Can't understand why we need TS_COMPAT. I assume this is correct,
> this was copied from flush_thread().
>
> What TS_COMPAT actually means? I thought it just means "the task
> is inside 32-bit syscall".

Yes. In this case, though, it was a 64-bit syscall when the process did
the exec, but it needs to "return" as if it came from a 32-bit syscall;
that's why we set the TS_COMPAT bit.

> If a 64bit task execs a 32bit app, can't this TS_COMPAT break, say,
> syscall_get_arguments() ?
>

At that point (this is after the exec!) we don't get arguments anyway.

> Just curious, I don't really understand COMPAT issues anyway.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2010-02-15 17:27    [W:0.090 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site