Re: vmsplice exploits, stack protector and Makefiles

From: Sam Ravnborg
Date: Thu Feb 14 2008 - 02:43:54 EST


> --- linux-2.6.24.2/arch/x86/kernel/Makefile_64 2008-01-24 23:58:37.000000000
> +0100
> +++ linux-2.6.24.2-pax/arch/x86/kernel/Makefile_64 2008-02-13
> 11:36:14.000000000 +0100
> @@ -42,4 +42,6 @@ obj-$(CONFIG_PCI) += early-quirks.o
> obj-y += topology.o
> obj-y += pcspeaker.o
>
> -CFLAGS_vsyscall_64.o := $(PROFILING) -g0
> +CFLAGS_vsyscall_64.o := $(PROFILING) -g0 -fno-stack-protector
> +CFLAGS_hpet.o := -fno-stack-protector
> +CFLAGS_tsc_64.o := -fno-stack-protector

We should use:
nostackp := $(call cc-option, -fno-stack-protector)
+CFLAGS_vsyscall_64.o := $(PROFILING) -g0 $(nostackp)
+CFLAGS_hpet.o := $(nostackp)
+CFLAGS_tsc_64.o := $(nostackp)

(or somthing similar)

because we cannot rely on that all gcc versions has support
for -fno-stack-protector

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/