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] [day] [month] [year] [list]
Message-ID: <c898e879-26e6-4701-9baa-f9d2444e3137@intel.com>
Date: Fri, 20 Jun 2025 16:09:34 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Arnd Bergmann <arnd@...nel.org>
CC: Manish Chopra <manishc@...vell.com>, Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Nathan
 Chancellor" <nathan@...nel.org>, Arnd Bergmann <arnd@...db.de>, "Nick
 Desaulniers" <nick.desaulniers+lkml@...il.com>, Bill Wendling
	<morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<llvm@...ts.linux.dev>
Subject: Re: [PATCH] net: qed: reduce stack usage for TLV processing

From: Arnd Bergmann <arnd@...nel.org>
Date: Fri, 20 Jun 2025 15:09:53 +0200

> From: Arnd Bergmann <arnd@...db.de>
> 
> clang gets a bit confused by the code in the qed_mfw_process_tlv_req and
> ends up spilling registers to the stack hundreds of times. When sanitizers
> are enabled, this can end up blowing the stack warning limit:
> 
> drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c:1244:5: error: stack frame size (1824) exceeds limit (1280) in 'qed_mfw_process_tlv_req' [-Werror,-Wframe-larger-than]
> 
> Apparently the problem is the complexity of qed_mfw_update_tlvs()
> after inlining, and marking the four main branches of that function
> as noinline_for_stack makes this problem completely go away, the stack
> usage goes down to 100 bytes.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Reviewed-by: Alexander Lobakin <aleksander.lobakin@...el.com>

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ