x86, boot: Restrict CFLAGS for hostprogs
authorMatt Fleming <matt.fleming@intel.com>
Tue, 28 Feb 2012 13:37:23 +0000 (13:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2012 15:53:35 +0000 (08:53 -0700)
commitaa703cc83786fabab0058713a424d5201e29dde2
tree114b51d6f8a4a6351d292a75c8eaafff5e4b90db
parent24eba790c0dae612b499a77e736fb11cc8e81a9c
x86, boot: Restrict CFLAGS for hostprogs

commit d40f833630a1299fd377408dc8d8fac370d621b0 upstream.

Currently tools/build has access to all the kernel headers in
$(srctree). This is unnecessary and could potentially allow
tools/build to erroneously include kernel headers when it should only
be including userspace-exported headers.

Unfortunately, mkcpustr still needs access to some of the asm kernel
headers, so explicitly special case that hostprog.

Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1330436245-24875-5-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/boot/Makefile