diff options
-rw-r--r-- | arch/x86/include/asm/compat.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index e7f68b49c01a..355edc091604 100644 --- a/arch/x86/include/asm/compat.h +++ b/arch/x86/include/asm/compat.h | |||
@@ -235,12 +235,17 @@ static inline void __user *arch_compat_alloc_user_space(long len) | |||
235 | return (void __user *)round_down(sp - len, 16); | 235 | return (void __user *)round_down(sp - len, 16); |
236 | } | 236 | } |
237 | 237 | ||
238 | static inline bool is_compat_task(void) | 238 | static inline bool is_ia32_task(void) |
239 | { | 239 | { |
240 | #ifdef CONFIG_IA32_EMULATION | 240 | #ifdef CONFIG_IA32_EMULATION |
241 | if (current_thread_info()->status & TS_COMPAT) | 241 | if (current_thread_info()->status & TS_COMPAT) |
242 | return true; | 242 | return true; |
243 | #endif | 243 | #endif |
244 | return false; | ||
245 | } | ||
246 | |||
247 | static inline bool is_x32_task(void) | ||
248 | { | ||
244 | #ifdef CONFIG_X86_X32_ABI | 249 | #ifdef CONFIG_X86_X32_ABI |
245 | if (task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT) | 250 | if (task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT) |
246 | return true; | 251 | return true; |
@@ -248,4 +253,9 @@ static inline bool is_compat_task(void) | |||
248 | return false; | 253 | return false; |
249 | } | 254 | } |
250 | 255 | ||
256 | static inline bool is_compat_task(void) | ||
257 | { | ||
258 | return is_ia32_task() || is_x32_task(); | ||
259 | } | ||
260 | |||
251 | #endif /* _ASM_X86_COMPAT_H */ | 261 | #endif /* _ASM_X86_COMPAT_H */ |