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] [day] [month] [year] [list]
Date:   Tue, 27 Jul 2021 17:01:20 +0800
From:   "Chen, Rong A" <rong.a.chen@...el.com>
To:     Richard Fitzgerald <rf@...nsource.cirrus.com>,
        Petr Mladek <pmladek@...e.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        kernel test robot <lkp@...el.com>,
        - <patches@...nsource.cirrus.com>
Subject: Re: [kbuild-all] Re: lib/test_scanf.c:531:1: warning: the frame size
 of 2080 bytes is larger than 2048 bytes



On 7/24/2021 12:15 AM, Richard Fitzgerald wrote:
> On 13/07/2021 09:21, kernel test robot wrote:
>> All warnings (new ones prefixed by >>):
>>
>>     lib/test_scanf.c: In function 'numbers_list_field_width_val_width':
>>>> lib/test_scanf.c:531:1: warning: the frame size of 2080 bytes is 
>>>> larger than 2048 bytes [-Wframe-larger-than=]
>>       531 | }
>>           | ^
>>     lib/test_scanf.c: In function 'numbers_list_field_width_typemax':
>>     lib/test_scanf.c:489:1: warning: the frame size of 2552 bytes is 
>> larger than 2048 bytes [-Wframe-larger-than=]
>>       489 | }
>>           | ^
>>     lib/test_scanf.c: In function 'numbers_list':
>>     lib/test_scanf.c:438:1: warning: the frame size of 2080 bytes is 
>> larger than 2048 bytes [-Wframe-larger-than=]
>>       438 | }
>>           | ^
>>
> 
> I haven't been able to reproduce this. I've tried these compilers:
> 
> Linaro AArch32 GCC 10.2.1 20201103(-O2 or -Os optimization): stack 
> frames < 200 bytes
> 
> Linaro ARM32 7.5-2019.12 -Os: maximum of 384 bytes
> 
> Debian 6.3.0-18+deb9u1, x86_64 -O2: frames < 200 bytes

Hi Richard,

I installed gcc-10-arm-linux-gnueabi on Debian and can't reproduce the 
warning too.

> 
> (The GCC fetched with the reproduction instructions from the krobot
> report doesn't work on my Debian system.)

I have confirmed that the gcc compiler used by the bot can reproduce the 
warning, which problem on your Debian system? we can improve the 
reproduce tool if there's more information.

Best Regards,
Rong Chen

> 
> The sizes reported by the krobot are the total of all stack variable in
> the function, but they all have limited scope. Obviously my GCC versions
> are optimizing by effectively making a union of stack variable that are
> used in different scope. So presumably the GCC version used by krobot is
> missing this optimization. That feels to me more like a compiler bug if
> it is allocating 12 times more stack than is actually necessary for the
> function.
> 
> Output from my 10.2.1 compiler (-O2):
> 
> lib/test_scanf.c: In function 'numbers_list_field_width_val_width':
> lib/test_scanf.c:530:1: warning: the frame size of 176 bytes is larger 
> than 128 bytes [-Wframe-larger-than=]
>    530 | }
>        | ^
> lib/test_scanf.c: In function 'numbers_list_field_width_typemax':
> lib/test_scanf.c:488:1: warning: the frame size of 184 bytes is larger 
> than 128 bytes [-Wframe-larger-than=]
>    488 | }
>        | ^
> lib/test_scanf.c: In function 'numbers_list':
> lib/test_scanf.c:437:1: warning: the frame size of 168 bytes is larger 
> than 128 bytes [-Wframe-larger-than=]
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@...ts.01.org
> To unsubscribe send an email to kbuild-all-leave@...ts.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ