]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] headers_check: don't expose PFN stuff to userspace in <asm-i386/setup.h>
authorDavid Woodhouse <dwmw2@infradead.org>
Wed, 13 Sep 2006 03:36:05 +0000 (20:36 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 13 Sep 2006 14:32:16 +0000 (07:32 -0700)
The header file <linux/pfn.h> doesn't exist in userspace and probably
shouldn't -- but it's used unconditionally in <asm-i386/setup.h>.  Protect it
with #ifdef __KERNEL__ and move setup.h from $(header-y) to $(unifdef-y) in
Kbuild accordingly.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-i386/Kbuild
include/asm-i386/setup.h

index 335b2fa4e0666a46c00b7a270ff615c08cbd2d07..2308190321da053aa9af3e26d8c344b3ba696edb 100644 (file)
@@ -1,5 +1,5 @@
 include include/asm-generic/Kbuild.asm
 
-header-y += boot.h debugreg.h ldt.h setup.h ucontext.h
+header-y += boot.h debugreg.h ldt.h ucontext.h
 
-unifdef-y += mtrr.h vm86.h
+unifdef-y += mtrr.h setup.h vm86.h
index f737e423029ecb6570d3b5051688353abc45156b..2734909eff840f82b676b8ed8cb7ab208ea6a473 100644 (file)
@@ -6,6 +6,7 @@
 #ifndef _i386_SETUP_H
 #define _i386_SETUP_H
 
+#ifdef __KERNEL__
 #include <linux/pfn.h>
 
 /*
@@ -13,6 +14,7 @@
  */
 #define MAXMEM_PFN     PFN_DOWN(MAXMEM)
 #define MAX_NONPAE_PFN (1 << 20)
+#endif
 
 #define PARAM_SIZE 4096
 #define COMMAND_LINE_SIZE 256