From patchwork Wed Nov 27 23:31:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 3250921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 105819F3B8 for ; Wed, 27 Nov 2013 23:35:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3185C2060B for ; Wed, 27 Nov 2013 23:35:31 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 335962060A for ; Wed, 27 Nov 2013 23:35:30 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VlocH-0006qG-18; Wed, 27 Nov 2013 23:33:57 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vlobk-0004yl-7y; Wed, 27 Nov 2013 23:33:24 +0000 Received: from mail-ie0-f171.google.com ([209.85.223.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vloav-0004sT-Df for linux-arm-kernel@lists.infradead.org; Wed, 27 Nov 2013 23:32:35 +0000 Received: by mail-ie0-f171.google.com with SMTP id ar20so13437667iec.30 for ; Wed, 27 Nov 2013 15:32:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=miggL5sL7ggq/EK/QqiDvXkAVzzc6eSPLx8n+BTX7Bs=; b=W44dmob/Z1uRquAjlmFErovtzB4Icu0bbL77Z61GJITYSSiYvk9uHM2Eul3J8A0XpE TytzL61PHVltkO6ajj266B2KqY6GCcT0KHGES7+/D6bvmDMH/mF8apSSneJAFg1SprBs wwFAc1KeoVWSSRU3yS83otjYNS2bNWyyU9nXeU+t9AuEQqTPNU7S+aOF4DheTdXKTLOY Vw0LKSoyVtgDZIvWPdip8kOdAF2gUU60RwyqsRU/TCBlCy66gFSFk7nOph+QTwSdyG3A 0Tj9xB20BiTs1KGk7jYG9Q6OXolaJUaqFW9tzuuFYXYKLLRDa6/khI5uqhxJvkQb6hUR MorQ== X-Gm-Message-State: ALoCoQmHyDGQEINjyPnlzQb+uEY9glPo483+rwhPOBrNQHritEkB5NtsAftwjMFzfv956dEoNZYY X-Received: by 10.42.62.196 with SMTP id z4mr7270619ich.49.1385595132590; Wed, 27 Nov 2013 15:32:12 -0800 (PST) Received: from rfranz-v430.caveonetworks.com (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id p5sm41764439igj.10.2013.11.27.15.32.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Nov 2013 15:32:12 -0800 (PST) From: Roy Franz To: linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, matt.fleming@intel.com, linux@arm.linux.org.uk Subject: [PATCH V5 5/6] Disable stack protection for decompressor/stub Date: Wed, 27 Nov 2013 15:31:54 -0800 Message-Id: <1385595115-21488-6-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1385595115-21488-1-git-send-email-roy.franz@linaro.org> References: <1385595115-21488-1-git-send-email-roy.franz@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131127_183233_541188_1B531F7A X-CRM114-Status: GOOD ( 10.43 ) X-Spam-Score: -2.6 (--) Cc: patches@linaro.org, leif.lindholm@linaro.org, Roy Franz , msalter@redhat.com, grant.likely@linaro.org, dave.martin@arm.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 c0c7fee..7974791 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -132,7 +132,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.