From: Eric Biggers <ebiggers@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
linux-f2fs-devel@lists.sourceforge.net, kbuild-all@lists.01.org,
kernel test robot <lkp@intel.com>,
clang-built-linux <clang-built-linux@googlegroups.com>
Subject: Re: [f2fs-dev] [f2fs:dev-test 48/48] fs/f2fs/super.c:3303:12: warning: stack frame size of 2064 bytes in function 'f2fs_fill_super'
Date: Fri, 5 Jun 2020 13:33:40 -0700 [thread overview]
Message-ID: <20200605203340.GM1373@sol.localdomain> (raw)
In-Reply-To: <CAKwvOdm_EfEuhb8QVNzbFhVnTN+q5tkDkWPxOpC+rfzOVxpWVg@mail.gmail.com>
On Fri, Jun 05, 2020 at 01:02:54PM -0700, Nick Desaulniers wrote:
> Right, so my script would have printed out the list of all local
> variables in f2fs_fill_super() and their sizes. With that information
> handy, we could assess if there were any smoking guns of clearly
> incorrect large stack allocations vs death by a thousand cuts. Your
> change may not have added a new large local allocation, simply tipped
> the scale or changed inlining decisions. They may be other local
> variables in this call chain that we should reassess allocation
> strategy; ie. dynamic or static rather than local, to avoid the
> potential for exhausting kernel stack.
For comparison, I also tried building for x86_64 (with gcc 10.1.0) and running
your script. But it crashed:
f2fs_fill_super:
8 struct f2fs_sb_info* sbi
8 struct f2fs_super_block* raw_super
8 struct inode* root
4 int err
Unsupported type info for bool, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'bool', raw_value=2068, offset=691)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=695)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=30, raw_value=30, offset=696)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=17, raw_value=17, offset=697)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=702, raw_value=702, offset=698)
0 None skip_recovery
Unsupported type info for bool, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'bool', raw_value=2068, offset=691)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=695)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=30, raw_value=30, offset=696)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=17, raw_value=17, offset=697)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=702, raw_value=702, offset=698)
0 None need_fsck
8 char* options
4 int recovery
4 int i
4 int valid_super_block
8 struct curseg_info* seg_i
4 int retry_cnt
0 struct lock_class_key __key
0 struct lock_class_key __key
0 struct lock_class_key __key
0 struct lock_class_key __key
0 struct lock_class_key __key
4 int n
4 int j
0 struct lock_class_key __key
0 struct lock_class_key __key
array_size:
Unsupported type info for size_t, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'size_t', raw_value=1942, offset=746)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=750)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=55, raw_value=55, offset=751)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=26, raw_value=26, offset=752)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=441, raw_value=441, offset=753)
0 None bytes
Unsupported type info for size_t, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'size_t', raw_value=1942, offset=746)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=750)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=55, raw_value=55, offset=751)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=26, raw_value=26, offset=752)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=441, raw_value=441, offset=753)
0 None __a
Unsupported type info for size_t, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'size_t', raw_value=1942, offset=746)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=750)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=55, raw_value=55, offset=751)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=26, raw_value=26, offset=752)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=441, raw_value=441, offset=753)
0 None __b
Unsupported type info for size_t, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'size_t', raw_value=1942, offset=746)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=750)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=55, raw_value=55, offset=751)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=26, raw_value=26, offset=752)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=441, raw_value=441, offset=753)
Traceback (most recent call last):
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 147, in <module>
parse_file(elffile.get_dwarf_info(), sys.argv[2])
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 129, in parse_file
parse_file(dwarf_info, get_name(ti))
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 125, in parse_file
print_var(dwarf_info, DIE)
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 111, in print_var
type_string = get_type_string(dwarf_info, type_info)
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 85, in get_type_string
return get_type_string(dwarf_info, pointed_to_type) + '*'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: [f2fs-dev] [f2fs:dev-test 48/48] fs/f2fs/super.c:3303:12: warning: stack frame size of 2064 bytes in function 'f2fs_fill_super'
Date: Fri, 05 Jun 2020 13:33:40 -0700 [thread overview]
Message-ID: <20200605203340.GM1373@sol.localdomain> (raw)
In-Reply-To: <CAKwvOdm_EfEuhb8QVNzbFhVnTN+q5tkDkWPxOpC+rfzOVxpWVg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6687 bytes --]
On Fri, Jun 05, 2020 at 01:02:54PM -0700, Nick Desaulniers wrote:
> Right, so my script would have printed out the list of all local
> variables in f2fs_fill_super() and their sizes. With that information
> handy, we could assess if there were any smoking guns of clearly
> incorrect large stack allocations vs death by a thousand cuts. Your
> change may not have added a new large local allocation, simply tipped
> the scale or changed inlining decisions. They may be other local
> variables in this call chain that we should reassess allocation
> strategy; ie. dynamic or static rather than local, to avoid the
> potential for exhausting kernel stack.
For comparison, I also tried building for x86_64 (with gcc 10.1.0) and running
your script. But it crashed:
f2fs_fill_super:
8 struct f2fs_sb_info* sbi
8 struct f2fs_super_block* raw_super
8 struct inode* root
4 int err
Unsupported type info for bool, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'bool', raw_value=2068, offset=691)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=695)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=30, raw_value=30, offset=696)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=17, raw_value=17, offset=697)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=702, raw_value=702, offset=698)
0 None skip_recovery
Unsupported type info for bool, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'bool', raw_value=2068, offset=691)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=695)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=30, raw_value=30, offset=696)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=17, raw_value=17, offset=697)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=702, raw_value=702, offset=698)
0 None need_fsck
8 char* options
4 int recovery
4 int i
4 int valid_super_block
8 struct curseg_info* seg_i
4 int retry_cnt
0 struct lock_class_key __key
0 struct lock_class_key __key
0 struct lock_class_key __key
0 struct lock_class_key __key
0 struct lock_class_key __key
4 int n
4 int j
0 struct lock_class_key __key
0 struct lock_class_key __key
array_size:
Unsupported type info for size_t, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'size_t', raw_value=1942, offset=746)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=750)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=55, raw_value=55, offset=751)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=26, raw_value=26, offset=752)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=441, raw_value=441, offset=753)
0 None bytes
Unsupported type info for size_t, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'size_t', raw_value=1942, offset=746)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=750)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=55, raw_value=55, offset=751)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=26, raw_value=26, offset=752)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=441, raw_value=441, offset=753)
0 None __a
Unsupported type info for size_t, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'size_t', raw_value=1942, offset=746)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=750)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=55, raw_value=55, offset=751)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=26, raw_value=26, offset=752)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=441, raw_value=441, offset=753)
0 None __b
Unsupported type info for size_t, implement me!
DIE DW_TAG_typedef, size=12, has_children=False
|DW_AT_name : AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'size_t', raw_value=1942, offset=746)
|DW_AT_decl_file : AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=36, raw_value=36, offset=750)
|DW_AT_decl_line : AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=55, raw_value=55, offset=751)
|DW_AT_decl_column : AttributeValue(name='DW_AT_decl_column', form='DW_FORM_data1', value=26, raw_value=26, offset=752)
|DW_AT_type : AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=441, raw_value=441, offset=753)
Traceback (most recent call last):
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 147, in <module>
parse_file(elffile.get_dwarf_info(), sys.argv[2])
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 129, in parse_file
parse_file(dwarf_info, get_name(ti))
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 125, in parse_file
print_var(dwarf_info, DIE)
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 111, in print_var
type_string = get_type_string(dwarf_info, type_info)
File "/home/e/src/frame-larger-than/frame_larger_than.py", line 85, in get_type_string
return get_type_string(dwarf_info, pointed_to_type) + '*'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
next prev parent reply other threads:[~2020-06-05 20:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-05 9:15 [f2fs:dev-test 48/48] fs/f2fs/super.c:3303:12: warning: stack frame size of 2064 bytes in function 'f2fs_fill_super' kernel test robot
2020-06-05 14:55 ` [f2fs-dev] " Jaegeuk Kim
2020-06-05 14:55 ` Jaegeuk Kim
2020-06-05 16:08 ` [f2fs-dev] " Eric Biggers
2020-06-05 16:08 ` Eric Biggers
2020-06-05 16:45 ` Nick Desaulniers via Linux-f2fs-devel
2020-06-05 16:45 ` Nick Desaulniers
2020-06-05 19:33 ` Eric Biggers
2020-06-05 19:33 ` Eric Biggers
2020-06-05 19:42 ` Nick Desaulniers via Linux-f2fs-devel
2020-06-05 19:42 ` Nick Desaulniers
2020-06-05 19:57 ` Eric Biggers
2020-06-05 19:57 ` Eric Biggers
2020-06-05 20:02 ` Nick Desaulniers via Linux-f2fs-devel
2020-06-05 20:02 ` Nick Desaulniers
2020-06-05 20:33 ` Eric Biggers [this message]
2020-06-05 20:33 ` Eric Biggers
2020-06-05 21:28 ` Nick Desaulniers via Linux-f2fs-devel
2020-06-05 21:28 ` Nick Desaulniers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200605203340.GM1373@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=jaegeuk@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=lkp@intel.com \
--cc=ndesaulniers@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.