diff options
author | Andy Lutomirski <luto@amacapital.net> | 2015-02-24 19:01:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-02-25 02:27:50 -0500 |
commit | 72c6fb4f74b6b3797f5b1abd6944d7a1d2adbf04 (patch) | |
tree | c3d6cf7e1f69916cca017cebc7ea45297079476e /arch/x86 | |
parent | 08571f1ae327bfb631cb7171bde5ea605df626c6 (diff) |
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/process_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 5a2c02913af3..936d43461dca 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, | |||
207 | */ | 207 | */ |
208 | if (clone_flags & CLONE_SETTLS) { | 208 | if (clone_flags & CLONE_SETTLS) { |
209 | #ifdef CONFIG_IA32_EMULATION | 209 | #ifdef CONFIG_IA32_EMULATION |
210 | if (test_thread_flag(TIF_IA32)) | 210 | if (is_ia32_task()) |
211 | err = do_set_thread_area(p, -1, | 211 | err = do_set_thread_area(p, -1, |
212 | (struct user_desc __user *)childregs->si, 0); | 212 | (struct user_desc __user *)childregs->si, 0); |
213 | else | 213 | else |