diff options
Diffstat (limited to 'arch/x86_64/mm/fault.c')
-rw-r--r-- | arch/x86_64/mm/fault.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index 3751b4788e28..a65fc6f1dcaf 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <linux/compiler.h> | 23 | #include <linux/compiler.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/kprobes.h> | 25 | #include <linux/kprobes.h> |
26 | #include <linux/uaccess.h> | ||
26 | 27 | ||
27 | #include <asm/system.h> | 28 | #include <asm/system.h> |
28 | #include <asm/uaccess.h> | ||
29 | #include <asm/pgalloc.h> | 29 | #include <asm/pgalloc.h> |
30 | #include <asm/smp.h> | 30 | #include <asm/smp.h> |
31 | #include <asm/tlbflush.h> | 31 | #include <asm/tlbflush.h> |
@@ -96,7 +96,7 @@ void bust_spinlocks(int yes) | |||
96 | static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr, | 96 | static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr, |
97 | unsigned long error_code) | 97 | unsigned long error_code) |
98 | { | 98 | { |
99 | unsigned char __user *instr; | 99 | unsigned char *instr; |
100 | int scan_more = 1; | 100 | int scan_more = 1; |
101 | int prefetch = 0; | 101 | int prefetch = 0; |
102 | unsigned char *max_instr; | 102 | unsigned char *max_instr; |
@@ -116,7 +116,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr, | |||
116 | unsigned char instr_hi; | 116 | unsigned char instr_hi; |
117 | unsigned char instr_lo; | 117 | unsigned char instr_lo; |
118 | 118 | ||
119 | if (__get_user(opcode, (char __user *)instr)) | 119 | if (probe_kernel_address(instr, opcode)) |
120 | break; | 120 | break; |
121 | 121 | ||
122 | instr_hi = opcode & 0xf0; | 122 | instr_hi = opcode & 0xf0; |
@@ -154,7 +154,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr, | |||
154 | case 0x00: | 154 | case 0x00: |
155 | /* Prefetch instruction is 0x0F0D or 0x0F18 */ | 155 | /* Prefetch instruction is 0x0F0D or 0x0F18 */ |
156 | scan_more = 0; | 156 | scan_more = 0; |
157 | if (__get_user(opcode, (char __user *)instr)) | 157 | if (probe_kernel_address(instr, opcode)) |
158 | break; | 158 | break; |
159 | prefetch = (instr_lo == 0xF) && | 159 | prefetch = (instr_lo == 0xF) && |
160 | (opcode == 0x0D || opcode == 0x18); | 160 | (opcode == 0x0D || opcode == 0x18); |
@@ -170,7 +170,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr, | |||
170 | static int bad_address(void *p) | 170 | static int bad_address(void *p) |
171 | { | 171 | { |
172 | unsigned long dummy; | 172 | unsigned long dummy; |
173 | return __get_user(dummy, (unsigned long __user *)p); | 173 | return probe_kernel_address((unsigned long *)p, dummy); |
174 | } | 174 | } |
175 | 175 | ||
176 | void dump_pagetable(unsigned long address) | 176 | void dump_pagetable(unsigned long address) |