From patchwork Wed Nov 27 20:30:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180336 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6647600ilf; Wed, 27 Nov 2019 13:01:48 -0800 (PST) X-Google-Smtp-Source: APXvYqw28fnbIXpt8gvG+kGaZYB3Oh0wLk3JeTmAes/HEoY3bZps51siBH75ZZAKFANhvG0hy0g6 X-Received: by 2002:a17:906:1d59:: with SMTP id o25mr50672802ejh.17.1574888508828; Wed, 27 Nov 2019 13:01:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888508; cv=none; d=google.com; s=arc-20160816; b=0SKXVhTP+Km8Cu71saGDf7m2XWNfRRj8F1wzGzVMG3q3TfV6oWF9Of4ntcBYFOhbAt CoLGZneQhXf4x0E9rEaXsl0/vLLW8MYDCeD/ebEwAif4nbrOrkjg1s0+fn5IteDhD8II FcIGObCH7lwvHehdjBlTgwzWMnqZf9AnV2wBaMvDH9OTi9VAY99JBrNMQcXMuLVCOLSQ BiEFJ4gsJhC/gGew9xKz+HPYiIN3VgcSB6UADbtuxSflzFmsbPQC8sOLaLzsvKWVXJuC mxyBEG3Asl2MoiUANe6vF8lSFGY8Tqr0wxhH997g5BDb8z4xfsEXaSBC0Rej9x6n8U69 P8TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Gb7coRBSB/H0dD3lzrlODgehlowbwQauj3Jkst49lvM=; b=wOVLwnCTyDOz00/iKuu6+g1E26I5lDxlyRtS4k5qA5HiBLM1Hfz2vitg6qQKSUNG75 cILYLJIIwc0eE65TIV1w2dVONniH701oqFVpXZcrMK145uHvn6BEbo2uKk6Hqa7KVAgy w3z7U+/POehNSVepua9m+RuUTUOMpi1vOG9DhTVCb9OGr05pr9UuVhJA0GA7nDu/pVNu mSHepTafvX9IoyAwkX8n8ej8qh6SL8fEPVRldMfJmi9qtn3HDlsbYKTo8IARzCL65GMn Pt+qd1/T0MyFBcSKD7FGR5RJX0Ml/W/0XszMQGyhksmchywW3k2SLIWFCZSIjEPi4Ozq 45+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xZz7WJVX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p24si9939798eja.385.2019.11.27.13.01.48; Wed, 27 Nov 2019 13:01:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xZz7WJVX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731783AbfK0VBq (ORCPT + 26 others); Wed, 27 Nov 2019 16:01:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:54092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731741AbfK0VBm (ORCPT ); Wed, 27 Nov 2019 16:01:42 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DA08A2158C; Wed, 27 Nov 2019 21:01:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888502; bh=mjEAf4IZiaoy69szyp+z+zduvvrVkJ634Pi2kNlx0nY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xZz7WJVXDS2bU0v7Sv8a0XSH7ngT2HGYxaZtko+VPeoQfbPoZKRwj3p+3gAbd5B9g q1WxZXKpXfjgUGCjkjj7ltjZHiWEa90PM6Mm/0wzAVFpo7o5YsZj47m72RXEnA3fV5 EmfkMtl6tNIsF8pgtW5hBS3hgDrWllD9q4l+e6HI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joel Stanley , Michael Ellerman , Sasha Levin Subject: [PATCH 4.19 160/306] powerpc/xmon: Relax frame size for clang Date: Wed, 27 Nov 2019 21:30:10 +0100 Message-Id: <20191127203127.204172470@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joel Stanley [ Upstream commit 9c87156cce5a63735d1218f0096a65c50a7a32aa ] When building with clang (8 trunk, 7.0 release) the frame size limit is hit: arch/powerpc/xmon/xmon.c:452:12: warning: stack frame size of 2576 bytes in function 'xmon_core' [-Wframe-larger-than=] Some investigation by Naveen indicates this is due to clang saving the addresses to printf format strings on the stack. While this issue is investigated, bump up the frame size limit for xmon when building with clang. Link: https://github.com/ClangBuiltLinux/linux/issues/252 Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/xmon/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.20.1 diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile index 9d7d8e6d705c4..9ba44e190e5e4 100644 --- a/arch/powerpc/xmon/Makefile +++ b/arch/powerpc/xmon/Makefile @@ -13,6 +13,12 @@ UBSAN_SANITIZE := n ORIG_CFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) +ifdef CONFIG_CC_IS_CLANG +# clang stores addresses on the stack causing the frame size to blow +# out. See https://github.com/ClangBuiltLinux/linux/issues/252 +KBUILD_CFLAGS += -Wframe-larger-than=4096 +endif + ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) obj-y += xmon.o nonstdio.o spr_access.o