linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: x86: get rid of the insane TIF_ABI_PENDING bit
@ 2010-02-15 16:17 Oleg Nesterov
  2010-02-15 16:23 ` H. Peter Anvin
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Oleg Nesterov @ 2010-02-15 16:17 UTC (permalink / raw)
  To: H. Peter Anvin, Linus Torvalds, Roland McGrath; +Cc: linux-kernel

commit 05d43ed8a89c159ff641d472f970e3f1baa66318
Author: H. Peter Anvin <hpa@zytor.com>
Date:   Thu Jan 28 22:14:43 2010 -0800

> --- a/arch/x86/include/asm/elf.h
> +++ b/arch/x86/include/asm/elf.h
> @@ -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()

OK, but what about force_personality32? With this patch it becomes
unused?

> +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;

Can't understand why we need TS_COMPAT. I assume this is correct,
this was copied from flush_thread().

What TS_COMPAT actually means? I thought it just means "the task
is inside 32-bit syscall".

If a 64bit task execs a 32bit app, can't this TS_COMPAT break, say,
syscall_get_arguments() ?

Just curious, I don't really understand COMPAT issues anyway.

Oleg.


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2010-02-17 15:41 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-15 16:17 x86: get rid of the insane TIF_ABI_PENDING bit Oleg Nesterov
2010-02-15 16:23 ` H. Peter Anvin
2010-02-15 16:50   ` Oleg Nesterov
2010-02-15 18:06     ` H. Peter Anvin
2010-02-15 18:52       ` Oleg Nesterov
2010-02-15 19:07 ` H. Peter Anvin
2010-02-15 19:10 ` H. Peter Anvin
2010-02-15 19:41   ` Roland McGrath
2010-02-15 20:07     ` H. Peter Anvin
2010-02-15 21:14       ` Roland McGrath
2010-02-15 20:43     ` H. Peter Anvin
2010-02-15 21:05       ` Roland McGrath
2010-02-16 10:19       ` Oleg Nesterov
2010-02-16 10:23         ` Andi Kleen
2010-02-16 14:01           ` [PATCH 0/3] Was: " Oleg Nesterov
2010-02-16 14:02             ` [PATCH 1/3] x86: set_personality_ia32() misses force_personality32 Oleg Nesterov
2010-02-16 23:27               ` [tip:x86/urgent] " tip-bot for Oleg Nesterov
2010-02-16 14:02             ` [PATCH 2/3] x86: set_personality_ia32() abuses TS_COMPAT Oleg Nesterov
2010-02-16 15:40               ` Linus Torvalds
2010-02-16 17:16                 ` Oleg Nesterov
2010-02-16 17:38                   ` H. Peter Anvin
2010-02-16 17:44                 ` Oleg Nesterov
2010-02-16 17:51                   ` H. Peter Anvin
2010-02-17 15:40                     ` Oleg Nesterov
2010-02-16 18:43                   ` Linus Torvalds
2010-02-16 14:03             ` [PATCH 3/3] x86: ELF_PLAT_INIT() shouldn't worry about TIF_IA32 Oleg Nesterov
2010-02-16 14:24               ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).