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: <87bjz0fjwa.fsf@kernel.org>
Date: Thu, 31 Oct 2024 16:04:53 +0200
From: Kalle Valo <kvalo@...nel.org>
To: Jeff Johnson <quic_jjohnson@...cinc.com>
Cc: <ath12k-devel-internal@....qualcomm.com>,  Jeff Johnson
 <jjohnson@...nel.org>,  Nathan Chancellor <nathan@...nel.org>,  Nick
 Desaulniers <ndesaulniers@...gle.com>,  Bill Wendling <morbo@...gle.com>,
  Justin Stitt <justinstitt@...gle.com>,  Arnd Bergmann <arnd@...nel.org>,
  <linux-wireless@...r.kernel.org>,  <ath12k@...ts.infradead.org>,
  <linux-kernel@...r.kernel.org>,  <llvm@...ts.linux.dev>
Subject: Re: [PATCH] wifi: ath12k: mark QMI driver event helpers as noinline

Jeff Johnson <quic_jjohnson@...cinc.com> writes:

> As described in [1], compiling the ath12k driver using clang with
> KASAN enabled warns about some functions with excessive stack usage,
> with the worst case being:
>
> drivers/net/wireless/ath/ath12k/qmi.c:3546:13: warning: stack frame size (2456) exceeds limit (1024) in 'ath12k_qmi_driver_event_work' [-Wframe-larger-than]
>
> Nathan [2] highlighted work done by Arnd [3] to address similar
> issues in other portions of the kernel.
>
> ath12k_qmi_driver_event_work() itself is a pretty lightweight
> function, but it dispatches to several other functions which do the
> real work:
> ath12k_qmi_driver_event_work()
> 	ath12k_qmi_event_server_arrive()
> 		ath12k_qmi_host_cap_send()
> 	ath12k_qmi_event_mem_request()
> 		ath12k_qmi_respond_fw_mem_request()
> 	ath12k_qmi_event_load_bdf()
> 		ath12k_qmi_request_target_cap()
> 		ath12k_qmi_load_bdf_qmi()
> 		ath12k_qmi_wlanfw_m3_info_send()
>
> Mark all of those underlying functions as 'noinline_for_stack' to
> prevent them from being inlined in ath12k_qmi_driver_event_work(),
> thereby eliminating the excessive stack usage.
>
> Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@quicinc.com # [1]
> Link: https://msgid.link/20241025223321.GA3647469@thelio-3990X # [2]
> Link: https://lore.kernel.org/all/?q=f:arnd@kernel.org+Wframe-larger-than # [3]
> Signed-off-by: Jeff Johnson <quic_jjohnson@...cinc.com>

Acked-by: Kalle Valo <kvalo@...nel.org>

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ