From: David Woodhouse Date: Wed, 13 Sep 2006 03:36:05 +0000 (-0700) Subject: [PATCH] headers_check: don't expose PFN stuff to userspace in X-Git-Tag: v2.6.18~13^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f01f0f052d1255dcdcf11d4872c4bca95e46b36c;p=linux-2.6 [PATCH] headers_check: don't expose PFN stuff to userspace in The header file doesn't exist in userspace and probably shouldn't -- but it's used unconditionally in . Protect it with #ifdef __KERNEL__ and move setup.h from $(header-y) to $(unifdef-y) in Kbuild accordingly. Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-i386/Kbuild b/include/asm-i386/Kbuild index 335b2fa4e0..2308190321 100644 --- a/include/asm-i386/Kbuild +++ b/include/asm-i386/Kbuild @@ -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 diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index f737e42302..2734909eff 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h @@ -6,6 +6,7 @@ #ifndef _i386_SETUP_H #define _i386_SETUP_H +#ifdef __KERNEL__ #include /* @@ -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