X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=arch%2Fx86%2Finclude%2Fasm%2Fcompat.h;h=7938b84e4506200c7f6afde771334cbff684c5d6;hb=fca460f95e928bae373daa8295877b6905bc62b8;hp=30d737ef2a421e4a457597ae92e28c045f390d0c;hpb=8f86f36284547fdd873769a5f190549f3ab69cca;p=mirror_ubuntu-zesty-kernel.git diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index 30d737ef2a42..7938b84e4506 100644 --- a/arch/x86/include/asm/compat.h +++ b/arch/x86/include/asm/compat.h @@ -7,6 +7,7 @@ #include #include #include +#include #define COMPAT_USER_HZ 100 #define COMPAT_UTS_MACHINE "i686\0\0" @@ -212,9 +213,17 @@ static inline void __user *arch_compat_alloc_user_space(long len) return (void __user *)regs->sp - len; } -static inline int is_compat_task(void) +static inline bool is_compat_task(void) { - return current_thread_info()->status & TS_COMPAT; +#ifdef CONFIG_IA32_EMULATION + if (current_thread_info()->status & TS_COMPAT) + return true; +#endif +#ifdef CONFIG_X86_X32_ABI + if (task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT) + return true; +#endif + return false; } #endif /* _ASM_X86_COMPAT_H */