linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: lib/maple_tree.c:4056:1: error: the frame size of 1144 bytes is larger than 1024 bytes
       [not found] <60cee319-4914-4a98-b74d-32e06fb3cbd8@prosemail.net>
@ 2025-01-30 16:13 ` Liam R. Howlett
       [not found]   ` <8415a24a-a19e-46f6-bb56-dfd529143dd9@prosemail.net>
  0 siblings, 1 reply; 4+ messages in thread
From: Liam R. Howlett @ 2025-01-30 16:13 UTC (permalink / raw)
  To: Scall; +Cc: Andrew Morton, maple-tree, linux-mm, linux-kernel, Wei Yang

* Scall <scall@prosemail.net> [250130 10:53]:
> Trying to build Linux 6.12.11 with GCC 14.2.1 and KCFLAGS="-O3":

Thanks.  I received a report of a frame size issue directly (not over
email) from someone else.

Do you have KASAN or lock debugging on?


> 
> [...]
> lib/maple_tree.c: In function 'mas_wr_bnode':
> lib/maple_tree.c:4056:1: error: the frame size of 1144 bytes is larger than
> 1024 bytes [-Werror=frame-larger-than=]
>   4056 | }
>        | ^
> [...]

Does the issue go away when reverting 8c7904a8cd0df ("maple_tree: i is
always less than or equal to mas_end") ?

Thanks,
Liam



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: lib/maple_tree.c:4056:1: error: the frame size of 1144 bytes is larger than 1024 bytes
       [not found]   ` <8415a24a-a19e-46f6-bb56-dfd529143dd9@prosemail.net>
@ 2025-01-31 12:28     ` Wei Yang
  2025-01-31 13:37     ` Wei Yang
  1 sibling, 0 replies; 4+ messages in thread
From: Wei Yang @ 2025-01-31 12:28 UTC (permalink / raw)
  To: Scall
  Cc: Liam R. Howlett, Andrew Morton, maple-tree, linux-mm,
	linux-kernel, Wei Yang

Hi, Scall

On Thu, Jan 30, 2025 at 11:31:50PM +0100, Scall wrote:
>On 1/30/25 5:13 PM, Liam R. Howlett wrote:
>> Do you have KASAN or lock debugging on?
>
>No, I don't.
>
>> Does the issue go away when reverting 8c7904a8cd0df ("maple_tree: i is
>> always less than or equal to mas_end") ?
>
>That commit has not been backported to the kernel version I tried to build
>(6.12.11, currently the latest stable version).

Is there a public git tree to get the code you do build?

>
>Good news: I learned that the issue has already been solved in the mainline
>version with commit 5059aa6334fcf ("maple_tree: memset maple_big_node as a
>whole") and backporting it is the solution.

Or, is it possible to list the last several commits of file lib/maple_tree.c
so that I can reproduce it on my side.

I guess maybe I can try to reproduce this with:

   * set CONFIG_FRAM_WARN to 1024
   * set KCFLAGS="-O3"

I would try to take a look first.

Is the GCC version matters? I don't have the exact version at hand. Have you
tried other version?

-- 
Wei Yang
Help you, Help me


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: lib/maple_tree.c:4056:1: error: the frame size of 1144 bytes is larger than 1024 bytes
       [not found]   ` <8415a24a-a19e-46f6-bb56-dfd529143dd9@prosemail.net>
  2025-01-31 12:28     ` Wei Yang
@ 2025-01-31 13:37     ` Wei Yang
  2025-01-31 15:08       ` Liam R. Howlett
  1 sibling, 1 reply; 4+ messages in thread
From: Wei Yang @ 2025-01-31 13:37 UTC (permalink / raw)
  To: Scall
  Cc: Liam R. Howlett, Andrew Morton, maple-tree, linux-mm,
	linux-kernel, Wei Yang

On Thu, Jan 30, 2025 at 11:31:50PM +0100, Scall wrote:
>On 1/30/25 5:13 PM, Liam R. Howlett wrote:
>> Do you have KASAN or lock debugging on?
>
>No, I don't.
>
>> Does the issue go away when reverting 8c7904a8cd0df ("maple_tree: i is
>> always less than or equal to mas_end") ?
>
>That commit has not been backported to the kernel version I tried to build
>(6.12.11, currently the latest stable version).
>
>Good news: I learned that the issue has already been solved in the mainline
>version with commit 5059aa6334fcf ("maple_tree: memset maple_big_node as a
>whole") and backporting it is the solution.

Hmm... I tried to reproduce this and found different gcc version may behave
differently. An old version doesn't report warning while a later version does.

With GCC 8.2.1, the latest master looks good. Even I use -O3.

    7004a2e46d16 2025-01-22 Merge tag 'linux_kselftest-nolibc-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

But with GCC 11.4.0(I don't have the exact version as yours), the latest
master still get a warning. But the message is a little bit different from
yours:

  lib/maple_tree.c: In function ‘mas_wr_spanning_store’:
  lib/maple_tree.c:3804:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
   3804 | }
        | ^
  lib/maple_tree.c: In function ‘mas_wr_bnode’:
  lib/maple_tree.c:4065:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
   4065 | }
        | ^

Then I tried to bisect it. And found similar warning even at the first maple
tree commit 54a611b60590 ("Maple Tree: add new data structure"). Below is the
warning message:

  lib/maple_tree.c: In function ‘mas_wr_spanning_store.isra’:
  lib/maple_tree.c:4047:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
   4047 | }
        | ^
  lib/maple_tree.c: In function ‘mas_wr_bnode’:
  lib/maple_tree.c:4325:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
   4325 | }
        | ^

Hi, Liam

Do you have some suggestion on what I can do to help?

-- 
Wei Yang
Help you, Help me


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: lib/maple_tree.c:4056:1: error: the frame size of 1144 bytes is larger than 1024 bytes
  2025-01-31 13:37     ` Wei Yang
@ 2025-01-31 15:08       ` Liam R. Howlett
  0 siblings, 0 replies; 4+ messages in thread
From: Liam R. Howlett @ 2025-01-31 15:08 UTC (permalink / raw)
  To: Wei Yang; +Cc: Scall, Andrew Morton, maple-tree, linux-mm, linux-kernel

* Wei Yang <richard.weiyang@gmail.com> [250131 08:37]:
> On Thu, Jan 30, 2025 at 11:31:50PM +0100, Scall wrote:
> >On 1/30/25 5:13 PM, Liam R. Howlett wrote:
> >> Do you have KASAN or lock debugging on?
> >
> >No, I don't.
> >
> >> Does the issue go away when reverting 8c7904a8cd0df ("maple_tree: i is
> >> always less than or equal to mas_end") ?
> >
> >That commit has not been backported to the kernel version I tried to build
> >(6.12.11, currently the latest stable version).
> >
> >Good news: I learned that the issue has already been solved in the mainline
> >version with commit 5059aa6334fcf ("maple_tree: memset maple_big_node as a
> >whole") and backporting it is the solution.
> 
> Hmm... I tried to reproduce this and found different gcc version may behave
> differently. An old version doesn't report warning while a later version does.
> 
> With GCC 8.2.1, the latest master looks good. Even I use -O3.
> 
>     7004a2e46d16 2025-01-22 Merge tag 'linux_kselftest-nolibc-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
> 
> But with GCC 11.4.0(I don't have the exact version as yours), the latest
> master still get a warning. But the message is a little bit different from
> yours:
> 
>   lib/maple_tree.c: In function ‘mas_wr_spanning_store’:
>   lib/maple_tree.c:3804:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>    3804 | }
>         | ^
>   lib/maple_tree.c: In function ‘mas_wr_bnode’:
>   lib/maple_tree.c:4065:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>    4065 | }
>         | ^
> 
> Then I tried to bisect it. And found similar warning even at the first maple
> tree commit 54a611b60590 ("Maple Tree: add new data structure"). Below is the
> warning message:
> 
>   lib/maple_tree.c: In function ‘mas_wr_spanning_store.isra’:
>   lib/maple_tree.c:4047:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>    4047 | }
>         | ^
>   lib/maple_tree.c: In function ‘mas_wr_bnode’:
>   lib/maple_tree.c:4325:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>    4325 | }
>         | ^
> 
> Hi, Liam
> 
> Do you have some suggestion on what I can do to help?

No, this isn't worth chasing down.

The proper fix is to remove the big node, but that's really involved and
I'm working on it.

Thanks,
Liam



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-31 15:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <60cee319-4914-4a98-b74d-32e06fb3cbd8@prosemail.net>
2025-01-30 16:13 ` lib/maple_tree.c:4056:1: error: the frame size of 1144 bytes is larger than 1024 bytes Liam R. Howlett
     [not found]   ` <8415a24a-a19e-46f6-bb56-dfd529143dd9@prosemail.net>
2025-01-31 12:28     ` Wei Yang
2025-01-31 13:37     ` Wei Yang
2025-01-31 15:08       ` Liam R. Howlett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox