1. 01 Jul, 2013 3 commits
    • Gregory Fong's avatar
      MIPS: r4k,octeon,r2300: stack protector: change canary per task · 1400eb65
      Gregory Fong authored
      For non-SMP, uses the new random canary value that is stored in the
      task struct whenever a new task is forked.  Based on ARM version in
      df0698be and subject to the same
      limitations: the variable GCC expects, __stack_chk_guard, is global,
      so this will not work on SMP.
      
      Quoting Nicolas Pitre <nico@fluxnic.net>: "One way to overcome this
      GCC limitation would be to locate the __stack_chk_guard variable into
      a memory page of its own for each CPU, and then use TLB locking to
      have each CPU see its own page at the same virtual address for each of
      them."
      Signed-off-by: default avatarGregory Fong <gregory.0xf0@gmail.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5488/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      1400eb65
    • Gregory Fong's avatar
      MIPS: initial stack protector support · 36ecafc5
      Gregory Fong authored
      Implements basic stack protector support based on ARM version in
      c743f380 , with Kconfig option,
      constant canary value set at boot time, and script to check if
      compiler actually supports stack protector.
      
      Tested by creating a kernel module that writes past end of char[].
      Signed-off-by: default avatarGregory Fong <gregory.0xf0@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: Filippo Arcidiacono <filippo.arcidiacono@st.com>
      Cc: Carmelo Amoroso <carmelo.amoroso@st.com>
      Patchwork: https://patchwork.linux-mips.org/patch/5448/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      36ecafc5
    • Markos Chandras's avatar
      MIPS: Boot: Compressed: Remove -fstack-protector from CFLAGS · 23df3415
      Markos Chandras authored
      When building with -fstack-protector, gcc emits the __stack_chk_guard and
      __stack_chk_fail symbols to check for stack stability. These symbols are
      defined in vmlinux but the generated vmlinux.bin that is used to create
      the compressed vmlinuz image has no symbol table so the linker can't find
      these symbols during the final linking phase.  As a result of which, we
      need either to redefine these symbols just for the compressed image or drop
      the -fstack-protector option when building the compressed image. This patch
      implements the latter of two options.
      
      Fixes the following linking problem:
      
      dbg.c:(.text+0x7c): undefined reference to `__stack_chk_guard'
      dbg.c:(.text+0x80): undefined reference to `__stack_chk_guard'
      dbg.c:(.text+0xd4): undefined reference to `__stack_chk_guard'
      dbg.c:(.text+0xec): undefined reference to `__stack_chk_fail'
      
      [ralf@linux-mips.org: I'm applying this before the patch that actually adds
      stack protector support for MIPS.  This means, it will not be possible
      to trigger above error message with any commit from the tree but rather
      they are what one would hit without this commit.]
      Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/5575/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      23df3415
  2. 17 Jun, 2013 4 commits
  3. 13 Jun, 2013 24 commits
  4. 11 Jun, 2013 1 commit
  5. 10 Jun, 2013 8 commits