Propolice build patch

GapLo Ip <[email protected]>
Newsgroups gmane.linux.wolk.devel
Message-ID <[email protected]>
Hi Marc,

I have created a patch to turn on the
"-fstack-protector" flag during kernel compilation.
This patch is originated from
http://frogger974.homelinux.org/propolice/2.4.20-propolice-build.patch

Will you consider adding it to the upcoming WOLK ?

Regards,
Gary

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
propolice-build.patch (application/octet-stream, 5.5 KB)
*** ./arch/ppc/config.in.nossp	Thu Sep 18 22:27:07 2003
--- ./arch/ppc/config.in	Thu Sep 18 22:28:04 2003
***************
*** 130,135 ****
--- 130,138 ----
  if [ "$CONFIG_8xx" = "y" -o "$CONFIG_8260" = "y" ]; then
      define_bool CONFIG_EMBEDDEDBOOT y
  fi
+ 
+ # ProPolice build support (add -fstack-protector)
+ bool ' ProPolice stack smashing protection' CONFIG_PROPOLICE
  endmenu
  
  source arch/all/Config-TWEAKS.in
*** ./arch/ppc/Makefile.nossp	Thu Sep 18 22:25:47 2003
--- ./arch/ppc/Makefile	Thu Sep 18 22:26:38 2003
***************
*** 47,52 ****
--- 47,56 ----
    CFLAGS += $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
  endif
  
+ ifdef CONFIG_PROPOLICE
+ CFLAGS += -fstack-protector
+ endif
+ 
  ifdef CONFIG_4xx
    HEAD := arch/ppc/kernel/head_4xx.o
  else
*** ./arch/i386/config.in.nossp	Thu Sep 18 22:16:02 2003
--- ./arch/i386/config.in	Thu Sep 18 22:21:27 2003
***************
*** 499,504 ****
--- 499,506 ----
  fi
  endmenu
  
+ # ProPolice build support (add -fstack-protector)
+ bool ' ProPolice stack smashing protection' CONFIG_PROPOLICE
  endmenu
  
  source arch/all/Config-TWEAKS.in
*** ./arch/i386/Makefile.nossp	Thu Sep 18 22:15:14 2003
--- ./arch/i386/Makefile	Thu Sep 18 22:15:49 2003
***************
*** 112,117 ****
--- 112,121 ----
  CFLAGS += $(call check_gcc,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0)
  endif
  
+ ifdef CONFIG_PROPOLICE
+ CFLAGS += -fstack-protector
+ endif
+ 
  HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
  
  SUBDIRS += arch/i386/kernel arch/i386/mm arch/i386/lib
*** ./arch/m68k/config.in.nossp	Thu Sep 18 22:22:43 2003
--- ./arch/m68k/config.in	Thu Sep 18 22:23:23 2003
***************
*** 83,88 ****
--- 83,91 ----
        bool 'Use write-through caching for 68060 supervisor accesses' CONFIG_060_WRITETHROUGH
     fi
  fi
+ 
+ # ProPolice build support (add -fstack-protector)
+ bool ' ProPolice stack smashing protection' CONFIG_PROPOLICE
  endmenu
  
  source arch/all/Config-TWEAKS.in
*** ./arch/m68k/Makefile.nossp	Thu Sep 18 22:21:49 2003
--- ./arch/m68k/Makefile	Thu Sep 18 22:22:28 2003
***************
*** 54,59 ****
--- 54,63 ----
  CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g
  endif
  
+ ifdef CONFIG_PROPOLICE
+ CFLAGS += -fstack-protector
+ endif
+ 
  ifndef CONFIG_SUN3
  HEAD := arch/m68k/kernel/head.o
  else
*** ./arch/mips/config-shared.in.nossp	Thu Sep 18 22:24:54 2003
--- ./arch/mips/config-shared.in	Thu Sep 18 22:25:32 2003
***************
*** 547,552 ****
--- 547,555 ----
  fi
  endmenu
  
+ # ProPolice build support (add -fstack-protector)
+ bool ' ProPolice stack smashing protection' CONFIG_PROPOLICE
+ 
  source arch/all/Config-TWEAKS.in
  
  mainmenu_option next_comment
*** ./arch/mips/Makefile.nossp	Thu Sep 18 22:23:38 2003
--- ./arch/mips/Makefile	Thu Sep 18 22:24:30 2003
***************
*** 98,103 ****
--- 98,106 ----
  AFLAGS		+= $(GCCFLAGS)
  CFLAGS		+= $(GCCFLAGS)
  
+ ifdef CONFIG_PROPOLICE
+ CFLAGS += -fstack-protector
+ endif
  
  #
  # We unconditionally build the math emulator
*** ./arch/alpha/config.in.nossp	Thu Sep 18 22:13:25 2003
--- ./arch/alpha/config.in	Thu Sep 18 22:14:57 2003
***************
*** 22,27 ****
--- 22,30 ----
    bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
    bool 'Kernel module loader' CONFIG_KMOD
  fi
+ 
+ # ProPolice build support (add -fstack-protector)
+ bool ' ProPolice stack smashing protection' CONFIG_PROPOLICE
  endmenu
  
  source arch/all/Config-TWEAKS.in
*** ./arch/alpha/Makefile.nossp	Thu Sep 18 22:11:15 2003
--- ./arch/alpha/Makefile	Thu Sep 18 22:12:19 2003
***************
*** 84,89 ****
--- 84,93 ----
  endif
  CFLAGS := $(CFLAGS) -Wa,-mev6
  
+ ifdef CONFIG_PROPOLICE
+ CFLAGS += -fstack-protector
+ endif
+ 
  HEAD := arch/alpha/kernel/head.o
  
  SUBDIRS := $(SUBDIRS) arch/alpha/kernel arch/alpha/mm arch/alpha/lib \
*** ./arch/sparc/config.in.nossp	Thu Sep 18 22:29:31 2003
--- ./arch/sparc/config.in	Thu Sep 18 22:30:02 2003
***************
*** 19,24 ****
--- 19,27 ----
     bool '  Set version information on all symbols for modules' CONFIG_MODVERSIONS
     bool '  Kernel module loader' CONFIG_KMOD
  fi
+ 
+ # ProPolice build support (add -fstack-protector)
+ bool ' ProPolice stack smashing protection' CONFIG_PROPOLICE
  endmenu
  
  source arch/all/Config-TWEAKS.in
*** ./arch/sparc/Makefile.nossp	Thu Sep 18 22:28:27 2003
--- ./arch/sparc/Makefile	Thu Sep 18 22:29:07 2003
***************
*** 30,35 ****
--- 30,39 ----
  CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
  endif
  
+ ifdef CONFIG_PROPOLICE
+ CFLAGS += -fstack-protector
+ endif
+ 
  #LINKFLAGS = -N -Ttext 0xf0004000
  LINKFLAGS = -T arch/sparc/vmlinux.lds
  
*** ./arch/sparc64/config.in.nossp	Thu Sep 18 22:31:16 2003
--- ./arch/sparc64/config.in	Thu Sep 18 22:31:49 2003
***************
*** 16,21 ****
--- 16,24 ----
     bool '  Set version information on all symbols for modules' CONFIG_MODVERSIONS
     bool '  Kernel module loader' CONFIG_KMOD
  fi
+ 
+ # ProPolice build support (add -fstack-protector)
+ bool ' ProPolice stack smashing protection' CONFIG_PROPOLICE
  endmenu
  
  source arch/all/Config-TWEAKS.in
*** ./arch/sparc64/Makefile.nossp	Thu Sep 18 22:30:26 2003
--- ./arch/sparc64/Makefile	Thu Sep 18 22:30:56 2003
***************
*** 53,58 ****
--- 53,62 ----
    CFLAGS := $(CFLAGS) -pg
  endif
  
+ ifdef CONFIG_PROPOLICE
+ CFLAGS += -fstack-protector
+ endif
+ 
  LINKFLAGS = -T arch/sparc64/vmlinux.lds
  
  HEAD := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.