From patchwork Fri Jan 10 16:30:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 3467201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6089DC02DC for ; Fri, 10 Jan 2014 16:34:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3CBD72011D for ; Fri, 10 Jan 2014 16:34:31 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E6B7B200F0 for ; Fri, 10 Jan 2014 16:34:29 +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 1W1f0b-0007Tw-Qt; Fri, 10 Jan 2014 16:32:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1f03-0005iX-Bl; Fri, 10 Jan 2014 16:31:59 +0000 Received: from mail-pa0-f44.google.com ([209.85.220.44]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1ez7-0005Zz-Th for linux-arm-kernel@lists.infradead.org; Fri, 10 Jan 2014 16:31:03 +0000 Received: by mail-pa0-f44.google.com with SMTP id fa1so4993489pad.3 for ; Fri, 10 Jan 2014 08:30:42 -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=H3IpbLs36pdHxkbaA9uHtxn/ILsJ/NSVH5Y0+ErskdY803fBhMvuweAVhZJOXBeHM8 X1CTmpWYXtzbQ0RKjU0W/lu+Kh5DBuf+zddlBDdHLPwgvf1+8Ii4ZFRHaqznPyaftZpQ UY1Lt1sXeXWhn4wlBpgCM7rbw09SmWFVpcrVDK+AH3tZprirSMLBne15Y4FEs4nXtgFY LegBaFRknRGw/L+BfXx9DnPVb0voWXXEecdmz6FlrJ6mqcliZTwWBZNcNIYqeQGXeDni iczuK6yozfLrGo5YYBqMzY7wZZvpGBwPxa+AuImxAWr3JfFnmKgcv4Csn7OCQU4a8xrx k45g== X-Gm-Message-State: ALoCoQnGNm2PfZJUuZHuyVXXuXIFDXSv7HETikZbrBDaTMp7vLd/ey03p1j3jLi4ZvNHb2udtb9a X-Received: by 10.68.204.161 with SMTP id kz1mr12616425pbc.156.1389371440071; Fri, 10 Jan 2014 08:30:40 -0800 (PST) Received: from rfranz-i7.local (c-24-10-97-91.hsd1.ca.comcast.net. [24.10.97.91]) by mx.google.com with ESMTPSA id nw11sm23388124pab.13.2014.01.10.08.30.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jan 2014 08:30:38 -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 V6 7/8] Disable stack protection for decompressor/stub Date: Fri, 10 Jan 2014 08:30:16 -0800 Message-Id: <1389371417-379-8-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1389371417-379-1-git-send-email-roy.franz@linaro.org> References: <1389371417-379-1-git-send-email-roy.franz@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140110_113102_107703_BBBF9886 X-CRM114-Status: GOOD ( 10.42 ) 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.3 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.