Brendan Cully
2006-Dec-18 18:36 UTC
[Xen-devel] [PATCH] Disable GCC stack protection in kernel builds
# HG changeset patch # User Brendan Cully <brendan@cs.ubc.ca> # Date 1166470577 28800 # Node ID 18d9894cb78627cf743a2df98f29e22d3ffd7819 # Parent 469478194aef6e987f9281efbc0756749be6eb80 Disable GCC stack protection in kernel builds. Without this flag, the kernel won''t build on Ubuntu 6.10. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca> diff -r 469478194aef -r 18d9894cb786 patches/linux-2.6.16.33/gcc-no-stack-protection-flag.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/linux-2.6.16.33/gcc-no-stack-protection-flag.patch Mon Dec 18 11:36:17 2006 -0800 @@ -0,0 +1,12 @@ +--- ../pristine-linux-2.6.16.33/Makefile 2006-12-06 14:06:45.000000000 -0800 ++++ ./Makefile 2006-12-06 14:07:32.000000000 -0800 +@@ -533,6 +533,9 @@ + # disable pointer signedness warnings in gcc 4.0 + CFLAGS += $(call cc-option,-Wno-pointer-sign,) + ++# disable stack protection ++CFLAGS += $(call cc-option,-fno-stack-protector,) ++ + # Default kernel image to build when no specific target is given. + # KBUILD_IMAGE may be overruled on the commandline or + # set in the environment diff -r 469478194aef -r 18d9894cb786 patches/linux-2.6.16.33/series --- a/patches/linux-2.6.16.33/series Mon Dec 18 00:14:40 2006 +0000 +++ b/patches/linux-2.6.16.33/series Mon Dec 18 11:36:17 2006 -0800 @@ -8,6 +8,7 @@ device_bind.patch device_bind.patch fix-hz-suspend.patch fix-ide-cd-pio-mode.patch +gcc-no-stack-protection-flag.patch i386-mach-io-check-nmi.patch ipv6-no-autoconf.patch net-csum.patch _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Brendan Cully
2007-Jan-09 21:31 UTC
Re: [Xen-devel] [PATCH] Disable GCC stack protection in kernel builds
Any comments? It should be obsoleted by a newer upstream kernel, but it''s convenient in the mean time. On Monday, 18 December 2006 at 11:36, Brendan Cully wrote:> # HG changeset patch > # User Brendan Cully <brendan@cs.ubc.ca> > # Date 1166470577 28800 > # Node ID 18d9894cb78627cf743a2df98f29e22d3ffd7819 > # Parent 469478194aef6e987f9281efbc0756749be6eb80 > Disable GCC stack protection in kernel builds. > Without this flag, the kernel won''t build on Ubuntu 6.10. > > Signed-off-by: Brendan Cully <brendan@cs.ubc.ca> > > diff -r 469478194aef -r 18d9894cb786 patches/linux-2.6.16.33/gcc-no-stack-protection-flag.patch > +++ b/patches/linux-2.6.16.33/gcc-no-stack-protection-flag.patch Mon Dec 18 11:36:17 2006 -0800 > @@ -0,0 +1,12 @@ > +--- ../pristine-linux-2.6.16.33/Makefile 2006-12-06 14:06:45.000000000 -0800 > ++++ ./Makefile 2006-12-06 14:07:32.000000000 -0800 > +@@ -533,6 +533,9 @@ > + # disable pointer signedness warnings in gcc 4.0 > + CFLAGS += $(call cc-option,-Wno-pointer-sign,) > + > ++# disable stack protection > ++CFLAGS += $(call cc-option,-fno-stack-protector,) > ++ > + # Default kernel image to build when no specific target is given. > + # KBUILD_IMAGE may be overruled on the commandline or > + # set in the environment > diff -r 469478194aef -r 18d9894cb786 patches/linux-2.6.16.33/series > +++ b/patches/linux-2.6.16.33/series Mon Dec 18 11:36:17 2006 -0800 > @@ -8,6 +8,7 @@ device_bind.patch > device_bind.patch > fix-hz-suspend.patch > fix-ide-cd-pio-mode.patch > +gcc-no-stack-protection-flag.patch > i386-mach-io-check-nmi.patch > ipv6-no-autoconf.patch > net-csum.patch > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel