[PATCH] x86_64: Implement is_compat_task the right way
By setting a flag during a 32bit system call only Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
2966387b48
commit
bf2fcc6fdf
6 changed files with 16 additions and 1 deletions
|
|
@ -202,4 +202,9 @@ static __inline__ void __user *compat_alloc_user_space(long len)
|
|||
return (void __user *)regs->rsp - len;
|
||||
}
|
||||
|
||||
static inline int is_compat_task(void)
|
||||
{
|
||||
return current_thread_info()->status & TS_COMPAT;
|
||||
}
|
||||
|
||||
#endif /* _ASM_X86_64_COMPAT_H */
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ static inline struct thread_info *stack_thread_info(void)
|
|||
* have to worry about atomic accesses.
|
||||
*/
|
||||
#define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */
|
||||
#define TS_COMPAT 0x0002 /* 32bit syscall active */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue