diff options
-rw-r--r-- | arch/x86/kernel/traps_32.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/vm86_32.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/fault.c | 2 | ||||
-rw-r--r-- | include/asm-x86/ptrace.h | 4 | ||||
-rw-r--r-- | include/asm-x86/vm86.h | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 3284502a1bf8..bb9107c56ff5 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -498,7 +498,7 @@ do_trap(int trapnr, int signr, char *str, int vm86, struct pt_regs *regs, | |||
498 | { | 498 | { |
499 | struct task_struct *tsk = current; | 499 | struct task_struct *tsk = current; |
500 | 500 | ||
501 | if (regs->flags & VM_MASK) { | 501 | if (regs->flags & X86_VM_MASK) { |
502 | if (vm86) | 502 | if (vm86) |
503 | goto vm86_trap; | 503 | goto vm86_trap; |
504 | goto trap_signal; | 504 | goto trap_signal; |
@@ -643,7 +643,7 @@ void __kprobes do_general_protection(struct pt_regs *regs, long error_code) | |||
643 | } | 643 | } |
644 | put_cpu(); | 644 | put_cpu(); |
645 | 645 | ||
646 | if (regs->flags & VM_MASK) | 646 | if (regs->flags & X86_VM_MASK) |
647 | goto gp_in_vm86; | 647 | goto gp_in_vm86; |
648 | 648 | ||
649 | if (!user_mode(regs)) | 649 | if (!user_mode(regs)) |
@@ -922,7 +922,7 @@ void __kprobes do_debug(struct pt_regs *regs, long error_code) | |||
922 | goto clear_dr7; | 922 | goto clear_dr7; |
923 | } | 923 | } |
924 | 924 | ||
925 | if (regs->flags & VM_MASK) | 925 | if (regs->flags & X86_VM_MASK) |
926 | goto debug_vm86; | 926 | goto debug_vm86; |
927 | 927 | ||
928 | /* Save debug status register where ptrace can see it */ | 928 | /* Save debug status register where ptrace can see it */ |
@@ -1094,7 +1094,7 @@ void do_simd_coprocessor_error(struct pt_regs *regs, long error_code) | |||
1094 | * Handle strange cache flush from user space exception | 1094 | * Handle strange cache flush from user space exception |
1095 | * in all other cases. This is undocumented behaviour. | 1095 | * in all other cases. This is undocumented behaviour. |
1096 | */ | 1096 | */ |
1097 | if (regs->flags & VM_MASK) { | 1097 | if (regs->flags & X86_VM_MASK) { |
1098 | handle_vm86_fault((struct kernel_vm86_regs *)regs, error_code); | 1098 | handle_vm86_fault((struct kernel_vm86_regs *)regs, error_code); |
1099 | return; | 1099 | return; |
1100 | } | 1100 | } |
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index 51040698c222..c866c00f4a85 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c | |||
@@ -299,7 +299,7 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk | |||
299 | VEFLAGS = info->regs.pt.flags; | 299 | VEFLAGS = info->regs.pt.flags; |
300 | info->regs.pt.flags &= SAFE_MASK; | 300 | info->regs.pt.flags &= SAFE_MASK; |
301 | info->regs.pt.flags |= info->regs32->flags & ~SAFE_MASK; | 301 | info->regs.pt.flags |= info->regs32->flags & ~SAFE_MASK; |
302 | info->regs.pt.flags |= VM_MASK; | 302 | info->regs.pt.flags |= X86_VM_MASK; |
303 | 303 | ||
304 | switch (info->cpu_type) { | 304 | switch (info->cpu_type) { |
305 | case CPU_286: | 305 | case CPU_286: |
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 81fcbeec3892..fd7e1798c75a 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -639,7 +639,7 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
639 | #ifdef CONFIG_X86_32 | 639 | #ifdef CONFIG_X86_32 |
640 | /* It's safe to allow irq's after cr2 has been saved and the vmalloc | 640 | /* It's safe to allow irq's after cr2 has been saved and the vmalloc |
641 | fault has been handled. */ | 641 | fault has been handled. */ |
642 | if (regs->flags & (X86_EFLAGS_IF|VM_MASK)) | 642 | if (regs->flags & (X86_EFLAGS_IF | X86_VM_MASK)) |
643 | local_irq_enable(); | 643 | local_irq_enable(); |
644 | 644 | ||
645 | /* | 645 | /* |
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h index e779f2b26b32..24ec061566c5 100644 --- a/include/asm-x86/ptrace.h +++ b/include/asm-x86/ptrace.h | |||
@@ -170,7 +170,7 @@ static inline int user_mode(struct pt_regs *regs) | |||
170 | static inline int user_mode_vm(struct pt_regs *regs) | 170 | static inline int user_mode_vm(struct pt_regs *regs) |
171 | { | 171 | { |
172 | #ifdef CONFIG_X86_32 | 172 | #ifdef CONFIG_X86_32 |
173 | return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & VM_MASK)) >= | 173 | return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & X86_VM_MASK)) >= |
174 | USER_RPL; | 174 | USER_RPL; |
175 | #else | 175 | #else |
176 | return user_mode(regs); | 176 | return user_mode(regs); |
@@ -180,7 +180,7 @@ static inline int user_mode_vm(struct pt_regs *regs) | |||
180 | static inline int v8086_mode(struct pt_regs *regs) | 180 | static inline int v8086_mode(struct pt_regs *regs) |
181 | { | 181 | { |
182 | #ifdef CONFIG_X86_32 | 182 | #ifdef CONFIG_X86_32 |
183 | return (regs->flags & VM_MASK); | 183 | return (regs->flags & X86_VM_MASK); |
184 | #else | 184 | #else |
185 | return 0; /* No V86 mode support in long mode */ | 185 | return 0; /* No V86 mode support in long mode */ |
186 | #endif | 186 | #endif |
diff --git a/include/asm-x86/vm86.h b/include/asm-x86/vm86.h index a2be241ed036..f5f3dc479c34 100644 --- a/include/asm-x86/vm86.h +++ b/include/asm-x86/vm86.h | |||
@@ -17,9 +17,9 @@ | |||
17 | #define IOPL_MASK 0x00003000 | 17 | #define IOPL_MASK 0x00003000 |
18 | #define NT_MASK 0x00004000 | 18 | #define NT_MASK 0x00004000 |
19 | #ifdef CONFIG_VM86 | 19 | #ifdef CONFIG_VM86 |
20 | #define VM_MASK 0x00020000 | 20 | #define X86_VM_MASK X86_EFLAGS_VM |
21 | #else | 21 | #else |
22 | #define VM_MASK 0 /* ignored */ | 22 | #define X86_VM_MASK 0 /* No VM86 support */ |
23 | #endif | 23 | #endif |
24 | #define AC_MASK 0x00040000 | 24 | #define AC_MASK 0x00040000 |
25 | #define VIF_MASK 0x00080000 /* virtual interrupt flag */ | 25 | #define VIF_MASK 0x00080000 /* virtual interrupt flag */ |