This patch renames VM_MASK to X86_VM_MASK (which
in turn defined as alias to X86_EFLAGS_VM) to better
distinguish from virtual memory flags. We can't just
use X86_EFLAGS_VM instead because it is also used
for conditional compilation
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Index: linux-2.6.git/arch/x86/kernel/traps_32.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/traps_32.c 2008-03-27 22:14:40.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/traps_32.c 2008-03-27 22:59:24.000000000 +0300
@@ -499,7 +499,7 @@ do_trap(int trapnr, int signr, char *str
{
struct task_struct *tsk = current;
- if (regs->flags & VM_MASK) {
+ if (regs->flags & X86_VM_MASK) {
if (vm86)
goto vm86_trap;
goto trap_signal;
Index: linux-2.6.git/arch/x86/mm/fault.c
===================================================================
--- linux-2.6.git.orig/arch/x86/mm/fault.c 2008-03-27 21:41:05.000000000 +0300
+++ linux-2.6.git/arch/x86/mm/fault.c 2008-03-27 23:00:40.000000000 +0300
@@ -667,7 +667,7 @@ void __kprobes do_page_fault(struct pt_r
#ifdef CONFIG_X86_32
/* It's safe to allow irq's after cr2 has been saved and the vmalloc
fault has been handled. */
- if (regs->flags & (X86_EFLAGS_IF|VM_MASK))
+ if (regs->flags & (X86_EFLAGS_IF | X86_VM_MASK))
local_irq_enable();
/*
Index: linux-2.6.git/include/asm-x86/ptrace.h
===================================================================
--- linux-2.6.git.orig/include/asm-x86/ptrace.h 2008-03-27 21:41:05.000000000 +0300
+++ linux-2.6.git/include/asm-x86/ptrace.h 2008-03-27 22:59:09.000000000 +0300
@@ -170,7 +170,7 @@ static inline int user_mode(struct pt_re
static inline int user_mode_vm(struct pt_regs *regs)
{
#ifdef CONFIG_X86_32
- return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & VM_MASK)) >=
+ return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & X86_VM_MASK)) >=
...