Skip to content

Commit

Permalink
[PATCH] headers_check: don't expose PFN stuff to userspace in <asm-i3…
Browse files Browse the repository at this point in the history
…86/setup.h>

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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dwmw2 authored and Linus Torvalds committed Sep 13, 2006
1 parent 651c923 commit f01f0f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-i386/Kbuild
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions include/asm-i386/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
#ifndef _i386_SETUP_H
#define _i386_SETUP_H

#ifdef __KERNEL__
#include <linux/pfn.h>

/*
* Reserved space for vmalloc and iomap - defined in asm/page.h
*/
#define MAXMEM_PFN PFN_DOWN(MAXMEM)
#define MAX_NONPAE_PFN (1 << 20)
#endif

#define PARAM_SIZE 4096
#define COMMAND_LINE_SIZE 256
Expand Down

0 comments on commit f01f0f0

Please sign in to comment.