diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-01-28 22:14:43 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-29 08:22:01 -0800 |
commit | 05d43ed8a89c159ff641d472f970e3f1baa66318 (patch) | |
tree | 78b6619e51bb77c2e5350a63b1b11c23a4a113e2 /arch/x86/kernel/process_64.c | |
parent | 221af7f87b97431e3ee21ce4b0e77d5411cf1549 (diff) | |
download | blackbird-op-linux-05d43ed8a89c159ff641d472f970e3f1baa66318.tar.gz blackbird-op-linux-05d43ed8a89c159ff641d472f970e3f1baa66318.zip |
x86: get rid of the insane TIF_ABI_PENDING bit
Now that the previous commit made it possible to do the personality
setting at the point of no return, we do just that for ELF binaries.
And suddenly all the reasons for that insane TIF_ABI_PENDING bit go
away, and we can just make SET_PERSONALITY() just do the obvious thing
for a 32-bit compat process.
Everything becomes much more straightforward this way.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r-- | arch/x86/kernel/process_64.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index f9e033150cdf..41a26a82470a 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -521,6 +521,17 @@ void set_personality_64bit(void) current->personality &= ~READ_IMPLIES_EXEC; } +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; +} + unsigned long get_wchan(struct task_struct *p) { unsigned long stack; |