From patchwork Fri Jul 18 14:00:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 33859 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5DBDD20CA0 for ; Fri, 18 Jul 2014 14:03:57 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id tr6sf33953146ieb.2 for ; Fri, 18 Jul 2014 07:03:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=AoG7tnPJ/5BpfI7mET9H/XvaDYZSjo727OB6FG9kyLg=; b=GV84zwuAPmT/B6yp93YU+JXg3S0bevcL5JBCt6IFZGFQ8Xnp9mSdjWSLBS+C55mmRT DaN1YcXSSJJr59+8C5IU35bZp5Ln4OzMFTTbaOL/nfaKXTu4hF0QiJw2hHWnXpG3gPpz NFqPWF56ALONniYA6qbzWHB4BBMyNDP4DWJkeUzZiE0Z3a0pqcSoZZPdbtuOjkSn/7km kZhfQDkZdgjRL4uH755YQc2cfX83VDuXodvTBUWsLQCkLwkT0ICYkqrp5BnFvSMoMBTd 4mKoElIdAjyG7FnQtE6IRdajIysVm3GoM+sMTFBi6pScw+N1xUjKhrttM+54RKF6wOCl P/vw== X-Gm-Message-State: ALoCoQm9RtiaaJ+0wk/CnozmCXkyReZWDL1u8Pi8p/EWRpcLCv8iRv86h1tiBoqlT9e7KJZXKAc1 X-Received: by 10.182.66.198 with SMTP id h6mr2553919obt.12.1405692236529; Fri, 18 Jul 2014 07:03:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.169 with SMTP id f38ls1008008qgd.24.gmail; Fri, 18 Jul 2014 07:03:56 -0700 (PDT) X-Received: by 10.52.88.74 with SMTP id be10mr5226141vdb.54.1405692236447; Fri, 18 Jul 2014 07:03:56 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id w4si5780328vev.44.2014.07.18.07.03.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 07:03:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so7280338vcb.31 for ; Fri, 18 Jul 2014 07:03:48 -0700 (PDT) X-Received: by 10.221.47.9 with SMTP id uq9mr6208526vcb.48.1405692228615; Fri, 18 Jul 2014 07:03:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp13854vcb; Fri, 18 Jul 2014 07:03:48 -0700 (PDT) X-Received: by 10.66.184.42 with SMTP id er10mr5465790pac.102.1405692227728; Fri, 18 Jul 2014 07:03:47 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id qx12si6083566pab.107.2014.07.18.07.03.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 07:03:47 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X88k2-0005yj-RZ; Fri, 18 Jul 2014 14:02:30 +0000 Received: from mail-wi0-f178.google.com ([209.85.212.178]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X88j0-00050i-RV for linux-arm-kernel@lists.infradead.org; Fri, 18 Jul 2014 14:01:27 +0000 Received: by mail-wi0-f178.google.com with SMTP id hi2so883884wib.17 for ; Fri, 18 Jul 2014 07:00:58 -0700 (PDT) X-Received: by 10.194.92.148 with SMTP id cm20mr7129888wjb.57.1405692058434; Fri, 18 Jul 2014 07:00:58 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id ft17sm14465308wjc.14.2014.07.18.07.00.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 07:00:57 -0700 (PDT) From: Leif Lindholm To: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, linux@arm.linux.org.uk Subject: [PATCH 4/7] arm: Disable stack protection for decompressor/stub Date: Fri, 18 Jul 2014 15:00:50 +0100 Message-Id: <1405692053-7514-5-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1405692053-7514-1-git-send-email-leif.lindholm@linaro.org> References: <1405692053-7514-1-git-send-email-leif.lindholm@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140718_070127_066544_9DD8F5FD X-CRM114-Status: GOOD ( 10.52 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.178 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.178 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: roy.franz@linaro.org, matt.fleming@intel.com, ard.biesheuvel@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Roy Franz 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 never 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 built with -fno-stack-protector. Signed-off-by: Roy Franz Signed-off-by: Leif Lindholm --- 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 68c9183..27536b1 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -121,7 +121,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.