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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251030165137.56eb618f@pumpkin>
Date: Thu, 30 Oct 2025 16:51:37 +0000
From: David Laight <david.laight.linux@...il.com>
To: Christian Kujau <lists@...dbynature.de>
Cc: linux-kernel@...r.kernel.org, "Liam R. Howlett"
 <Liam.Howlett@...cle.com>, Arnd Bergmann <arnd@...db.de>
Subject: Re: maple_tree.c:3738:1: error: the frame size of 1040 bytes is
 larger than 1024 bytes

On Thu, 30 Oct 2025 15:48:30 +0100 (CET)
Christian Kujau <lists@...dbynature.de> wrote:

> On Thu, 30 Oct 2025, David Laight wrote:
> > Does marking mas_wr_bnode() 'noinline' help?
> > Some functions are marked noinline for KASAN builds, the comment suggests
> > mas_wr_bnode() is one of them - but it isn't marked at all.  
> 
> Yes, I've seen that too. But adding noinline or noinline_for_kasan did not 
> help, compilation stopped with the same erro^W warning.

I've just looked at the disassembly of mas_wr_bnode() of a build where it
doesn't fail.
It is horrendous - best part of 4k code, the stack frame is 0x408.
Which means I must be building with a larger stack frame limit.
Is one of your debug options reducing it?

OTOH it looks as though the actual place to force a stack frame 'break' is to
stop mas_rebalance() and mas_split() being inlined into mas_commit_b_node().
(Probably instead of all the current noinline_for_kasan.)
Both those functions are large and don't have many parameters.

Oh, and the WARN_ON_ONCE() in there is all wrong.
A WARN_ON_ONCE(type != wr_split_store) after the call to mas_rebalance()
might make sense.

	David

> 
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index 39bb779cb311..90ec87d4d49d 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -3727,7 +3727,7 @@ static inline void mas_wr_append(struct ma_wr_state 
> *wr_mas,
>   *
>   * This is where split, rebalance end up.
>   */
> -static void mas_wr_bnode(struct ma_wr_state *wr_mas)
> +static noinline_for_kasan void mas_wr_bnode(struct ma_wr_state *wr_mas)
>  {
>         struct maple_big_node b_node;
>  
> 
> Thanks,
> Christian.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ