From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947014AbcBRROM (ORCPT ); Thu, 18 Feb 2016 12:14:12 -0500 Received: from mail-qg0-f53.google.com ([209.85.192.53]:34492 "EHLO mail-qg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946254AbcBRROK (ORCPT ); Thu, 18 Feb 2016 12:14:10 -0500 Date: Thu, 18 Feb 2016 12:14:06 -0500 (EST) From: Nicolas Pitre To: Arnd Bergmann cc: linux-arm-kernel@lists.infradead.org, Jon Medhurst , Russell King , Ard Biesheuvel , Marc Zyngier , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ARM: atags_to_fdt: don't warn about stack size In-Reply-To: <7301172.5fH67MHlU9@wuerfel> Message-ID: References: <1455804123-2526139-1-git-send-email-arnd@arndb.de> <1455804123-2526139-6-git-send-email-arnd@arndb.de> <7301172.5fH67MHlU9@wuerfel> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Feb 2016, Arnd Bergmann wrote: > 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 Acked-by: Nicolas Pitre > --- > 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 > >