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-next>] [day] [month] [year] [list]
Message-Id: <20240405142823.615609-1-arnd@kernel.org>
Date: Fri,  5 Apr 2024 16:27:43 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Andi Shyti <andi.shyti@...nel.org>,
	Wim Van Sebroeck <wim@...ux-watchdog.org>,
	Guenter Roeck <linux@...ck-us.net>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: Arnd Bergmann <arnd@...db.de>,
	Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
	Geert Uytterhoeven <geert+renesas@...der.be>,
	Jean Delvare <jdelvare@...e.de>,
	linux-i2c@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-watchdog@...r.kernel.org
Subject: [PATCH] i2c: i801: add I2C_MUX dependency

From: Arnd Bergmann <arnd@...db.de>

When I2C_MUX is a loadable module but I2C_I801 is built-in, the newly
added notifier function causes a link error:

x86_64-linux-ld: drivers/i2c/busses/i2c-i801.o: in function `i801_notifier_call':
i2c-i801.c:(.text+0x1f5): undefined reference to `i2c_root_adapter'

This code is only built if I2C_MUX_GPIO is also enabled, so add a
conditional dependency that allows building the driver as before if the
GPIO part is disabled, but otherwise require the linker dependency at
Kconfig level.

With the added dependency, the driver cannot be selected by a builtin
ITCO_WDT driver when I2C_MUX_GPIO is a loadable module, so remove
the 'select' statement in that driver as well. This was apparently
never needed at compile-time, and the watchdog driver just needs either
the LPC or the I2C drivers, but never both.

Configurations that rely on the implied 'select' from the watchdog
driver now need to enable all three.

Fixes: 71b494e043d2 ("i2c: i801: Call i2c_register_spd for muxed child segments")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/i2c/busses/Kconfig | 1 +
 drivers/watchdog/Kconfig   | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 1872f1995c77..2619018dd756 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -108,6 +108,7 @@ config I2C_HIX5HD2
 config I2C_I801
 	tristate "Intel 82801 (ICH/PCH)"
 	depends on PCI
+	depends on I2C_MUX || I2C_MUX_GPIO=n
 	select P2SB if X86
 	select CHECK_SIGNATURE if X86 && DMI
 	select I2C_SMBUS
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 0b0df3fe1efd..4dfb3773e6e2 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1301,8 +1301,6 @@ config ITCO_WDT
 	select WATCHDOG_CORE
 	depends on I2C || I2C=n
 	depends on MFD_INTEL_PMC_BXT || !MFD_INTEL_PMC_BXT
-	select LPC_ICH if !EXPERT
-	select I2C_I801 if !EXPERT && I2C
 	help
 	  Hardware driver for the intel TCO timer based watchdog devices.
 	  These drivers are included in the Intel 82801 I/O Controller
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ