diff options
author | Bobby Powers <bobbypowers@gmail.com> | 2012-02-25 23:25:38 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-02-25 23:42:18 -0500 |
commit | ce5f7a99df87918b5be4618a9386213a8e9a7146 (patch) | |
tree | 38e95ae1b9dae5b4149dd4fa0df42a7abed4e758 /arch/x86/kernel | |
parent | 3f21723079d3ff1c0f71790b4f7fbf9546856eb1 (diff) |
x32: Make sure TS_COMPAT is cleared for x32 tasks
If a process has a non-x32 ia32 personality and changes to x32, the
process would keep its TS_COMPAT flag. x32 uses the presence of the
x32 flag on a syscall to determine compat status, so make sure
TS_COMPAT is cleared.
Signed-off-by: Bobby Powers <bobbypowers@gmail.com>
Link: http://lkml.kernel.org/r/1330230338-25077-1-git-send-email-bobbypowers@gmail.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/process_64.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index a0701da2bd18..32e04120b2cd 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -540,6 +540,9 @@ void set_personality_ia32(bool x32) | |||
540 | clear_thread_flag(TIF_IA32); | 540 | clear_thread_flag(TIF_IA32); |
541 | set_thread_flag(TIF_X32); | 541 | set_thread_flag(TIF_X32); |
542 | current->personality &= ~READ_IMPLIES_EXEC; | 542 | current->personality &= ~READ_IMPLIES_EXEC; |
543 | /* is_compat_task() uses the presence of the x32 | ||
544 | syscall bit flag to determine compat status */ | ||
545 | current_thread_info()->status &= ~TS_COMPAT; | ||
543 | } else { | 546 | } else { |
544 | set_thread_flag(TIF_IA32); | 547 | set_thread_flag(TIF_IA32); |
545 | clear_thread_flag(TIF_X32); | 548 | clear_thread_flag(TIF_X32); |