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: <20250623104043.GA2260@wp.pl>
Date: Mon, 23 Jun 2025 12:40:43 +0200
From: Stanislaw Gruszka <stf_xl@...pl>
To: Arnd Bergmann <arnd@...nel.org>
Cc: 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>,
	Johannes Berg <johannes.berg@...el.com>,
	linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
	llvm@...ts.linux.dev
Subject: Re: [PATCH] wifi: iwlegacy: work around excessive stack usage on
 clang/kasan

On Fri, Jun 20, 2025 at 01:39:42PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> In some rare randconfig builds, I seem to trigger a bug in clang where
> it unrolls a loop but then runs out of registers, which then get
> spilled to the stack:
> 
> net/wireless/intel/iwlegacy/4965-rs.c:2262:1: error: stack frame size (1696) exceeds limit (1280) in 'il4965_rs_rate_init' [-Werror,-Wframe-larger-than]
> 
> This seems to be the same one I saw in the omapdrm driver, and there is
> an easy workaround by not inlining the il4965_rs_rate_scale_clear_win
> function.
> 
> Link: https://github.com/llvm/llvm-project/issues/143908
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Acked-by: Stanislaw Gruszka <stf_xl@...pl>

> ---
>  drivers/net/wireless/intel/iwlegacy/4965-rs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlegacy/4965-rs.c b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
> index 0e5130d1fccd..031d88bf6393 100644
> --- a/drivers/net/wireless/intel/iwlegacy/4965-rs.c
> +++ b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
> @@ -203,7 +203,8 @@ il4965_rs_extract_rate(u32 rate_n_flags)
>  	return (u8) (rate_n_flags & 0xFF);
>  }
>  
> -static void
> +/* noinline works around https://github.com/llvm/llvm-project/issues/143908 */
> +static noinline_for_stack void
>  il4965_rs_rate_scale_clear_win(struct il_rate_scale_data *win)
>  {
>  	win->data = 0;
> -- 
> 2.39.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ