From: tip-bot for Andy Lutomirski <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: dvlasenk@redhat.com, luto@amacapital.net, bp@alien8.de,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
mingo@kernel.org, hpa@zytor.com
Subject: [tip:x86/asm] x86/ia32-compat: Fix CLONE_SETTLS bitness of copy_thread()
Date: Wed, 25 Feb 2015 00:27:58 -0800 [thread overview]
Message-ID: <tip-72c6fb4f74b6b3797f5b1abd6944d7a1d2adbf04@git.kernel.org> (raw)
In-Reply-To: <45e2d0d695393d76406a0c7225b82c76223e0cc5.1424822291.git.luto@amacapital.net>
Commit-ID: 72c6fb4f74b6b3797f5b1abd6944d7a1d2adbf04
Gitweb: http://git.kernel.org/tip/72c6fb4f74b6b3797f5b1abd6944d7a1d2adbf04
Author: Andy Lutomirski <luto@amacapital.net>
AuthorDate: Tue, 24 Feb 2015 16:01:39 -0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 25 Feb 2015 08:27:50 +0100
x86/ia32-compat: Fix CLONE_SETTLS bitness of copy_thread()
CLONE_SETTLS is expected to write a TLS entry in the GDT for
32-bit callers and to set FSBASE for 64-bit callers.
The correct check is is_ia32_task(), which returns true in the
context of a 32-bit syscall. TIF_IA32 is set if the task itself
has a 32-bit personality, which is not the same thing.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Link: http://lkml.kernel.org/r/45e2d0d695393d76406a0c7225b82c76223e0cc5.1424822291.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/process_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 5a2c029..936d434 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -207,7 +207,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
*/
if (clone_flags & CLONE_SETTLS) {
#ifdef CONFIG_IA32_EMULATION
- if (test_thread_flag(TIF_IA32))
+ if (is_ia32_task())
err = do_set_thread_area(p, -1,
(struct user_desc __user *)childregs->si, 0);
else
prev parent reply other threads:[~2015-02-25 8:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 0:01 [PATCH 0/3] Some TIF_IA32 fixes Andy Lutomirski
2015-02-25 0:01 ` [PATCH 1/3] x86_64, entry: Remove a bogus ret_from_fork optimization Andy Lutomirski
2015-02-25 7:23 ` Ingo Molnar
2015-02-25 0:01 ` [PATCH 2/3] x86_64, ptrace: Remove checks for TIF_IA32 when changing cs and ss Andy Lutomirski
2015-02-25 8:27 ` [tip:x86/asm] x86/ptrace: Remove checks for TIF_IA32 when changing CS and SS tip-bot for Andy Lutomirski
2015-02-25 0:01 ` [PATCH 3/3] x86_64, copy_thread: Fix CLONE_SETTLS bitness Andy Lutomirski
2015-02-25 8:27 ` tip-bot for Andy Lutomirski [this message]
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=tip-72c6fb4f74b6b3797f5b1abd6944d7a1d2adbf04@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@alien8.de \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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