public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86 - hide X86_VM_MASK from userland programs v3
@ 2008-04-29 18:10 Cyrill Gorcunov
  2008-04-29 20:56 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2008-04-29 18:10 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, David Woodhouse; +Cc: LKML

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

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

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.

Index: linux-2.6.git/include/asm-x86/vm86.h
===================================================================
--- linux-2.6.git.orig/include/asm-x86/vm86.h	2008-04-29 21:57:04.000000000 +0400
+++ linux-2.6.git/include/asm-x86/vm86.h	2008-04-29 21:59:15.000000000 +0400
@@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86 - hide X86_VM_MASK from userland programs v3
  2008-04-29 18:10 [PATCH] x86 - hide X86_VM_MASK from userland programs v3 Cyrill Gorcunov
@ 2008-04-29 20:56 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-04-29 20:56 UTC (permalink / raw)
  To: Cyrill Gorcunov; +Cc: H. Peter Anvin, David Woodhouse, LKML


* Cyrill Gorcunov <gorcunov@gmail.com> wrote:

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-29 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 18:10 [PATCH] x86 - hide X86_VM_MASK from userland programs v3 Cyrill Gorcunov
2008-04-29 20:56 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox