]> git.hungrycats.org Git - linux/commitdiff
x86/asm/entry/32: Fix user_mode() misuses
authorAndy Lutomirski <luto@amacapital.net>
Tue, 10 Mar 2015 00:42:31 +0000 (17:42 -0700)
committerZefan Li <lizefan@huawei.com>
Fri, 19 Jun 2015 03:40:26 +0000 (11:40 +0800)
commit 394838c96013ba414a24ffe7a2a593a9154daadf upstream.

The one in do_debug() is probably harmless, but better safe than sorry.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/d67deaa9df5458363623001f252d1aee3215d014.1425948056.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[lizf: Backported to 3.4: drop the change to do_bounds()]
Signed-off-by: Zefan Li <lizefan@huawei.com>
arch/x86/kernel/traps.c

index 9bfe95fda57c55014aab8d3fa67c7f66590ed246..adc049fef8ca1b117b0f53b8c5880b926574bfc3 100644 (file)
@@ -435,7 +435,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
         * then it's very likely the result of an icebp/int01 trap.
         * User wants a sigtrap for that.
         */
-       if (!dr6 && user_mode(regs))
+       if (!dr6 && user_mode_vm(regs))
                user_icebp = 1;
 
        /* Catch kmemcheck conditions first of all! */