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: 23094 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C0C5216DB for ; Fri, 10 Jan 2014 16:30:51 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id i4sf8279115oah.2 for ; Fri, 10 Jan 2014 08:30:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=miggL5sL7ggq/EK/QqiDvXkAVzzc6eSPLx8n+BTX7Bs=; b=Oc+6Hz1suGovNTTPFgORasx2USoPu7+lsfjfufz6Sky83tBgAVF5s95XZpWaftRlHN VBynKSh1Zv35ODlBQ6tB//pHoqljgKCVXASxwagCPShXucXA7nVYunFXdtRZohAZE6zo Ezt5PILhp4mbUBPu1+zyLVWWd5n1dB9TbCOeabJfmx44xl8NbnLJEp4HQQ3EBOk+Gk0g NpflGq3cEjYbxgdVyYVgqXrOebNaVf6R6wTE60YzglbKiR93uWD1Nc9Xe2xre1ZVtwT4 secl3w5oqKFawhLkAywLsSCSf3LpPsm9j847GWRXQJwSfL7P0hoBFgbEjvsafJ7O8V8O 4vTg== X-Gm-Message-State: ALoCoQmmxq0n/zBjipxiJAYMNIpYTGXD3+mS8R9voSXpKMZj3dsfusr8HgoD6JR7hLJpoP11cNKi X-Received: by 10.182.89.231 with SMTP id br7mr3935896obb.0.1389371449925; Fri, 10 Jan 2014 08:30:49 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.41.66 with SMTP id d2ls1592562qel.10.gmail; Fri, 10 Jan 2014 08:30:49 -0800 (PST) X-Received: by 10.52.230.35 with SMTP id sv3mr7317376vdc.27.1389371449671; Fri, 10 Jan 2014 08:30:49 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id x7si5241208vel.114.2014.01.10.08.30.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Jan 2014 08:30:49 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oz11so3644919veb.18 for ; Fri, 10 Jan 2014 08:30:49 -0800 (PST) X-Received: by 10.58.243.37 with SMTP id wv5mr2808864vec.41.1389371449560; Fri, 10 Jan 2014 08:30:49 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp100840ved; Fri, 10 Jan 2014 08:30:47 -0800 (PST) X-Received: by 10.66.163.74 with SMTP id yg10mr12456252pab.57.1389371442706; Fri, 10 Jan 2014 08:30:42 -0800 (PST) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by mx.google.com with ESMTPS id e8si7652435pac.82.2014.01.10.08.30.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Jan 2014 08:30:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.170 is neither permitted nor denied by best guess record for domain of roy.franz@linaro.org) client-ip=209.85.192.170; Received: by mail-pd0-f170.google.com with SMTP id g10so4795063pdj.1 for ; Fri, 10 Jan 2014 08:30:42 -0800 (PST) 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 Cc: leif.lindholm@linaro.org, grant.likely@linaro.org, dave.martin@arm.com, msalter@redhat.com, patches@linaro.org, Roy Franz 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: roy.franz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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.