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: <61e3292b-c98d-4ac9-9ddc-165835b4583d@RTEXMBS04.realtek.com.tw>
Date: Mon, 16 Jun 2025 11:50:20 +0800
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Arnd Bergmann <arnd@...nel.org>, Ping-Ke Shih <pkshih@...ltek.com>,
        "Nathan Chancellor" <nathan@...nel.org>
CC: Arnd Bergmann <arnd@...db.de>,
        Nick Desaulniers
	<nick.desaulniers+lkml@...il.com>,
        Bill Wendling <morbo@...gle.com>,
        "Justin
 Stitt" <justinstitt@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Ingo
 Molnar" <mingo@...nel.org>,
        Colin Ian King <colin.i.king@...il.com>,
        <linux-wireless@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <llvm@...ts.linux.dev>
Subject: Re: [PATCH] wifi: rtlwifi: avoid stack size warning for _read_eeprom_info

Arnd Bergmann <arnd@...nel.org> wrote:

> From: Arnd Bergmann <arnd@...db.de>
> 
> txpower_info_{2g,5g} are too big to fit on the stack, but in most of the
> rtlwifi variants this stays below the warning limit for stack frames.
> In rtl8192ee and a few others, I see a case where clang decides to fully
> inline this into rtl92ee_read_eeprom_info, triggering this warning:
> 
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c:2178:6: error: stack frame size (1312) exceeds limit (1280) in 'rtl92ee_read_eeprom_info' [-Werror,-Wframe-larger-than]
> 
> Mark _rtl92ee_read_txpower_info_from_hwpg() as noinline_for_stack to
> and mark _rtl92ee_get_chnl_group() as __always_inline to make clang
> behave the same way as gcc. Inlining _rtl92ee_get_chnl_group helps
> let the compiler see that the index is always in range. The same
> change appears to be necessary in all rtlwifi variants.
> 
> A more thorough approach would be to avoid the use of the two structures
> on the stack entirely and combine them with the struct rtl_efuse
> data that is dynamically allocated and holds the same information.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

2baacfe83346 wifi: rtlwifi: avoid stack size warning for _read_eeprom_info

---
https://github.com/pkshih/rtw.git


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ