* drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power'
@ 2020-10-25 18:15 kernel test robot
2020-10-25 19:17 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2020-10-25 18:15 UTC (permalink / raw)
To: Andrey Konovalov
Cc: kbuild-all, clang-built-linux, linux-kernel, Andrew Morton,
Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 3120 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d76913908102044f14381df865bb74df17a538cb
commit: cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4 kasan: allow enabling stack tagging for tag-based mode
date: 3 months ago
config: arm64-randconfig-r005-20201026 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1c8371692dfe8245bc6690ff1262dcced4649d21)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power' [-Wframe-larger-than=]
static int ltv350qv_power(struct ltv350qv *lcd, int power)
^
1 warning generated.
vim +/ltv350qv_power +192 drivers/video/backlight/ltv350qv.c
18f65c793a5106 Haavard Skinnemoen 2007-09-02 191
18f65c793a5106 Haavard Skinnemoen 2007-09-02 @192 static int ltv350qv_power(struct ltv350qv *lcd, int power)
18f65c793a5106 Haavard Skinnemoen 2007-09-02 193 {
18f65c793a5106 Haavard Skinnemoen 2007-09-02 194 int ret = 0;
18f65c793a5106 Haavard Skinnemoen 2007-09-02 195
18f65c793a5106 Haavard Skinnemoen 2007-09-02 196 if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->power))
18f65c793a5106 Haavard Skinnemoen 2007-09-02 197 ret = ltv350qv_power_on(lcd);
18f65c793a5106 Haavard Skinnemoen 2007-09-02 198 else if (!POWER_IS_ON(power) && POWER_IS_ON(lcd->power))
18f65c793a5106 Haavard Skinnemoen 2007-09-02 199 ret = ltv350qv_power_off(lcd);
18f65c793a5106 Haavard Skinnemoen 2007-09-02 200
18f65c793a5106 Haavard Skinnemoen 2007-09-02 201 if (!ret)
18f65c793a5106 Haavard Skinnemoen 2007-09-02 202 lcd->power = power;
18f65c793a5106 Haavard Skinnemoen 2007-09-02 203
18f65c793a5106 Haavard Skinnemoen 2007-09-02 204 return ret;
18f65c793a5106 Haavard Skinnemoen 2007-09-02 205 }
18f65c793a5106 Haavard Skinnemoen 2007-09-02 206
:::::: The code at line 192 was first introduced by commit
:::::: 18f65c793a5106b9f99822ef248e71582db03386 backlight: Add Samsung LTV350QV LCD driver
:::::: TO: Haavard Skinnemoen <hskinnemoen@atmel.com>
:::::: CC: Richard Purdie <rpurdie@rpsys.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34821 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power'
2020-10-25 18:15 drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power' kernel test robot
@ 2020-10-25 19:17 ` Andrew Morton
2020-10-25 19:23 ` Joe Perches
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Andrew Morton @ 2020-10-25 19:17 UTC (permalink / raw)
To: kernel test robot
Cc: Andrey Konovalov, kbuild-all, clang-built-linux, linux-kernel,
Linux Memory Management List
On Mon, 26 Oct 2020 02:15:37 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: d76913908102044f14381df865bb74df17a538cb
> commit: cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4 kasan: allow enabling stack tagging for tag-based mode
> date: 3 months ago
> config: arm64-randconfig-r005-20201026 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1c8371692dfe8245bc6690ff1262dcced4649d21)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install arm64 cross compiling tool for clang build
> # apt-get install binutils-aarch64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power' [-Wframe-larger-than=]
That's a lot of stack.
> static int ltv350qv_power(struct ltv350qv *lcd, int power)
> ^
> 1 warning generated.
>
> vim +/ltv350qv_power +192 drivers/video/backlight/ltv350qv.c
Odd - the code looks pretty normal. It is possible that your compiler
is (crazily) inlining ltv350qv_write_reg()?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power'
2020-10-25 19:17 ` Andrew Morton
@ 2020-10-25 19:23 ` Joe Perches
2020-10-28 15:46 ` Daniel Thompson
2020-10-29 15:28 ` Andrey Konovalov
2 siblings, 0 replies; 6+ messages in thread
From: Joe Perches @ 2020-10-25 19:23 UTC (permalink / raw)
To: Andrew Morton, kernel test robot
Cc: Andrey Konovalov, kbuild-all, clang-built-linux, linux-kernel,
Linux Memory Management List
On Sun, 2020-10-25 at 12:17 -0700, Andrew Morton wrote:
> On Mon, 26 Oct 2020 02:15:37 +0800 kernel test robot <lkp@intel.com> wrote:
> > vim +/ltv350qv_power +192 drivers/video/backlight/ltv350qv.c
>
> Odd - the code looks pretty normal. It is possible that your compiler
> is (crazily) inlining ltv350qv_write_reg()?
There's a lot of stack used when gcc's compiler options include
-fsanitize=object-size
This option enables instrumentation of memory references using
the "__builtin_object_size" function. Various out of bounds
pointer accesses are detected.
Perhaps this config enables it?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power'
2020-10-25 19:17 ` Andrew Morton
2020-10-25 19:23 ` Joe Perches
@ 2020-10-28 15:46 ` Daniel Thompson
2020-10-29 15:28 ` Andrey Konovalov
2 siblings, 0 replies; 6+ messages in thread
From: Daniel Thompson @ 2020-10-28 15:46 UTC (permalink / raw)
To: Andrew Morton
Cc: kernel test robot, Andrey Konovalov, kbuild-all,
clang-built-linux, linux-kernel, Linux Memory Management List
On Sun, Oct 25, 2020 at 12:17:08PM -0700, Andrew Morton wrote:
> On Mon, 26 Oct 2020 02:15:37 +0800 kernel test robot <lkp@intel.com> wrote:
>
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: d76913908102044f14381df865bb74df17a538cb
> > commit: cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4 kasan: allow enabling stack tagging for tag-based mode
> > date: 3 months ago
> > config: arm64-randconfig-r005-20201026 (attached as .config)
> > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1c8371692dfe8245bc6690ff1262dcced4649d21)
> > reproduce (this is a W=1 build):
> > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > # install arm64 cross compiling tool for clang build
> > # apt-get install binutils-aarch64-linux-gnu
> > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
> > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > git fetch --no-tags linus master
> > git checkout cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power' [-Wframe-larger-than=]
>
> That's a lot of stack.
>
> > static int ltv350qv_power(struct ltv350qv *lcd, int power)
> > ^
> > 1 warning generated.
> >
> > vim +/ltv350qv_power +192 drivers/video/backlight/ltv350qv.c
>
> Odd - the code looks pretty normal. It is possible that your compiler
> is (crazily) inlining ltv350qv_write_reg()?
Certainly could be.
Same config compiled with gcc-9 gives ltv350qv_write_reg() a stack usage
that is large but not crazy: 768 bytes and dropping to 480 bytes with
the sanitizers disabled. With the sanitizers enabled then even the
cumulative stack usage of ltv350qv_power() through to ltv350qv_write_reg() is
still less than 1k.
Daniel.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power'
2020-10-25 19:17 ` Andrew Morton
2020-10-25 19:23 ` Joe Perches
2020-10-28 15:46 ` Daniel Thompson
@ 2020-10-29 15:28 ` Andrey Konovalov
2020-10-30 13:28 ` [kbuild-all] " Chen, Rong A
2 siblings, 1 reply; 6+ messages in thread
From: Andrey Konovalov @ 2020-10-29 15:28 UTC (permalink / raw)
To: Andrew Morton, kernel test robot
Cc: kbuild-all, clang-built-linux, LKML,
Linux Memory Management List, Arnd Bergmann
On Sun, Oct 25, 2020 at 8:17 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Mon, 26 Oct 2020 02:15:37 +0800 kernel test robot <lkp@intel.com> wrote:
>
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: d76913908102044f14381df865bb74df17a538cb
> > commit: cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4 kasan: allow enabling stack tagging for tag-based mode
> > date: 3 months ago
> > config: arm64-randconfig-r005-20201026 (attached as .config)
> > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1c8371692dfe8245bc6690ff1262dcced4649d21)
> > reproduce (this is a W=1 build):
> > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > # install arm64 cross compiling tool for clang build
> > # apt-get install binutils-aarch64-linux-gnu
> > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
> > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > git fetch --no-tags linus master
> > git checkout cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power' [-Wframe-larger-than=]
>
> That's a lot of stack.
>
> > static int ltv350qv_power(struct ltv350qv *lcd, int power)
> > ^
> > 1 warning generated.
> >
> > vim +/ltv350qv_power +192 drivers/video/backlight/ltv350qv.c
>
> Odd - the code looks pretty normal. It is possible that your compiler
> is (crazily) inlining ltv350qv_write_reg()?
This is the same issue in LLVM that was reported by Arnd for generic
KASAN (also see KASAN_STACK_ENABLE option description). By default
KASAN shouldn't have stack instrumentation enabled unless
KASAN_STACK_ENABLE is specified. Perhaps it makes sense to disable it
for KASAN_SW_TAGS config on the kernel test robot.
[1] https://bugs.llvm.org/show_bug.cgi?id=38809
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kbuild-all] Re: drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power'
2020-10-29 15:28 ` Andrey Konovalov
@ 2020-10-30 13:28 ` Chen, Rong A
0 siblings, 0 replies; 6+ messages in thread
From: Chen, Rong A @ 2020-10-30 13:28 UTC (permalink / raw)
To: Andrey Konovalov, Andrew Morton, kernel test robot
Cc: kbuild-all, clang-built-linux, LKML,
Linux Memory Management List, Arnd Bergmann
On 10/29/2020 11:28 PM, Andrey Konovalov wrote:
> On Sun, Oct 25, 2020 at 8:17 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>>
>> On Mon, 26 Oct 2020 02:15:37 +0800 kernel test robot <lkp@intel.com> wrote:
>>
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head: d76913908102044f14381df865bb74df17a538cb
>>> commit: cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4 kasan: allow enabling stack tagging for tag-based mode
>>> date: 3 months ago
>>> config: arm64-randconfig-r005-20201026 (attached as .config)
>>> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1c8371692dfe8245bc6690ff1262dcced4649d21)
>>> reproduce (this is a W=1 build):
>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>> chmod +x ~/bin/make.cross
>>> # install arm64 cross compiling tool for clang build
>>> # apt-get install binutils-aarch64-linux-gnu
>>> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>> git fetch --no-tags linus master
>>> git checkout cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4
>>> # save the attached .config to linux build tree
>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All warnings (new ones prefixed by >>):
>>>
>>>>> drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power' [-Wframe-larger-than=]
>>
>> That's a lot of stack.
>>
>>> static int ltv350qv_power(struct ltv350qv *lcd, int power)
>>> ^
>>> 1 warning generated.
>>>
>>> vim +/ltv350qv_power +192 drivers/video/backlight/ltv350qv.c
>>
>> Odd - the code looks pretty normal. It is possible that your compiler
>> is (crazily) inlining ltv350qv_write_reg()?
>
> This is the same issue in LLVM that was reported by Arnd for generic
> KASAN (also see KASAN_STACK_ENABLE option description). By default
> KASAN shouldn't have stack instrumentation enabled unless
> KASAN_STACK_ENABLE is specified. Perhaps it makes sense to disable it
> for KASAN_SW_TAGS config on the kernel test robot.
Hi Andrey,
Thanks for your advice, we'll take a look.
Best Regards,
Rong Chen
>
> [1] https://bugs.llvm.org/show_bug.cgi?id=38809
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-30 13:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-25 18:15 drivers/video/backlight/ltv350qv.c:192:12: warning: stack frame size of 13472 bytes in function 'ltv350qv_power' kernel test robot
2020-10-25 19:17 ` Andrew Morton
2020-10-25 19:23 ` Joe Perches
2020-10-28 15:46 ` Daniel Thompson
2020-10-29 15:28 ` Andrey Konovalov
2020-10-30 13:28 ` [kbuild-all] " Chen, Rong A
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).