From: "H. Peter Anvin" <hpa@zytor.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Roland McGrath <roland@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: x86: get rid of the insane TIF_ABI_PENDING bit
Date: Mon, 15 Feb 2010 08:23:19 -0800 [thread overview]
Message-ID: <4B7974F7.1030105@zytor.com> (raw)
In-Reply-To: <20100215161752.GA19962@redhat.com>
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.
next prev parent reply other threads:[~2010-02-15 16:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-15 16:17 Oleg Nesterov
2010-02-15 16:23 ` H. Peter Anvin [this message]
2010-02-15 16:50 ` Oleg Nesterov
2010-02-15 18:06 ` H. Peter Anvin
2010-02-15 18:52 ` Oleg Nesterov
2010-02-15 19:07 ` H. Peter Anvin
2010-02-15 19:10 ` H. Peter Anvin
2010-02-15 19:41 ` Roland McGrath
2010-02-15 20:07 ` H. Peter Anvin
2010-02-15 21:14 ` Roland McGrath
2010-02-15 20:43 ` H. Peter Anvin
2010-02-15 21:05 ` Roland McGrath
2010-02-16 10:19 ` Oleg Nesterov
2010-02-16 10:23 ` Andi Kleen
2010-02-16 14:01 ` [PATCH 0/3] Was: " Oleg Nesterov
2010-02-16 14:02 ` [PATCH 1/3] x86: set_personality_ia32() misses force_personality32 Oleg Nesterov
2010-02-16 23:27 ` [tip:x86/urgent] " tip-bot for Oleg Nesterov
2010-02-16 14:02 ` [PATCH 2/3] x86: set_personality_ia32() abuses TS_COMPAT Oleg Nesterov
2010-02-16 15:40 ` Linus Torvalds
2010-02-16 17:16 ` Oleg Nesterov
2010-02-16 17:38 ` H. Peter Anvin
2010-02-16 17:44 ` Oleg Nesterov
2010-02-16 17:51 ` H. Peter Anvin
2010-02-17 15:40 ` Oleg Nesterov
2010-02-16 18:43 ` Linus Torvalds
2010-02-16 14:03 ` [PATCH 3/3] x86: ELF_PLAT_INIT() shouldn't worry about TIF_IA32 Oleg Nesterov
2010-02-16 14:24 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B7974F7.1030105@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=roland@redhat.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome