* You have to fix this
@ 2012-09-27 22:34 David Miller
2012-09-28 11:59 ` Vipul Pandya
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2012-09-27 22:34 UTC (permalink / raw)
To: vipul; +Cc: netdev
You cannot put such monster sized local data objects on the stack:
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c: In function ‘t4_memory_rw.constprop.6’:
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:484:1: warning: the frame size of 2056 bytes is larger than 2048 bytes [-Wframe-larger-than=]
That's because of this thing:
__be32 data[MEMWIN0_APERTURE/sizeof(__be32)];
I'm really surprised this didn't show up in any of your test builds.
Or are you ignoring warnings that your changes add?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: You have to fix this
2012-09-27 22:34 You have to fix this David Miller
@ 2012-09-28 11:59 ` Vipul Pandya
2012-09-28 17:43 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Vipul Pandya @ 2012-09-28 11:59 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org
On 28-09-2012 04:04, David Miller wrote:
>
> You cannot put such monster sized local data objects on the stack:
>
> drivers/net/ethernet/chelsio/cxgb4/t4_hw.c: In function ‘t4_memory_rw.constprop.6’:
> drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:484:1: warning: the frame size of 2056 bytes is larger than 2048 bytes [-Wframe-larger-than=]
>
> That's because of this thing:
>
> __be32 data[MEMWIN0_APERTURE/sizeof(__be32)];
>
> I'm really surprised this didn't show up in any of your test builds.
> Or are you ignoring warnings that your changes add?
>
Thanks for pointing this out. We will send a patch for this soon.
I am not ignoring any warnings. I did build my tree different way as
shown below but did not get above warning message.
#> make
#> make allmodconfig
#> make allnoconfig
Please let me know how else would I get above warning message?
I missed doing make checkstack which doesn't display warning message but
lists the function names.
Thanks,
Vipul Pandya
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: You have to fix this
2012-09-28 11:59 ` Vipul Pandya
@ 2012-09-28 17:43 ` David Miller
2012-10-03 10:12 ` Vipul Pandya
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2012-09-28 17:43 UTC (permalink / raw)
To: vipul; +Cc: netdev
From: Vipul Pandya <vipul@chelsio.com>
Date: Fri, 28 Sep 2012 17:29:22 +0530
> Please let me know how else would I get above warning message?
Maybe your compiler is too old. Does -Wframe-larger-than= show up in your
build logs with "make V=1"?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: You have to fix this
2012-09-28 17:43 ` David Miller
@ 2012-10-03 10:12 ` Vipul Pandya
2012-10-03 21:17 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Vipul Pandya @ 2012-10-03 10:12 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org
On 28-09-2012 23:13, David Miller wrote:
> From: Vipul Pandya <vipul@chelsio.com>
> Date: Fri, 28 Sep 2012 17:29:22 +0530
>
>> Please let me know how else would I get above warning message?
>
> Maybe your compiler is too old. Does -Wframe-larger-than= show up in your
> build logs with "make V=1"?
>
I am using gcc version 4.4.4 20100726. Yes -Wframe-larger-than=2048 does
show up in my build logs as shown below:
===
gcc -Wp,-MD,arch/x86/kernel/.hw_breakpoint.o.d -nostdinc -isystem
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/include
-I/root/git_kernel_tree/net-next/arch/x86/include
-Iarch/x86/include/generated -Iinclude -include
/root/git_kernel_tree/net-next/include/linux/kconfig.h -D__KERNEL__
-Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone
-mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1
-DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -pipe
-Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048
-fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer
-Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
-fconserve-stack -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(hw_breakpoint)"
-D"KBUILD_MODNAME=KBUILD_STR(hw_breakpoint)" -c -o
arch/x86/kernel/hw_breakpoint.o arch/x86/kernel/hw_breakpoint.c
===
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: You have to fix this
2012-10-03 10:12 ` Vipul Pandya
@ 2012-10-03 21:17 ` Randy Dunlap
0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2012-10-03 21:17 UTC (permalink / raw)
To: Vipul Pandya; +Cc: David Miller, netdev@vger.kernel.org
On 10/03/2012 03:12 AM, Vipul Pandya wrote:
>
>
> On 28-09-2012 23:13, David Miller wrote:
>> From: Vipul Pandya <vipul@chelsio.com>
>> Date: Fri, 28 Sep 2012 17:29:22 +0530
>>
>>> Please let me know how else would I get above warning message?
>>
>> Maybe your compiler is too old. Does -Wframe-larger-than= show up in your
>> build logs with "make V=1"?
>>
>
> I am using gcc version 4.4.4 20100726. Yes -Wframe-larger-than=2048 does
> show up in my build logs as shown below:
> ===
> gcc -Wp,-MD,arch/x86/kernel/.hw_breakpoint.o.d -nostdinc -isystem
> /usr/lib/gcc/x86_64-redhat-linux/4.4.4/include
> -I/root/git_kernel_tree/net-next/arch/x86/include
> -Iarch/x86/include/generated -Iinclude -include
> /root/git_kernel_tree/net-next/include/linux/kconfig.h -D__KERNEL__
> -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
> -fno-common -Werror-implicit-function-declaration -Wno-format-security
> -fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone
> -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args
> -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1
> -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -pipe
> -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
> -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048
> -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer
> -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
> -fconserve-stack -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s"
> -D"KBUILD_BASENAME=KBUILD_STR(hw_breakpoint)"
> -D"KBUILD_MODNAME=KBUILD_STR(hw_breakpoint)" -c -o
> arch/x86/kernel/hw_breakpoint.o arch/x86/kernel/hw_breakpoint.c
> ===
Regardless, you could just go ahead and fix it and use
scripts/checkstack.pl (or make checkstack) to check it for stack
usage as well as test the binary code to make sure that it works OK.
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-03 21:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27 22:34 You have to fix this David Miller
2012-09-28 11:59 ` Vipul Pandya
2012-09-28 17:43 ` David Miller
2012-10-03 10:12 ` Vipul Pandya
2012-10-03 21:17 ` Randy Dunlap
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).