lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5qs88614-n75s-1rn5-353r-o1p96s5qp59n@syhkavp.arg>
Date:   Mon, 9 Aug 2021 11:25:24 -0400 (EDT)
From:   Nicolas Pitre <nico@...xnic.net>
To:     David Heidelberg <david@...t.cz>
cc:     Arnd Bergmann <arnd@...db.de>, Jon Medhurst <tixy@...aro.org>,
        Russell King <linux@....linux.org.uk>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Marc Zyngier <marc.zyngier@....com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] ARM: atags_to_fdt: don't warn about stack size

On Mon, 9 Aug 2021, David Heidelberg 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 disabling the warning flag for this
> file.
> 
> Tested on Nexus 7 2012 builds.
> 
> Original Author: Arnd Bergmann <arnd@...db.de>
> Reference: https://lore.kernel.org/lkml/8232115.18ykgQ6J5T@wuerfel/
> 
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Nicolas Pitre <nico@...aro.org>
> Cc: Russell King <linux@....linux.org.uk>
> Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
> Cc: Marc Zyngier <marc.zyngier@....com>
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> 
> Signed-off-by: David Heidelberg <david@...t.cz>

Acked-by: Nicolas Pitre <nico@...xnic.net>

> ---
>  arch/arm/boot/compressed/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
> index 9d91ae1091b0..91265e7ff672 100644
> --- a/arch/arm/boot/compressed/Makefile
> +++ b/arch/arm/boot/compressed/Makefile
> @@ -85,6 +85,8 @@ compress-$(CONFIG_KERNEL_LZ4)  = lz4
>  libfdt_objs := fdt_rw.o fdt_ro.o fdt_wip.o fdt.o
>  
>  ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
> +CFLAGS_REMOVE_atags_to_fdt.o += -Wframe-larger-than=${CONFIG_FRAME_WARN}
> +CFLAGS_atags_to_fdt.o += -Wframe-larger-than=1280
>  OBJS	+= $(libfdt_objs) atags_to_fdt.o
>  endif
>  ifeq ($(CONFIG_USE_OF),y)
> -- 
> 2.30.2
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ