x86/compat: remove is_compat_task()
authorAndy Lutomirski <luto@kernel.org>
Tue, 22 Mar 2016 21:25:27 +0000 (14:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2016 22:36:02 +0000 (15:36 -0700)
x86's is_compat_task always checked the current syscall type, not the
task type.  It has no non-arch users any more, so just remove it to
avoid confusion.

On x86, nothing should really be checking the task ABI.  There are
legitimate users for the syscall ABI and for the mm ABI.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/include/asm/compat.h
arch/x86/include/asm/ftrace.h
arch/x86/kernel/process_64.c

index acdee09228b30e020332f0beb7e55e58e65b718e..ebb102e1bbc7ad84cff580de23380becbe900ed1 100644 (file)
@@ -316,9 +316,10 @@ static inline bool is_x32_task(void)
        return false;
 }
 
-static inline bool is_compat_task(void)
+static inline bool in_compat_syscall(void)
 {
        return is_ia32_task() || is_x32_task();
 }
+#define in_compat_syscall in_compat_syscall    /* override the generic impl */
 
 #endif /* _ASM_X86_COMPAT_H */
index 24938852db3013e0290df0b2ff77c2aafeff73d3..21b66dbf3601aebdd7c9b00927ff184a8ea03159 100644 (file)
@@ -58,7 +58,7 @@ int ftrace_int3_handler(struct pt_regs *regs);
 #define ARCH_TRACE_IGNORE_COMPAT_SYSCALLS 1
 static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs)
 {
-       if (is_compat_task())
+       if (in_compat_syscall())
                return true;
        return false;
 }
index 776229e98202f32dedd96642e03509e516945760..dfa2781610e8e435953bd09f5b1e51b8ee5e103a 100644 (file)
@@ -478,7 +478,7 @@ void set_personality_ia32(bool x32)
                if (current->mm)
                        current->mm->context.ia32_compat = TIF_X32;
                current->personality &= ~READ_IMPLIES_EXEC;
-               /* is_compat_task() uses the presence of the x32
+               /* in_compat_syscall() uses the presence of the x32
                   syscall bit flag to determine compat status */
                current_thread_info()->status &= ~TS_COMPAT;
        } else {