linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: roy.franz@linaro.org (Roy Franz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] Disable stack protection for decompressor/stub
Date: Sat, 28 Sep 2013 09:23:22 -0700	[thread overview]
Message-ID: <1380385403-31904-6-git-send-email-roy.franz@linaro.org> (raw)
In-Reply-To: <1380385403-31904-1-git-send-email-roy.franz@linaro.org>

The ARM decompressor/EFI stub do not implement the functions
(__stack_chk_guard_setup, etc) that are required for support of
stack protection.  The actual enablement of stack protection is
controlled by heuristics in GCC, which the code added for the EFI
stub triggers when CONFIG_STACKPROTECTOR is set.  Even with
CONFIG_STACKPROTECTOR set, the decompressor was not compiled
with stack protection actually enabled. Adding -fno-stack-protector
to the decompressor/stub build keeps it building without stack
protection as it has always been built.
The x86 decompressor/stub is also build with -fno-stack-protector.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
---
 arch/arm/boot/compressed/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 5fad8bd..551dbf9 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -136,7 +136,7 @@ ORIG_CFLAGS := $(KBUILD_CFLAGS)
 KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
 endif
 
-ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
+ccflags-y := -fpic -mno-single-pic-base -fno-builtin -fno-stack-protector -I$(obj)
 asflags-y := -DZIMAGE
 
 # Supply kernel BSS size to the decompressor via a linker symbol.
-- 
1.7.10.4

  parent reply	other threads:[~2013-09-28 16:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-28 16:23 [PATCH V4 0/6] ADD ARM EFI stub Roy Franz
2013-09-28 16:23 ` [PATCH 1/6] efi-stub.txt updates for ARM Roy Franz
2013-10-03  9:40   ` Matt Fleming
2013-09-28 16:23 ` [PATCH 2/6] Add shared update_fdt() function for ARM/ARM64 Roy Franz
2013-10-03  9:52   ` Matt Fleming
2013-10-03 13:43     ` Mark Salter
2013-10-03 14:27       ` Matt Fleming
2013-10-03 14:57         ` Mark Salter
2013-10-03 19:28         ` Roy Franz
2013-10-03 21:07           ` Matt Fleming
2013-09-28 16:23 ` [PATCH 3/6] Add strstr to compressed string.c for ARM Roy Franz
2013-09-28 16:23 ` [PATCH 4/6] Add EFI stub " Roy Franz
2013-09-28 16:23 ` Roy Franz [this message]
2013-09-28 16:23 ` [PATCH 6/6] Add config EFI_STUB for ARM to Kconfig Roy Franz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380385403-31904-6-git-send-email-roy.franz@linaro.org \
    --to=roy.franz@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).