Skip to contentSkip to conversation

x86 - hide X86_VM_MASK from userland programs v3

PATCH In review Cyrill Gorcunov 2 participants 2 messages Apr 29, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86 - hide X86_VM_MASK from userland programs v3

X86_VM_MASK is kernel specific flags so hide it from userland programs.

It should be defined *before* ptrace.h inclusion because of circular link between these files

---

David as you see we can't use existing CONFIG_VM86 for this purpose. But that is my fault - I was to check this before cooking the patch.

include/asm-x86/vm86.h +7 -6
Index: linux-2.6.git/include/asm-x86/vm86.h
===================================================================
@@ -14,12 +14,6 @@
 
 #include <asm/processor-flags.h>
 
-#ifdef CONFIG_VM86
-#define X86_VM_MASK	X86_EFLAGS_VM
-#else
-#define X86_VM_MASK	0 /* No VM86 support */
-#endif
-
 #define BIOSSEG		0x0f000
 
 #define CPU_086		0
@@ -133,6 +127,13 @@ struct vm86plus_struct {
 };
 
 #ifdef __KERNEL__
+
+#ifdef CONFIG_VM86
+#define X86_VM_MASK	X86_EFLAGS_VM
+#else
+#define X86_VM_MASK	0 /* No VM86 support */
+#endif
+
 /*
  * This is the (kernel) stack-layout when we have done a "SAVE_ALL" from vm86
  * mode - the main change is that the old segment descriptors aren't
#1 lore raw
Quoted 5 lines · Cyrill Gorcunov

X86_VM_MASK is kernel specific flags so hide it from userland programs.

It should be defined *before* ptrace.h inclusion because of circular link between these files

thanks Cyrill, applied.

Ingo