linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
	linuxppc-dev@lists.ozlabs.org, Joel Stanley <joel@jms.id.au>,
	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	[thread overview]
Message-ID: <20191116154113.7417-143-sashal@kernel.org> (raw)
In-Reply-To: <20191116154113.7417-1-sashal@kernel.org>

From: Joel Stanley <joel@jms.id.au>

[ 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 <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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


  parent reply	other threads:[~2019-11-16 16:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191116154113.7417-1-sashal@kernel.org>
2019-11-16 15:37 ` [PATCH AUTOSEL 4.19 010/237] powerpc: Fix signedness bug in update_flash_db() Sasha Levin
2019-11-16 15:37 ` [PATCH AUTOSEL 4.19 011/237] powerpc/boot: Fix opal console in boot wrapper Sasha Levin
2019-11-16 15:37 ` [PATCH AUTOSEL 4.19 012/237] powerpc/boot: Disable vector instructions Sasha Levin
2019-11-16 15:37 ` [PATCH AUTOSEL 4.19 013/237] powerpc/eeh: Fix null deref for devices removed during EEH Sasha Levin
2019-11-16 15:37 ` [PATCH AUTOSEL 4.19 014/237] powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field Sasha Levin
2019-11-16 15:38 ` [PATCH AUTOSEL 4.19 075/237] macintosh/windfarm_smu_sat: Fix debug output Sasha Levin
2019-11-16 15:38 ` [PATCH AUTOSEL 4.19 091/237] powerpc/pseries: Export raw per-CPU VPA data via debugfs Sasha Levin
2019-11-16 15:38 ` [PATCH AUTOSEL 4.19 092/237] powerpc/mm/radix: Fix off-by-one in split mapping logic Sasha Levin
2019-11-16 15:38 ` [PATCH AUTOSEL 4.19 093/237] powerpc/mm/radix: Fix overuse of small pages in splitting logic Sasha Levin
2019-11-16 15:38 ` [PATCH AUTOSEL 4.19 094/237] powerpc/mm/radix: Fix small page at boundary when splitting Sasha Levin
2019-11-16 15:38 ` [PATCH AUTOSEL 4.19 095/237] powerpc/64s/radix: Fix radix__flush_tlb_collapsed_pmd double flushing pmd Sasha Levin
2019-11-16 15:39 ` [PATCH AUTOSEL 4.19 126/237] powerpc/process: Fix flush_all_to_thread for SPE Sasha Levin
2019-11-16 15:39 ` Sasha Levin [this message]
2019-11-16 15:39 ` [PATCH AUTOSEL 4.19 144/237] selftests/powerpc/ptrace: Fix out-of-tree build Sasha Levin
2019-11-16 15:39 ` [PATCH AUTOSEL 4.19 145/237] selftests/powerpc/signal: " Sasha Levin
2019-11-16 15:39 ` [PATCH AUTOSEL 4.19 146/237] selftests/powerpc/switch_endian: " Sasha Levin
2019-11-16 15:39 ` [PATCH AUTOSEL 4.19 147/237] selftests/powerpc/cache_shape: " Sasha Levin
2019-11-16 15:39 ` [PATCH AUTOSEL 4.19 163/237] mm/memory_hotplug: make add_memory() take the device_hotplug_lock Sasha Levin
2019-11-16 15:40 ` [PATCH AUTOSEL 4.19 165/237] powerpc/powernv: hold device_hotplug_lock when calling device_online() Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191116154113.7417-143-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=joel@jms.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).