Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180048
b: refs/heads/master
c: 05d43ed
h: refs/heads/master
v: v3
  • Loading branch information
H. Peter Anvin authored and Linus Torvalds committed Jan 29, 2010
1 parent ea2331c commit 25a5784
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 221af7f87b97431e3ee21ce4b0e77d5411cf1549
refs/heads/master: 05d43ed8a89c159ff641d472f970e3f1baa66318
1 change: 0 additions & 1 deletion trunk/arch/x86/ia32/ia32_aout.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
/* OK, This is the point of no return */
set_personality(PER_LINUX);
set_thread_flag(TIF_IA32);
clear_thread_flag(TIF_ABI_PENDING);

setup_new_exec(bprm);

Expand Down
10 changes: 2 additions & 8 deletions trunk/arch/x86/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,8 @@ do { \
void start_thread_ia32(struct pt_regs *regs, u32 new_ip, u32 new_sp);
#define compat_start_thread start_thread_ia32

#define COMPAT_SET_PERSONALITY(ex) \
do { \
if (test_thread_flag(TIF_IA32)) \
clear_thread_flag(TIF_ABI_PENDING); \
else \
set_thread_flag(TIF_ABI_PENDING); \
current->personality |= force_personality32; \
} while (0)
void set_personality_ia32(void);
#define COMPAT_SET_PERSONALITY(ex) set_personality_ia32()

#define COMPAT_ELF_PLATFORM ("i686")

Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ struct thread_info {
#define TIF_NOTSC 16 /* TSC is not accessible in userland */
#define TIF_IA32 17 /* 32bit process */
#define TIF_FORK 18 /* ret_from_fork */
#define TIF_ABI_PENDING 19
#define TIF_MEMDIE 20
#define TIF_DEBUG 21 /* uses debug registers */
#define TIF_IO_BITMAP 22 /* uses I/O bitmap */
Expand All @@ -112,7 +111,6 @@ struct thread_info {
#define _TIF_NOTSC (1 << TIF_NOTSC)
#define _TIF_IA32 (1 << TIF_IA32)
#define _TIF_FORK (1 << TIF_FORK)
#define _TIF_ABI_PENDING (1 << TIF_ABI_PENDING)
#define _TIF_DEBUG (1 << TIF_DEBUG)
#define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
#define _TIF_FREEZE (1 << TIF_FREEZE)
Expand Down
12 changes: 0 additions & 12 deletions trunk/arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,6 @@ void flush_thread(void)
{
struct task_struct *tsk = current;

#ifdef CONFIG_X86_64
if (test_tsk_thread_flag(tsk, TIF_ABI_PENDING)) {
clear_tsk_thread_flag(tsk, TIF_ABI_PENDING);
if (test_tsk_thread_flag(tsk, TIF_IA32)) {
clear_tsk_thread_flag(tsk, TIF_IA32);
} else {
set_tsk_thread_flag(tsk, TIF_IA32);
current_thread_info()->status |= TS_COMPAT;
}
}
#endif

flush_ptrace_hw_breakpoint(tsk);
memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
/*
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 25a5784

Please sign in to comment.