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: <d7b656f2e44833f17cb4d15dc7fd985db8c9b485.camel@sipsolutions.net>
Date: Fri, 23 May 2025 14:14:09 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Arnd Bergmann <arnd@...nel.org>, Miri Korenblit	
 <miriam.rachel.korenblit@...el.com>, Avraham Stern
 <avraham.stern@...el.com>,  Yedidya Benshimol
 <yedidya.ben.shimol@...el.com>, Benjamin Berg <benjamin.berg@...el.com>
Cc: Arnd Bergmann <arnd@...db.de>, Daniel Gabay <daniel.gabay@...el.com>, 
 Anjaneyulu <pagadala.yesu.anjaneyulu@...el.com>,
 linux-wireless@...r.kernel.org, 	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wifi: iwlwifi: fix iwlmld-test link failure

On Fri, 2025-05-23 at 14:10 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> If the driver is built-in but the test is in a loadable module, the symbols
> are not exported, resulting in a link failure:
> 
> ERROR: modpost: "iwl_get_cmd_string" [drivers/net/wireless/intel/iwlwifi/mld/tests/iwlmld-tests.ko] undefined!
> ERROR: modpost: "__iwl_dbg" [drivers/net/wireless/intel/iwlwifi/mld/tests/iwlmld-tests.ko] undefined!
> 
> Enable CONFIG_IWLWIFI_OPMODE_MODULAR in this configuration, to
> make those symbols visible.

Hah, thanks. We were just debating exactly this fix, but I think if
CONFIG_INET is _also_ turned off, we still have another link issue, so
what we have now is actually the below (maybe the Fixes: is wrong then
though)



commit 800fe085168e073910d8a0b758df0399d3c38323
Author: Benjamin Berg <benjamin.berg@...el.com>
Date:   Mon May 12 14:04:33 2025 +0200

    [BUGFIX] wifi: iwlwifi: ensure iwl_average_neg_dbm is available for kunit
    
    The function was not compiled if CONFIG_INET was not enabled. Change it
    to always be compiled in. Also update the IWLWIFI_OPMODE_MODULAR check
    so that the symbol is exported even if only the kunit tests are build
    as a module.
    
    Change-Id: I02014d338de26768533cd07225780563393b4591
    Signed-off-by: Benjamin Berg <benjamin.berg@...el.com>
    Reported-by: kernel test robot <lkp@...el.com>
    Closes: https://lore.kernel.org/oe-kbuild-all/202505120905.ceWoI4rO-lkp@intel.com/
    Fixes: 1f52f7f0abe2 ("wifi: iwlwifi: move dBm averaging function into utils")
    Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@...el.com>

diff --git a/drivers/net/wireless/intel/iwlwifi/Kconfig b/drivers/net/wireless/intel/iwlwifi/Kconfig
index b2fb1dee59c0..e4a3fe2eaf57 100644
--- a/drivers/net/wireless/intel/iwlwifi/Kconfig
+++ b/drivers/net/wireless/intel/iwlwifi/Kconfig
@@ -105,6 +105,7 @@ config IWLWIFI_OPMODE_MODULAR
 	default y if IWLMVM=m
 	default y if IWLXVT=m
 	default y if IWLMLD=m
+	default y if IWLWIFI_KUNIT_TESTS=m
 
 comment "WARNING: iwlwifi is useless without IWLDVM or IWLMVM or IWLMLD"
 	depends on IWLDVM=n && IWLMVM=n && IWLMLD=n
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-utils.c b/drivers/net/wireless/intel/iwlwifi/iwl-utils.c
index 9edb8f512058..0049a8ca60f3 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-utils.c
@@ -82,6 +82,7 @@ int iwl_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes,
 	return 0;
 }
 IWL_EXPORT_SYMBOL(iwl_tx_tso_segment);
+#endif /* CONFIG_INET */
 
 static u32 iwl_div_by_db(u32 value, u8 db)
 {
@@ -193,5 +194,3 @@ s8 iwl_average_neg_dbm(const u8 *neg_dbm_values, u8 len)
 	return clamp(average_magnitude - i, -128, 0);
 }
 IWL_EXPORT_SYMBOL(iwl_average_neg_dbm);
-
-#endif /* CONFIG_INET */


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ