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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aee90be9-4816-592e-632b-21cbea4bb3dd@nerdbynature.de>
Date: Thu, 30 Oct 2025 18:13:33 +0100 (CET)
From: Christian Kujau <lists@...dbynature.de>
To: David Laight <david.laight.linux@...il.com>
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, David Laight wrote:
> 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?

No that I know of. I've attached the config to my initial posting.

> 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.

Cool, that helped! Leaving mas_wr_bnode() as it was, and only changed:

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 39bb779cb311..949fd2a0554b 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -2746,7 +2746,7 @@ static void mas_spanning_rebalance(struct ma_state *mas,
  * Rebalance two nodes into a single node or two new nodes that are sufficient.
  * Continue upwards until tree is sufficient.
  */
-static inline void mas_rebalance(struct ma_state *mas,
+static noinline void mas_rebalance(struct ma_state *mas,
 				struct maple_big_node *b_node)
 {
 	char empty_count = mas_mt_height(mas);
@@ -2967,7 +2967,7 @@ static inline bool mas_push_data(struct ma_state *mas,
  * @mas: The maple state
  * @b_node: The maple big node
  */
-static void mas_split(struct ma_state *mas, struct maple_big_node *b_node)
+static noinline void mas_split(struct ma_state *mas, struct maple_big_node *b_node)
 {
 	struct maple_subtree_state mast;
 	int height = 0;

> 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.

I'll leave that for someone else to fix :-)

Thanks,
Christian.
-- 
BOFH excuse #135:

You put the disk in upside down.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ