linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: atags_to_fdt: don't warn about stack size
Date: Thu, 18 Feb 2016 17:26:56 +0100	[thread overview]
Message-ID: <7301172.5fH67MHlU9@wuerfel> (raw)
In-Reply-To: <alpine.LFD.2.20.1602181112310.13632@knanqh.ubzr>

The merge_fdt_bootargs() function by definition consumes more than 1024
bytes of stack because it has a 1024 byte command line on the stack,
meaning that we always get a warning when building this file:

arch/arm/boot/compressed/atags_to_fdt.c: In function 'merge_fdt_bootargs':
arch/arm/boot/compressed/atags_to_fdt.c:98:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]

However, as this is the decompressor and we know that it has a very shallow
call chain, and we do not actually risk overflowing the kernel stack
at runtime here.

This just shuts up the warning by slightly increasing the limit for this
file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
On Thursday 18 February 2016 11:13:52 Nicolas Pitre wrote:
> What about setting the warning to 2048 instead?

Sure, actually 1280 is more than enough I think.

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 7a6a58ef8aaf..2cc63038d6c8 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -85,6 +85,8 @@ $(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/
 $(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \
 	$(addprefix $(obj)/,$(libfdt_hdrs))
 
+CFLAGS_atags_to_fdt.o += -Wframe-larger-than=1280
+
 ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
 OBJS	+= $(libfdt_objs) atags_to_fdt.o
 endif

  reply	other threads:[~2016-02-18 16:26 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 14:01 [PATCH 0/9] ARM: randconfig testing fallout Arnd Bergmann
2016-02-18 14:01 ` [PATCH 1/9] ARM: ARMv7-M uses BE-8, not BE-32 Arnd Bergmann
2016-02-18 16:06   ` Nicolas Pitre
2016-02-18 16:12     ` Arnd Bergmann
2016-02-19  8:47       ` Vladimir Murzin
2016-02-19 10:17         ` Arnd Bergmann
2016-02-18 14:01 ` [PATCH 2/9] ARM: change NR_IPIS to 8 Arnd Bergmann
2016-02-18 14:26   ` Marc Zyngier
2016-02-18 14:37   ` Russell King - ARM Linux
2016-02-18 15:18     ` Arnd Bergmann
2018-09-18  8:19       ` Chunyan Zhang
2016-02-18 14:01 ` [PATCH 3/9] ARM: make free_memmap as __init Arnd Bergmann
2016-02-18 15:55   ` Nicolas Pitre
2016-02-18 14:01 ` [PATCH 4/9] ARM: add CONFIG_PHYS_OFFSET default values Arnd Bergmann
2016-02-18 16:02   ` Nicolas Pitre
2016-02-19  8:33     ` Arnd Bergmann
2016-02-19 14:29       ` Chris Brandt
2016-02-19 15:34         ` Arnd Bergmann
2016-02-19 16:43           ` Russell King - ARM Linux
2016-02-19 17:18             ` Chris Brandt
2016-02-19 17:57             ` Nicolas Pitre
2016-02-19 16:10       ` Nicolas Pitre
2016-02-19 16:23         ` Arnd Bergmann
2016-02-19 17:31           ` Nicolas Pitre
2016-02-19 18:07             ` Russell King - ARM Linux
2016-02-19 21:14               ` Arnd Bergmann
2016-02-18 14:01 ` [PATCH 5/9] ARM: atags_to_fdt: don't warn about stack size Arnd Bergmann
2016-02-18 16:13   ` Nicolas Pitre
2016-02-18 16:26     ` Arnd Bergmann [this message]
2016-02-18 17:14       ` [PATCH v2] " Nicolas Pitre
2016-02-19 16:58       ` Arnd Bergmann
2016-02-18 14:01 ` [PATCH 6/9] ARM: uaccess: avoid warning for NOMMU in access_ok Arnd Bergmann
2016-02-18 16:15   ` Nicolas Pitre
2016-02-18 14:01 ` [PATCH 7/9] ARM: move NO_DMA definition to ecard.h Arnd Bergmann
2016-02-18 16:17   ` Nicolas Pitre
2016-02-18 14:02 ` [PATCH 8/9] ARM: do not use optimized do_div for ARMv3 Arnd Bergmann
2016-02-18 17:20   ` Nicolas Pitre
2016-02-19  9:03     ` Arnd Bergmann
2016-02-19 18:44       ` Nicolas Pitre
2016-02-18 14:02 ` [PATCH 9/9] ARM: fix kprobe test with CONFIG_CPU_32v3 Arnd Bergmann
2016-02-18 14:21   ` Jon Medhurst (Tixy)
2016-02-18 16:21   ` Nicolas Pitre

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=7301172.5fH67MHlU9@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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).