[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87plmox27o.fsf@kernel.org>
Date: Thu, 21 Nov 2024 13:20:43 +0200
From: Kalle Valo <kvalo@...nel.org>
To: Jeff Johnson <quic_jjohnson@...cinc.com>
Cc: 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>,
<ath11k@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<llvm@...ts.linux.dev>
Subject: Re: [PATCH 3/3] wifi: ath11k: mark
ath11k_wow_convert_8023_to_80211() as noinline
Jeff Johnson <quic_jjohnson@...cinc.com> writes:
> When compiling the ath11k driver using clang with KASAN enabled, the
> following warning is observed:
>
> drivers/net/wireless/ath/ath11k/wow.c:672:5: warning: stack frame size (1336) exceeds limit (1024) in 'ath11k_wow_op_suspend' [-Wframe-larger-than]
>
> This is similar to the issue found in ath12k/qmi.c that was discussed
> in [1] and fixed with [2]. The issue is that clang inlining can
> explode stack usage.
>
> ath11k_wow_op_suspend() itself is a pretty lightweight function, but
> it dispatches to several other functions which do the real work. One
> path in particular is:
>
> ath11k_wow_op_suspend()
> ath11k_wow_set_wakeups()
> ath11k_vif_wow_set_wakeups()
> ath11k_wow_convert_8023_to_80211()
>
> Of these, ath11k_wow_convert_8023_to_80211() has non-trivial stack
> usage, so mark it as 'noinline_for_stack' to prevent it from being
> inlined in ath11k_wow_op_suspend(), thereby eliminating the excessive
> stack usage.
>
> Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@quicinc.com # [1]
> Link: https://patch.msgid.link/20241028-ath12k_qmi_driver_event_work-v1-1-0d532eb593fa@quicinc.com # [2]
> 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