From patchwork Wed Nov 27 20:30:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180321 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6636889ilf; Wed, 27 Nov 2019 12:50:10 -0800 (PST) X-Google-Smtp-Source: APXvYqw7xZK5u6omn7esxayR1pvpD7SUSgJE7hZu0XX16hiNeqDF/lZsP40QiW28O4IzA6KrNkul X-Received: by 2002:a17:906:2e41:: with SMTP id r1mr27761684eji.127.1574887810494; Wed, 27 Nov 2019 12:50:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574887810; cv=none; d=google.com; s=arc-20160816; b=rCQbMR43DmK7C0EviKNy3t+bguvipJ0rNMTs+rVcGwyFTu3cstuJpJIhVajBoQd2PT ApHKgW8m3k9xUMS1/vvGW2b9avZ2oFOL1exlQwn2uto8Glydt7bwOPHW1EP0LbFcfvBk 79DP2iauA5k2x2XClUyvlm/oDwmg86Npcx4/zk/fqfMv0rnrSsK5tPNWZavlboWK1tio Gc82tXMkHDYElMcf5WN5ALkkVsL84Or9HL+5+RAJ8YG/X970BosgXMK8ohfeU8Ev6sup /nzeiLGuy/T9200N7zBaLwVWQHi7A4dr/MvcEuHk9BgjUT7RK6gw+nErHncjjz9sRrt+ MQ7A== 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=s+VhaTKhfHVXegKpLkB98dmOqEYz5tuvqSY2VBqXnRM=; b=gFfuiLxnKiJsIFCUpfc0cDkyRneMthLB1JxFfoCN+HuX3ia8d4jpHO10n/NycvMMz2 GDEpCrqBY7F6O38bGQ84VmogjWwoYit7u1KpYJZ/T1WoCX/gsSixErbyuZ6AiCJ2Zxe/ 9h23sMsTI8OSZDuQeFJvf+336OvrTUSiOMOek9kVbv9/God8RWy/hzN+G/zWnUijWW3/ 65QtkTE02gcQ+vkrJgRa+aCs4KC+iPDTYlqpWloCjn24gP4A6zh1p3J1GuhZ3wVigDE0 7aXshBBs7KMZP/+es2DPjxbv5wxZWsNheLBdpkOe2C5diPraWKZuUuX87Kg4DJRpyeUr BIyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=n8geMdfp; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 s38si10856631edd.351.2019.11.27.12.50.10; Wed, 27 Nov 2019 12:50:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=n8geMdfp; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730321AbfK0UuI (ORCPT + 15 others); Wed, 27 Nov 2019 15:50:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:35890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730317AbfK0UuH (ORCPT ); Wed, 27 Nov 2019 15:50:07 -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 E20EC21774; Wed, 27 Nov 2019 20:50:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887807; bh=pal9hfN4N0D5eIJxzhWWfFKR/tR1Zz4LVav7/9eRo0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n8geMdfpwD+ue8EMM6c3rk6xfwbpM69KA6b938hvsVdC9UCeK4jTYEnd3m5musFJG icVhlhY+RpItRBa2D0XWIf/VgPC8YgAfLorjjg5N03pBmHkiAYH9UJw4u/ohgmj2fw 2+vlXFRs0ajOk2ZFWfrT08Qfg0WFdIDjx4thXhYk= 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.14 103/211] powerpc/xmon: Relax frame size for clang Date: Wed, 27 Nov 2019 21:30:36 +0100 Message-Id: <20191127203103.434216230@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203049.431810767@linuxfoundation.org> References: <20191127203049.431810767@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 549e99e71112b..ac5ee067aa512 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 -mno-sched-epilog,,$(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