From patchwork Wed Feb 5 17:04:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 24200 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3DE1720675 for ; Wed, 5 Feb 2014 17:05:51 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id pa12sf1417205veb.5 for ; Wed, 05 Feb 2014 09:05: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=qnj4kNHQmsCcneBeb/HXbb4HjqlHFW0pZzwYFayX0lg=; b=JhwTLu+krcX06GIrl2w9+hD8v64cRc/ATJwckTGvuY7tDWHjGPZTYYytx/Cm3V6uIQ 5R+8xyLSjTukGlMhWVKYivz7eXJqMQSxfBrSOhFjvvgTXMnCATbFTVR3BQvxC3wWu+Su arWeMZF9xs7hVhk4yhBYWLQSZUM28Dc9jcFlF24WiJ/4m8g9AymPAtya2sKWtsBtRR49 JktNZvqYDJjEjGlmlzWkc+w8+ovKNhbQOtmUPpp4kJiWl6I6VyhvAS7xpTF2vftCFh/5 25ueYWm1JiSx/tRN0RtUTgGjhkpXMMtHd8xDIQc72XU7AYbZvG2F3cKQUchvOUjodH9v NKTA== X-Gm-Message-State: ALoCoQnk+38I6jJXTiy+LzZqBHbLbeyETJgrq5dMDWxhiv8MROdv84RI2ZBhl++oChsoYIVlr/8U X-Received: by 10.236.17.161 with SMTP id j21mr4381016yhj.55.1391619950130; Wed, 05 Feb 2014 09:05:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.47 with SMTP id s44ls218122qgs.70.gmail; Wed, 05 Feb 2014 09:05:50 -0800 (PST) X-Received: by 10.58.255.233 with SMTP id at9mr1779802ved.20.1391619950033; Wed, 05 Feb 2014 09:05:50 -0800 (PST) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id y3si9842898vdo.97.2014.02.05.09.05.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Feb 2014 09:05:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.171 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.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so536855veb.30 for ; Wed, 05 Feb 2014 09:05:50 -0800 (PST) X-Received: by 10.58.186.132 with SMTP id fk4mr1709599vec.9.1391619949963; Wed, 05 Feb 2014 09:05: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.220.174.196 with SMTP id u4csp64632vcz; Wed, 5 Feb 2014 09:05:49 -0800 (PST) X-Received: by 10.194.201.134 with SMTP id ka6mr2247wjc.93.1391619925069; Wed, 05 Feb 2014 09:05:25 -0800 (PST) Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by mx.google.com with ESMTPS id ew1si15475624wjd.18.2014.02.05.09.05.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Feb 2014 09:05:25 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.170 is neither permitted nor denied by best guess record for domain of leif.lindholm@linaro.org) client-ip=74.125.82.170; Received: by mail-we0-f170.google.com with SMTP id w62so512185wes.1 for ; Wed, 05 Feb 2014 09:05:24 -0800 (PST) X-Received: by 10.194.60.73 with SMTP id f9mr2118978wjr.65.1391619924661; Wed, 05 Feb 2014 09:05:24 -0800 (PST) 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 p1sm47427211wie.1.2014.02.05.09.05.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Feb 2014 09:05:23 -0800 (PST) From: Leif Lindholm To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org Cc: patches@linaro.org, Roy Franz , Leif Lindholm Subject: [PATCH 11/22] Disable stack protection for decompressor/stub Date: Wed, 5 Feb 2014 17:04:02 +0000 Message-Id: <1391619853-10601-12-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391619853-10601-1-git-send-email-leif.lindholm@linaro.org> References: <1391619853-10601-1-git-send-email-leif.lindholm@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 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: , 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 1415411..5fc32ae 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.