Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp772194ybc; Sat, 16 Nov 2019 08:25:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwJZ0oz3wFxI0DRt1kwJBEBZfmFsh80EV5r1n80rc204yzqyKwY4sy+ZNBHi7rXHBFtsFBa X-Received: by 2002:adf:e387:: with SMTP id e7mr21163205wrm.180.1573921506269; Sat, 16 Nov 2019 08:25:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921506; cv=none; d=google.com; s=arc-20160816; b=tmm58K2iczpoEjhWHq+EMwvDrqX9dhf2FAuF4U39RvcM1xUceQYRThtawWFcCu4raY I2NRg+x75mrKqKNNdR+Ge2heOujr2gKXU1ALvxklX7d2MhPqGlQNHBlxCEYom5h7cF9M 2LUVgZnBJ7TGAeVyl4FGj0tBp7XtkuOplRFlhFBeVLeZVZpAJjDG7sLXdHJUknuzG8Nt IkLfoKO4iCfqSrsuCj6uRAVuBDXo6n14QrajNS6e11lkwnAWcJ61n2P6YX/dQULWWzD7 s1+KM19Pn5FApNZRhM83ZaArGcv0Ogaz2PFYEZ/q4yQtyitglgW3PoqgfK4kuDjnk/IB bxhg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Gb7coRBSB/H0dD3lzrlODgehlowbwQauj3Jkst49lvM=; b=DJAqjW9OxBnbFD2ZT2+sVTtPMKkE/gJ+tdJtdc3WMhNJmiPnZMf0f7sicPQgntdvUK EJxg2FmECV7TjLw/C6kBFhgGJROe6d/hdi0HKDR1hmtla4BJ5FNe2kaUBVUIyiDZObuN lFgnCoe9D5qMQuvTiYZVhu+86Pt7Kssj2sc2XqjZ7Aa7R1PM4G7Uy/1/84H8NYKk+GCP gDFaFTzHNBqKgku7cNolhOnWNvatpM0+AlL2zhB5rAd+tgcK6V7zSTkXvAb/tskEd8qW Msm/bb5vqXPhSm8nToevYB6HyGiJZdSS309a5548z63poEc01KeOucv1Ls/Ze+Sik+FZ iPVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kRK3ikGv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q25si7979717edw.222.2019.11.16.08.24.41; Sat, 16 Nov 2019 08:25:06 -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=kRK3ikGv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730182AbfKPQUR (ORCPT + 99 others); Sat, 16 Nov 2019 11:20:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:49496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729023AbfKPPoe (ORCPT ); Sat, 16 Nov 2019 10:44:34 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED3BC2073B; Sat, 16 Nov 2019 15:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919074; bh=mjEAf4IZiaoy69szyp+z+zduvvrVkJ634Pi2kNlx0nY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kRK3ikGvxxql0sMSWXYZcYyfrRDkSVBa7AMRBbbfjGz4Ap/Wl25NdyhDOPMBW66q1 Vy3U8sMZqd7r/2HCkDKzaar+9WKOKfaIbhFtUEDlLMFjyboK4077q+NhZu0kvKDNdk Q8pWlFXk1WcYt0jme9rI150AjE9kUMHpUhBfrEeo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Joel Stanley , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 4.19 143/237] powerpc/xmon: Relax frame size for clang Date: Sat, 16 Nov 2019 10:39:38 -0500 Message-Id: <20191116154113.7417-143-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit 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(+) 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 -- 2.20.1